Agentforce reference architecture

How Agentforce agents, Agent Script, the Atlas Reasoning Engine, the Einstein Trust Layer, Data 360 grounding, actions, MCP tools and human handoff fit together.

Banner for the GeekMidst reference architecture “Agentforce reference architecture”, covering Business context and Agentforce reference architecture

Agentforce is Salesforce's platform for building, testing, deploying and governing AI agents for employees and customers. An agent is only as useful as the data it is grounded in and the actions it can take, and only as safe as the controls around those actions. This page sets out a reference architecture for an Agentforce deployment, with feature status as Salesforce states it.

This is a reference design. We validate licences, permissions, data access and feature status for each implementation, and GeekMidst can design and implement it through Agentforce and AI automation.

Business context

Common starting points are service agents that answer and resolve cases with a route to a person, employee assistants in Lightning and Slack, and sales agents for inbound pipeline. Salesforce offers prebuilt agents, for example Casey (help and service) and Piper (inbound pipeline), both GA, and Hunter (outbound sales), in pilot with GA announced for November 2026. Pricing models include Flex Credits, Resolutions and per-user licensing, so cost depends on how the agent is used.

Agentforce reference architecture

Reference architecture: a reusable pattern, not a live client integration

Your Salesforce orgExternal tool providersCHANNELSAGENTSTRUST, POLICY AND HANDOFFGROUNDING AND ACTIONSSYSTEMSMONITORING AND TESTINGLightning and CoworkeremployeesSelf-service and webExperience CloudSlackAgentforce in SlackVoiceAgentforce VoiceAgentforce agentsbuilt in Agentforce BuilderAgent Scriptinstructions, actions, escalateAtlas Reasoning EnginereasoningEinstein Trust Layermasking, toxicity, auditAgentforce GatewayMCP usage policiesUser permissionsCRUD, FLS, sharingHuman agentsqueues and teamsData 360 groundingAgent Context EngineFlow actionsdeclarativeApex actionsinvocable methodsMCP toolsMCP client: betaSalesforce recordsSales and Service CloudExternal MCP serversregistered and allowlistedObservability and testinghealth, scorers, testsemployee requestscustomer messagesSlack messagesspeechinstructionsreasoning stepsLLM callsaction requestsMCP tool callsgroundingrun Flowrun Apexallowlisted toolsrecord updatescomplex updatesremote tool callsescalateoutcomes
  • Salesforce product
  • Data and analytics
  • AI and agents
  • Integration layer
  • Identity, policy and governance
  • Channel or touchpoint
  • External or custom system
  • People
  • Your Salesforce org
  • External tool providers
  • Dashed: asynchronous, optional or feedback
Diagram source (Mermaid)

Select a component to see what it is responsible for and how data moves to and from it.

Reference architecture. Licences, permissions, grounding data and feature status are confirmed per implementation. Agentforce MCP support is beta; GA is not confirmed.
Components and data flows (text version)
ComponentTypeResponsibility
Lightning and CoworkeremployeesChannel or touchpointAgentforce Coworker (GA) in Lightning calls your deployed agents for employees.
Self-service and webExperience CloudChannel or touchpointCustomer-facing agents in portals and web chat.
SlackAgentforce in SlackChannel or touchpointAgents used inside Slack channels and messages.
VoiceAgentforce VoiceChannel or touchpointSpoken conversations through Agentforce Voice and Agentforce Contact Center.
Agentforce agentsbuilt in Agentforce BuilderAI and agentsAgents built, tested and monitored in Agentforce Studio. New agents are created only in the new builder from July 2026.
Agent Scriptinstructions, actions, escalateAI and agentsMixes deterministic logic with LLM reasoning, including else if, system variables and escalate.
Atlas Reasoning EnginereasoningAI and agentsSalesforce's reasoning engine for Agentforce, which chooses the next step within the limits set by the agent's instructions.
Einstein Trust Layermasking, toxicity, auditIdentity, policy and governanceGrounding, data masking, toxicity detection, audit trail and zero data retention with LLM providers.
Agentforce GatewayMCP usage policiesIdentity, policy and governanceSets MCP usage policies per agent and tool, such as call-volume limits, and provides monitoring.
User permissionsCRUD, FLS, sharingIdentity, policy and governanceActions run within Salesforce permissions. Building agents needs the Manage AI Agents permission.
Human agentsqueues and teamsPeoplePeople who take over when the agent escalates, with the conversation context.
Data 360 groundingAgent Context EngineData and analyticsUnified profiles and related data used to ground answers. Agent Memory's status is not stated by Salesforce.
Flow actionsdeclarativeSalesforce productFlows exposed as agent actions for record updates and business processes.
Apex actionsinvocable methodsSalesforce productApex for logic Flow cannot express, with tests and bulk safety.
MCP toolsMCP client: betaIntegration layerAllowlisted tools from registered MCP servers become actions in the Asset Library. Beta since January 2026.
Salesforce recordsSales and Service CloudSalesforce productCases, accounts and opportunities that agents read and update.
External MCP serversregistered and allowlistedExternal or custom systemThird-party or MuleSoft servers registered through the Agentforce Registry or API Catalog.
Observability and testinghealth, scorers, testsIdentity, policy and governanceAgentforce Observability, Agent Health Monitoring (GA), Custom Scorers and Voice and Conversation Testing (beta).

Data flows

  1. Lightning and Coworker → Agentforce agents: employee requests. Requests from Coworker reach the agent with the user's identity.
  2. Self-service and web → Agentforce agents: customer messages. Customer messages reach a service agent; guest access needs a separate permission review.
  3. Slack → Agentforce agents: Slack messages. Messages from Slack reach the agent with the Slack user's mapped identity.
  4. Voice → Agentforce agents: speech. Voice is transcribed for the agent and responses are spoken back.
  5. Agentforce agents → Agent Script: instructions. The agent follows Agent Script; deterministic steps run as written.
  6. Agent Script → Atlas Reasoning Engine: reasoning steps. Atlas chooses which action to take next within the script's limits.
  7. Atlas Reasoning Engine → Einstein Trust Layer: LLM calls. Prompts and responses pass through the Trust Layer for masking, toxicity checks and audit.
  8. Atlas Reasoning Engine → User permissions: action requests. Each action runs within the running user's permissions.
  9. Atlas Reasoning Engine → Agentforce Gateway: MCP tool calls. Calls to MCP tools pass through Agentforce Gateway policies such as call-volume limits.
  10. Einstein Trust Layer → Data 360 grounding: grounding. Relevant data is retrieved and masked before reaching the model.
  11. User permissions → Flow actions: run Flow. Flow actions run declarative logic; errors are returned to the agent.
  12. User permissions → Apex actions: run Apex. Apex actions run with tests and error handling; failures are logged.
  13. Agentforce Gateway → MCP tools: allowlisted tools. Only tools an admin has allowlisted are available.
  14. Flow actions → Salesforce records: record updates. Flows create or update records under the user's permissions.
  15. Apex actions → Salesforce records: complex updates. Apex updates records that need more logic.
  16. MCP tools → External MCP servers: remote tool calls. Authenticated with OAuth client credentials or per-user named and external credentials.
  17. Agent Script → Human agents: escalate. Agent Script's escalate routes the conversation to a human with context.
  18. Salesforce records → Observability and testing: outcomes. Session traces, action results and record outcomes such as resolved cases feed observability and testing.

Component responsibilities

ComponentResponsible forStatus (as Salesforce states it)
Agentforce Builder in Agentforce StudioBuilding, testing and monitoring agentsOnly builder for new agents from the week of 13 July 2026
Agent ScriptHybrid deterministic and LLM logicUpdated in Winter '27
Atlas Reasoning EngineChoosing the next step and actionCurrent component
Einstein Trust LayerMasking, toxicity detection, audit, zero data retentionCurrent; some copy says Agentforce Trust Layer
Multi-Agent OrchestrationAgents handing work to other agentsGA
Flow and Apex actionsBusiness logic and record changesPlatform features
MCP toolsTools from external MCP serversBeta (15 January 2026); GA not confirmed
Agent OptimizerImproving agent performanceGA announced for October 2026

Data flow, step by step

  1. A request arrives from Lightning, a portal, Slack or voice, with the user's identity.
  2. The agent follows Agent Script, running deterministic steps and using Atlas for reasoning.
  3. Model calls pass through the Einstein Trust Layer, which masks data, checks toxicity and keeps an audit trail.
  4. The agent grounds its answer in CRM records and Data 360 data the user is allowed to see.
  5. The agent takes actions through Flow, Apex or allowlisted MCP tools, each within permissions and Gateway policies.
  6. The agent escalates to a person when the script says so.
  7. Outcomes are monitored through observability and testing tools.

Trust boundaries and authentication

The main boundary is your org: agents act within user permissions, CRUD, field-level security and sharing. Customer-facing agents cross the public boundary, so review guest access carefully. MCP tools cross a third boundary to external servers: admins register servers in Setup, allowlist tools, and connect with OAuth client credentials or per-user named and external credentials. Salesforce says the Einstein Trust Layer and zero data retention apply to MCP tool use. Our Agentforce and MCP page covers this in detail.

Failure scenarios and how to handle them

FailureEffectHow to handle it
Agent gives a wrong answerCustomer misledGround in governed data; test with scorers; escalate when unsure
Action failsTask incompleteReturn a clear error and offer a human
Agent over-permissionedData exposureLeast-privilege agent user and permission review
MCP server down or slowTool unavailableTimeouts and a fallback message
Escalation loses contextCustomer repeats themselvesPass the transcript and key fields on escalate

Operational monitoring

Use Agentforce Observability and Agent Health Monitoring for health and errors, and Voice Observability (GA) for voice. Review conversations weekly, measure escalation and resolution rates, and run regression tests before changes. Custom Scorers have a GA API and a beta UI; A/B Experimentation for agents is beta. See agent testing and guardrails.

Alternative approaches and trade-offs

Prebuilt agents start faster but follow Salesforce's design. Custom agents fit your process but need more testing. MCP tools reuse external capabilities but add a dependency and are beta. Flow or Apex actions keep logic in your org and are easier to govern.

Implementation checklist

  1. 01

    Pick one use case

    A narrow, measurable first agent

  2. 02

    Confirm licences

    Flex Credits, Resolutions or per-user licensing, and Data 360 if grounding uses it

  3. 03

    Prepare data

    Clean, permissioned data for grounding

  4. 04

    Design actions

    Flow or Apex first; MCP tools only where needed

  5. 05

    Write Agent Script

    Instructions, deterministic steps and escalate rules

  6. 06

    Test

    Scorers and conversation tests before launch

  7. 07

    Plan handoff

    Queues, context passing and staffing

  8. 08

    Monitor

    Health, escalation rate and errors with an owner

Questions we hear

Is this from a client deployment?
No. It is a reference design that we validate for each implementation.
Can Agentforce call external MCP servers?
Agentforce MCP support entered beta on 15 January 2026. A GA date is not confirmed in official sources, so treat it as beta.
Do agents bypass Salesforce permissions?
Actions run within Salesforce permissions. Design an agent user with only the access it needs.
How do customers reach a person?
Agent Script's escalate routes the conversation to a human. Pass context so the customer does not repeat themselves.

Sources

  • https://www.salesforce.com/agentforce/
  • https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_builder_studio.htm&type=5
  • https://developer.salesforce.com/docs/ai/agentforce/guide/trust.html
  • https://www.salesforce.com/blog/agentforce-mcp/
  • https://trailhead.salesforce.com/content/learn/modules/mcp-for-agentforce-quick-look/discover-mcp-for-agentforce
  • https://www.salesforce.com/news/stories/agentforce-job-ready-ai-agents/

Plan your Agentforce architecture

Tell us the use case you have in mind. We can propose an agent design with grounding, actions, controls and handoff.

Book a consultation →

Tell us what you are trying to fix.

Share your Salesforce setup, goals and constraints. A practitioner reads every message and replies with questions, first thoughts or an honest view of whether you need outside help at all.

Talk to a Salesforce Expert
Book a Consultation