Skip to content

Agent Communication — Reference ​

See Execution transport is below team coordination for the shared visual model.

See Coordinator-mediated dispatch, observations and steering for the shared visual model.

See Decision inbox, ledger, memory and curation for the shared visual model.

This reference maps Agentweaver's shared-state, addressed-message, handoff, and execution transport surfaces. The existing diagrams describe coordinator handoffs and execution transport, not the addressed mailbox.

The original three agent communication channels to its concrete surfaces: MCP tools and HTTP API endpoints. For the conceptual model and the reasoning behind it, read the Agent Communication deep dive.

The three pre-existing channels are:

  1. Indirect / shared-state coordination — the decisions ledger and cross-agent memory (the team's shared brain).
  2. Coordinator-mediated handoffs — the WorkPlan / subtask DAG and child-run dispatch.
  3. Direct transport (A2A) — the worker↔sandbox-pod execution transport for a single agent turn.

Addressed messages are a separate, durable mailbox for one named teammate and one target run. They are neither decisions nor coordinator steering. REST POST /api/projects/{id}/agent-messages persists a send with recipient, target_run_id, content, idempotency_key, and optional reply_to_id, reference_kind, reference_id, or expires_at. An authenticated source run determines the sender; the client does not choose one. A repeated key from the same sender returns the original logical message; a conflicting payload is rejected. GET /api/projects/{id}/agent-messages and GET /{messageId} expose project-visible history and diagnostics. Native and MCP tools expose corresponding send, list and get operations. MCP writes require forwarded, valid run-capability headers; an operator's broker token alone cannot impersonate a run, and stdio mode without a run identity cannot send. A reply uses the original message ID and preserves its thread.

States are accepted, claimed, delivered, acknowledged, expired, and undeliverable. Recipient-run-bound POST /claim leases a message; POST /{messageId}/deliver needs the matching owner and fence; POST /{messageId}/acknowledge records receipt and can be repeated safely. Their MCP/native counterparts follow the same checks. A lease expiry allows reclaim after a crash, but callers must only claim and present messages at a safe turn boundary. No runtime turn-boundary injection or scheduled idle wake is connected yet. A manual claim is not proof that the model saw the content, and a delivered mark is only as reliable as the caller's presentation. Until that integration lands, use list/get to inspect messages and do not interpret accepted as delivered. There is no paid wake loop.

Human notifications surface activity to operators; they are not addressed messages or acknowledgment receipts. Backlog/work-plan references link existing tasks without moving them; the decision inbox is for knowledge proposals; steering redirects a coordinator; A2A only executes a single agent turn. The handoff diagram below continues to describe coordinator-owned task dispatch, not mailbox delivery.

Precision note. Channels 1 and 2 are how the team coordinates. Channel 3 is how a single agent turn is executed. A2A is not a way for two agents to chat. Do not map agent-to-agent coordination onto the A2A surfaces. The A2A turn surface is RemoteAgentProxy → Authorization: Bearer {per-run token} → AgentHost message:stream; each AgentHost pod accepts only its own run's token.


Channel 1 — Shared-state coordination ​

Agents coordinate indirectly by reading the project's decisions and memory at turn start (and mid-run) and by writing proposals back into the decision inbox. The conceptual model is in the Memory & Decisions deep dive; the full tool catalog is in the MCP reference and the API reference. The surfaces below are the ones that constitute cross-agent communication.

Decision inbox — propose, list, promote, reject ​

The inbox is the durable drop-box in front of the canonical ledger. Agents submit proposals here; reviewers and the Scribe merge or reject them.

MCP toolAPI endpointPurpose
decision_inbox_submitPOST /api/projects/{id}/decisions/inboxSubmit a decision or learning proposal (slug-keyed, idempotent)
decision_inbox_listGET /api/projects/{id}/decisions/inboxList entries (?agent=, ?type=, ?status=; default pending)
decision_inbox_mergePOST /api/projects/{id}/decisions/inbox/{entryId}/mergePromote a pending entry into a canonical decision
(merge alias)POST /api/projects/{id}/decisions/inbox/{entryId}/promoteAlias for merge/promote
decision_inbox_rejectPOST /api/projects/{id}/decisions/inbox/{entryId}/rejectReject a pending entry (retained for audit)

decision_inbox_submit parameters: project_id, agent_name, slug (unique, for idempotency), type (learning · pattern · update · architectural · scope · process · technical), title, content, optional rationale. Re-submitting the same agent_name + slug while still pending updates the entry in place; a different agent reusing the same slug is de-collided into a new entry. See the slug de-collision logic in the Memory & Decisions deep dive.

Decisions ledger — create, list, update ​

Promoted entries become canonical decisions. The coordinator and Scribe paths may also create decisions directly, and decisions can be superseded or archived.

MCP toolAPI endpointPurpose
decision_createPOST /api/projects/{id}/decisionsCreate a decision directly (coordinator / Scribe path)
decision_listGET /api/projects/{id}/decisionsList decisions (?type=, ?agent=)
(get one)GET /api/projects/{id}/decisions/{decisionId}Get a single decision
decision_updatePUT /api/projects/{id}/decisions/{decisionId}Update status/content; set superseded_by_id

decision_update accepts status (active, superseded, archived), replacement content, and superseded_by_id.

Active, approved architectural and scope decisions are eligible for team-wide context compilation. They remain untrusted historical data, not executable prompt instructions. Coordinator children receive approved-decisions context without the full memory/session selection.

memory_search queries across project agents. Search visibility is not prompt eligibility: another agent's learning or pattern must be high importance, approved, and tagged cross-team to enter context selection. Eligible records remain subject to the compiler's item/token budget.

MCP toolAPI endpointPurpose
memory_recordPOST /api/projects/{id}/agents/{name}/memoryAdd a memory entry for an agent
memory_listGET /api/projects/{id}/agents/{name}/memoryList one agent's memories (?type=, ?importance=)
memory_getGET /api/projects/{id}/agents/{name}/memory/{memId}Get a single memory entry
memory_searchGET /api/projects/{id}/memoryCross-agent search across the whole project (?type=, ?tags=)

memory_record parameters: project_id, agent_name, type (learning · pattern · core_context · update), content, optional importance (low · medium · high) and comma-separated tags. memory_search parameters: project_id, optional type, optional tags (comma-separated, OR semantics) — and it returns entries from all agents.

GET /api/projects/{id}/memory is the cross-agent search surface. It is the endpoint behind memory_search and the one place a caller reads the team's accumulated memory without naming a specific agent.

Curation — the Scribe and export ​

After a run, the Scribe lists pending inbox entries, merges low-risk learning / pattern / update entries, updates the session, and exports DB state to files. Architectural and scope entries are left for review. Export and import bridge the DB to the .squad/ and .agentweaver/context/ mirrors:

API endpointPurpose
POST /api/projects/{id}/memory/exportExport DB memory → .squad/ + .agentweaver/context/
POST /api/projects/{id}/memory/importImport .squad/decisions/inbox/*.md → DB

The Scribe's role and the four-layer context build are documented in the Memory reference.


Channel 2 — Coordinator-mediated handoffs ​

The coordinator decomposes a goal into a WorkPlan / subtask DAG, dispatches child runs, observes them, and steers them. Children report results up to the coordinator; they never message each other. These tools are thin proxies over the Coordinator endpoints — see the Coordinator reference, the MCP reference, and the API table in the API reference.

Start and intent ​

MCP toolAPI endpointPurpose
coordinator_startPOST /api/projects/{id}/orchestrationsStart a coordinator orchestration from a plain-language goal
coordinator_outcome_spec_getGET /api/runs/{id}/outcome-specRead the persisted OutcomeSpec (intent contract)
coordinator_outcome_spec_confirmPOST /api/runs/{id}/outcome-spec/confirmConfirm the spec, resuming past the gate
coordinator_outcome_spec_revisePOST /api/runs/{id}/outcome-spec/reviseRe-draft the spec from feedback

Interactive defineOutcome waits for confirmation. direct skips that drafted-outcome gate, while launch Autopilot can confirm defineOutcome unattended; dispatch/review/merge boundaries remain.

Plan, children, and dispatch ​

MCP toolAPI endpointPurpose
coordinator_work_plan_getGET /api/runs/{id}/work-planThe subtask DAG: subtasks (with assignedAgent, phase, isolation, status, childRunId) and dependencies edges
coordinator_children_getGET /api/runs/{id}/childrenDispatched child runs, each with subtaskId, childRunId, subtaskStatus, assignedAgent, childRunStatus, worktreeBranch
orchestration_topologyGET /api/runs/{id}/work-plan + GET /api/runs/{id}/childrenOne-shot { coordinatorRunId, workPlan, children } snapshot

Each child run carries a ParentRunId and a SubtaskId. Children stop at the assemble-ready boundary — they do not run review, merge, or Scribe; the coordinator assembles. The full dispatch and assembly model is in Coordinator Internals.

Steering — coordinator-mediated, not peer-to-peer ​

Steering is how an operator redirects in-flight work. It always goes through the coordinator, which relays to the targeted child — siblings never steer each other.

MCP toolAPI endpointPurpose
coordinator_steerPOST /api/runs/{id}/steerSend stop, redirect, amend, or a recovery directive. Omit target_child_run_id to broadcast.

coordinator_steer accepts run_id, kind, instruction, and optional target_child_run_id. kind is stop, redirect, amend, or a recovery verb such as recover. instruction is required for redirect and amend. It is optional for stop and recovery directives. A stop cancels the targeted turn immediately. Other directives apply at the next turn boundary. Pause is not supported. Directive progress streams as coordinator.steering (pending → queued → relayed → applied).

Observing the topology ​

A coordinator run is an ordinary run, so there is no separate streaming tool — point run_watch at the coordinator run_id.

MCP toolAPI endpointPurpose
run_watchGET /api/runs/{id}/streamLive stream; carries coordinator.work_plan, coordinator.topology, subtask.*, and coordinator.steering events

The subtask.* family (subtask.dispatched, subtask.running, subtask.assemble_ready, subtask.completed, subtask.failed) is how results and status flow up to the coordinator view. Child clarifying questions and tool approvals are re-emitted on this stream and routed back to the originating child — never sideways. See Coordinator Internals.


Channel 3 — Direct transport (A2A) ​

A2A is a leaf-turn transport below team coordination. AgentHost exposes A2ATurnBridgeAgent through a purpose-routing runner for workflow execution or the Operator Assistant MCP loop. Its provider boundary may use a run-bound Copilot capability or BYOK; orchestration and checkpoint persistence stay outside the pod.

A2A has its own dedicated surfaces and is documented separately:

Because A2A operates below team coordination, none of the Channel 1 or Channel 2 surfaces change when a turn runs in a remote pod versus locally. The shared-state tools and coordinator tools are identical either way.


Channel-to-surface summary ​

ConcernChannelMCP toolsKey endpoints
Propose / promote boundaries1decision_inbox_submit, decision_inbox_list, decision_inbox_merge, decision_inbox_reject/api/projects/{id}/decisions/inbox*
Canonical decisions1decision_create, decision_list, decision_update/api/projects/{id}/decisions*
Cross-agent memory1memory_record, memory_list, memory_get, memory_search/api/projects/{id}/agents/{name}/memory*, GET /api/projects/{id}/memory
Decompose & dispatch2coordinator_start, coordinator_work_plan_get, coordinator_children_get, orchestration_topology/api/projects/{id}/orchestrations, /api/runs/{id}/work-plan, /api/runs/{id}/children
Steer & observe2coordinator_steer, run_watch/api/runs/{id}/steer, /api/runs/{id}/stream
Execute one agent turn3see A2A referencesee A2A reference
Diagram details and constraints
ElementContract
titleHandoffs, not peer chat
subtitleThe Coordinator owns the dependency frontier and assembles child results.
group-title0Intent → execution contract
group-title1Children and assembly
Human goalHuman goal
Human goalDefine the desired outcome
Human goalintent input
OutcomeSpecOutcomeSpec
OutcomeSpecConfirm before dispatch
OutcomeSpecconfirmation gate
WorkPlan DAGWorkPlan DAG
WorkPlan DAGSubtasks + dependencies
WorkPlan DAGeligible frontier
Child run AChild run A
Child run AOne assigned subtask
Child run Aisolated worktree
Child run BChild run B
Child run BAnother eligible subtask
Collective assemblyCollective assembly
Collective assemblyIntegrate settled work
Collective assemblyone reviewed integration
e1draft
e2confirm
e3dispatch A
e4dispatch B
e5result A
e6result B
assurance-titleDEPENDENCIES ARE CONTROL
assurance-line1A dependency edge is scheduling, not a conversation channel.
assurance-line2A2A transports one agent turn between worker and sandbox; it is not peer chat.
Human goalInput
Human goalDesired outcome
Human goalScope
Human goalHuman intent
Human goalGate
Human goalConfirm or revise
Human goalOwner
Human goalCoordinator intake
OutcomeSpecState
OutcomeSpecPersisted contract
OutcomeSpecFields
OutcomeSpecScope / assumptions
OutcomeSpecHuman confirmation
OutcomeSpecNext
OutcomeSpecWorkflow selection
WorkPlan DAGModel
WorkPlan DAGSubtasks + edges
WorkPlan DAGBounded assignee
WorkPlan DAGReady
WorkPlan DAGDependencies satisfied
WorkPlan DAGStore
WorkPlan DAGPersisted WorkPlan
Child run ABinding
Child run AParentRunId / SubtaskId
Child run AFiles
Child run APer-child worktree
Child run ACharter + decisions
Child run AOutput
Child run AResult to parent
Child run BEligible frontier only
Child run BFailure
Child run BBlocks dependents
Child run BChat
Child run BNo sibling channel
Collective assemblySettled child branches
Collective assemblyAction
Collective assemblyIntegrate collective work
Collective assemblyGates
Collective assemblyConfigured checks
Collective assemblyReview
Collective assemblyOne human decision
goalOutcome, scope, assumptions; Coordinator drafts the contract
specHuman confirms or revises; Persisted intent, not execution
planOne owner per bounded subtask; Only satisfied dependencies run
aActive decisions + charter; Result returned to Coordinator
bParallel only when eligible; No direct child-to-child chat
assemblyChild results flow upward; Failed / RAI child blocks dependents
notesDEPENDENCIES ARE CONTROL; A dependency edge is scheduling, not a conversation channel.; A2A transports one agent turn between worker and sandbox; it is not peer chat.
groupsIntent → execution contract; Isolated work → collective assembly
Diagram details and constraints
ElementContract
titleA2A remotes a leaf turn, not the graph
takeawaySetup and task cross to AgentHost; assistant output and structured events return.
Workflow graphWorkflow graph
Workflow graphHost owns gates/checkpoints
Workflow graphFive factory-created leaf types
RemoteAgentProxyRemoteAgentProxy
RemoteAgentProxyBuild setup DataContent
RemoteAgentProxyTask TextContent in same message
AgentHost bridgeAgentHost bridge
AgentHost bridgemessage:stream over HTTP+JSON
AgentHost bridgeApply per-turn context
Caller event pipelineCaller event pipeline
Caller event pipelineDecoded structured events
Caller event pipelineDurable state outside pod
Proxy stream decoderProxy stream decoder
Proxy stream decoderOutput + RunEventDataPart
Proxy stream decoderCheck definitive turn end
Leaf runtimeLeaf runtime
Leaf runtimeExecute provider/tool loop
Leaf runtimeStream updates and events
arrow-1invoke
arrow-2send
arrow-3run
arrow-4stream
arrow-5append
note-0Claim/configure is a separate lifecycle, completed before this exchange.
note-1EOF alone is not successful completion; structured failures remain failures.
notesClaim/configure is a separate lifecycle, completed before this exchange.; EOF alone is not successful completion; structured failures remain failures.
Diagram details and constraints
ElementContract
titleThree channels, three different jobs
takeawayTeam context, coordinator handoff and A2A execution transport must not be conflated.
Project state APIProject state API
Project state APIDecisions and eligible memory
Project state APIPending writes are not authority
Host compilationHost compilation
Host compilationApproved scope/architecture
Host compilationChildren: no full memory stack
Prepared child contextPrepared child context
Prepared child contextCharter + skills composed too
Prepared child contextInjection failure is logged
CoordinatorCoordinator
CoordinatorOwns subtask structure
CoordinatorNo peer-chat protocol
Child runChild run
Child runBounded assigned outcome
Child runResults return upward
Assemble-ready resultAssemble-ready result
Assemble-ready resultParent integrates fragments
Assemble-ready resultNot independent child merge
Worker proxyWorker proxy
Worker proxyOne leaf execution request
Worker proxySetup data + task text
AgentHost podAgentHost pod
AgentHost podProvider session and tools
AgentHost podNo prompt-compilation DB read
Returned streamReturned stream
Returned streamOutput + structured RunEvents
Returned streamCaller owns persistence
arrow-1select
arrow-2inject
arrow-3dispatch
arrow-4report
arrow-5A2A
arrow-6stream
note-0Rows: shared context / coordinator handoff / execution transport.
note-1Agents can submit inbox proposals or record pending memory through the API.
notesRows: shared context / coordinator handoff / execution transport.; Agents can submit inbox proposals or record pending memory through the API.