Agent API actions in Flow and Apex
Key Takeaway
Salesforce recommends custom agent invocable actions for most use cases. Choose the standard Agent API invocable actions when you need to manage the agent session itself, not just get a task done.
A flow or an Apex class can call an Agentforce agent through an invocable action, so the agent can do work without a person typing in a chat window. There are two kinds of these actions. Custom agent invocable actions handle the conversation for you and fit most needs. Standard Agent API invocable actions give direct control over an agent session for advanced cases.
Calling an agent from a flow or Apex class
You can call an Agentforce Service agent, an Agentforce Employee agent, or Agentforce (Default) from a flow or an Apex class by using invocable actions. Because these actions work from anywhere you can invoke a flow or Apex class, they fit background or event-driven tasks, such as summarizing a case.
Starting June 17, 2025, Agentforce (Default) gets no new features or improvements and isn't available in new Salesforce environments. Salesforce recommends migrating to an Agentforce Employee agent.