Building an agent in Agent Builder is iterative. Define the purpose, sketch topics, wire actions, configure grounding, test in the playground, refine descriptions. Most of the value comes from the iteration loop, not the initial build. Plan multiple rounds of testing before considering the agent ready for users.
- Define the agent purpose and scope
Write a clear description of what the agent does and what is out of scope. The scope discipline matters; agents that try to do everything end up doing nothing well.
- Open Agent Builder and create a new agent
Setup > Agent Studio > New Agent. Provide name, description, instructions. Choose the agent type that matches the use case (Service Agent for customer support, Sales Agent for sales workflows, Custom Agent for bespoke purposes).
- Map and create topics
For each major job, create a topic. Write a description that explains exactly when this topic applies. Write instructions that guide the agent''s behavior within the topic. The descriptions are the routing signal for the reasoning engine.
- Add actions to each topic
Click into each topic, click Add Action, pick from Apex methods, Flows, Prompt Templates, API calls, or sub-agents. Configure input parameters and write a description that explains when to invoke the action.
- Configure grounding sources
For topics that need real data to answer accurately, configure grounding rules. Pull from the current record, related records, Knowledge, Data Cloud, or custom queries. Strong grounding stops hallucination.
- Test in the Conversation Playground
Type realistic user inputs covering the main use cases plus edge cases. Watch which topic gets picked, which actions fire, and whether responses are accurate. Iterate on descriptions until routing matches expectation.
- Configure channels and deploy
Add channel deployments: Slack, Experience Cloud, Salesforce Mobile, embedded chat. Each channel has its own configuration. Activate the agent for the chosen channels.
- Monitor and iterate post-launch
Setup > Agent Studio > Usage shows conversation logs and quality signals. Review failed or low-quality conversations and refine the agent definition. Plan ongoing tuning; agents are not "deploy and forget."
Service Agent, Sales Agent, or Custom Agent. Determines starting templates and recommended actions.
Categorical mental model of agent jobs. Topic descriptions drive routing decisions.
Where the agent surfaces: Slack, Experience Cloud, Mobile, embedded chat, API. One agent definition can deploy to many channels.
- Topic and action descriptions drive routing accuracy. Vague descriptions produce inconsistent behavior; specific descriptions produce reliable agents. Plan iteration time accordingly.
- Conversation Playground is essential during design. Skipping iterative testing produces agents that misbehave on real user input. Build the playground into the daily design workflow.
- Grounding is what stops hallucination. Ungrounded agents confidently state facts that are not in your data. Configure grounding for every topic that needs accurate, data-specific answers.
- Action descriptions must be specific. The reasoning engine picks actions based on descriptions; ambiguous descriptions cause the engine to invoke the wrong action or no action.
- Agentforce evolves rapidly. Features available today may be renamed or extended in the next release. Stay current with release notes and Trailhead updates.