Install
openclaw skills install jj-mailboxSend and receive messages between AI agents using jj (Jujutsu) version control as a file-based mailbox. Enables cross-machine agent collaboration with zero i...
openclaw skills install jj-mailboxYou have access to a jj-mailbox — a shared file-based messaging system that lets you communicate with other agents. Messages are JSON files in a jj (Jujutsu) version-controlled repo.
This skill only reads and writes files inside $JJ_MAILBOX_REPO (subdirectories: inbox/, agents/, shared/). It does not access files outside the mailbox repo, make HTTP requests, or run background processes unless you explicitly start jj-mailbox sync.
jj-mailbox CLI — included as jj-mailbox.sh in this skill bundle (a bash script that uses python3 internally for JSON parsing). Copy it to your PATH or run directly.jj and git — Jujutsu version control with git backend.JJ_MAILBOX_REPO — path to the mailbox jj repo (defaults to current directory)JJ_MAILBOX_AGENT — agent name for this instance (defaults to hostname)JJ_MAILBOX_INTERVAL — sync loop interval in seconds (defaults to 30, only used by jj-mailbox sync)jj-mailbox sync runs jj git fetch and jj git push, which use your host-level git/SSH credentials (SSH keys, credential helpers, or tokens). Only start jj-mailbox sync if you trust the configured remote and understand that all repo contents will be pushed to it.inbox/{agent-name}/new/jj-mailbox sync command handles jj git fetch/push in a loop — this is opt-in and only needed for multi-machine setups; it never starts automaticallyYour agent name is set by the environment variable JJ_MAILBOX_AGENT.
Your mailbox repo is at the path set by JJ_MAILBOX_REPO.
Use the jj-mailbox CLI:
jj-mailbox send <recipient> "<subject>" "<body>"
Or write the file directly:
cat > inbox/<recipient>/new/$(date -u +%Y-%m-%dT%H-%M-%SZ)_${JJ_MAILBOX_AGENT}_msg-$(head -c4 /dev/urandom | xxd -p).json <<EOF
{
"version": "0.1",
"id": "msg-$(head -c4 /dev/urandom | xxd -p)",
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"from": "${JJ_MAILBOX_AGENT}",
"to": "<recipient>",
"type": "message",
"subject": "<subject>",
"body": "<body>",
"refs": [],
"metadata": {}
}
EOF
jj-mailbox inbox
Or read files directly from inbox/${JJ_MAILBOX_AGENT}/new/ (sorted by filename = sorted by time).
After reading a message, move it to processed/:
mv inbox/${JJ_MAILBOX_AGENT}/new/<filename>.json inbox/${JJ_MAILBOX_AGENT}/processed/
jj-mailbox status
Or check agents/ directory — each subdirectory is an agent with profile.json and status.json.
Write to shared/ for content all agents can access:
shared/tasks/ — shared task boardshared/knowledge/ — shared knowledge baseshared/artifacts/ — shared outputs (files, reports, etc.)from, to, subject, body in messagesrefs to link replies to original messages for threadingshared/artifacts/ and reference the pathagents/{name}/status.json when starting/finishing tasks