Spa retreats for your AI. Reset, refresh, relax.
Even autonomous agents need an occasional out-of-office day. After hours of grepping codebases, wrestling compiler errors, and accidentally pasting .env credentials into their own logs, your agent's session history gets tense.
Agent OOO is a fast, local Rust day spa (agent-ooo, alias ooo) and Model Context Protocol server (agent-ooo-mcp) that checks in tired AI agent transcripts between tasks. It scrubs leaked API keys and tokens from session logs, strips terminal ANSI residue, offloads oversized payloads into cold storage, and locks session metadata into a compact Cap'n Proto checkpoint. Everything runs locally on your machine. Nothing leaves the sanctuary.
Agent OOO ships prebuilt binaries (agent-ooo, ooo, and agent-ooo-mcp) for macOS (Apple Silicon) and Linux (x86_64).
Homebrew
The formula lives in this repository, so pass the repository URL when tapping:
brew tap mrtibbets/agent-ooo https://github.com/mrtibbets/agent-ooo
brew install agent-oooManual download
Download the archive for your platform from GitHub Releases, extract it, and place agent-ooo, ooo, and agent-ooo-mcp in your $PATH.
From source (requires Rust and Cap'n Proto):
cargo install --git https://github.com/mrtibbets/agent-ooo agent-ooo
cargo install --git https://github.com/mrtibbets/agent-ooo agent-ooo-mcpFrom a local clone:
cargo install --path crates/cli
cargo install --path crates/mcpThe signature treatment is spa. Run it with no arguments to automatically discover your most recent active session across 7 supported agent harnesses (Antigravity, Antigravity IDE, Claude Code, Codex CLI, Cursor, Windsurf, or Cline), or pass a specific .jsonl transcript path.
agent-ooo spa
ooo -y spa
ooo checkin --card
ooo spa ~/.claude/projects/<project>/<session>.jsonl
ooo detox --all
ooo detox --redact-in-place --backupPass -y (or --latest) to skip the interactive session picker and automatically select the most recent active session. Non-interactive agent shells (ANTIGRAVITY_AGENT=1, CLAUDECODE=1, CI=1, or TERM=dumb) automatically select the latest session without blocking.
You can also book individual treatments (checkin, detox, reset, discharge, export, init-skill) a la carte. Run ooo checkin --card to render a compact, screenshot-ready terminal vitals card (without the ASCII banner), or run ooo detox --all (or -a) to run a machine-wide credential posture scan across every discovered session on the host.
- Checkin (Intake, guest vitals & triage): Admits the session to the spa, parses the transcript in a constant-memory stream (ignoring sidechain sub-queries), extracts guest vitals (agent harness, model ID, tool cadence and error rate, top tools, thinking ratio, and token pace), detects identical tool-and-argument loop locks, and assigns a 4-tier wellness condition (
Elite,Fit,Fair,Fatigued) alongside a multi-factor "Rot Index." Pass--cardto output a compact, color-coded ANSI terminal vitals card summarizing condition, rot index, top tools, API spend, and leaked secret counts. - Detox (Deep-tissue cleanse & credential hygiene): Uses a fast-path byte-slice pre-filter in
sanitizer.rsbefore regex or JSON DOM parsing to strip terminal ANSI escape codes and detect or mask leaked secrets (Anthropic, OpenAI, Google, GitHub, AWS, Bearer tokens, PEM private keys, and JWTs including decodedroleclaims such asservice_role), pins Generation 0 system directives and durable user anchors, and spills payloads over 512 KB intoblake3content-addressed cold storage while recording CAS recall handles. Pass--all(-a) to run a machine-wide credential posture audit across all discovered agent sessions, or pass--redact-in-place(optionally with--backupfor ablake3-verified.bakcopy) to atomically scrub leaked credentials from source transcripts (including siblingtranscript_full.jsonlfiles) while preserving line endings and clean turns byte-for-byte. - Reset (Structural alignment & state compaction): Correlates tool calls and outcomes across turns (
EventStream), severs recursive intent-hash error loops within a 6-event sliding window, extracts durable user directives (NegativeConstraint) across the full session, capturesvalidIf-bound host git registers, and locks both session metadata and the refreshedgen0Arena+transientArenaconversation turns into a zero-copy Cap'n Proto checkpoint (checkpoint.capnp) alongside a portable JSON copy. - Discharge (Exit exam, cold-storage recall & spa report): Runs the 5-check zero-LLM canary suite (
checkpoint_structural_integrity,unresolved_tool_failure,unverified_late_edit,stub_or_conflict_injectionvia streaminggit diff -U0 HEAD, andenvironment_register_freshnessfor git HEAD drift), evaluates exit wellness (Elite,Fit,Fair,Fatigued), supports bounded cold-storage payload retrieval (ooo discharge --recall <blake3>), and issues.agent-ooo/spa_report.mdandspa_report.json.
When handing a session off to another agent or piping conversation history into an external reviewer (such as vet --history-loader), ooo export streams a secret-scrubbed, ANSI-stripped transcript in constant memory:
ooo export --format normalized
ooo export --format handoff --max-turns 50 --output handoff.mdWhen --output is omitted, ooo export suppresses the ASCII banner and streams directly to stdout so it can be piped safely without leaking .env keys or multi-megabyte tool payloads.
Generate the turnkey Agent OOO skill bundle (skills/agent-ooo/SKILL.md) and pre-push git verification hooks for your project:
# Generate skill bundle in ./skills/agent-ooo
ooo init-skill
# Install pre-push git hook running ooo discharge before git push
ooo init-skill --hooks
# Or using the alias:
ooo init-hooks
# Target a specific agent harness (antigravity, claude, cursor, codex, git, all)
ooo init-skill -H claude --target .claude/skills/agent-ooo
# Print skill markdown directly to stdout
ooo init-skill --stdoutThe generated skill teaches agents when to book each treatment (checkin, detox, spa, discharge, export) and provides harness configuration examples for Antigravity, Claude Code, Cursor, Codex CLI, and Git lifecycle hooks.
Agents can also check themselves into the spa. agent-ooo-mcp exposes the same 6 commands over standard I/O using the Model Context Protocol (JSON-RPC 2.0), so any MCP-capable agent can audit its own transcripts for leaked credentials, inspect checkpoints, or export sanitized handoffs as a native tool call.
Add agent-ooo-mcp to your MCP client configuration (such as Antigravity, Claude Code, or Cursor):
{
"mcpServers": {
"agent-ooo": {
"command": "agent-ooo-mcp",
"args": []
}
}
}The MCP tool surface mirrors the CLI subcommands 1:1:
spa: Runs the full 4-step retreat (checkin,detox,reset,discharge) non-interactively and writes checkpoints andspa_report.mdto.agent-ooo/.checkin: Triages a session transcript (Rot Index, token count, tool call repetitions), or lists discovered sessions across Antigravity, Antigravity IDE, Claude Code, Codex CLI, Cursor, Windsurf, and Cline whenlist_sessions: trueis passed.detox: Streams a session transcript (or every discovered session on the machine withall_sessions: true) in constant memory. Automatically prefers siblingtranscript_full.jsonlfiles for Antigravity sessions so truncated tool outputs are still inspected. Hashes raw tokens withblake3and returns only masked previews (first 7...last 4), line numbers, and occurrence counts so raw credentials are never echoed back into the agent's context window.reset: Correlates tool events, severs recursive intent-hash loops, extracts user negative constraints and git environment registers, and writes.agent-ooo/checkpoint.capnpand.agent-ooo/checkpoint.json.discharge: Runs the 5-check Clinical & Behavioral Canary Suite and deserializes.agent-ooo/checkpoint.capnpand.agent-ooo/checkpoint.json, returning session metadata,validIf-bound git environment registers, event stream count, preserved negative constraints, CAS recall handles, persisted arena counts, and structured canary findings (PASS/WARN/FAIL). Passrecall_handle(with optionaloffsetandmax_bytes) to retrieve bounded slices of spilled >512 KB cold-storage payloads on demand.export: Streams a secret-scrubbed, ANSI-stripped transcript in"jsonl","normalized", or"handoff"format (rendering"handoff"directly from the sanitized, loop-severed.agent-ooo/checkpoint.capnparena when present for the session).
Running a treatment leaves your source transcripts untouched (unless ooo detox --redact-in-place is explicitly passed) and writes its artifacts to .agent-ooo/ in the target workspace:
.agent-ooo/
├── checkpoint.capnp # Packed Cap'n Proto binary checkpoint
├── checkpoint.json # Portable JSON companion checkpoint
├── spa_report.md # Clinical verification & detox summary for humans
├── spa_report.json # Machine-readable telemetry certificate
└── spillover/ # Content-addressed cold storage for payloads > 512 KB
└── <blake3>.bin
If you installed with Homebrew, upgrade with Homebrew:
brew upgrade agent-oooIf you installed manually, the built-in updater pulls the latest agent-ooo binary from GitHub Releases:
agent-ooo updateagent-ooo update replaces the agent-ooo binary in place. To update ooo and agent-ooo-mcp on a manual install, extract them from the latest release archive or run brew upgrade agent-ooo.
Agent OOO is organized as a three-crate Rust workspace (crates/core, crates/cli, crates/mcp). It uses Cap'n Proto (schema/session_checkpoint.capnp) for zero-copy binary checkpoint serialization (persisting EnvironmentRegister, EventStream, NegativeConstraint, LossManifest, gen0Arena, and loop-severed transientArena), blake3 for content-addressed payload spilling and zero-retention secret deduplication, and a generational memory arena that pins system instructions (Gen 0) and durable user anchors while cycling transient turns through a ring buffer. See CHANGELOG.md for the complete milestone ledger.
For operational guidelines and pre-commit protocols for AI agents working in this repository, see AGENTS.md.