Agent Script Example: Customer Support
This agent helps customers get information about their order. It contains three subagents:
- The
agent_routersubagent, which provides general instructions to the LLM and exposes two tools that the LLM can choose to call. The two tools are utilities that transition to the required subagents, based on user input. - The
Identitysubagent, which verifies the user's identity. This subagent allows the LLM to request the user's email (if it doesn't exist), then sends a verification code to the provided email. Then, the LLM can validate the verification code that the customer provides. This subagent contains deterministic tools and actions, while allowing the LLM freedom to use natural language to interact with the user. - The
order_managementsubagent, which allows the user to look up order details.
- Each agent needs a unique
developer_name. If you make multiple agents from one example script, change the developer name each time. - If you encounter an unexpected error in Agentforce Builder with the last line of your script, add a blank line or a comment to the end.