Skip to main content
Glama
README.md
<p align="center">
  <img src="assets/logo.svg" alt="Agent Blackbox Logo" width="96" height="96" />
</p>

<h1 align="center">Agent Blackbox</h1>

<p align="center">
  <strong>Flight Data Recorder for AI Coding Agents.</strong><br/>
  Auto-discover local <strong>Antigravity</strong>, <strong>Claude Code</strong>, and <strong>Codex</strong> sessions, automatically scrub secrets &amp; PII, inspect interactive step-by-step timelines, and export standalone shareable HTML replays.
</p>

<p align="center">
  <a href="https://github.com/oguzhan-yildirim/agent-blackbox/actions"><img src="https://img.shields.io/badge/CI-passing-22c55e?style=flat-square" alt="CI Status" /></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-f97316?style=flat-square" alt="MIT License" /></a>
  <img src="https://img.shields.io/badge/MCP_App-SEP--1865-f59e0b?style=flat-square" alt="MCP App" />
  <img src="https://img.shields.io/badge/Node-%3E%3D20-34d399?style=flat-square" alt="Node 20+" />
</p>

---

## Why Agent Blackbox?

AI coding agents leave behind rich JSONL flight logs full of prompts, tool invocations, shell outputs, file edits, and errors — scattered across different directories and incompatible schemas. Sharing a session in a GitHub PR, bug report, or engineering postmortem is painful and risky because raw transcripts routinely contain API keys, JWTs, auth headers, emails, and local usernames.

**Agent Blackbox** solves this locally in one click — as an **Antigravity Plugin + MCP App**, a **universal MCP server**, and a **standalone CLI**:

- **Multi-Agent Auto-Discovery** — Scans and parses native local transcripts across:
  - **Google Antigravity**: `~/.gemini/antigravity/brain/*/.system_generated/logs/transcript.jsonl`
  - **Claude Code**: `~/.claude/projects/*/*.jsonl`
  - **Codex**: `~/.codex/sessions/**/*.jsonl`
  - **Custom JSONL**: Open and replay any `.jsonl` log file directly.
- **Deterministic Redaction Shield (Zero Leakage)** — Automatically scrubs sensitive data *before* rendering or exporting, and shows exact per-category proof counters (`API keys`, `Tokens`, `Emails`, `Home paths`):
  - GitHub tokens (`ghp_`, `gho_`, `github_pat_`), OpenAI/Anthropic keys (`sk-`, `sk-ant-`), Google API keys (`AIza`), AWS keys (`AKIA`/`ASIA`), Slack tokens (`xoxb-`), npm/HF tokens, and PEM `PRIVATE KEY` blocks
  - JWTs (`eyJ...`), `Bearer ...`, `Authorization:` headers, `x-codeium-csrf-token`, `x-api-key`
  - Email addresses → `[REDACTED_EMAIL]`
  - Local home paths (`/Users/<name>/...`, `/home/<name>/...`, `C:\Users\<name>\...`) → `~/...`
- **Standalone Zero-Dependency HTML Flight Replays** — Export any session to a single offline `.html` file (`<slug>-replay.html`) ready to attach to a PR, drop in Slack, or host on GitHub Pages. Includes dark/light toggle, session KPIs, clickable files-touched filters, search bar, collapsible tool inputs/outputs, Redaction Shield badge, and strict XSS escaping.
- **Interactive Antigravity MCP App** — Native side pane (`+` menu) and full-page sidebar dashboard with automatic light/dark host theming, live session filtering, timeline inspection, and 1-click HTML export.

---

## Quick Start

### 1. Google Antigravity Plugin (Full Interactive MCP App UI)

```bash
git clone https://github.com/oguzhan-yildirim/agent-blackbox.git
cd agent-blackbox
npm install
npm run build
npm run install:antigravity
```

Antigravity discovers the plugin automatically — no restart required:
- Open **Agent Blackbox** from the left **Sidebar** or side pane **`+`** menu.
- Or ask in chat: *"Open Agent Blackbox and export my latest session as a redacted HTML replay."*

### 2. Claude Code / Cursor / Codex (Universal MCP Server)

Add `agent-blackbox` to your MCP config (`~/.claude.json`, `.cursor/mcp.json`, or Codex MCP config):

```json
{
  "mcpServers": {
    "agent-blackbox": {
      "command": "npx",
      "args": ["-y", "github:oguzhan-yildirim/agent-blackbox"]
    }
  }
}
```

Or point directly to a local build:

```json
{
  "mcpServers": {
    "agent-blackbox": {
      "command": "node",
      "args": ["/absolute/path/to/agent-blackbox/dist/server.js"]
    }
  }
}
```

### 3. Standalone CLI

```bash
# List recent local sessions across Antigravity, Claude Code, and Codex
node dist/server.js list
node dist/server.js list --agent=antigravity --limit=15

# Inspect a session timeline with redaction shield summary (ID, prefix, or .jsonl path)
node dist/server.js inspect <session-id-or-path>

# Export a standalone, zero-dependency, redacted HTML flight replay
node dist/server.js export <session-id-or-path> --out=./pr-flight-replay.html
```

---

## Architecture

```mermaid
flowchart LR
  Host["Antigravity / Claude Code / Cursor / Codex"] <-->|MCP stdio| Server["Agent Blackbox MCP Server"]
  Host <-->|ui://agent-blackbox/app.html| UI["Interactive Flight Recorder UI"]
  UI <-->|app.callServerTool| Server
  Server --> Discovery["Multi-Agent Session Discovery\n(Antigravity · Claude · Codex · Custom)"]
  Discovery --> Redactor["Deterministic Redaction Shield\n(API Keys · Tokens · Emails · Paths)"]
  Redactor --> Timeline["Timeline Inspector"]
  Redactor --> Exporter["Standalone HTML Replay Generator\n(Zero-Dep · Offline · XSS-Safe)"]
  Discovery -. reads .-> Logs["~/.gemini · ~/.claude · ~/.codex"]
  Exporter -. writes .-> HTML["${PLUGIN_DATA}/replays/*.html"]
```

---

## MCP Tools Reference

| Tool | Visibility | Description |
| :--- | :--- | :--- |
| `open_agent_blackbox` | Model + UI | Opens the interactive Agent Blackbox Flight Recorder UI (`aux_pane` and `global` sidebar entrypoints; works with `{}`). |
| `list_agent_sessions` | Model | Auto-discovers local sessions across Antigravity, Claude Code, and Codex with redacted metadata & KPIs. |
| `inspect_agent_session` | Model | Parses a session by ID, unique prefix, or `.jsonl` path into a redacted timeline with exact per-category redaction counts. |
| `export_session_replay` | Model | Exports a standalone, zero-dependency, XSS-safe interactive HTML flight replay to disk. |
| `app_list_sessions` | App-only | Internal UI tool for fast filtering and refreshing. |
| `app_inspect_session` | App-only | Internal UI tool for loading full session timelines. |
| `app_export_replay` | App-only | Internal UI tool for 1-click HTML export from the dashboard. |

---

## Development

```bash
npm install
npm run typecheck   # Strict TypeScript check
npm run build       # Bundles dist/app.html (single-file) + dist/server.js
npm test            # Unit tests (redactor, multi-agent parsers, HTML XSS) + MCP stdio E2E
npm run install:antigravity
```

---

## Agent Toolkit Suite

Part of an open-source suite of developer tools for the Antigravity & MCP agent ecosystem:

- [**find-my-skill**](https://github.com/oguzhan-yildirim/find-my-skill) — Search, security-audit, preview, and one-click install AI Agent Skills (`SKILL.md`) from GitHub.
- [**mcp-xray**](https://github.com/oguzhan-yildirim/mcp-xray) — Live inspector, latency profiler, and payload debugger for MCP servers and tool calls.
- [**agent-blackbox**](https://github.com/oguzhan-yildirim/agent-blackbox) — Flight recorder, secret redactor, and standalone HTML replay exporter for AI coding sessions.
- [**skill-doctor**](https://github.com/oguzhan-yildirim/skill-doctor) — Static linter, security auditor, and quality grader for `SKILL.md` agent skill repositories.
- [**mcp-switchboard**](https://github.com/oguzhan-yildirim/mcp-switchboard) — Unified profile switcher and router for managing MCP servers across Antigravity, Claude Code, Cursor, and Codex.

---

## License

MIT © 2026 [Oğuzhan Yıldırım](https://github.com/oguzhan-yildirim)

TDQS

C2.9/5.0

Scored across 7 tools

Disambiguation2/5

The set contains three near-duplicate pairs: app_list_sessions vs list_agent_sessions, app_inspect_session vs inspect_agent_session, and app_export_replay vs export_session_replay. Only the 'Internal UI tool' phrasing in the description distinguishes them, which is easy for an agent to miss when selecting a tool.

Naming Consistency3/5

Most names follow a verb_noun pattern (list_agent_sessions, inspect_agent_session, export_session_replay), but this is undermined by parallel app_-prefixed variants and by open_agent_blackbox, which uses a different verb style and no resource-target structure. Readable, but two conventions coexist.

Tool Count4/5

Seven tools is a well-scoped size for a session flight-recorder server. The count is reasonable, though three of the seven exist only to mirror the same operations for the UI layer.

Completeness4/5

The browse → inspect → export → open-UI lifecycle is fully covered, including redaction, which is the core value proposition. Minor gaps: no content search across sessions, no delete/cleanup for generated replays, and no way to annotate or tag sessions.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues