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.

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
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

(*) 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.

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

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 topics and actions. You can build predictable, context-aware agent workflows that don’t rely on interpretation by an LLM.

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

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

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 AI agents programmatically and deploy customer-facing use cases.

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.

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 AI agents into your customer-facing mobile app with an 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.

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.

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.