[Portugal Dreamin 2026] Improve Agent interactions with Custom LWCs in Agentforce
Agentforce provides a default and simple UI to interact with it, but some specific use cases may benefit from a dedicated interface. Combine the power of LWC and Agentforce to simplify interaction with your Agents.
& CTO at Texeï Salesforce MVP - Hall of Fame Paris Developer Group leader https://www.salesforce.com/trailblazer/fabien https://www.fabientaillon.com https://www.texei.com /in/fabientaillon/ @FabienTaillon
unpredictable • Not always the best UI • Not always actionable Agentforce Out-of-the-Box Components Great but… Fabien Taillon - https://linkedin.com/in/fabientaillon - https://www.texei.com
Action Input or Output Rendering to you Custom Lightning Type Customizing the Agent UI Build a Custom LWC for your Apex Create a Custom Lightning Type referring to Apex and Editor / renderer referring to the component Custom LWC CLT Test your Action and launch your Agent Action Mapping Test 1 2 3 4 Custom Code Agent Config Fabien Taillon - https://linkedin.com/in/fabientaillon - https://www.texei.com
to be used in Agentforce Specific Target for Input <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>65.0</apiVersion> <isExposed>true</isExposed> <masterLabel>Restaurant Rating</masterLabel> <targets> <target>lightning__AgentforceInput</target> </targets> </LightningComponentBundle> Fabien Taillon - https://linkedin.com/in/fabientaillon - https://www.texei.com
with Lightning Experience • Run as your current user, with its access rights • Very powerful, no limitation in what can be done in this type of LWC ◦ Use of modal, toasts… ◦ Use of Lightning Data Service ◦ Return only record Ids from Apex and use LDS to get data if you need to keep it updated ◦ Use same color theme ◦ … • Automatic mapping between Apex returned values and LWC @api parameters ◦ Custom mapping can be used too • Can be used in Enhanced Chat V2 • More to come (maybe ?): override standard Salesforce types (date, custom object…) Some more things to know Fabien Taillon - https://linkedin.com/in/fabientaillon - https://www.texei.com