[TDX at Agentforce World Tour London 2025] 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.
Custom Lightning Type Steps to Customise Agent UI Build a Custom LWC for your Apex Build a Custom Lightning Type with Schema 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
default class RestaurantDetail extends LightningElement { @api label; @api rating; … } public class RestaurantService { … public class Restaurant { @InvocableVariable public String label; @InvocableVariable public Integer rating; } … } Apex LWC Use LWC to render Apex Type Fabien Taillon - https://linkedin.com/in/fabientaillon - https://www.texei.com
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 ◦ … • Run as your current user, with its access rights What you need to know But… • Only available in Lightning Experience ◦ Use “Standard Agent Surface” for Experience Cloud/Public Agent It’s cool because… Fabien Taillon - https://linkedin.com/in/fabientaillon - https://www.texei.com