Agentforce

Agentforce Architecture Guide — Summer '26

By Rishabh Panwar · 3 min read · Advanced

The first Agentforce project most architects meet arrives disguised as a chatbot request. Someone wants a bot bolted onto an existing flow. That framing is the trap. An agent that reasons about goals and picks its own actions is a different architectural animal from a Flow, and building one as though it were a scripted bot produces something that works in the demo and falls over in production. This guide covers how the pieces actually fit together.

What makes Agentforce different

Traditional Salesforce automation (Flows, Apex triggers, scheduled jobs) follows deterministic logic. Given input A, the automation always produces output B. Every path is explicitly coded or configured.

Agentforce agents are non-deterministic reasoning systems. They interpret natural language input, determine which actions are most appropriate to take to achieve the stated goal, execute those actions, interpret the results, and decide whether to continue or respond. The path from input to output is not fixed. It depends on the LLM’s reasoning at runtime.

That distinction changes how you build and verify. You cannot unit test an agent the way you test a trigger, because the same input can produce a different action sequence on two runs. You cannot enumerate every path the way you would for a decision tree. The uncertainty is inherent to LLM reasoning; the job is to design around it with guardrails and behavioural tests rather than trying to eliminate it.

The architecture components

Agents and Topics

An agent is the top-level AI entity. It has a name, a role description, and a set of Topics. Topics scope the agent’s capability — a Service Agent might have topics for Case Management, Order Status, and Knowledge Search. The agent uses its role description and available topics to determine which topic applies to a given user input.

Actions

Actions are the capabilities an agent can invoke during reasoning. Salesforce provides standard actions — query records, create records, send emails. Custom actions extend this with business-specific logic via Apex or Flow.


// Summer '26: Custom Agent Action in Apex
public class CheckOrderStatusAction {
@InvocableMethod(
label='Check Order Status'
description='Returns the current status and estimated delivery date for a given order number'
)
public static List<OrderStatusResult> checkStatus(
List<OrderStatusRequest> requests
) {
// Query order, call external fulfillment API if needed
// Return structured result the agent uses in its response
}
}

The label and description do real work here. The LLM reads them during reasoning to decide whether this action fits the current step, so a vague description like “handles orders” gets the action skipped or misfired. Write descriptions that state exactly what the action returns and when to use it.

Summer ‘26 architecture updates

Multi-agent orchestration (Beta)

The most architecturally significant Summer ‘26 addition is multi-agent orchestration. A primary agent can delegate specialist tasks to sub-agents, each configured for a specific domain. A Billing Agent handles payment queries. A Technical Agent handles product support. A primary Service Agent routes incoming conversations to the appropriate specialist.

The beta status means implementation details may change. Treat current multi-agent configurations as exploratory rather than production-critical.

Dynamic prompt grounding

Prompt Templates can now reference related records up to 3 levels deep — for example, Contact → Account → Parent Account. This enables richer context in agent responses without requiring custom action code to assemble related record data.

Agent Testing Framework

The Agent Testing Framework allows you to define expected agent behaviour as test cases. Specify a conversation input, the expected topic classification, the expected actions invoked, and the expected response characteristics. The framework evaluates the agent against these expectations automatically.

Architectural principles for Agentforce

Design actions to be atomic and composable. Each action should do one thing well. The agent composes multiple actions to achieve complex goals. An action that does too much reduces the agent’s flexibility.

Make action inputs and outputs explicit. The LLM uses input field labels and descriptions to correctly populate action parameters. Poorly labelled inputs lead to incorrect action invocations.

Use guardrails proactively. Define what the agent should not do as clearly as what it should do. Guardrails are your primary safety mechanism.

Expect and test for edge cases. The non-deterministic nature of LLM reasoning means your agent will encounter inputs you did not anticipate. The Agent Testing Framework helps, but production monitoring is essential.

Test your knowledge — Agentforce

10 questions · Basic to Advanced

0 / 10 correct

Frequently asked questions

What is Agentforce?

Agentforce is Salesforce's AI agent platform that lets you build autonomous AI systems capable of reasoning about goals, selecting actions, and operating within defined guardrails — without following fixed deterministic logic like a Flow or trigger.

What is an Agent Topic in Agentforce?

An Agent Topic is a scoped configuration that defines a domain of work the agent can handle, including its goal, instructions, guardrails, and the specific actions available for that domain. A single agent can have multiple topics.

What are Custom Agent Actions in Agentforce?

Custom Agent Actions are Apex classes or invocable Flows that extend what an Agentforce agent can do beyond the standard platform actions. The action's label and description are critical because the LLM reads them at runtime to decide whether to invoke the action.

What is the Agent Testing Framework in Summer '26?

The Agent Testing Framework is an automated testing harness introduced in Summer '26 that lets you define expected agent behaviour — intent classification, action selection, and response characteristics — and validate the agent against those expectations automatically.

What is multi-agent orchestration in Agentforce and is it production-ready?

Multi-agent orchestration allows a primary Agentforce agent to delegate specialist tasks to sub-agents within the same org. It is in Beta in Summer '26, so it should be treated as exploratory rather than production-critical.

What is the Agentforce DX MCP Server?

The Agentforce DX MCP Server is a Model Context Protocol server that allows MCP-compatible AI development tools — such as Claude or GitHub Copilot — to interact with Salesforce Agentforce APIs for building, testing, and iterating on agent configurations.

How do guardrails work in Agentforce topic configuration?

Guardrails are instructions in a topic that explicitly define what the agent should not do within that domain. They are your primary mechanism for constraining agent behaviour and preventing actions outside the intended scope.