AI Voice Agent + Salesforce Agentforce 2: Apex Tools and Headless 360
Salesforce TDX 2026 turned the entire platform into MCP tools and APIs. We unpack how AI voice agents now plug directly into Agentforce 2 via Apex Invocable actions and the Agent Builder API.
At TDX 2026 in April, Salesforce shipped "Headless 360" alongside Agentforce Vibes 2.0 — making every CRM action available as an API, MCP tool, or CLI command. For voice agent teams that means CallSphere can read pipeline, write opportunities, and create cases without ever booting a browser session.
What the integration unlocks
flowchart LR
User --> Triage["Triage / Supervisor"]
Triage -->|tool A| A["Specialist A"]
Triage -->|tool B| B["Specialist B"]
Triage -->|tool C| C["Specialist C"]
A --> Mem[(Shared memory · mem0/Letta)]
B --> Mem
C --> Mem
Mem --> Final["Final response"]A CallSphere voice agent answering an inbound call can now do the work a sales-ops human used to do mid-conversation: pull the caller's account record, log the call as a Task, update the Opportunity stage, create a Lead, attach a recording URL, and trigger an Agentforce flow that emails the rep a summary — all before the call ends. That is a 4-6 minute manual workflow compressed into a 200ms tool round-trip.
How the Salesforce API exposes it
Agentforce 2 ships three integration surfaces. First, Custom Apex Actions annotated with @InvocableMethod become callable agent actions with full access to governor limits, multi-object SOQL, and external callouts. Second, the Agent Builder API lets you create and configure agents programmatically through Apex or REST, ideal for templating one Agentforce per tenant. Third, @salesforce/mcp — the official MCP server shipped April 2026 — exposes Records, Apex, Flows, and Agent invocations to any external runtime over the Model Context Protocol.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
Key endpoints CallSphere calls: POST /services/data/v62.0/actions/custom/apex/<ActionName> for Invocable methods, POST /services/data/v62.0/sobjects/Lead for fast lead creation, and /services/data/v62.0/connect/agents/<agentId>/sessions for delegating a turn to Agentforce when the voice agent decides escalation is warranted. OAuth scopes used: api, refresh_token, agent_api.
How CallSphere implements it
CallSphere runs 37 specialist agents across 6 verticals with 90+ tools and 115+ DB tables. The Sales product (browser dialer plus CSV/Excel import) ships with a Salesforce connector that maps inbound calls to the matching Account by phone, opens an Activity record, and on a positive disposition writes the Opportunity. Real Estate OneRoof's 10 specialist agents push qualified leads into Salesforce custom objects with property, budget, and timeline fields. Healthcare's 14 tools (lookup_patient, create_new_patient, get_available_slots...) round-trip patient demographics through Salesforce Health Cloud where the customer's source of truth lives there.
Pricing starts at $149/mo Starter, $499 Growth, $1499 Scale, with a 14-day trial and a 22% affiliate program.
Build steps
- Create a connected app in Salesforce Setup with OAuth scopes
api,refresh_token,agent_api. Enable PKCE. - Author an Apex class with
@InvocableMethod(label='Log Voice Call')accepting aList<CallRecord>parameter. - In Agent Builder, add the Apex action and write a one-sentence description ("Log a CallSphere voice call to the matching Account; create one if no match.").
- Mount the Salesforce MCP server in your CallSphere tenant config. Pass the OAuth refresh token through your secrets manager.
- In the voice agent system prompt, reference the tool by its semantic name and include a 2-3 example transcript showing when to call it.
- Subscribe to Salesforce Platform Events for
Opportunity_Stage_Changed__eso the voice agent can be notified mid-call if a teammate moves the deal. - Validate end-to-end on a sandbox org first, then promote to production via Change Sets.
Code snippet
// Invoking a Salesforce Apex Invocable from CallSphere mid-call
const sfResponse = await fetch(
`${instance}/services/data/v62.0/actions/custom/apex/LogVoiceCall`,
{
method: "POST",
headers: {
Authorization: `Bearer ${accessToken}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
inputs: [{
accountPhone: caller.e164,
callDurationSec: turn.elapsedMs / 1000,
disposition: "qualified",
recordingUrl: recording.s3Url,
agentSummary: turn.summary,
}],
}),
}
);
FAQ
Is the @salesforce/mcp server production-ready? It is GA as of April 2026 with some toolsets still in Beta. We use the GA Records and Apex tools in production and gate Beta toolsets behind a feature flag.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Do we still need Apex if MCP exists? Yes for complex multi-object writes, governor-limit-bound logic, and anything calling external services. Use direct REST for simple reads and writes; use Apex when you need a transaction.
How does this work with voice latency budgets? A single Apex Invocable round-trip averages 180-260ms from CallSphere's us-east-1 to a us-east Salesforce instance. We parallelize reads and only block on writes that the user is waiting on.
What about Health Cloud and Financial Services Cloud? Same surface, different objects. CallSphere's healthcare deployment writes to Patient__c and HealthcareProvider__c through Apex Invocables.
How do I demo this? Start a 14-day trial, pick the Sales product, mount the Salesforce MCP server, and run a test inbound call. Or book a demo.
Sources
Try CallSphere AI Voice Agents
See how AI voice agents work for your industry. Live demo available -- no signup required.