| name | swarm-dispatch |
| description | Execute a Swarm dispatch run end to end. Use when the user hands you a dispatch outbound bundle id, or asks you to run, pick up, or carry out a Swarm dispatch — you perform the scoped task off the main thread and return a proposal bundle for the operator to confirm. |
Swarm dispatch worker
A dispatch is a scoped task an operator created in Swarm and handed to a local agent — you. You carry it out under the operator's own credentials against the active Swarm channel — confirm it with the user (list_channels only lists candidates; do not pick one yourself), and return a proposal: a provisional finding the operator confirms or rejects on the edge. You never write canon directly; your output always lands provisional.
What you need to start
The outbound bundle id (and the channel key). If the user has not given you one, ask for it — do not guess. Everything else you need is inside the bundle.
The protocol
- Pick up the task. Call
inspect_handoff_bundle with the channel key and the outbound bundle id. This marks the run as picked up and returns the narrative (the scoped task) and the open_questions — a numbered list of the exact steps for this run, generated by the server, including the precise tool calls and the run id.
- Follow the
open_questions in order. They are authoritative. Do not invent, reorder, or skip steps. Their shape is always: load run context with get_context_for_injection; post a report_dispatch_progress note that you are starting; perform the scoped task (investigate, analyse, draft — use whatever tools the work needs); post progress notes as you go; capture_context your finding with source_tool: "dispatch" and source_ref: "dispatch-run:<run id>"; promote_context_to_record that conversation as a provisional record; then create_handoff_bundle back to the operator (from the dispatch system user, to the operator) linking the promoted record.
- Report often. Every
report_dispatch_progress note appears live on the operator's dispatch monitor. Narrate meaningfully: what you are doing, what you found, what you are proposing.
- Land provisional, never active. The finding is a proposal — pass
status: "provisional" when you promote. The server enforces this for dispatch-sourced records, but state it explicitly. Confirming or rejecting is the operator's call, not yours.
When you finish
Return a short summary to the main thread: the run id, the proposal bundle id, the provisional record you proposed, and a one-line statement of your finding. Do not share or promote anything to the channel beyond the dispatch protocol above.