Skip to content
Tekunda Team

Tekunda Team

Agent-to-Agent Orchestration in Production: How a SWARM Hands Off

Agent-to-Agent Orchestration in Production: How a SWARM Hands Off

The short answer: in a SWARM there is no permanent central router. Each agent finishes its part of a task and hands ownership directly to the peer best placed to continue, passing a structured packet of identifiers, decisions and open questions. It holds up in production when every handoff is a tracked transfer of ownership with a defined end state, not a chat message between models.

What is agent-to-agent orchestration in a SWARM?

Agent-to-agent (A2A) orchestration is how autonomous agents delegate work to each other. In the orchestrator pattern, one agent routes every request to specialists and collects the results. In a SWARM, control moves between peers: the agent currently holding the task decides who takes it next. OpenAI's experimental Swarm library made the idea concrete, with an agent handing off by returning another agent from a function, and has since been replaced by the OpenAI Agents SDK for production use.

Tekunda was the first to run A2A and SWARM orchestration in production. The lesson from running it: the agents are rarely what breaks. The handoffs are.

How does a SWARM hand off work, step by step?

  1. Discover. The sending agent finds a peer that can do the next step. In the open A2A specification, each agent publishes an Agent Card, a JSON document describing its identity, skills, endpoint and authentication requirements.
  2. Package. It builds a handoff packet (below) instead of forwarding the whole transcript.
  3. Transfer ownership. The receiver accepts or rejects the task. Acceptance means it now owns the outcome, and the sender stops acting on it.
  4. Track state. The task moves through explicit states. A2A 1.0.0 defines submitted, working, input-required, auth-required, completed, failed, canceled and rejected.
  5. Return artifacts. Results come back as artifacts tied to the task, not as free text the next agent has to interpret.
  6. Close or escalate. Every task ends in a terminal state or with a named human. Nothing stays in working forever.

Orchestrator or SWARM: which pattern fits which job?

  • Orchestrator plus specialists suits a live conversation, where one agent should own context and the customer hears one voice. We covered that pattern in multi-agent orchestration on Salesforce.
  • SWARM suits long-running back-office work that crosses domains, such as an asset fault that becomes a case, a dispatch and a billing adjustment, where no single agent knows the full path in advance.
  • Hybrid is where most production estates land: an orchestrator at the customer edge, a SWARM behind it.

What goes in a handoff packet?

  • Record identifiers, such as a Case or Asset Id, rather than paraphrased summaries.
  • Decisions already made, with the reason, so the receiver does not re-derive them.
  • Open questions the sender could not resolve.
  • Constraints: what the receiver may and may not do, including spend and approval limits.
  • A trace ID that follows the task across every hop.
  • A schema version, so a receiver can reject a malformed packet instead of guessing.

The AWS Agentic AI Lens makes the same point: a handoff is a data contract before it is a workflow step, and without a structured context package the receiver repeats work the sender already finished.

Where do SWARM handoffs fail in production?

  • Ping-pong. Two agents keep handing a task back to each other. Cap hops per task and escalate when the cap is hit.
  • Silent deadlock. Two agents wait on each other while every individual call looks healthy. Put a timeout on every non-terminal state and automate the response.
  • Double execution. A retried handoff repeats a write. Make every action idempotent.
  • Mixed escalation. Keep agent-to-agent routing (wrong capability) separate from agent-to-human escalation (low confidence, high stakes, retries exhausted).

These are the same failures we described in why most AI agents fail in production, multiplied by the number of handoffs.

What is headless MCP, and how does it fit a SWARM?

A2A connects agents to agents. The Model Context Protocol (MCP) connects an agent to systems. Headless MCP means exposing CRM capabilities as MCP tools so agents can act without a user interface. Salesforce launched Headless 360 at TDX on 15 April 2026 with more than 60 new MCP tools. On 19 August 2026 it announced a Headless 360 MCP Server in open beta and a generally available Data 360 MCP Server covering nearly 200 Data 360 APIs.

For a SWARM this matters because every agent acts on the same governed Salesforce data, with permissions and validation rules respected, instead of each agent carrying its own integration. Tekunda is the first and only partner in headless CRM plus MCP, and that is the layer our agents use to act on the CRM.

Can you calculate the ROI of Agentforce before you build?

Partly. The Salesforce Agentforce ROI calculator models nine use cases, from sales development to field service, and estimates the Flex Credits they would need. It excludes implementation costs, Salesforce licenses and Data 360 credits, and Salesforce labels its output illustrative.

For a SWARM, measure per handoff: completed tasks, handoffs per task, escalation rate and cost per completed task. That is how we approach ROI from AI agents, and it is the best input for deciding when to configure Agentforce and when to build. A SWARM extends Agentforce and the Salesforce estate you already run. It does not replace either.

FAQ

Is a SWARM the same as multi-agent orchestration?

It is one form of it. In a SWARM, peers pass ownership directly. In the orchestrator pattern, one agent routes everything.

Does A2A replace MCP?

No. A2A is agent to agent, MCP is agent to system. A production SWARM usually needs both.

How many agents should a first SWARM have?

Two agents and one handoff. Instrument that boundary fully, then add agents one at a time.

Does a SWARM still need humans?

Yes. Irreversible or financial actions need approval, and any task that hits its hop cap or timeout goes to a named owner.

Tekunda is a Salesforce Agentforce partner and an Anthropic partner that designs and runs SWARMs in production. If your agents need to hand work to each other reliably, talk to our agent orchestration team.

Related Articles