Agentforce
The platform for building and running AI agents: hybrid reasoning with Agent Script, subagents and actions, grounding with Data 360, Prompt Builder, models and the Trust Layer, security, channels, MCP and A2A interoperability, testing, observability, DevOps and pricing.
Start here: what Agentforce is
Plain-language orientation before the detail.
In one sentence
Agentforce is Salesforce's platform for building, grounding, securing, testing and running AI agents: agents that understand a request, reason about what to do, take actions in Salesforce and other systems, and hand over to people when judgement is needed.
Interview one-liner: "A chatbot follows a script; an agent pursues a goal. Agentforce agents combine LLM reasoning with deterministic Agent Script logic, use actions built from Flow, Apex, prompts and APIs, are grounded in CRM and Data 360, and run inside the trust layer with testing and observability around them."
A note on names. The product moves fast. Topics are now called subagents. The Einstein Trust Layer is now the Agentforce Trust Layer, and Einstein Studio is now AI Models. The new Agentforce Builder with Agent Script has been generally available since February 2026; the older Setup-based builder is now called legacy. Agentforce Studio groups building, testing and observability. Dreamforce 2026 (September) added items that were still in pilot or beta when this guide was written: long-horizon agents, AI Skills, Agent Optimizer and the Koa reasoning model. Check status before you promise them β verify.
An analogy: a new team member
| New hire | Agentforce |
|---|---|
| Job description | Agent role and description |
| Areas of responsibility | Subagents (formerly topics) |
| Standard operating procedures | Instructions and Agent Script logic |
| Systems they're allowed to use | Actions (Flow, Apex, prompt templates, APIs, MCP tools) |
| The customer file and the handbook | Grounding: records, data graphs, knowledge and RAG |
| Security badge and access rights | Agent user, permissions, verification |
| Compliance officer watching over them | Trust Layer: masking, toxicity checks, audit, zero data retention |
| Probation reviews | Testing Center |
| Performance reviews | Observability and optimisation |
| Manager to escalate to | Hand-off to humans via Omni-Channel |
If you remember one thing: an agent is only as good as its scope, its actions and its context. Design these three before writing any instructions.
Same idea, explained to four audiences
| Audience | Say it like this |
|---|---|
| Executive | "Agents handle routine work end to end around the clock, people handle the exceptions, and we can see and control what every agent does." |
| Business owner | "We pick a process, define what the agent may do and when it must hand over, test it with real conversations, and improve it from production data." |
| Developer | "Agent Script for deterministic flow, subagents with focused instructions, invocable Apex and Flow actions with clear input and output descriptions, data graphs and retrievers for grounding, CLI-based deployment and automated tests." |
| CTA review board | "Use-case selection by value and risk; hybrid reasoning for control; least-privilege agent identity; grounding through Data 360 with access controls; an interoperability strategy using MCP and A2A governed centrally; testing, observability and consumption baked into ALM." |
How an agent turn works
Building blocks at a glance
| Area | Pieces |
|---|---|
| Build | Agentforce Builder (Canvas and Script views), Agent Script, subagents, instructions, variables, actions, Prompt Builder |
| Ground | Record data, data graphs, Knowledge, Data 360 retrievers, Agentforce Data Library |
| Models and trust | Salesforce-enabled models, bring your own LLM, Trust Layer (grounding, masking, toxicity detection, audit, zero data retention) |
| Channels | Messaging for web and app, Experience Cloud sites, Slack, voice, Lightning (Coworker), Agent API, Flow and Apex invocation |
| Interoperability | MCP client and server, A2A, AgentExchange, Agent Fabric |
| Lifecycle | Testing Center, Observability, CLI and metadata deployment, sandboxes |
| Commercials | Flex Credits, conversations, per-user licences, Digital Wallet |
Prebuilt agents
Salesforce ships prebuilt agents and templates for service, sales (SDR, coaching), commerce, marketing, field service and industries. At Dreamforce 2026 it announced seven named "job-ready" agents (for example Hunter for outbound prospecting) and Agentforce Coworker inside Lightning β verify availability. The Sales Cloud and Service Cloud sections of this guide cover their domain agents. This section covers the platform you use to build, extend and run any agent.
When agents are a good fit (and when they aren't)
Good fit
- High-volume, repeatable requests with clear policies (order status, appointment changes, password resets, FAQs with actions).
- Work that needs understanding of natural language plus actions in systems.
- Processes where hand-off to a person is easy and defined.
Poor fit (or not yet)
- Decisions the law or policy reserves for people.
- Processes without reliable data or APIs.
- Low-volume, high-variance expert work where errors are costly.
- Anything you can't test or observe.
How to learn this cloud
- Foundations: fundamentals, choosing use cases, hybrid reasoning and Agent Script (concepts 1β3).
- Designing agents: subagents and instructions, actions, grounding, Prompt Builder (4β7).
- Trust: models and the Trust Layer, security and permissions (8β9).
- Reach and scale: channels, interoperability, multi-agent and long-horizon work (10β12).
- Run it well: testing, observability, DevOps, pricing and consumption (13β16).
- Read the case studies, then practise the questions.
Interview tip: Always describe what the agent may not do and how you know it's working. Guardrails, testing and observability are what separate production agents from demos.
Concept map
How the building blocks fit together. Select a concept to open it.
Foundations3
Designing agents4
Trust2
Reach and scale3
Run it well4
Concepts
Grouped by theme.
Foundations
What an agent is, how it differs from chatbots and automation, the parts of an Agentforce agent (role, subagents, instructions, actions, variables, channels), agent types, Agentforce Studio, and current naming.
How to pick agent use cases by volume, value, risk and readiness, defining scope and hand-off, estimating ROI including consumption costs, and running a pilot to production path.
Why pure LLM reasoning isn't enough for enterprise processes, how Agent Script mixes deterministic logic with LLM steps, Canvas and Script views in the new Agentforce Builder, the reasoning engine, and when to use deterministic vs generative control.
Designing agents
Scoping subagents so the right one is selected, writing scope descriptions and instructions, using variables, avoiding overlap, guardrails and refusal behaviour, and why context engineering replaces prompt engineering.
Standard and custom actions, building actions with Flow and invocable Apex, prompt template actions, external API and MuleSoft actions, MCP tools, writing good input and output descriptions, confirmation and idempotency, and running-user context.
How agents get the facts they need: record and merge-field grounding, Data 360 data graphs, Knowledge and RAG with retrievers and the Agentforce Data Library, variables, and managing context size, freshness and access.
Prompt template types, grounding templates with merge fields, flows, Apex, data graphs and retrievers, choosing models, using templates in Lightning, Flow, Apex and agents, versioning and testing prompts.
Trust
Salesforce-enabled models and bring-your-own LLMs, choosing models per task, the Agentforce Trust Layer (secure retrieval, grounding, masking, toxicity detection, audit trail, zero data retention), and what the trust layer does not do for you.
Which user an agent runs as, least-privilege permission sets for agent users, guest vs authenticated channels, customer verification before account actions, preventing prompt injection and data leakage, and governance tools such as Guardian.
Reach and scale
Deploying agents to messaging for web and mobile, Experience Cloud sites, Slack, voice, the Lightning interface (Agentforce Coworker) and headless use through the Agent API, Flow and Apex, with human hand-off via Omni-Channel.
Connecting agents to external tools with the MCP client, exposing Salesforce to other AI hosts, agent-to-agent collaboration with A2A, AgentExchange, and governing a multi-vendor agent estate with Agent Fabric.
When to split work across several agents, orchestrator and specialist patterns, hand-offs between agents, long-horizon agents that pursue goals over days or weeks, reusable AI Skills, and the governance these need.
Run it well
Building test sets for subagent selection, actions and answers, conversation-level testing with personas, custom evaluations, regression testing in pipelines, adversarial and safety tests, and acceptance criteria for go-live.
Session traces and reasoning visibility, quality and context-based scoring with editable and custom LLM-as-judge metrics, citations, analytics and health monitoring, Agent Optimizer, voice observability, and KPIs that measure real outcomes.
Treating agents as code: Agent Script and related metadata in source control, agent versions and activation, sandboxes and data dependencies, Salesforce CLI agent commands for generation, deployment and tests, and release practices for agents.
Agentforce buying models (Flex Credits per action, per-conversation pricing, per-user licences and editions), how actions, prompts and voice consume credits, Data 360 costs on top, the Digital Wallet, and designing for predictable cost.
Implementations
End-to-end case studies, each in a different industry.
A retailer deploys one service agent to web chat, the mobile app and phone for order status, delivery changes and returns, with verification, Data 360 context, carrier integrations, human hand-off, automated tests and cost optimisation.
A wealth manager gives advisers an employee agent in Lightning and Slack for meeting preparation, portfolio summaries, compliant follow-up drafts and task creation, grounded in CRM and Data 360 and constrained by compliance rules.
A software company uses an SDR-style agent to answer inbound leads by email and web chat, qualify them against criteria, book meetings, and follow up over weeks, with guardrails on claims and consent.
A professional services firm runs an employee helpdesk agent in Slack that resolves IT requests through an IT service management MCP server, answers HR policy questions with retrieval, delegates payroll questions to the payroll vendor's agent via A2A, and governs everything centrally.
An insurer's voice agent takes first notice of loss for motor claims, verifies the policyholder, captures incident details, creates the claim, arranges towing and repairs through partners, and hands complex or distressed callers to adjusters.