Read local AI agent sessions (Claude Code, Codex, OpenCode, Antigravity, Pi): intents, plans, tools
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
English | Π ΡΡΡΠΊΠΈΠΉ | δΈζ | ζ₯ζ¬θͺ | EspaΓ±ol
An agent reported "done." There's nothing to check it against.
ai-r reads the session history of any of the five coding agents and lets a
fresh agent cold-check what git can't answer:
Across our own corpus β 1600+ sessions of five agents in 20+ projects β that's how we found 312 risky commands (
rm -rf,curl|sh,git push --force): the agent caught and rolled back two itself; the other 310 ran silently βgitwon't show them.
git shows what made it into the code; ai-r shows whether you can trust
how the agent got there. Read-only: no LLM calls, no network.
The primary mode is MCP: an agent (Claude, Codex, β¦) calls ai-r directly
and asks about history in plain language. For example β pull the plan the
previous agent settled on, drafts discarded:
Fast edit attribution β one terminal command, across every agent at once:
One cause: every agent writes its history its own way β Claude and Codex in JSONL, OpenCode in SQLite, Antigravity in "brain" directories, Pi in per-project JSONL. Five formats, five layouts β together they don't reconcile.
ai-r folds all five into one read-only interface. Point any agent β or a
script, or yourself β at any session, no matter which tool recorded it. One
query shape per agent; format differences are normalized inside the parsers.
Even with a single agent it works: you audit your own Claude history (or Codexβ¦). The five formats are so your history doesn't break when you switch tools β not a requirement to have all five.
In an "LLM + external data source" setup (RAG), ai-r is the source β more
precisely, a retrieval layer over agent sessions. For a query it returns not a
slice of log but parsed entities: the plan, the intent, the authorship of an
edit β with a reference to the body the agent can pull if it needs it.
It doesn't replace your RAG over code and docs; it adds a source the others can't reach. The usual sources you retrieve from: documentation, commit history, Stack Overflow, internal wikis, code bases, bug reports. Agent sessions aren't on that list β even though only there is it recorded why an edit happened at all.
Retrieval is BM25 (ranked keyword search), with optional semantic re-ranking. No vector database, no second LLM: all local, results reproducible. BM25 here isn't a shortcut β GitHub lists it alongside vector retrievers: "Common retrievers include sparse methods like BM25 and dense vector retrievers using neural networks."
Each item is a trust question from the first screen and the verb that answers it:
dropped_drafts) and checks it against what actually made
it into the edits β catching "did X per plan Y" where Y is no longer that
plan. (plan, session_diff)rm -rf, curl|sh, git push --force) and, from the turns that follow,
sees whether the agent caught it and rolled back β or it passed silently.
(incidents, query tool_kind=bash)> file under codex) that a plain diff misses.
(find-file-edits, find-tool-calls)session_stats with_tokens, aggregate group_by=model)query with_intent)Deterministically, with no second LLM guessing β and honest about the edges:
rm -rf, curl|sh,
git push --force, β¦). Anything obfuscated (exec(input())) the pattern
won't catch β that's a declared boundary, not a silent miss.ai-r won't infer a silent rollback, it honestly
says "not confirmed".ai-r doesn't decide for you. It lays the plan
entity next to the session's reconstructed edits (session_diff) β the
mismatch is visible to you or a reviewing agent. That's evidence assembly, not
a semantic verdict.Zero LLM calls, read-only β the numbers are reproducible and "confirmed" is never guessed.
/compact erases
the specifics. Instead, open a fresh session: it reads the previous session's
logs and continues from its conclusions, without re-burning context on
what's already been worked out. The original session stays intact β for audit
and search. The new session can run in any agent: the history reconciles
regardless of the tool.ai-r gives you, for AI chats, what you already do with
message history β parsed entities to build a lasting memory of the details
that matter.A handful of cross-agent tools now read more than one agent's history
(jazzyalex/agent-sessions, Dicklesworthstone/coding_agent_session_search,
hacktivist123/agent-session-resume). Almost all are about search and
timeline: find a session, scroll the history.
ai-r goes deeper: it extracts the plan, intent, and authorship as ready-made
entities you build memory on. Search finds text β ai-r answers why.
Technically a search tool could also dig a plan out of a session's text, but it
doesn't hand it back parsed into a single, normalized shape β with ai-r that's
the primary surface.
| Capability | Single-agent viewers | Cross-agent search tools | ai-r |
|---|---|---|---|
| Reads >1 agent's logs | No | Yes | Yes β Claude, Codex, OpenCode, Antigravity, Pi |
| Programmatic surface | Mostly GUI/TUI | Mostly TUI/CLI/app | MCP + CLI + Python SDK |
| Attribution (edit/command β agent + intent) | β | Partial | Yes β find-file-edits / find-tool-calls |
| Audit replay (reconstruct a session's changes, no git) | β | Rarely | Yes β session_diff |
| Plan extraction (final vs draft, normalized) | β | β | Yes β plan |
| Scope | Viewer | Search / resume / memory | Read-only extraction core |
Competitor columns reflect their public docs as of 2026-07; where a capability is unclear we under-state rather than over-claim.
We deliberately don't compete on agent breadth, speed, or TUI richness.
ai-r's wedge is extracting the "why" and structured entities for machine
consumption.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ai-r)<a href="https://allmcps.com/mcp/ai-r"><img src="https://allmcps.com/api/badge/ai-r?style=directory" alt="AI R on AllMCPs" /></a>