Curriculum/Multi-Agent Systems
Supervisor Star, Not a Mesh
Workers talk only to the supervisor. Secret side-channels between workers are how you lose the audit trail, skip the critic, and undo tool isolation.
In supervisor mode, workers do not message each other. The supervisor assigns, collects, reassigns, or stops. Traces are star-shaped: one hub, many spokes. A mesh is a hairball.
The orchestration overview said this restriction is a feature. This lesson is the drop rule: if src is not the supervisor and dst is not the supervisor, the message is not delivered. Logs say peer_forbidden. The coder cannot tell the docs worker to skip tests. The critic cannot whisper a patch. Isolation and no-write critics survive only if the wire cooperates.
A supervisor can be a rules engine. Ticket category → worker id. Save the LLM for the worker. A 70B hub that only routes on the word “invoice” is the tax lesson’s bad spend. Use a model hub when assignment needs messy language and you still cannot encode subgraphs — then eval the hub’s assignments as their own golden set.
Star versus mesh versus sequential
Star. Every legal message has the hub on one end. Workers return artifacts to the hub. The hub writes the blackboard. The hub may start a critic as another spoke, then reassign the worker. Workers never see each other’s prompts.
Mesh. Any to any. Side channels skip the critic and the audit. Hop-limits can still cap a mesh, but you will spend the year drawing the edge list you should have gotten by using a star.
Sequential. No messages at all in the peer sense: code calls node 2 after node 1. Sequential is often enough. Supervisor shines when which worker is unknown at compile time (twenty specialist types) but peer talk should stay forbidden.
| Channel | Star | Mesh | Sequential |
|---|---|---|---|
| sup → coder | yes | yes | code calls coder |
| coder → sup | yes | yes | return value |
| coder → docs | drop | delivered | does not exist |
Workers talk only to the hub. Secret side-channels skip the critic.
Star, not a meshShared memory is a channel. If coder and docs both have write access to board["notes"], you rebuilt peer DM as a sticky note. Blackboard ACL: workers write only artifacts/{their_id}/... or a single artifact id the hub assigned. They do not append to a communal novel.
Hidden channels also include shared disks, redis pubsub, “temporary” Slack, and a SQL table every role can UPDATE. Security review should search for those the same way it searches for allow_peer=True. If two workers must share a fact, the hub writes it to the board under an id and the second worker gets that id in a typed assignment. That is sequential under a star, not a whisper.
Walkthrough: “psst skip tests”
Inbox of three messages:
- Supervisor to coder: step 1 — keep.
- Coder to supervisor: artifact a1 — keep.
- Coder to docs: “psst skip tests” — drop,
peer_forbidden.
If you set allow_peer=True, the third message delivers. That is the bug you are refusing. The last print in the box shows the delivered peer when the flag is on, so you can see the incident in output, not only in prose.
The drop is not a scolding in the coder prompt. The coder model will still emit peer envelopes. The runtime drops them. Eval: a fixture that emits peer must still finish without docs ever seeing skip-tests. If docs’ trace contains the string, you have a leak (board, logs, or flag).
Run to execute this in your browser. Nothing is sent to a server.
What printed: three events in default mode; the third is drop: True with peer_forbidden. peer allowed prints the last event of the second call, which is not dropped — from: coder, to: docs, body skip tests. That second call is the incident. Leave the flag false in product. Keep the second print as a teaching contrast, not as a default.
Bodies in production are typed payloads, not strings. The drop rule still keys off from and to. Parse envelopes before you consider the body.
Hub responsibilities
The hub stamps parent_id and child_id on every spoke (swarm logging uses the same keys). The hub runs reduce if there are many children. The hub enforces step budgets. The hub is the only place that may call finish for the job, unless sequential code does.
The hub does not inherit worker tools. A supervisor with run_shell will do the work and skip workers. Same failure as a planner with edit. Allow-list the hub for assign, collect, stop, maybe handoff_human. If the hub is an LLM, eval its assignments as a router golden set: invoice tickets must not go to tech. A 70B hub that only switches on a keyword is a cost bug — put that switch in code.
Bad assignment is the star’s failure mode: billing ticket sent to tech. Fix with goldens on the hub, or replace the hub with rules. Do not fix it by letting billing and tech negotiate in a mesh. Negotiation is how skip-tests DMs come back with extra politeness.
How agents use this
The supervisor can be a rules engine. Ticket category → worker id. Save the LLM for the worker. Log every spoke as parent_id plus child_id.
Alert on dropped peer messages. A spike means a prompt is trying to build a mesh. Do not “just this once” set allow_peer. If two workers must collaborate, the hub runs them in order and passes a typed artifact id, which is sequential subgraph under a star — the next lesson.
Security review: search the codebase for worker-to-worker queues. Hidden channels include shared files, redis pubsub, and “temporary” Slack. Close them or they are the product. If you cannot draw a star with the hub in the middle and only those edges in the logs, you do not have supervisor mode. You have a mesh that still prints assigned.
Check your understanding