agent-session-recorder
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-session-recorderstart a session for this bug fix and export the redacted timeline as markdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π©οΈ agent-session-recorder
The code is the result. The session is the artifact.
A local-first flight recorder for AI coding agents. Every prompt, tool call, and decision, on one redacted timeline.
What: it records Claude Code, Codex CLI, and any MCP host into one normalized JSONL timeline. You can export it as Markdown or HTML, or watch it live.
Why: a diff shows you what changed. The session shows you how the agent got there: the prompts, the tool calls, the dead ends. That part is usually lost.
How: everything stays on your machine. Secrets are redacted before anything touches disk. Reasoning is stored only when the provider exposes it, and it's labelled honestly.
Status: v0.1. The adapters are built against documented formats and tested on synthetic fixtures. Real-world transcripts are wanted (#10).
β‘ 30-second quickstart
Not on npm yet, so install from a clone:
git clone https://github.com/SM260845/agent-session-recorder && cd agent-session-recorder
npm ci && npm run build && npm link # installs the `agent-session-recorder` command
agent-session-recorder init # dry-run: detects claude/codex, prints the config it would add
agent-session-recorder init --write # Claude hooks (+ .bak) and Codex MCP config
agent-session-recorder view # live timeline at http://127.0.0.1:4318No agent handy? Open examples/claude-fixture-1.html to see a recorded session.
More commands: import-claude <file>, codex import|tail [--latest], mcp, export <id> --format md,html,jsonl, list, redact. Flags: --research (shrinks large or repeated tool output), --no-redact (you probably don't want this one).
Related MCP server: roxabi-sense
π₯ What gets captured
Source | Prompts & replies | Reasoning | Tool calls / results | Timing | Tokens / model |
Claude Code (hooks + transcript) | β |
| β Pre/PostToolUse | β measured | β |
Codex CLI (rollout import + live tail) | β |
| β exit code β error | β | β |
MCP (any host) | only what the agent logs | only what the agent sends | only what the agent sends | β event ts | if sent |
Direct APIs (OpenAI / Anthropic / xAI) | π #1 | π #3 |
The MCP server (start_session, log_event, end_session, export) only knows what the host tells it. SKILL.md asks agents to report their plan, decisions, and outcome. Schema details are in docs/event-schema.md.
π Privacy
Local only. Data is written to
~/.agent-session-recorder/with0600file permissions. No network calls, no telemetry, no cloud.Redaction always runs before a write. Keys, tokens, emails, phone numbers, IPs, Luhn-valid cards, and home-dir usernames become placeholders like
[API_KEY_1]. Only a salted hash β placeholder map is kept.It's regex, so it's best-effort. Review exports before you share them. Found a leak? That's a security issue. More in docs/redaction.md.
π Sealed sessions
Events are hash-chained as they are written. seal <id> --timestamp adds a Merkle batch with an RFC 3161 timestamp, and verify <id> reports OK or the exact tampered lines. See docs/sealed-sessions.md.
To ship a proof-carrying PR, run bundle <sessionId> --intent <YYYYMMDD-slug> [--timestamp | --tsa url]. It records a sealed proof.link event tying that intent to the current git HEAD, refuses to write a bundle if verify fails, and writes .proof/<intent>.json by default. Reviewers can then run the independent proof-check flow against that JSON bundle instead of trusting the local CLI output alone.
π§ Architecture
flowchart LR
A[Claude Code hooks/transcripts] --> R
B[Codex rollout files] --> R
C[MCP host] --> R
R[Recorder<br/>redact β research-shrink] --> S[(JSONL per session)]
S --> E[Export: md / html / jsonl]
S --> V[Live viewer :4318]More detail in docs/architecture.md and docs/adapters.md.
π οΈ Contribute in 10 minutes
Pick a
good first issue. Each one points to the files you'll need.npm ci && npm run build && npm test: green in well under a minute.Read CONTRIBUTING.md (it's short). Using an AI agent? Point it at AGENTS.md.
Have questions or ideas? Head to Discussions.
πΊοΈ Roadmap
API proxy #1 Β· Grok CLI adapter #2 Β· xAI reasoning #3 Β· NER redaction #4 Β· Session diff #5 Β· Cost charts #6 Β· Dataset export #7 Β· OTel #8 Β· Cloud sync #9 Β· Real-session validation #10
π The series behind it
License
MIT. Record freely.
This server cannot be deployed
Maintenance
Related MCP Connectors
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
A paid remote MCP for agent memory MCP, built to return verdicts, receipts, usage logs, and audit-re
Remote MCP for A2A failure replay MCP, structured receipts, audit logs, and reviewer-ready evidence.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceLocal MCP server that signs and records agent actions into a tamper-evident log using Ed25519 keys for frictionless integration with Touchstone.33 npmApache 2.0
roxabi-senseofficial
AlicenseBqualityBmaintenanceLocal workstation attention journal that tracks focus, idle, and agent sessions, exposing timeline data via MCP for AI agents to query current or past activity.5AGPL 3.0- AlicenseCqualityAmaintenanceEnables coding agents to query, compare, and audit local profiler traces, benchmarks, memory captures, and execution evidence without uploading code or data, using CLI and MCP interfaces.11139 PyPI114MIT
- AlicenseNot gradedqualityBmaintenanceEnables transparent MCP proxying with a hash-chained effect ledger, classifying agent actions by reversibility, enforcing approval gates, and dry-run previews of sessions.MIT