Skip to main content

Module send_message

Module send_message 

Source
Expand description

send_message tool — coordinator ↔ worker (or task) messaging.

§Resolution order

Callers can address the target in two ways:

  1. task_id — preferred, used when the worker was spawned via the Phase D agent tool with team_name+name (or run_in_background). The message is pushed into the task’s output channel, which the worker’s prompt loop can poll between steps (or, more practically, which the human can read on the next task_output call).
  2. worker_id — legacy, addresses a worker registered in WorkerRegistry (from pre-Phase-D spawn_worker).

If both are present, task_id wins. If neither resolves, the tool returns a helpful message listing active workers and tasks.

Structs§

ListWorkersTool
List all currently active workers and tasks registered.
SendMessageTool
The send_message tool — push a follow-up message to a running worker (task or legacy worker).
WorkerMailbox
A FIFO queue of pending messages for a single worker agent.
WorkerRegistry
Global registry mapping worker_id → WorkerMailbox.