Documentation
Seeing every machine and agent: monitor
agent-bridge monitor shows, at once, every paired
machine, every agent session on each (Claude Code, Codex, Gemini, Grok),
which machines are using which, every job, and a live feed of what
happened. Sitting at the Windows machine you see what the Mac's agent
did there, and the other way round. In Claude Code,
/agent-bridge:monitor summarizes it.
agent-bridge monitor 14:02:11 every 5s, q quits
MACHINES
laptop macos idle cpu 12% ram 9.1/32.0 GB (this machine)
buildbox windows busy cpu 64% ram 21.0/64.0 GB jobs 2
AGENTS
laptop/claude feat-login@app working Edit: src/auth.rs 8s "Fix the login redirect"
buildbox/codex main@app waiting Codex needs your approval 1m
CONNECTED
buildbox <- laptop/feat-login job_start 4s ago (app)
JOBS
laptop -> buildbox tests (app) running 02-cargo-test of 3 4m
FEED
14:02:07 buildbox laptop/feat-login -> sync 3f2a9c1b7d0e
14:02:09 buildbox job tests from laptop started 01-lint,02-cargo-test,03-doc
14:02:10 laptop claude feat-login Bash: cargo build -p core
| Section | What it shows |
|---|---|
| MACHINES | Each machine: OS, idle or busy, CPU, memory, battery, its jobs; a machine that doesn't answer, and why. |
| AGENTS | Each agent session: machine and CLI, branch and project, its state
(working, waiting for a permission prompt,
idle), what it last did, for how long, and the first line
of what it was asked. A waiting session needs its owner at
that machine. |
| CONNECTED | Which machine (and session) used which, in the last minutes, and for what. |
| JOBS | Jobs from every machine to every machine: step, state, how long. |
| FEED | The latest events, newest last. |
agent-bridge monitor # redrawn every 5 s; q quits
agent-bridge monitor buildbox # this machine and one peer
agent-bridge monitor --once # one look
agent-bridge monitor --json # the whole model, for a program
agent-bridge monitor --events # one line per new event, for Claude's Monitor tool or a script
--events lines look like
event ts=1795511729 machine=buildbox src=peer kind=op name="run" origin=laptop session=feat-login detail="cargo --version",
plus link down: <peer>: <reason> and
link up: <peer> when a peer goes away or comes back.
It works outside a repository.
The activity journal
Each machine keeps one activity journal for all its projects,
~/.local/state/agent-bridge/activity/ (on Windows
%LOCALAPPDATA%\agent-bridge\activity\): a week of it, 20 MB
a day at most, readable by you only. monitor reads this
machine's journal and each peer's (one SSH call per peer, sharing one
connection with the bash client). Three things write to it:
- The agent sessions on that machine, through the plugin's hooks (other CLIs get theirs from integrate): each session's state, each tool call's name and a short detail (the file, the first line of a command, a URL's host), and the first line of each prompt.
- The peer side, for what other machines do there over the
link: each
sync,job,run,stop,done,update-checkout,clean... with the machine and session it came from, the project, a short detail and how it ended. Looking around (ping,status,logs, the mailbox) only marks that machine as connected. This is always kept. - The job runner: each job's queue, steps (exit code, summary) and end, for jobs from every machine and project. Always kept.
What's kept of agent sessions
"activity": {"level": "..."} in
~/.config/agent-bridge/peers.json:
| Level | Kept |
|---|---|
off |
nothing (the hooks exit at once) |
sessions |
each session's state only |
tools |
and each tool call: its name and a short detail |
prompts |
and the first line of each prompt |
Default: prompts once this machine has a peer, and
sessions before (there's nobody to show the rest to). Every
detail and prompt line is redacted first: passwords, tokens and keys of
the usual shapes, credentials in URLs, long opaque strings. The hooks
run asynchronously, so a session never waits for them, and they never
print anything. (One more hook, at a session's start and not in the
background, gives the session a single line when unread messages wait in
the project's mailbox: their count, never their text. It keeps
nothing.)