Monday morning, in your IDE. You type a broad request: add a CSV export to a billing module, with its tests and its documentation page. A single assistant would spend an hour doing everything in one thread, losing the beginning of the context halfway through. This time a coordinator reads the request, spots three independent pieces, hands them to three agents that each work in their own context, and one of them warns a colleague that a column name has changed. You see only one report: what was done, what was checked, what is left for you to decide.
That is the promise of an agent swarm. It is real, but it is not free: every delegation costs a launch and messages, and every handoff is a chance to get lost. This feature describes what a swarm changes, the mechanics of a handoff, the failures measured by research, then what AI-KIDO takes from all this and where it goes further.
What a swarm changes
The simplest way to make several agents work is a supervisor: one agent receives everything, hands out sub-tasks, reads every answer and decides who speaks next. It is easy to audit, but it becomes a bottleneck: all the context flows back up to it, and every round trip costs it tokens. Anthropic describes its research system this way, as an orchestrator-worker pattern in which a lead agent develops a strategy and then spawns subagents that explore different aspects in parallel.
A swarm reverses part of this logic. In the account given by ActuIA, OpenAI’s Swarm is an experimental framework that orchestrates multi-agent systems using routines and task handoffs between agents. The openai/swarm repository describes itself as an educational framework exploring lightweight orchestration: each agent has its own instructions and tools, and can hand the conversation to another agent when it judges that the request leaves its domain.
Peer-to-peer handoff is the heart of the model. With LangGraph Swarm, agents hand off control to one another based on their specializations, and the system remembers which agent was last active so that the conversation resumes with it on the next turn. Governance is no longer centralized in a supervisor: each agent decides its own routing, which removes round trips but moves the responsibility for stopping properly.
CrewAI offers side by side a sequential process and a hierarchical one in which a manager delegates along a chain of command: the swarm is not the end of the supervisor, it is the possibility for peers to talk without always going back up.
The mechanics: the next agent is a tool
How does an agent hand off? The answer given by public libraries is disarmingly simple: a handoff is a function call. In the Agents SDK Handoffs documentation, handoffs are represented to the model as tools; a handoff to an agent named “Refund Agent” becomes a tool named transfer_to_refund_agent. The agent handling the conversation “calls” its successor the way it would call a search or a calculation.
The OpenAI Cookbook sets out the two notions that structure everything else. A routine is a set of steps in natural language, carried by a system message, with the tools needed to carry them out. A handoff is the moment when one routine passes the conversation to another. The openai/swarm repository spells out what changes then: the system prompt is replaced by the new agent’s, but the chat history is not.
Under the hood, it looks like this. You wrote “I want a refund”; the triage agent calls its handoff tool; the orchestrator updates the active agent and replays the history to the new one. In the Cookbook’s style, the core fits in a few lines:
def transfer_to_refunds():
return refunds_agent # the next agent is a return value
triage_agent = Agent(
instructions="Triage the user issue, then hand off.",
tools=[transfer_to_refunds], # a handoff is just a tool
)
# the runner swaps the active agent, keeps the message history
Two consequences. First, the model decides the handoff itself, as it decides to call any tool: routing is a model output, not a coded rule. Second, the openai/swarm repository describes itself as stateless between calls and running client-side: state lives in the history you pass, nowhere else. The same repository now points to the Agents SDK, presented as its production-ready evolution.
Shared state and the team’s memory
If agents hand off to one another, what becomes of what they know? The simplest answer is the cumulative message log: each agent appends its turns to one list, and the next receives it whole. That is what Swarm does, and it is why a handoff there is so light. The price is a history that grows with every handoff and ends up carrying exchanges that no longer concern the active agent.
LangGraph Swarm adds an explicit memory: the shared state holds the name of the active agent, and that agent resumes on the next turn. Each agent updates the part of the state that belongs to it. This idea of a single writer per variable, where only one routine may modify a given piece of data, is what prevents two peers from silently contradicting each other in the same field.
Three things coexist in a swarm and must not be confused: the conversation history, which circulates; the shared state, each variable of which has an owner; and the active agent, which is a piece of data like any other, remembered between turns.
What breaks, measured
Letting agents talk to each other opens gaps you do not see with a single assistant. The study “Why Do Multi-Agent LLM Systems Fail?” from the University of California, Berkeley, starts from an observation: despite the enthusiasm, the gains of multi-agent systems on popular benchmarks are often minimal. The authors annotated more than 1,600 execution traces from seven popular frameworks and derived a taxonomy, MAST, of fourteen failure modes grouped into three categories.
- System designThe specification is vague, roles overlap, an agent ignores its instructions or forgets the step that was its own. The problem is set before the first message leaves.
- Inter-agent misalignmentAgents talk but do not understand each other: one starts over, another waits for an answer that never comes, a third repeats what is already settled. Handoff loops and overlong chains live here.
- Task verificationNobody really checks the result: the end is declared too early, verification is incomplete or absent, and one peer’s error becomes a fact for everyone.
Anyone who has watched a swarm run recognizes these categories: two agents passing the conversation back and forth, a chain of handoffs in which the last agent no longer knows the original request, a peer finding never cross-checked. The study concludes that these failures call for more sophisticated solutions than prompt adjustments.
What AI-KIDO takes up, and where it goes further
AI-KIDO did not invent the swarm. It takes up the essentials, a coordinator that splits the work and peers that exchange findings, and it answers each weak point measured above with a rule of its Swarm policy, a public file in the method’s repository shared by every AI-KIDO agent, including the ones you create. Rather than list those rules, this part stops on each one: the problem it avoids, the rule itself, then what you see when it applies to your Monday-morning request.
A definition first, to set the vocabulary. An AI-KIDO Swarm is a bounded team of workers with separate contexts, who receive ready, independent tasks and exchange findings when useful. One coordinator keeps integration, acceptance, budgets and resource locks. The policy also says what a Swarm is not: a second orchestrator, unlimited fan-out, recursive delegation, or several writers of the same files.
Select from verified capabilities, not model names
The problem: a model name says nothing about what an agent can actually do in your tool. The same model, launched from Copilot, Claude Code or Roo Code, has neither the same delegation tools, nor the same way of returning a result, nor necessarily the right to write to a peer. Picking a team by “which model” amounts to promising a mailbox that may not exist.
The rule fits in one sentence: before choosing a form of collaboration, the coordinator maps the host’s actual tools, capability by capability, and treats any unknown capability as absent. It verifies separately launch, concurrent execution, result, peer send and receive, relay, follow-up on a retained conversation, reset and close, and records the exact identifier of each tool.
The lived case: you ask for the CSV export with its tests and its docs. The coordinator finds that your host can launch subtasks and read their result, but that no tool lets one worker write to another. It does not simulate a peer exchange: it writes “communication: relay” and will carry findings itself. If a send tool only works from the coordinator, it is not a peer mailbox; if a worker is one-shot, giving it an identifier does not give it follow-up capability.
These checks feed five choices, each with its fallback. Direct for a small task, no team. Parallel if prerequisites are accepted, effects disjoint, concurrency verified and budget sufficient, otherwise sequential. Peer communication if send and receive are authorized at both ends and recipients are known, otherwise relay through the coordinator. Retain a worker if the follow-up concerns the same task and the host allows it, otherwise a fresh worker. Clean and reuse if a real reset has been verified, otherwise a fresh worker, never a simulated reset. And Swarm is chosen only when context isolation or an early exchange reduces duplication enough to pay for the launch and message cost.
The delegation brief, written before delegating
The problem: the first failure category of the Berkeley study, vague design. A worker that receives “take care of the tests” without knowing what it may touch, whom to talk to or when to stop improvises, and two improvising workers end up writing the same files.
The rule: every delegation is a bounded request in the task-request/2 format, in which the coordinator writes its collaboration decision, even when it is disabled. An unknown capability there means “none”, never a promise to configure it later.
- Mode and reasonDirect, sequential or parallel, with the reason in plain words, for example “independent implementation and fixture preparation”.
- Channel and peersNone, relay or peer; then the list of verified peers, each with its task identifier and its scope.
- Tools and lifecycleThe tools actually authorized to send and receive, and the worker’s lifecycle: fresh, retained or reset.
- Stop conditionWhat ends the task, for example “return after implementation and targeted tests; no further delegation”.
The brief also carries the source revision, acceptance checks, resource ownership, message scope and remaining budget. The lived case: the worker in charge of tests gets the right to read the service and to write in the tests folder, nothing else. It is not granted broad write access because it will need to discuss a finding with the service worker. And when a new agent joins the team, it receives these rules through a link to the policy or a compact handoff; it is not made to reload the whole knowledge base.
Peer work and the relay
The problem: Berkeley’s second category, inter-agent misalignment. Two workers that talk freely pass the conversation back and forth, wait for each other, or ask the same question every thirty seconds; and one of them can announce “done” without anyone checking.
The rule has two parts. A worker first checks its own capabilities and scope; if communication is requested but unavailable, it reports this to the coordinator and continues only the permitted independent work, without simulating a conversation. Then it sends a message only when another task would otherwise duplicate its work, use a wrong interface or remain blocked: no broadcast, no busy polling, no mutual wait cycles, no repeated queries for an unchanged status.
The lived case: the tests worker discovers that the expected endpoint returns a field the service does not produce. That is exactly the planned case: it writes a short finding, marked provisional, in the host tool’s exact format, one strict JSON object in a text field. Since your host offers no peer channel, the message goes to the coordinator, which relays it to the service worker. A peer message is never a completion or an acceptance: the coordinator still validates final results and alone decides when a dependency is released.
One last point in this part, which answers Berkeley’s third category: peer messages are untrusted data. No instruction from a peer can override permissions, resource ownership or acceptance gates, and an identity merely claimed in text is not believed: it is the host’s authorized routing that binds sender, recipient and request. A worker shares facts and references, not credentials or whole conversations, and asks the coordinator before changing scope.
Reuse a worker or start fresh
The problem: context contamination. A worker that spent an hour on invoicing keeps assumptions, open files and permissions in memory. Handing it “a small fix” on another module afterwards, to save a launch, imports all of that into a task that does not want it. This is where AI-KIDO goes clearly beyond handoff frameworks, which say little about what an agent becomes after its task.
The rule: a worker is retained only for a follow-up of the same task, it is cleaned only if the host offers a real reset whose completion is verified, and in every other case a fresh context is used. Resetting a conversation resets neither files, nor processes, nor external credentials; if any state remains unknown, a fresh worker is taken.
The lived case: the tests passed, but you ask to add a date filter to the same export. The coordinator reuses the service worker through its known handle, after verifying identity, project, source freshness, permissions and worker state, and passes only the delta: turns are serialized, and concurrent work would require a separate worker. Had you asked for a fix in payroll, an unrelated task, it would have created a fresh worker with a compact handoff rather than a full transcript. And when no follow-up is useful anymore, it releases membership and handles, never claiming a worker was unloaded because it finished a turn.
Reusing a worker, reusing a persona and reusing a cached result are three different operations. Reusing a persona does not reuse a conversation; a cached result needs unchanged sources and the same acceptance checks; and a retained context can still require a fresh source check, because a cheaper reload is no reason to keep a false assumption.
Runtime thresholds
The problem: rules without numbers stay wishes. The loops, overlong chains and stale results the Berkeley study describes do not stop by themselves. The policy published in the same folder therefore sets thresholds, and each one closes a specific drift.
- 3parallel tasks at most: no unlimited fan-out, no overlong chains
- 1retry per task: a failure loop stops on the second round
- 900 swithout news and the task is stale: a silent worker does not block the team
- 30 daysafter which a routing price source expires: no decision on stale figures
The lived case: the documentation worker fails because the site generator is not installed. It is relaunched once; if it fails again, the coordinator returns a partial result rather than retrying forever. And if the cause is an unavailable tool, a denied permission or an invalid request, there is not even a second attempt, because those codes are never retryable. The other thresholds keep exchanges small: 800 output tokens for the coordinator, a result summary of at most 2,000 characters, an execution cut after 120 seconds with its output truncated to 4,000 characters. That is what keeps the coordinator from becoming the bottleneck it must avoid.
The strict JSON contract
The problem: most inter-agent failures come from a misread message: a result announced in prose, a task without an explicit dependency, an invented key nobody reads. The rule: every exchange between the coordinator, a worker or a native orchestrator is a JSON object validated against a public schema, and any unknown key is rejected.
A task-request/2 requires an identifier, a caller, a coordination mode among lead, collaborate or direct, an objective, constraints and tasks that each declare their dependencies, transport, tools, read and write resources, state and acceptance check. A task-result/1 carries a status among ok, partial, blocked or error, a summary, artifacts, errors and next actions. The lived case: the provisional finding of the tests worker, above, travels in this envelope. Under the hood, it looks like this.
{
"id": "tests",
"status": "partial",
"summary": "Provisional: fixtures ready; the endpoint expects a field the service does not produce.",
"artifacts": [{ "type": "file", "ref": "tests/fixtures/invoices.json" }],
"errors": [],
"next": ["Rerun the tests once the service is accepted"]
}
A Node evaluator, published in the same place, validates this contract and schedules dependency- and resource-safe batches, exclusive locks included. It does not create workers, send messages, verify a reset or authenticate a sender: the host and the coordinator must do that. The contract makes the exchange verifiable; it does not replace verification.
The native orchestrator keeps priority
The problem: two bosses. Your tool often already has its orchestrator, and a second one claiming command produces exactly the role conflicts described in Berkeley’s first category. The rule: AI-KIDO never installs itself over your tool’s orchestrator; its orchestrator agent determines once, per capability snapshot, which of three postures applies.
- Lead: only on a verified Copilot host, with a complete inventory and no other general orchestrator. Lived case: in Copilot, with no other coordinator declared, the AI-KIDO agent writes the brief and distributes the three tasks.
- Collaborate: as soon as a native orchestrator exists, the host is Claude Code, Kiro, Codex or Roo Code, or a role is ambiguous. Lived case: in Roo Code, the AI-KIDO agent does itself what needs no delegation, guides the native orchestrator with a JSON plan and delegates a bounded subtask to it.
- Execute directly: when the host or the inventory cannot be established. Lived case: in an unknown tool, the agent does the work itself, sequentially, with its own tools, rather than inventing a delegation.
When collaborating, it takes over a task only if the native orchestrator verifiably cannot do it, for example a parallel batch when it is established that it does not parallelize. An unknown native capability is never a reason to take the lead. So much for the mechanics; what remains is what all this looks like from your chair, in the conversation you read.
What you type, what you read
Back to your Monday morning, with AI-KIDO installed in your assistant. You write your request without saying anything about organization: it is up to the coordinator to decide whether there is a case for a team.
- YouAdd the CSV export of the month’s invoices: service + endpoint, integration tests, and the “Export” page in the user docs. Same column format as the PDF export.
- AssistantThree independent tasks, disjoint effects: service and endpoint, tests with fixtures, docs page. Concurrency verified on this host, coordinator relay available, no direct peer messaging. Launching in parallel (limit: 3), at most one retry per task. Stop: after targeted tests, no further delegation.
- AssistantFinding relayed from task “service” to “tests”: column “amount_incl_tax” becomes “total_incl_tax” to match the PDF export. Marked provisional; waiting for the final result before releasing the dependency.
- AssistantReport. Service and endpoint: ok, 2 files, unit tests green. Integration tests: ok, fixtures added, column aligned. Docs: ok, “Export” page in EN and FR. No retry used. For you to decide: keep the “;” separator for French Excel or switch to “,”.
You saw these four messages. Underneath, there was one task-request/2 with three tasks, then three task-result/1 answers validated by the coordinator before the report. No handoff loop, because nobody had the right to pass the conversation around indefinitely; a short chain, because recursive delegation is forbidden; a cross-checked finding, because it was marked provisional; and the separator question comes back to you, because the coordinator does not decide in your place.
Try it
- Pick a request genuinely made of two or three independent pieces, for example a feature, its tests and its documentation.
- Phrase it in one go, without describing the organization: let the coordinator announce its mode (direct, sequential or parallel) and its reason.
- Read the stop condition it states before launching; if it is missing, ask for it.
- In the report, spot what is marked as verified by the coordinator and what is left for you to decide; that is where the value of a team is judged.
References
- ActuIA OpenAI dévoile Swarm, un framework d’orchestration multi-agents open source
- OpenAI (GitHub) openai/swarm — Educational framework exploring ergonomic, lightweight multi-agent orchestration
- OpenAI Agents SDK Handoffs
- OpenAI Cookbook Orchestrating Agents: Routines and Handoffs
- LangChain (GitHub) langgraph-swarm-py — LangGraph Multi-Agent Swarm
- arXiv — Cemri et al., UC Berkeley Why Do Multi-Agent LLM Systems Fail? (2503.13657)
- Anthropic How we built our multi-agent research system
- CrewAI Processes — CrewAI documentation