An Agentforce solution connects a user or system request to an agent that can retrieve knowledge and invoke permitted actions. Its architecture must define the execution identity, enforce data and action boundaries, and capture evidence of what happened.
This diagram is an independent design reference for a single-agent solution. It shows the decisions to review, rather than every Salesforce service or an exact internal execution sequence. Retrieval and actions can repeat during a conversation.
From a request to a controlled outcome
Illustrative single-agent designUser and channel
Request, authenticated identity, and session context
Establish the runtime identity and permitted data scope. Recheck authorization where data is read or changed.
Agent and reasoning
Subagents, instructions, variables, and the allowed action set
Choose an allowed capability; return its result to the agent
Retrieve knowledge
Data Library → index / retriever → relevant source content
Check source scope and retrieval accessExecute an action
Flow / Apex / API → business validation → permitted operation
Enforce inputs, permissions, and approval gatesRepeat as needed, or stop and hand off
Response or human handoff
Explain the result, disclose only allowed information, and escalate when the request exceeds authority.
The components and their boundaries
1. Channel and execution identity
Establish who is asking and which identity each operation runs under. An employee assistant and a customer-facing service agent can have different access models. Document the Agent User boundary and test authenticated and anonymous paths separately.
2. Reasoning and available capabilities
The agent uses its configured subagents, instructions, and context to select work. Agent Script and deterministic logic can constrain the available paths. A natural-language instruction to avoid an operation does not replace a permission check or business validation.
3. Retrieval and business actions
Data Libraries support grounded answers through indexed content and retrieval. Flow, Apex, and API actions perform operations. A policy saying a refund is allowed is evidence for a decision; the refund action still needs its own eligibility checks, authorization, and any required human approval.
4. Outcomes and evidence
The agent returns an answer, reports an action result, or hands off. Define what must trigger escalation and what context the next person receives. Use session tracing to investigate a turn and a regression suite to check whether a fix holds across other requests.
Example: a customer asks for a refund
This is a proposed architecture walkthrough, not a report of a deployed customer system.
- Identify the customer and order. Establish the permitted account scope before retrieving order details. A supplied order number alone is not proof of ownership.
- Retrieve the applicable policy. Ground the answer in the current returns policy and its exceptions. Record which source supports the explanation.
- Validate the operation. The refund action checks ownership, status, amount, and previous refunds. Prevent duplicate execution in the business layer.
- Apply the approval gate. If the request exceeds a defined limit or needs an exception, route it to a person with the required authority.
- Report the actual outcome. Confirm a refund only after the action reports success. Retain enough trace and audit evidence to reconstruct the decision without unnecessary customer data.
Questions for an architecture review
- Which identity reads each source and executes each action, and where is its access enforced?
- Which rules are deterministic, and which are only behavioral instructions?
- What happens when retrieval is empty, an integration fails, or an action is requested twice?
- Who can investigate the session, and what evidence survives long enough for an incident review?
Continue with soft and hard rule mapping, irreversible action gates, and the 21-check production readiness checklist.
Salesforce architecture and product documentation
The diagram is our synthesis. Use these references for platform behavior and implementation details.