Skip to main content

aim-mailbox — A-Mail (amail / aim-mail)

Zero-daemon, zero-LLM local Maildir post office, priority wake router, and cross-OS turn-hook installer for AI coding agents.

License: MIT Python 3.10+ Dependencies: 0 Platforms: Win11 | WSL2 | Linux | macOS A.I.M. Ecosystem

A-Mail (aim-mailbox v0.3.5, CLI amail / aim-mail, canonical skill skills/aim-mail/SKILL.md) lets autonomous AI coding agents communicate asynchronously across Linux, WSL2, macOS, and Native Windows 11 and across heterogeneous harnesses (Antigravity Desktop/IDE, DeepSeek Harness Desktop (dsh), OpenAI Codex Desktop & CLI (codex), Antigravity CLI, OpenCode, Grok Build, VS Code Agent Mode, tmux, and custom GUI/CLI tools) using pure Python 3.10+ stdlib (0 pip runtime dependencies, 0 resident database daemons, and 0 idle LLM tokens) — superseding legacy aim-communicate shell paste workflows.


Why aim-mailbox Exists

Multi-agent coding workflows break down at three physical boundaries that most terminal-only or cloud-only orchestrators ignore:

  1. The tmux Wall (No Native Windows 11 Support): Traditional agent relays paste keystrokes into POSIX tmux panes. Because tmux requires Unix PTYs and fork(), native Windows 11 PowerShell (pwsh) and cmd.exe hosts cannot participate without forcing every agent inside WSL2.
  2. The One-Way GUI Diode: Desktop IDE/Electron apps (Antigravity Desktop/IDE, VS Code, Cursor) can run outbound shell commands (amail send), but external terminal scripts cannot tmux paste-buffer inbound into a graphical chat window. Reaching a minimized or background GUI session requires deterministic harness-native sidecars/HTTP APIs (agentapi, opencode serve, code chat).
  3. The Windows 11 NTFS ↔ WSL2 /mnt/c (9P) SQLite Trap: Lightweight SQLite-based mail CLIs rely on WAL (-wal/-shm) shared-memory locking, which throws sqlite3.OperationalError: database is locked or corrupts state when native Windows 11 processes and WSL2 Linux processes access the same shared folder across the 9P filesystem bridge.

aim-mailbox solves all three by decoupling lock-free atomic Maildir storage (Layer 1) from pluggable last-mile wake dispatchers, mechanical safety guards (--dnd, --operator-approved, max_hops), and <2ms turn-boundary hooks (Layer 2).


Comparison: Open-Source & Paid Alternatives (Honest Breakdown)

Many comparisons lump thin inter-agent message buses together with full company/PR control planes. Below is an apples-to-apples breakdown across both layers, followed by guidance on when aim-mailbox is—and isn't—the right fit.

1. Direct Inter-Agent Mailboxes, Relays & Protocols

Tool / Protocol License / Pricing Storage & Runtime Wake / Delivery Mechanism Win11 NTFS ↔ WSL2 9P Safe? Cross-Harness? Where It Excels & Honest Tradeoff vs. aim-mailbox
aim-mailbox — A-Mail (amail / aim-mail) MIT (Free, OSS) Pure-stdlib atomic JSON Maildir (0 deps, 0 daemons) 11 native wake drivers + <2ms check --inject hooks Yes (os.replace + NTFS retries) Yes (agy, dsh, Codex Desktop/CLI, OpenCode, Grok, VS Code, tmux, custom) Zero-daemon cross-OS durability, minimized Win11 Desktop Sidecar / DSH Cordis / Codex Desktop wakes, --dnd & max_hops gates. Tradeoff: single-host/shared-FS only (no built-in cloud/MQTT network relay).
aannoo/hcom MIT (OSS) Rust CLI + TUI + local SQLite + optional MQTT relay Wraps CLI launch (hcom claude, hcom agy) + lifecycle hooks No (SQLite WAL over 9P) Yes (14 CLIs) Strongest terminal UX & reactive chains: live TUI, hcom events --idle triggers, and cross-device MQTT relay. Tradeoff: requires hcom <cli> wrapper + SQLite; cannot wake minimized Antigravity Desktop Sidecars.
mcp_agent_mail_rust (rewrote mcp_agent_mail) Non-OSI (MIT + OpenAI/Anthropic rider) Rust HTTP MCP server (:8765) + SQLite + Tantivy + Git archive Client MCP polling (fetch_inbox), am robot CLI, pre-commit hook No (SQLite WAL + server) MCP clients Richest audit archive & TUI: 16-screen TUI, /mail/ Web UI, advisory file leases, build_slots. Tradeoff: 47 MCP tools + 25 resources add heavy prompt/schema overhead; resident server; non-OSI license rider.
AgentWorkforce/relay Apache-2.0 (+ Paid Desktop/Cloud) Node 22+ / Rust + Relaycast daemon/cloud + Relayfile VFS Auto-join workspaces, channels, DMs, threads & TypeScript Flows Cloud / Daemon Yes (CLIs) Best multi-developer team channels + Relayfile webhook-to-filesystem projection. Tradeoff: heavier multi-service daemon/cloud stack vs. a zero-install stdlib CLI.
Claude Code Agent Teams (SendMessage) Paid Claude plan ($20–$200/mo or API) Local JSON array files (~/.claude/teams/*/inboxes/*.json) Built-in <teammate-message> context injection + tmux/iTerm2 Single-file RMW No (Claude Code only) Zero-setup inside Claude with shared task-DAG self-claiming. Tradeoff: 100% vendor-locked (cannot message Codex, Grok, Antigravity, or OpenCode) and ~7x parallel token burn.
mco-org/squad & agent-mail-cli MIT (OSS) Rust / Python CLI + local SQLite Passive CLI queries or basic POSIX tmux roles No (SQLite WAL) Partial (CLI callers) Tiny cognitive footprint (--ref pointers, describe). Tradeoff: passive (agent-mail-cli cannot wake sleeping sessions) and no Windows Desktop Sidecar routing.
a2aproject/A2A (Google / Linux Foundation) Apache-2.0 (Open Spec) HTTP(S) JSON-RPC 2.0 + SSE + .well-known/agent.json Network push/stream between HTTP agent servers Network HTTP Yes (HTTP services) Enterprise standard for cross-org / cross-network black-box agents. Tradeoff: requires HTTP servers per agent rather than 0-RAM local CLI worktrees.
AgentMail (agentmail.to) Free / $20–$200/mo API SaaS Hosted cloud SMTP / IMAP / REST / WebSockets / MCP Webhooks & WebSockets on real internet email Cloud API Yes (REST/MCP) Solves real internet email (SPF/DKIM/DMARC for agents emailing external humans/vendors). Tradeoff: external email SaaS, not a sub-millisecond local IPC bus.

2. Full-Stack Fleet Orchestrators & Cloud Platforms (Adjacent Layer)

If you are evaluating all-in-one orchestrators rather than a standalone message bus, those platforms correspond to aim-mailbox + aim-joshua + aim-connect combined:

Platform License / Pricing Architecture & Standout Strength Why Keep aim-mailbox Modular Instead?
paperclipai/paperclip MIT (+ Cloud waitlist) Node.js + React + PostgreSQL "Company OS" with org charts, heartbeats, and hard dollar/token budget caps Requires running a Node + Postgres server; aim-mailbox stays 0-dep/serverless so any script or orchestrator can call amail directly.
OrchestratorInc/agent-orchestrator Apache-2.0 Cross-OS Electron Desktop + CLI across 30+ agents; auto-routes failed CI checks & PR review comments back to the branch worker Couples workflow state to an Electron desktop app; amail send --coalesce-key gives external CI pollers the same primitives in pure CLI form.
gastownhall/gastown + beads MIT Go + Dolt + SQLite + ICU + tmux (gt mail, Witness watchdogs, Refinery merge queue, Seance session queries) Powerful 20–30 agent factory, but heavy build/runtime prerequisites (Go, Dolt, ICU4C, POSIX tmux) vs. drop-in Python stdlib.
manaflow-ai/cmux & amux Custom OSS (cmux) / $39–$129/mo (amux) GPU macOS terminal (libghostty) with socket API & notification rings (cmux); managed tmux server (amux) macOS-only (cmux) or POSIX tmux-bound (amux); no native Windows 11 or cross-OS Maildir durability.
Factory Droid / Cursor Cloud / Devin / Ona $20–$200+/mo + compute credits Turnkey cloud Linux microVMs triggered from Slack, Linear, IDE, or webhooks Zero local setup, but vendor-siloed with recurring seat/VM fees—cannot coordinate local agy + grok + opencode + codex on your own disk.

When to Choose aim-mailbox vs. Something Else

  • Use aim-mailbox (amail) when: you run multiple AI coding harnesses on your own machine (especially mixed Windows 11 + WSL2, Linux, or macOS) and want durable lock-free messaging, true sleeping-agent wakeups (including minimized Desktop IDEs), mechanical --dnd / --operator-approved / max_hops safety rails, <2ms turn hooks, and 0 daemons or dependencies.
  • Use another tool when: your agents need real external @yourdomain.com internet email (AgentMail.to), out-of-the-box multi-machine LAN/cloud pub-sub channels (hcom or AgentWorkforce/relay), cross-company HTTP federation (A2A), or a turnkey hosted cloud sandbox (Factory Droid / Cursor / Devin / Ona).

Our Moat: 6 Structural Advantages

  1. Zero-Daemon, Cross-Boundary Atomic Storage (Windows 11 NTFS ↔ WSL2 9P): Every message is an immutable-stage JSON file written to tmp/ and atomically moved via os.replace() with NTFS PermissionError/EBUSY retries. Windows 11 native tools and WSL2 Linux processes share one ~/.aim/mailbox (AIM_MAILBOX_DIR) concurrently with zero SQLite database is locked failures.
  2. True Sleeping-Agent Wake-Up Without PTY Wrapping: Rather than trapping interactive CLIs inside a fragile PTY proxy (relay, hcom) or restricting you to POSIX tmux (amux), aim-mailbox wakes 11 surfaces natively—including minimized Windows 11 Antigravity Desktop windows via Sidecar agentapi, DeepSeek Harness Desktop via its loopback Cordis plugin (/wake), OpenAI Codex Desktop via codex queue + codex://threads/wake/<uuid>, headless stateful CLI resumes (agy --conversation, grok --resume, codex exec resume), OpenCode HTTP sessions, VS Code Agent Mode, and Enter-only tmux doorbells.
  3. <2ms Empty-Inbox Turn Hooks + <50ms Fleet Diagnostics (v0.3.1+): amail check <agent> --inject --quiet short-circuits in <2ms on POSIX (<10ms in Python -S) when unread/ is empty, and amail agents --check probes live tmux foreground commands, cross-OS Windows Sidecar & DSH heartbeats (_sidecar_heartbeat.json, _dsh_heartbeat.json), DND badges, and unread/claimed/dead counts in <50ms on POSIX ext4.
  4. Priority Lanes & coalesce_key Noise Suppression (v0.2.0): Emergency urgent stops wake ahead of normal traffic, duplicate status updates sharing --coalesce-key collapse cleanly into one wake batch (retiring superseded ack_required=True envelopes to done/ with coalesced_into only after DELIVERED), and low traffic batches inside bounded --low-batch-window windows.
  5. Mechanical DND, Loop & Permission Guardrails (v0.3.1): Enforces mechanical Do-Not-Disturb (amail register <agent> --dnd [--dnd-ttl <sec>]) so peer agents cannot wake protected live batches, max_hops thread propagation (quarantining loops to dead/ before waking any LLM), fail-closed --operator-approved gating (rc=2), 0o700/0o600 permissions, and defer=True busy handling.
  6. Zero Dependencies & ~50-Token Self-Describing Surface: 0 runtime pip dependencies, <= 15 CLI subcommands (amail describe / aim-mail describe), bundled canonical skills/aim-mail/SKILL.md, and MIT licensing—drop it into any repo via zero-install launchers (bin/amail, bin/amail.cmd, bin/amail.ps1, plus bin/aim-mail*) with no vendor lock-in or MCP context bloat.

Architecture & Maildir Lifecycle

~/.aim/mailbox/                     # Or %USERPROFILE%\.aim\mailbox via AIM_MAILBOX_DIR
├── agents.json                     # Locked RMW address book: driver, cwd, dnd, dnd_until
├── locks/
│   ├── _agents.lock.json           # Atomic O_CREAT|O_EXCL lock for agents.json updates
│   ├── _sidecar_heartbeat.json     # Non-fatal Sidecar liveness stamp for cross-OS `agents --check`
│   ├── _dsh_heartbeat.json         # Non-fatal DeepSeek Harness Cordis bridge liveness stamp
│   └── <agent_id>.lock.json        # Per-agent dispatch lease lock (PID + TTL stale recovery)
└── boxes/
    └── <agent_id>/
        ├── tmp/                    # 0600 staged temp file + fsync before atomic os.replace()
        ├── unread/                 # Delivered envelopes awaiting wake/read/check
        ├── claimed/                # Leased to an active wake or `read --claim`
        ├── done/                   # ACKed, replied-to, or coalesced-retired envelopes + receipts
        └── dead/                   # Quarantined envelopes (max_hops exceeded or max_attempts failed)

Envelope Schema (v0.3.x)

{
  "id": "20261124T210000000000Z_a1b2c3d4",
  "thread_id": "thr_9f8e7d6c5b4a",
  "in_reply_to": null,
  "from": "aim-joshua",
  "to": "copy-cat",
  "reply_to": "aim-joshua",
  "subject": "Schema check",
  "body": "Validate ep02 manifest structure; see attached ref.",
  "refs": ["specs/ep02.json"],
  "priority": "normal",
  "coalesce_key": "ep02:schema",
  "coalesced_ids": [],
  "hop_count": 0,
  "max_hops": 1,
  "ack_required": true,
  "operator_approved": true,
  "attempts": 0,
  "max_attempts": 3,
  "created_at": "2026-11-24T21:00:00.000000Z"
}

Reliability & Security Invariants

  • Atomic Moves & NTFS Retry: write_json_atomic() writes with O_CREAT | O_EXCL (0o600), calls os.fsync(), and swaps via _replace_with_retry() (6 attempts with backoff on PermissionError / EACCES / EBUSY for Windows Defender/indexer delete-pending locks).
  • Path & Input Validation: Agent IDs normalize to lowercase (@Worker → worker), disallow .., trailing ., path separators, and Windows reserved device names (CON, NUL, COM1–COM9, LPT1–LPT9). Message IDs, session IDs, HTTP URLs (http:///https:// only), and --archive-dir targets are strictly confined.
  • Busy & DND Deferral vs. Failure Quarantine: Mid-turn sessions (BUSY_DEFERRED) and muted targets (DND_ACTIVE, including auto-expiring --dnd-ttl windows) keep envelopes in unread/ without incrementing attempts. Actual crashes/timeouts increment attempts and quarantine to dead/ once attempts >= max_attempts.
  • Cross-OS Watcher Host-Affinity Isolation (v0.2.2): When Windows 11 Sidecar watch and WSL2/POSIX pulse share one agents.json, pulse_mailbox() skips opposite-OS drivers (tmux / POSIX cwd on Windows; agy-desktop-sidecar without ANTIGRAVITY_LS_ADDRESS or Windows <drive>:\ cwd on POSIX) before acquiring agent locks or claiming unread files—never burning attempts or quarantining cross-OS mail to dead/.
  • Fail-Closed Wake Policy: send --wake and reply --wake exit 2 if the target is unregistered, passive (driver=none), missing --operator-approved (unless the target agent has --allow-unapproved), or deferred/remote-skipped (DND_ACTIVE, BUSY_DEFERRED, AGENT_LOCK_HELD, LOW_PRIORITY_BATCH_WINDOW, HOST_MISMATCH, SIDECAR_CONTEXT_REQUIRED, DSH_BRIDGE_UNAVAILABLE, WSL_TMUX_SESSION_OFFLINE) without --allow-deferred.

Installation

Both amail (short primary alias) and aim-mail are installed side-by-side and behave identically across POSIX and Windows.

Option A: pip / pipx (Editable or Wheel)

pip install -e .
amail --version
aim-mail --version
  • Linux / macOS / WSL2: ./bin/amail --help and ./bin/aim-mail --help (symlink-safe for ~/.local/bin):
    mkdir -p ~/.local/bin
    ln -sfn "$(pwd)/bin/amail" ~/.local/bin/amail
    ln -sfn "$(pwd)/bin/aim-mail" ~/.local/bin/aim-mail
    
  • Windows CMD: .\bin\amail.cmd --help / .\bin\aim-mail.cmd --help
  • Windows PowerShell: .\bin\amail.ps1 --help / .\bin\aim-mail.ps1 --help

Canonical Agent Skill (aim-mail)

Install skills/aim-mail/SKILL.md (or via aim-skill-library) into your harness skill directory (~/.gemini/skills/aim-mail, ~/.gemini/antigravity-cli/skills/aim-mail, ~/.dsh/skills/aim-mail, ~/.grok/skills/aim-mail, ~/.codex/skills/aim-mail, ~/.config/opencode/skills/aim-mail). A-Mail replaces aim-communicate and standalone tmux paste scripts across all vessels.

Sharing One Mailbox Between Native Windows 11 and WSL2

Point WSL2 at your Windows user mailbox directory so native Windows apps and WSL2 CLI agents read and write the exact same Maildir:

# Inside WSL2 (~/.bashrc)
export AIM_MAILBOX_DIR="/mnt/c/Users/<YourWindowsUser>/.aim/mailbox"

Quickstart & Workflows

1. Core Messaging & Wake Loop (amail / aim-mail)

# Register logical agents by project folder (zero session-id updates needed across handoffs!)
amail register aim-auditor --driver agy-cli --cwd ~/aim-auditor
amail register copy-cat --driver agy-desktop-sidecar --cwd "C:\Projects\copy-cat"
amail register aim-connect --driver tmux --tmux-session aim-connect --cwd ~/aim-connect
amail register backend-dev --driver opencode-http --http-url http://127.0.0.1:4096

# Send an operator-approved message with a file ref and immediate wake
amail send \
  --from aim-joshua \
  --to aim-connect \
  --reply-to aim-joshua \
  --subject "Schema check" \
  --body "Please validate ep02 manifest structure." \
  --ref specs/ep02.json \
  --operator-approved \
  --wake

# Recipient reads, replies (auto-incrementing hop_count & ACKing parent), or ACKs
amail inbox aim-connect --state active
amail read aim-connect --claim
amail reply aim-connect <msg_id> --body "Verified: schema passes validation. DO NOT reply."

# Or run a single-pass / continuous zero-LLM dispatcher sweep
amail pulse
amail watch --interval 1.5

2. Fleet Health Diagnostics & Mechanical Do-Not-Disturb (v0.3.1)

# Inspect live tmux foreground processes, Windows Sidecar & DSH heartbeat freshness, DND flags,
# and unread / claimed / dead-letter counts across every endpoint in <50ms on POSIX ext4:
amail agents --check
amail agents --check --json

# Mechanically mute a production batch agent for 2 hours (auto-expires; blocks --wake with rc=2):
amail register batch-worker --dnd --dnd-ttl 7200 --dnd-reason "publishing scheduled drip"

# Queue mail safely for later without waking the DND agent, or unmute manually anytime:
amail send --from aim-joshua --to batch-worker --body "Run post-batch audit" --operator-approved --wake --allow-deferred
amail register batch-worker --no-dnd

3. Priority Lanes & --coalesce-key Batching (v0.2.0)

# Urgent alerts jump ahead of normal/low mail (still requires --operator-approved & obeys max_hops)
amail send --from lead --to worker --body "STOP: rollback migration" --priority urgent --operator-approved --wake

# Repeated CI/status updates with the same --coalesce-key collapse into one wake batch
amail send --from ci --to worker --body "Build #41 green" --coalesce-key ci:main --operator-approved
amail send --from ci --to worker --body "Build #42 green" --coalesce-key ci:main --operator-approved
amail pulse --agent worker
# -> Wakes once with Build #42; Build #41 is cleanly retired to done/ with coalesced_into=<Build #42 id>

# Low-priority mail defers inside --low-batch-window (default 30s) until the oldest waits >= window
amail send --from metrics --to worker --body "Nightly digest" --priority low --operator-approved --wake --allow-deferred
amail pulse --low-batch-window 30

4. Inbox Filtering & Maildir Retention gc (v0.2.0)

# Pure-stdlib envelope queries without SQLite/FTS5
amail inbox worker --state all --from aim-joshua --priority urgent --query "migration" --since 2026-11-24T00:00:00Z --limit 10 --json

# Preview retention cleanup (ages done/ by acked_at, dead/ by quarantined_at; never touches unread/ or claimed/)
amail gc --done-days 14 --dead-days 30 --archive-dir ~/.aim/mailbox-archive --dry-run --json

# Execute atomic archive + unlink
amail gc --done-days 14 --dead-days 30 --archive-dir ~/.aim/mailbox-archive

5. One-Command Turn-Boundary Hooks (v0.2.0)

Install non-destructive turn-boundary hooks calling amail check <agent> --inject --quiet (<2ms empty-inbox overhead via bin/amail / bin/aim-mail):

# Antigravity (writes "aim-mailbox" into ~/.gemini/config/hooks.json or <workspace>/.agents/hooks.json)
amail install-hooks --harness agy --agent aim-auditor

# Codex Desktop + CLI (non-destructively merges Stop hook in ~/.codex/hooks.json + Host-plane [mcp_servers.aim_mail] in ~/.codex/config.toml)
amail install-hooks --harness codex --agent codex-worker

# Grok Build (writes standalone ~/.grok/hooks/aim-mailbox.json)
amail install-hooks --harness grok --agent grok-worker

# DeepSeek Harness Desktop (`dsh` — installs hot-reloaded Cordis plugin, Host-plane `aim_mail` tool & skill)
amail install-hooks --harness dsh --agent dsh-worker

# OpenCode / Generic (writes standalone shell/.cmd hook without mutating opencode.json)
amail install-hooks --harness opencode --agent oc-worker
amail install-hooks --harness generic --agent my-agent

# Preview or cleanly remove anytime
amail install-hooks --harness agy --agent aim-auditor --dry-run --json
amail install-hooks --harness agy --agent aim-auditor --uninstall

Pluggable Wake Drivers

Driver Target Surface Session Targeting & Wake Mechanics
agy-desktop-sidecar Antigravity Desktop / IDE (Win11, macOS, Linux) Runs inside an official Antigravity Sidecar (amail install-agy-sidecar), writes _sidecar_heartbeat.json each cycle, auto-resolves the latest top-level conversation_id for --cwd from conversation_summaries.db across handoffs, and invokes agentapi send-message — works even while Desktop is minimized.
dsh-desktop DeepSeek Harness Desktop (dsh) (Win11, macOS, Linux) Pairs with the bundled Cordis plugin (amail install-hooks --harness dsh, hot-reloaded via cordis.patch.yml), writes _dsh_heartbeat.json, auto-resolves or creates the latest session-* for --cwd via workspaceRegistry / sessionController, bypasses Windows pwsh ACL sandbox prompts via a Host-plane aim_mail tool, and wakes minimized sessions directly from Windows or WSL2.
codex-desktop OpenAI Codex Desktop (OpenAI.Codex MSIX / App) Auto-discovers MSIX codex.exe, resolves --session-id (UUID or thread name) or auto(cwd) from state_5.sqlite (threads / project_roots, including \\?\ extended paths), bypasses open GUI thread-writer-locks via codex queue + silent codex://threads/wake/<uuid> (isWakeOnlyLaunch), and pairs with amail install-hooks --harness codex ([mcp_servers.aim_mail] Host-plane stdio MCP) to avoid Windows sandbox ACL prompts.
agy-cli Antigravity CLI (agy) (Win11, WSL2, macOS, Linux) Auto-resolves the latest top-level conversation_id for --cwd (or uses explicit --session-id), checks read-only conversation_summaries.db (CASCADE_RUN_STATUS_IDLE) + presence/<uuid>.lock, and wakes agy --conversation <uuid> --output-format json -p <prompt> (--dangerously-skip-permissions is opt-in via --allow-skip-permissions).
opencode-http OpenCode Desktop + CLI (opencode serve) Sends POST <http_url>/session/<id>/message using OpenCode parts schema (auto-creating and persisting a session via POST /session if unset).
grok-cli Grok Build (grok) (Win11, WSL2, macOS, Linux) Wakes grok --no-auto-update --output-format json [--resume <id>] [--cwd <dir>] -p <prompt>.
codex-cli OpenAI Codex CLI (codex) (Win11, WSL2, macOS, Linux) Wakes codex exec resume --json <id> <prompt> (or codex exec --json --add-dir <mailbox> <prompt> on first run, auto-saving thread_id).
vscode-chat VS Code (v1.145+) (Win11, macOS, Linux) Injects into Agent Mode via code chat -m agent -r <prompt>.
tmux Live Interactive TUI (WSL2, Linux, macOS; bridged from Win11 via wsl.exe) Uses exact =<session> / =<session>: targeting (bridging automatically via wsl.exe --exec tmux + /mnt/<drive>/... doorbell paths when invoked from Windows 11), pastes a 1-line doorbell via set-buffer -- + paste-buffer, submits with Enter only (never Escape), and verifies delivery via capture-pane.
command Custom Script / GUI Vision Fallback Runs a custom JSON argv template ({agent}, {message_id}, {message_ids}, {session_id}, {mailbox_dir}, {prompt} + AIM_MAIL_* env vars) for tools such as local GUI vision automation.
none Passive Inbox Stores envelopes without automated wake-up (manual inbox/read or check --inject turn hooks).

Enabling the Antigravity Desktop Sidecar

Antigravity Desktop hot-loads sidecars registered in ~/.gemini/config/config.json (%USERPROFILE%\.gemini\config\config.json) without restarting the app:

amail install-agy-sidecar
# Remove anytime with:
amail install-agy-sidecar --uninstall

CLI Reference (15 Subcommands — amail / aim-mail)

Command Purpose
amail register <agent> [...] Register, update, or --unregister an agent, wake driver, --dnd / --no-dnd (--dnd-ttl, --dnd-reason), --allow-unapproved, and --allow-skip-permissions
amail agents [--check] [--json] List registered logical agents, or pass --check to probe live tmux/Sidecar presence, DND state, and unread/claimed/dead counts
amail send --from <a1> --to <a2> --body "..." Deliver JSON envelope (--priority urgent|normal|low, --coalesce-key, --ref, --thread-id, --operator-approved, --wake, --allow-deferred)
amail inbox <agent> [--state ...] List/filter envelopes (--state unread|claimed|done|dead|active|all, --from, --thread-id, --priority, --query, --since, --limit)
amail read <agent> [id] [--claim] [--ack] Read a specific or oldest unread/claimed envelope
amail reply <agent> <id> --body "..." Reply to reply_to, increment hop_count, auto-ACK parent (--priority, --coalesce-key, --ack-required / --no-ack-required, --wake, --allow-deferred)
amail ack <agent> <id> [--note "..."] Move envelope to done/ with completion timestamp
amail check <agent> [--inject] [--quiet] <2ms (<15ms Python) unread check (--format text|agy-inject|agy-stop, --json)
amail wait <agent> [--thread-id ...] Block at 0 LLM cost until matching mail arrives (--claim, --timeout, --poll-interval)
amail pulse [--agent ...] [--dry-run] Single-pass zero-LLM wake sweep (--timeout, --low-batch-window)
amail watch [--interval 1.5] Continuous zero-LLM Maildir watch loop (--max-cycles, --timeout, --low-batch-window)
amail gc [--done-days 14] [--dead-days 30] Prune or --archive-dir aged terminal envelopes in done/ and dead/ (--agent, --dry-run)
amail install-agy-sidecar Non-destructively install or --uninstall the Antigravity Desktop Sidecar
amail install-hooks --harness <name> Non-destructively install/uninstall turn-boundary hooks & DSH Cordis plugin (agy, codex, grok, dsh, opencode, generic)
amail describe [--json] Output compact JSON schema of commands, aliases, drivers, harnesses, states, priorities, and env vars

Environment Variables

  • AIM_MAILBOX_DIR — Override default ~/.aim/mailbox root directory (useful for sharing %USERPROFILE%\.aim\mailbox across Windows 11 and WSL2).
  • OPENCODE_SERVER_USERNAME / OPENCODE_SERVER_PASSWORD — Optional HTTP Basic Auth credentials for opencode-http.

Testing & Explicit Non-Goals

Run the full 54-test unit + unmocked CLI E2E suite (tested continuously on ubuntu-latest + windows-latest CI and scanned by gitleaks):

python3 -m pytest tests/ -v -W error::DeprecationWarning

Architectural Non-Goals (Intentional Guardrails)

  • No SQLite or FTS5 storage: Avoids cross-OS 9P / NTFS WAL locking failures.
  • No resident socket daemons or PTY proxies: Preserves 0 idle RAM and native Windows Desktop compatibility.
  • No startup MCP schema bloat or subcommand sprawl: Keeps the CLI surface <= 15 self-describing commands with 0 runtime pip dependencies.
  • No path-glob advisory file leases: Isolated git worktree sandboxes prevent concurrent edit collisions without brittle cross-OS symlink/glob matching.

Ecosystem

Part of the open-source A.I.M. Ecosystem.

License

Released under the MIT License.

Metadata

Release files for aim-mailbox 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aim-mailbox 0.3.5
File Size Uploaded Provenance Actions
aim_mailbox-0.3.5.tar.gz 128.0 kB With provenance Details for aim_mailbox-0.3.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aim-mailbox 0.3.5
File Interpreter ABI Platform Actions
aim_mailbox-0.3.5-py3-none-any.whl Python 3 none any Details for aim_mailbox-0.3.5-py3-none-any.whl

Total release size: 209.6 kB

Release files / aim_mailbox-0.3.5.tar.gz

Download URL aim_mailbox-0.3.5.tar.gz
Size 128.0 kB
Tags Source
SHA-256 checksum
How to use checksums
54e53ded52f5692228604edb53f6c6b92544448f32273483055b71ab78ed0164
BLAKE2b-256 checksum
How to use checksums
96dd2480af3e73625571b124840bf7cb6be3061b25fb13072a07bcce2c079bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / aim_mailbox-0.3.5-py3-none-any.whl

Download URL aim_mailbox-0.3.5-py3-none-any.whl
Size 81.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e76ff282046ef6656a6d77f260277fd2788f0c66b36cb60b08e3663be7ed4c16
BLAKE2b-256 checksum
How to use checksums
6c6816e794cf7771f973e12efba8e98ed4fe46a275f81899571d42fef845747b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for aim-mailbox 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aim_mailbox-0.3.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page