Lesson 27 of 41 · All lessons
Salesforce Agentforce Specialist
0 of 41 complete
1Exam Overview
  1. 1.1Agentforce Specialist Complete Exam Overview
2Prompt Engineering20%
  1. 2.1When to Use Prompt Builder
  2. 2.2Prompt Template Access Controls
  3. 2.3Field Generation and Flex Prompt Template Types
  4. 2.4Grounding Techniques for Prompt Templates
  5. 2.5Creating, Activating, and Executing Prompt Templates
  6. 2.6Best Practices for Writing Effective Prompts
  7. 2.7Trust Layer Security and Privacy Features
  8. 2.8Managing and Preventing Specific Models from Being Accessed
3Data 360 Fundamentals20%
  1. 3.1Agentforce Data Library
  2. 3.2Data 360 Concepts for Agentforce
  3. 3.3Chunking
  4. 3.4Indexing
  5. 3.5Retrievers
  6. 3.6Choosing a Grounding Approach for a Scenario
4AI Agents35%
  1. 4.1How an Agentforce Agent Works
  2. 4.2Agent Building Blocks and Agent Script
  3. 4.3Hybrid Reasoning and Deterministic Behavior
  4. 4.4Agentforce Builder: Canvas and Script Views
  5. 4.5Filters, Variables, and Template Expressions
  6. 4.6Standard and Custom Topics
  7. 4.7Standard and Custom Agent Actions
  8. 4.8Configure Topics, Instructions, and Actions for a Use Case
  9. 4.9Connecting Agents to Digital Experience, Email, Voice, and Slack
  10. 4.10Agent Security Context and Action Execution
  11. 4.11Choosing Between Employee and Service Agents
  12. 4.12When to Use Agent API
5Testing, Deployment, and Maintenance10%
  1. 5.1Testing Agents with Testing Center
  2. 5.2Understanding Testing Center Evaluations
  3. 5.3Deploying Agents from Sandbox to Production
  4. 5.4Deploying Prompt Templates Between Environments
  5. 5.5Reviewing Agent Behavior After Changes
6Governance and Observability10%
  1. 6.1Managing and Monitoring Agents
  2. 6.2Agent Analytics and Performance Signals
  3. 6.3Identifying Opportunities to Optimize Agent Behavior
  4. 6.4Using Observations to Guide Improvements
7Multi-Agent Orchestration5%
  1. 7.1Choosing a Multi-Agent Architecture
  2. 7.2Orchestrators and Connected Subagents
  3. 7.3Handoff and Supervisor Modes
  4. 7.4Model Context Protocol (MCP)
  5. 7.5Agent-to-Agent (A2A) Communication

Section 4 · AI Agents · 35% of exam

4.12 When to Use Agent API

3 min read Updated Nov 16, 2026

Exam objective

Given a scenario, identify when the Agent API is appropriate for connecting an Agentforce agent to a custom application or workflow.

What the Agent API provides

The Agent API exposes an Agentforce agent through REST endpoints so an external client can interact with it programmatically. A client can start a session, send messages, receive responses, and end the session. Salesforce also documents synchronous and streaming message patterns. This is useful when an organization wants the agent’s reasoning, subagent selection, and actions inside an application or user experience that is not already a Salesforce-managed channel. The API does not build the client interface for you; the application must manage authentication, session state, rendering, errors, and user experience.

Choose API versus a standard channel

Use a standard supported connection when it provides the needed experience and channel behavior, such as Enhanced Chat or Slack. Consider Agent API when the client is custom, a separate application needs direct interaction, or the organization must embed the agent in its own interface. Salesforce’s custom connection documentation describes structured response formats that can support native components such as cards, forms, or pickers. Building a custom channel requires more implementation and testing than enabling an out-of-the-box connection. Do not choose an API simply because the agent uses AI; choose it when programmatic integration solves a specific requirement that a supported channel does not.

Understand setup and limitations

Salesforce Developer documentation says Agent API use requires Agentforce to be enabled and at least one agent activated, plus an External Client App for secure OAuth access. The API is not supported for agents of type Agentforce (Default). Session calls use an agent ID, a bearer token, and a session key; later messages use the active session ID. API calls must be authorized for the correct Salesforce user context, and the bypassUser setting affects whether the agent-assigned user or token-associated user is used. Review current Agent API considerations for usage, timeouts, and supported agent types before committing to an integration.

Design the client responsibly

The external client should securely obtain tokens, avoid exposing client secrets in a browser, maintain the conversation session correctly, and handle timeouts, errors, and service-unavailable responses. If the API returns structured content, validate it before rendering it as a component. Treat user identity, access, and session lifecycle as part of the architecture. Test concurrent sessions, expired tokens, transfer or escalation behavior, and the UI’s response to partial or failed messages. A custom interface may need channel-specific instructions or a custom connection to produce the desired output format. Keep using platform permissions and least-privilege access for the user associated with the API call.

TIP: Select Agent API when a custom application must interact with an Agentforce agent programmatically and a supported standard channel does not meet the experience requirement.

Agent API is not supported for Agentforce (Default) agents. Verify the selected agent type and the current API setup requirements before designing around it.

Extra concept: The Agent API provides session and message operations; your client remains responsible for secure authentication and rendering the conversation.

Official references:

  • Get Started with the Agent API https://developer.salesforce.com/docs/ai/agentforce/guide/agent-api-get-started.html
  • Agent API Developer Guide https://developer.salesforce.com/docs/ai/agentforce/guide/agent-api.html
  • Agent API Considerations https://developer.salesforce.com/docs/ai/agentforce/guide/agent-api-considerations.html

Key takeaways

  • Agent API connects an agent to custom applications through REST sessions and messages.
  • Prefer standard connections when they meet the requirement; custom clients add security and lifecycle responsibilities.
  • Confirm agent type, OAuth setup, user context, error handling, and current API limits.

Check your knowledge

Answer exam-style AI Agents questions with answers and explanations.

Practice AI Agents
Finished this lesson? Mark it complete to track your progress.

Ready for the real exam?

Take the timed Salesforce Agentforce Specialist simulator: same number of questions, same time limit.

Get Complete Access