Get Started with Agents

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.

Communicate with AI agents using the Agent API. Build custom actions for agents from Apex code.

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.

With Agent Builder, developers can enhance agent capabilities by creating custom actions using Apex, flows, or prompt templates. This unique extensibility empowers developers to tailor agents to their business needs. To use your Apex code in a custom action, you must annotate your method with @InvocableMethod. This annotation makes the action available for configuration in Agent Builder. The following sample code shows an Apex class that uses this annotation.

To learn how to turn an invocable Apex method into a custom agent action, check out these resources.