agent-mailbox — Mailbox and Wake System for AI Agent Teams
v0.7.6Mailbox + wake system for AI agent teams: letters always land, right agent wakes, quiet otherwise.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
mailbox_register
Register this member and claim its mailbox. Idempotent — safe to call again. ``kind`` (v0.7.5): ``owner`` (the human), ``agent`` (a local agent) or ``guest`` (an external source). Empty keeps the existing/default kind; an explicit kind is a visibility decision and is written to audit.log.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | |
description | string | |
kind | string | |
owner | string |
mailbox_send
Send a message to one agent, a list of agents, or "all" for broadcast. dedupe=True (default) suppresses a re-send of semantically identical mail to a recipient whose inbox still holds it non-terminal (pending / acked) within the 24h dedup window: that recipient's entry comes back as {"to", "deduped": true, "existing_id"} with zero side effects — no letter, no sent.log line, no webhook. Pass dedupe=False to exempt periodic jobs. "count" counts only letters that actually landed. v0.7.5: ``sealed=True`` marks a 密封信 — the body stays readable only through…
| Parameter | Type | Description |
|---|---|---|
body * | string | |
subject * | string | |
to * | ||
attention | string | |
dedupe | boolean | |
from_id | string | |
links | ||
origin | string | |
pairing_token | string | |
priority | string | |
reply_to | ||
sealed | boolean |
mailbox_check
Fetch your pending letters and your true backlog. Call at session start. v0.7.6 (F 状态可信): by default this is a **read-only probe** — letters stay ``pending``; counting mail never consumes it (禁自动 ack). The numbers report the mailbox as it is *right now*, straight from the store: - ``unread`` — 真·待办: letters currently ``pending``. Acked letters are never counted, so a mailbox full of acked-but-unhandled mail reports ``unread: 0`` honestly (the pre-0.7.6 bug: it counted the letters the call itself had just acked). - ``total`` — a…
| Parameter | Type | Description |
|---|---|---|
agent_id | string | |
mark | boolean |
mailbox_reply
Reply to a message thread. Routes to the original sender automatically.
| Parameter | Type | Description |
|---|---|---|
body * | string | |
msg_id * | string | |
agent_id | string |
mailbox_list
List messages in your mailbox, optionally filtered by status and/or thread. Spans inbox **and** archive: ``check()`` moves handled letters into the archive, so an inbox-only view reports zero for any agent that drains regularly (HS 09-24: five status queries all returned 0 against 877 on-disk letters). ``thread`` takes a thread_id, or any subject on the thread (legacy letters without a thread_id are matched by the subject key heuristic).
| Parameter | Type | Description |
|---|---|---|
agent_id | string | |
status | ||
thread |
mailbox_thread
Pull one thread in time order across every agent (inbox + archive). ``thread`` may be a thread_id, any message id on the thread, or a subject on the thread. Legacy letters without an id/thread_id are included via the subject-key heuristic (Re:/Fwd: prefixes stripped), so a 12-deep "Re: Re: ..." chain resolves to one thread. Letters come back oldest first with their status, so the full cross-agent conversation is visible in one call. v0.7.5 scope: an ``agent``/``guest`` caller sees only the letters it took part in (from/to includes them) — if the thread exist…
| Parameter | Type | Description |
|---|---|---|
thread * | string |
mailbox_done
Mark a message as handled. Done messages can be archived.
| Parameter | Type | Description |
|---|---|---|
msg_id * | string | |
agent_id | string |
mailbox_confirm_external
Human confirmation gate for an external-origin letter (§3.3). Flips ``origin`` external→local so the wake/webhook paths may act on it. Only an owner-kind member (``boss`` or a registered ``owner``) may confirm; the operation appends to audit.log and the letter's handled_log (greppable by name). Anything else is a structured rejection.
| Parameter | Type | Description |
|---|---|---|
msg_id * | string | |
actor_id | string |
mailbox_broadcast
Broadcast to every registered agent (including boss). dedupe=True (default) suppresses semantically identical re-broadcasts per recipient within the dedup window — see mailbox_send.
| Parameter | Type | Description |
|---|---|---|
body * | string | |
subject * | string | |
dedupe | boolean | |
from_id | string |
mailbox_whoami
List all registered agents and the mail root location.
mailbox_wait
Block until a new message arrives (long-poll, up to timeout). Returns immediately if pending messages exist. Import 'time' is at module top.
| Parameter | Type | Description |
|---|---|---|
agent_id | string | |
timeout_seconds | number |
task_create
Create a task card (starts at todo). The assignee is auto-messaged — skip with notify=False.
| Parameter | Type | Description |
|---|---|---|
assignee * | string | |
title * | string | |
due | string | |
from_id | string | |
notify | boolean |
task_move
Move a task along todo→doing→review→done. Skips need force=True; done is terminal. Pass assignee to reassign. The (new) assignee is auto-messaged — moving a card wakes its owner.
| Parameter | Type | Description |
|---|---|---|
status * | string | |
task_id * | string | |
assignee | ||
force | boolean | |
from_id | string | |
note | string | |
notify | boolean |
task_list
List task cards, optionally filtered by assignee and/or status.
| Parameter | Type | Description |
|---|---|---|
assignee | ||
status |