Expand description
Asynchronous message passing between agents.
The MailboxHub manages per-agent mailboxes and a global sequence number
(tokio::sync::watch<u64>) that notifies waiters when any result arrives.
§Architecture
Parent (LLM tools) Child (AgentRuntime task)
│ │
│ send_task() / send_message() │
├────────────────────────────────────────►│ task_rx
│ │
│ post_result() │
│◄────────────────────────────────────────┤ (via result_tx clone)
│ │
│ wait_for_result() watches seq_rx │
│ (blocks until seq changes) │Every post_result() increments the global sequence number, waking all
wait_for_result() callers.
Structs§
- Child
Mailbox - The child-side handle to a mailbox.
- Mailbox
Hub - Central hub for inter-agent message passing.
- Mailbox
Result - A result posted from child agent to parent.
- Mailbox
Task - A task sent from parent to child agent.
Enums§
- Mailbox
Status - Status of a result posted from child to parent.