Agentforce isn’t just a chatbot; it’s a reasoning engine that thinks, plans, and acts. This guide breaks down the core architecture—from Agent Roles to the Atlas Reasoning Engine—using a real-world “Returns Agent” example to make the concepts stick.
Index / Table of Contents
- Introduction
- The Core Components Explained
- The Brain: Atlas Reasoning Engine
- Putting It All Together: The “Returns Agent” Scenario
- Conclusion
Introduction
Salesforce’s Agentforce represents a shift from “programmatic” automation (where you define every step, like in a Flow) to “agentic” automation (where you define the goal, and the AI figures out the steps).
To understand how this magic happens, you need to understand the architecture. It’s like hiring a new employee: you give them a Job Title (Role), a Handbook (Topics/Instructions), and Tools (Actions).
Let’s break down each component using a consistent example: a Customer Service Agent handling a product return.
The Core Architecture Explained

1. Agent Role
This is the “persona” of the agent. It defines who the agent is and what its general purpose is. It sets the tone and the high-level boundaries.
- Definition: The job title and description of the AI.
- Example: “You are a helpful Service Agent for ‘Northern Trail Outfitters’. Your job is to assist customers with orders, returns, and product questions in a friendly, professional tone.”

2. Topic
A Topic is a specific category of work the agent can handle. Think of these as “skills” or “departments.” An agent can have multiple topics.
- Definition: A distinct functional area the agent is trained on.
- Example:
Order Management,Product Recommendations,General FAQ. - Scenario: Our agent needs the
Order Managementtopic to handle the return.
3. Topic Classification Description
This is critical. It is the “label” the AI looks at to decide which Topic to choose when a user speaks. If the user says “I hate this shirt, take it back,” the AI checks the Classification Descriptions to find a match.
- Definition: Natural language utterances that trigger the topic.
- Example for ‘Order Management’: “Users asking to return items, check shipping status, cancel orders, or report damaged goods.”
4. Topic Scope
The Scope defines the boundaries of what the agent can (and cannot) do within that Topic. It prevents the agent from hallucinating capabilities it doesn’t have.
- Definition: The guardrails or “rules of engagement” for a topic.
- Example: “This agent can process returns for orders placed in the last 30 days. It cannot process refunds for international shipments or gift cards. It must escalate international issues to a human.”
5. Topic Instruction
These are the detailed, step-by-step guidelines the agent follows after it has entered a Topic. This is where you tell the AI how to behave.
- Definition: Natural language logic that guides the conversation flow.
- Example: “First, ask the user for their Order Number. Once provided, use the ‘Get Order Details’ action. If the order is eligible for return, ask for the reason. If the reason is ‘Damaged’, offer an immediate replacement. If the reason is ‘Don’t like it’, offer store credit.”
6. Types of Action
Actions are the “hands” of the agent. Without actions, the agent can only talk. With actions, it can do things in Salesforce.
There are three main types of actions Agentforce uses:
- Flows (Autolaunched): The most common action. You build a Flow to “Calculate Refund” or “Create Return Order.” The Agent passes inputs (Order ID) to the Flow, and the Flow returns outputs (Success/Fail).
- Apex (Invocable Methods): For complex logic that Flows can’t handle (e.g., complex API integrations, heavy math).
- Prompt Templates: Using Generative AI to draft emails or summaries based on CRM data.
- Example: The agent calls a Flow named
Process_Return_FlowtakingOrderIDandReasonas inputs.
The Brain: Atlas Reasoning Engine
The Atlas Reasoning Engine is the conductor of this orchestra. It is the proprietary system that sits between the User and the LLM (Large Language Model).
When a user sends a message, Atlas does not just guess. It follows a loop:
- Refine (Classification): It looks at the user’s text and compares it against your Topic Classification Descriptions. “Ah, this is an
Order Managementissue.” - Retrieve (RAG): It pulls relevant data (CRM records, Knowledge Articles) to give context.
- Reason (Planning): It looks at the Topic Instructions and Scope. It thinks: “I need to ask for the Order ID before I can run the return action.”
- Act: It executes the correct Action (e.g., triggers the Flow).
- Response: It generates a natural language response to the user based on the Action’s result.
Putting It All Together: The “Returns Agent” Scenario
Imagine a customer chats in: “I want to return my hiking boots.”
- Atlas Engine receives the text.
- It scans Topics and matches it to Topic: Order Management (because the Classification Description says “handle returns”).
- It reads the Topic Scope: “Can only return items within 30 days.”
- It reads the Topic Instruction: “Ask for Order ID first.”
- Agent: “I can help with that. What is your Order ID?”
- Customer: “Order 123.”
- Atlas Engine decides to use an Action. It calls the
Get_Order_StatusFlow. - Action returns: “Order Date: 45 days ago.”
- Atlas Engine checks Scope again. “Wait, scope says 30 days max.”
- Agent: “I see your order is from 45 days ago. Unfortunately, I can only process returns within 30 days. Would you like me to connect you with a human agent?”
Conclusion
Agentforce architecture is designed to be deterministic yet flexible. By clearly defining Roles, Topics, and Instructions, you give the Atlas Reasoning Engine the map it needs to navigate complex customer conversations safely and effectively.
The beauty is that you don’t script every “If/Then” statement. You provide the guidelines, and Atlas figures out the path.
