Building and Configuring Agents
Building an agent
In Agent Builder you create an agent, choose a channel, write the persona or role, and add topics. Each topic has a classification description (when to use it), scope (what is in and out), instructions (tone and constraints), and actions. Actions expose typed inputs and outputs; prefer Flow for deterministic business logic, Apex for complex operations, and prompt templates for generation. Variables carry context between turns. Test in conversation preview before activation.
Concepts to know
- Action descriptions and input schemas drive selection and slot filling.
- Instructions are not guardrails; use scope and permissions for hard limits.
- Keep topics narrow and non-overlapping.
- Version and activate deliberately.
Traps
Overloading one topic with many unrelated actions causes misclassification. Vague action descriptions cause the agent to skip or misuse tools. Candidates forget that the agent user needs object, field, and Apex class access. Instructions do not override sharing rules.
Worked example
Build a Case Triage agent: Topic “Case Status” with a Flow action GetCaseStatus(caseId); Topic “Escalate” with an Apex action CreateEscalation; a fallback topic for unknown requests. Rule of thumb: one topic per job-to-be-done and 3–7 well-described actions per topic.