Uh oh!
There was an error while loading. Please reload this page.
docs: correct the multi-agent orchestration documents - #3555
Merged
Astro-Han merged 2 commits intoAug 23, 2026
Conversation
`docs/agent-swarm.md` still documented an `agent_swarm` tool that takes `items`, a `prompt_template` and `resume_run_ids`. That tool was removed in apache#2384, which deleted `agent-swarm-tools.ts` (where `AGENT_SWARM_TOOL_NAME = 'agent_swarm'` was defined) together with `adaptive-swarm.ts`, and replaced them with asynchronous supervision over the Agent Graph. `agent_swarm` survives only as a tool-result kind. Rewritten to describe what swarm is now: an orchestration mode rather than a tool. The mode is entered with `/swarm on|off|status|<task>` and changes four things — the system prompt, a guaranteed tool set that omits `view_agent_graph`, the durable `agentSwarmAuthorization` field on the Run header, and its own supervisor-wake rule in `isSwarmCheckpointTransition`. Items are ordinary child Sessions scheduled as graph work, and `agent_swarm_status` is a projection over the same graph snapshot, where `swarmId` is the `graphId`. The Agent Graph chapter carried four smaller defects, corrected in both languages: - `apps/desktop/src/main/agent-graph-ipc-main.ts` does not exist. Graph change events travel through `runtime-host-session-domains-ipc-main.ts` as `agentGraphChanged`, and the panel takes its types straight from `@maka/runtime-host/client` and `@maka/runtime-host/protocol`. - `apps/desktop/src/main/__tests__/graph-mode-host-contract.test.ts` was deleted and has no successor. - The comparison table described Agent Swarm as "one foreground tool call owns a bounded worker pool", which is the removed synchronous model. - The same table listed Agent Team beside four real mechanisms, but `AgentTeam` / `agent_team` / `mailbox` appear nowhere in the code. `docs/side-conversation.md` was audited as part of this group and needs no change: its unresolved symbols all sit in the Codex Reference and Desktop Architecture Snapshot sections, which describe OpenAI Codex rather than Maka. Refs apache#3522 Generated-by: Claude Opus 5 via Claude Code
16 tasks
The rewrite said swarm adds no execution machinery of its own and that wake state lives in the graph control plane, then described a mode-specific wake rule a few paragraphs later. Both are true — the graph stores wake state, while `isSwarmCheckpointTransition` decides when a swarm checkpoint is worth waking the supervisor for — but stated side by side they read as a contradiction. Say the split once, up front: one scheduler, one ledger, one control plane, all the graph's; what the mode adds is supervision policy over them. Refs apache#3522 Generated-by: Claude Opus 5 via Claude Code
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Multi-agent orchestration group from #3522. Four documents were audited; three needed changes.
docs/agent-swarm.mddocumented a tool that no longer exists. The whole document was built around anagent_swarmtool takingitems, aprompt_templateandresume_run_ids. #2384 deletedpackages/runtime/src/agent-swarm-tools.ts— whereAGENT_SWARM_TOOL_NAME = 'agent_swarm'was defined — along withadaptive-swarm.ts, and replaced synchronous fan-out with asynchronous supervision over the Agent Graph.agent_swarmsurvives only as a tool-result kind on historical records, so a reader following this document would call a tool that is not in the catalog.Rewritten around what swarm actually is now: an orchestration mode, not a tool. It is entered with
/swarm on|off|status|<task>and changes four things — the system prompt, a guaranteed tool set that deliberately omitsview_agent_graph, the durableagentSwarmAuthorizationfield on the Run header, and its own supervisor-wake rule. Items are ordinary child Sessions scheduled as graph work, andagent_swarm_statusprojects the same graph snapshot, whereswarmIdis thegraphId.Two questions a reader may reasonably ask, answered here so the diff does not have to carry them:
Was the tool deleted, or renamed and moved? Deleted. The file that defined it declared exactly one tool, the current catalog of 47 tools contains no
agent_swarm, no tool anywhere accepts a batchitemsarray, and every surviving mention is the result-kind type — nothing constructs one.agent_swarm_statusis a different tool, not a rename: it takes no parameters and only projects a graph snapshot. The capability did move, onto the graph tools.Is swarm now just a compatibility shell over graph? No. The execution machinery is entirely the graph — one scheduler, one ledger, one control plane. But swarm is a live mode over it, with its own guaranteed tool set, durable authorization record, and supervisor-wake trigger. Only the
agent_swarmresult kind is pure legacy, kept so old records stay readable.The Agent Graph chapter had four smaller defects, corrected in both languages so
translation_status: syncedstays true:apps/desktop/src/main/agent-graph-ipc-main.tsdoes not exist. Graph change events travel throughruntime-host-session-domains-ipc-main.tsasagentGraphChanged, andagent-graph-panel.tsximports its types straight from@maka/runtime-host/clientand@maka/runtime-host/protocol.apps/desktop/src/main/__tests__/graph-mode-host-contract.test.tswas deleted and has no successor.AgentTeam,agent_teamandmailboxappear nowhere in the code. The row was removed and the section heading updated to match the rows that remain.docs/side-conversation.mdneeds no change. Its unresolved symbols (excludeTurns,moveTabTo,receiveMovedTab,preserveOnClose,onBeforeClose) all sit inside the Codex Reference and Desktop Architecture Snapshot sections, which describe OpenAI Codex and carry their own inspection date.Refs #3522
Verification
Claims in the rewritten document, each checked against the code:
agent_swarmtool existed and was deletedgit show 08b745028^:packages/runtime/src/agent-swarm-tools.ts | grep TOOL_NAMEAGENT_SWARM_TOOL_NAME = 'agent_swarm'; file deleted by that commitagent_swarmtool todaygrep -n "name: 'agent" packages/core/src/tool-catalog.tsagent_spawn,agent_list,agent_output,agent_swarm_status/swarmgrammarpackages/core/src/swarm-command.tsstatus/on/off/run_oncepackages/runtime/src/ai-sdk-backend.ts:1734mode === 'swarm'packages/runtime/src/ai-sdk-backend.ts:1670-1687view_agent_graph; graph set includes itpackages/core/src/orchestration.ts:84,91,agent-run.ts:165session_mode/turn_override/nonepackages/runtime/src/stream-graph-coordinator.ts:1715isSwarmCheckpointTransitionswarmIdisgraphIdpackages/runtime/src/agent-swarm-status-tool.ts:79swarmId: snapshot.graphIdls apps/desktop/src/main/agent-graph-ipc-main.tsfind . -name 'graph-mode-host-contract*'grep -rn "AgentTeam|agent_team|mailbox" packages/ apps/Every
packages/...andapps/...path in both reading maps was re-checked after the edit; all resolve.Repository checks:
No test covers prose and this PR changes no code, so no suite was added.
npm testwas not run.AI use
Select exactly one:
Tool(s) and scope: Claude Opus 5 via Claude Code — audited the four documents against the code, traced the swarm removal through
git show, drafted the rewrite and the bilingual corrections. Every row in the table above was produced by running the listed command. The commit carries aGenerated-bytrailer.Checklist
Does this PR entail a change in behavior?