📌 Key Points Covered in This Guide
- The difference between internal Employee Agents and external Service Agents.
- How the Agent Router intelligently hands off conversations to specialized Subagents.
- Why developers must understand the technical divide between Actions and Tools.
- How Grounding and the Data Library connect Large Language Models (LLMs) to your private CRM data securely.
- The role of the Einstein Trust Layer in maintaining data privacy.
🤖 Core Architecture: Agents & Routing
To build effectively on Salesforce's modern AI stack, you must understand the primary actors in the system. An Agent is not just a chatbot; it is software that reads human language, makes independent decisions, and acts on those decisions using your Salesforce data.
- Employee Agent: This agent serves your internal staff. Crucially, it runs under the permissions and context of the logged-in user. If a sales rep asks the agent to summarize an account, the agent can only see what that specific rep has access to.
- Service Agent: This agent serves your external customers (like a customer service bot on a public website). It operates under its own dedicated integration user profile.
Because an agent handles incredibly diverse requests, it cannot process everything at once. It delegates tasks using a specialized routing system:
- Agent Router: When a user sends a message, this component analyzes the intent and picks the single best Subagent to handle it. (Note: Prior to April 2026, the Agent Router was known as the Topic Selector).
- Subagent: A specialist inside a broader agent. For example, you might have one Subagent dedicated entirely to "Order Returns" and another dedicated to "Password Resets." (Note: Prior to April 2026, these were simply called Topics).
🛠️ Capabilities: Actions vs. Tools
How does an agent actually do things in Salesforce? This happens through Actions and Tools. While they sound similar, they represent entirely different architectural patterns.
- Action: Something the agent can execute. There are five main kinds: Flow, Apex, Prompt Templates, Standard API, and MuleSoft APIs.
- Tool: An action that the Large Language Model (LLM) is allowed to choose for itself. When you expose an action as a Tool, you provide a plain-text description so the LLM knows when to trigger it dynamically.
- Agent Script: The underlying configuration language that agents are written and deployed in.
To make a Tool effective, the developer must write clear metadata descriptions. If you write a poor description, the LLM won't know when to use the tool.
// Example of a poor tool description:
"Runs the Order Apex Class."
// Example of a great tool description:
"Use this tool when a customer asks to cancel an order, check shipping status,
or refund a purchase. Requires the Order ID as input."
📚 Knowledge: Grounding and Data Retrieval
Out of the box, LLMs know nothing about your specific company. You have to feed them your private CRM facts. This process is called Grounding.
- Grounding: The technical process of feeding real, verified Salesforce facts into the prompt before sending it to the LLM. This prevents AI hallucinations.
- Prompt Template: A saved, reusable prompt that includes merge fields (like
{!Account.Name}) specifically designed for Grounding. - Data Library: The centralized store of internal documents, PDFs, and knowledge articles that an agent is allowed to search through.
- Chunk: A massive PDF is too big for an LLM to read at once. It gets broken down into small paragraphs, called Chunks, stored in a vector database.
- Retriever: The internal component that searches your Data Library, finds the most relevant Chunks based on the user's question, and returns them to the agent.
🛡️ Governance: Trust & Consumption
Deploying AI at an enterprise scale requires intense auditing and cost tracking. Salesforce manages this securely beneath the surface.
- Einstein Trust Layer: The platform-level security gateway. Before any prompt goes to the LLM, the Trust Layer masks Personally Identifiable Information (PII), checks for toxicity, and ensures zero data retention from the LLM provider.
- Trace: The historical debug record of what actually happened in a single conversation turn. If an agent gives a weird answer, you check the Trace to see exactly which Subagent was chosen and which Tools were triggered.
- Digital Wallet: Where administrators track credit consumption. Every LLM generation costs credits, and the Digital Wallet keeps your budget from spiraling out of control.
Rule: Learn the exact vocabulary before attempting to build complex features. Wrong terminology leads to fundamental misunderstandings of the platform architecture.
Gain: You communicate effectively with current standard methodologies, build scalable AI, and read Salesforce documentation accurately.
Price: Terminology evolves rapidly alongside platform updates (e.g., Topics shifting to Subagents), requiring periodic realignment.
Limits: Legacy user interface screens or old Trailhead modules may still display deprecated terms, requiring you to translate concepts on the fly.
Mirror — learning features first: You can describe what a feature does technically while still misnaming its core platform components, which frustrates team collaboration.
💡 Core Q&A
A: They represent the exact same underlying logic, just viewed from two different operational perspectives.
- Anything placed in the standard actions list executes deterministically because a human programmed the logic to call it.
- Anything exposed in reasoning actions is a Tool. The LLM reads its metadata description and dynamically decides whether to execute it.
- The exact same underlying Apex class or Salesforce Flow can serve as either an Action or a Tool, depending on which configuration list you assign it to.
- That distinction is an architectural design decision regarding who controls step execution: deterministic admin logic or autonomous model reasoning.
A: LLMs try to predict the next best word based on their training data. If you ask an LLM for a customer's return policy, it might invent one that sounds plausible. Grounding interrupts this by pulling the exact text from your Knowledge Base (using a Retriever) and appending it to the prompt. The LLM is then strictly instructed: "Answer the user's question using ONLY the provided text."
A: First, review the Trace log to understand why the Agent Router made its decision. Usually, the issue stems from overlap in the natural language descriptions of your Subagents. Ensure the descriptions defining each Subagent are mutually exclusive and clearly written.
Q1. A customer types five wildly different phrasings of "my power is out". Which layer handles categorizing that?
A1. Routing. Specifically, the Agent Router evaluates all five natural language phrasings and classifies them to a single corresponding Subagent.
Q2. Does Agentforce always require a full Data 360 implementation?
A2. No. Data 360 is primarily required for grounding on unstructured document content (like PDFs via the Data Library). Record, Flow, and Apex grounding require no massive Data 360 setup.
Q3. What was a subagent called before the Spring 2026 architectural update?
A3. A topic. Additionally, the Topic Selector is now correctly termed the Agent Router.
Comments
Questions, corrections and your own experience are all welcome.
Post a Comment