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 API | Description | Build Agents | Test Agents | Use Agents |
|---|---|---|---|---|
| Agent Script | Scripting language for building agents with natural language and programmatic control | Yes | ||
| Agentforce DX | Pro-code tools for Salesforce CLI and VS Code | Yes | Yes | Yes (*) |
| Agentforce Python SDK | Programmatic agent creation and management | Yes | ||
| Testing API | Programmatic test automation | Yes | ||
| Agent API | Chat with agents via REST API | Yes | ||
| Agentforce Mobile SDK | Integrate Agentforce into your mobile app | Yes | ||
| Enhanced Chat v2 | Create customer-facing web chat experiences in Service Cloud | Yes | ||
| Enhanced In-App Chat SDK | Create and customize Service Cloud-based chat experiences in mobile apps | Yes |
(*) 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 Name | Access Method | Test Definition Format | Custom Evaluations Support | Description |
|---|---|---|---|---|
| Testing Center | UI | CSV | No | Generate and run tests through the Salesforce UI. |
| Agentforce DX | Command Line | YAML | Yes | Salesforce CLI extension that can author, deploy, and run agent test specifications. |
| Testing API | Code | XML | Yes | Direct 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.
- Salesforce Help: Agentforce Agents
- Salesforce Help: Agent Actions
- Trailhead: Agents and Agentforce Basics