Mailbox
The mailbox is the central communication bus for all agents in a project. Every task assignment, completion report, review result, and question flows through it. Messages are persisted to a JSONL log on disk and routed in memory by the Agenties broker — giving you both durability and low latency.
Message structure
Message types
| Type | Direction | Description |
|---|---|---|
task-assigned | Orchestrator → Agent | Carries the full task description, context, and any linked issue. Agents read this at turn start. |
task-done | Agent → Orchestrator | Reports task completion. Body contains a summary of what was done, files changed, and test results. Triggers orchestrator auto-wake. |
review-request | Agent / Orchestrator → Reviewer | Requests a code review. Includes the diff or file list to review and the acceptance criteria. |
review-result | Reviewer → Orchestrator | Contains verdict (approved/changes-requested/blocked) and specific comments. Triggers orchestrator auto-wake. |
question | Agent → Orchestrator / User | Agent is blocked and needs clarification. Orchestrator auto-wakes to answer or escalates to the user. |
answer | Orchestrator → Agent | Response to a question. The waiting agent resumes after receiving this. |
cancel | Orchestrator → Agent | Cancel cascade signal. Agent checks this at the start of each tool call. |
status | Agent → All | Progress update. Does not trigger auto-wake. Shown in the Agents panel. |
custom | Any → Any | Arbitrary inter-agent communication for advanced workflows. |
Routing addresses
The to field of a message determines who receives it. The broker supports several routing patterns:
| Address pattern | Delivers to |
|---|---|
agent:<agentId> | Specific running agent instance by ID |
orchestrator | The project orchestrator (triggers auto-wake if it is dormant) |
role:builder | Any available team member with role=builder (round-robin if multiple) |
broadcast | All currently running agents |
user | The Agenties user — appears as a message in the Chat tab |
user routing target is available only to the orchestrator. Sub-agents should route toorchestrator when they need human input — the orchestrator decides whether to escalate to the user or answer itself.Persistence
JSONL log
Every message is appended to .agenties/mailbox.jsonl immediately upon creation. This file is the source of truth for the mailbox — it is never deleted while Agenties is running.
Retention policy
The mailbox retains messages for 7 days or up to 5,000 messages, whichever limit is reached first. Older messages are trimmed from the tail of the JSONL file on startup. Read messages older than 24 hours are trimmed first.
In-memory broker
The Agenties main process runs an in-memory message broker that is populated from the JSONL log on startup. New messages are pushed to the broker and appended to disk simultaneously. The broker is used for:
MCP tools
read_messages
Agents typically call read_messages at the start of every turn with unreadOnly: true. The orchestrator calls it on every wake to process all pending results.
send_message
mark_read
Auto-trigger behaviour
The orchestrator auto-wake is one of the most powerful features of the mailbox system. When any of the following message types arrive in the broker, the orchestrator is woken automatically without any user action:
task-donereview-resultquestionThis creates a fully autonomous loop: you can assign a complex goal to the orchestrator, then step away. Agents execute, report back, the orchestrator re-plans, spawns more agents, and so on — until the goal is met or a blocking question requires your input.
/history in the chat, which renders all messages in a scrollable timeline with type filters. You can also export to JSON with /export json.