Get Started with Agentforce APIs and SDKs

Bring the power of conversational AI to your business with Agentforce agents. Build a trusted and customizable AI assistant that empowers your users to get more done in Salesforce. Accelerate your Agentforce integration with our APIs and other developer resources.

Beginning in April 2026, agent topics are now called subagents. There are no changes to functionality. During this transition, you may see a mix of the new and previous terms in our documentation

Note

Feature or APIDescriptionBuild AgentsTest AgentsUse Agents
Agent ScriptScripting language for building agents with natural language and programmatic controlYes
Agentforce DXPro-code tools for Salesforce CLI and VS CodeYesYesYes (*)
Agentforce Python SDKProgrammatic agent creation and managementYes
Testing APIProgrammatic test automationYes
Agent APIChat with agents via REST APIYes
Custom ConnectionsConnect external chat clients to the Agent API with structured response formatsYes
Agentforce Mobile SDKIntegrate Agentforce into your mobile appYes
Enhanced Chat v2Create customer-facing web chat experiences in Service CloudYes
Enhanced In-App Chat SDKCreate and customize Service Cloud-based chat experiences in mobile appsYes
ADL APICreate and manage data libraries programmatically
Export Session Tracing DataExtract a single, unified JSON view of a full agent session trace

(*) Agentforce DX provides the agent preview Salesforce CLI command, which you can use to interact with an active agent for testing purposes.

Looking for developer solutions to build and enhance Agentforce actions? See Build and Enhance Agentforce Actions.

Note

Build Agents 

Build agents programmatically using Agentforce developer tools. For information about the underlying agent metadata structure, see Agentforce Metadata Types.

Build Agents Using Agent Script 

Agent Script is the language for building agents in Agentforce Builder. Script combines the flexibility of natural language instructions for handling conversational tasks with the reliability of programmatic expressions for handling business rules. In script, you use expressions to define if/else conditions, transitions, and other logic; set, modify, and compare variables; and select subagents and actions. You can build predictable, context-aware agent workflows that don’t rely on interpretation by an LLM.

Build Agents Using Agentforce DX 

Use pro-code tools such as Salesforce CLI and VS Code to create and manage agents.

Build Agents with Agentforce Python SDK 

The Agentforce Python SDK provides a programmatic way to create, manage, and deploy AI agents in Salesforce.

Test Agents 

Use Testing API, Agentforce DX, or the Testing Center to test your Agentforce agents.

Feature NameAccess MethodTest Definition FormatCustom Evaluations SupportDescription
Testing CenterUICSVNoGenerate and run tests through the Salesforce UI.
Agentforce DXCommand LineYAMLYesSalesforce CLI extension that can author, deploy, and run agent test specifications.
Testing APICodeXMLYesDirect API access using Metadata API and Connect API.

Chat with Agents 

Chat with AI agents programmatically and deploy customer-facing use cases.

Chat with Agents Using Agent API 

Use the Agent API to communicate with AI agents directly from an API. Start sessions, send messages to the AI agent, receive messages, and end sessions with the API.

You can also access an invocable action to chat with an agent. See Calling an Agent from a Flow or Apex Class in Salesforce Help.

Chat with Agents Using Enhanced Chat 

For Service Cloud use cases, you can connect and deploy Service agents to external chat channels. Enhanced Chat v2 provides Javascript web APIs to pass context events.

Integrate Agents into Mobile Apps 

Integrate AI agents into your customer-facing mobile app with an SDK.

Integrate Agents Using the Agentforce Mobile SDK 

The Agentforce Mobile SDK empowers you to integrate Salesforce’s feature-rich, trusted AI platform directly into your native iOS and Android mobile applications. By leveraging the Agentforce Mobile SDK, you can deliver cutting-edge, intelligent, and conversational AI experiences to your mobile users, enhancing engagement and providing seamless access to information and actions.

Integrate Agents Using the Enhanced In-App Chat SDK 

The Enhanced In-App Chat SDK enables you to deliver a modern, highly customizable messaging experience directly inside your native mobile applications. You can connect and deploy Service agents to external chat channels for Service Cloud use cases. Its human-in-the-loop design enables seamless escalation from Agentforce agent to human service rep with full conversation context.

Build and Enhance Agentforce Actions 

Actions are the building blocks that enable your Agentforce agents to perform tasks and interact with data. You can create custom actions to extend your agent’s capabilities and enhance the user experience with rich interfaces and detailed responses.

See Also