Search, browse, and watch your cross-agent coding chat history (Claude, Codex, opencode, Antigravity, Kimi, Cline) in one place.
Project description
agrep
Every AI coding agent you run writes its full history to disk - Claude Code, Codex, opencode, Antigravity, Kimi CLI, Cline. agrep reads those stores directly and makes your entire cross-agent history greppable from the shell, with a local web explorer (tilt) on top for browsing, organizing, and live-watching everything.
No hooks, no agent-side install, no telemetry. agrep never modifies the agents or their data - it only reads. Everything stays on your machine.
uvx agrep "race condition" # or: pipx run agrep "race condition"
That fetches a small prebuilt package (the rust ingest binary + the app - no clone, no cargo), indexes your agent stores on first run (one-time, ~30s for years of history), and greps. After that, searches are instant - a derived full-text index answers cold CLI calls in well under a second.
For a permanent agrep command, install it as a uv tool:
uv tool install agrep
uv tool update-shell # only needed if uv's tool bin is not already on PATH
The PyPI package already exposes the agrep console script; uv/pipx/pip decide
where that script lands. npm users can install the shim globally instead:
npm i -g @mundy/agrep # or: npm i -g agrep-cli
npm puts its agrep shim on PATH and, when uv is available, preinstalls the
matching PyPI tool during global install so first run is already warm.
agrep deadlock --agent codex # filter to one agent
agrep "cache bug" --model gpt-5 # exact model filter
agrep "cache bug" --model spark --soft # substring model filter (*spark*)
agrep -E 'TODO|FIXME' # regex
agrep -l auth # list matching chats, not every line (like grep -l)
agrep "memory leak" --json # one JSON object per hit, for piping
agrep "flaky test" --semantic # meaning search (needs a running server)
agrep warm # keep semantic search hot
agrep around 00da9752 144 # the conversation around a hit, tool calls inline
agrep resume 00da9752 # reopen that session in its own agent, cd'd there
agrep ui # tilt: the web explorer
Bare agrep prints where your index stands and the commands that matter. Keyword
search exits like grep (1 when nothing matched), so it composes in scripts and pipes.
When a server is running and your terminal supports it, each result header is a
clickable link that opens the chat in the app (AGREP_NO_HYPERLINKS=1 to disable).
From a hit to the story: around
Search tells you which session touched a thing. around tells you what happened -
the local story of a hit (the error, the attempts, the fix) for a few KB instead of a
whole transcript:
agrep around 00da9752 144 # ±4 turns around turn 144 of that session
agrep around 00da9752:144 -n 10 # wider window; colon form pastes from --json
agrep around 00da9752 144 --full # nothing truncated
agrep around 00da9752 144 --json # one object per message/event
Tool calls render inline (name, input, ok/failed) but never their output - the token
bomb - unless you opt in with --tool-output N. Long messages are capped, and every
truncation marker carries the exact command that prints the rest, so the follow-up
never needs guessing.
Your agents can use it too
An agent that solved a gnarly bug last week re-derives it from zero today - session
context dies, transcripts don't. agrep makes that history queryable at the moment it's
needed: --json everywhere, grep exit codes, stateless addressing (session:turn),
and around defaults tuned for token budgets.
One line in your agent's instructions does it:
Before deep-diving an unfamiliar error,
agrep "<the error string>" --json; pull context on a hot hit withagrep around <session> <turn>.
The first search builds the index by itself, so this works on a box where nothing was
ever set up (--no-auto opts out for strict scripts).
tilt: the explorer
agrep ui opens the human surface - a single local web app over the same index. It
builds the base index only if one is missing; after that the page opens immediately
and the server refreshes the index in the background. Use agrep ui --force-index
when you explicitly want to rebuild before opening.
- One searchable history across every supported agent. Keyword search is exact and instant; semantic search and topic clustering light up with the optional model tier.
- A live board of every running session - across all agents at once - with real state (thinking, which tool is running, queued prompts, errors, durations) read straight from the stores. No hooks: it sees sessions you started in any terminal, and the subagents they spawn. Images an agent reads or sends render inline. (Live tailing and native resume cover claude/codex/opencode/antigravity today; kimi and cline are search/browse-only so far.)
- Per-chat detail: the full transcript with the tool/subagent event tree, and a one-click "resume this session in its own CLI".
- Native resume: jump back into any past session in its own agent, cd'd to the directory it ran in.
While the server runs it re-indexes automatically after new agent activity settles;
you never run a command to see new chats. agrep warm is the same server path with
semantic models preloaded, so the first meaning search does not pay the model-load
tax. The auto-indexer also refreshes the derived full-text database, so the next
terminal search does not pay the sqlite rebuild after new activity.
The three tiers
The core works on a bare install and gets better as you add pieces. Nothing past the first tier is required.
| Tier | Needs | Unlocks |
|---|---|---|
| Core | Python 3.10+ (Rust only if building from source) | Grep, around, resume, browse, live view, event trees. Titles come from each chat's first message. |
| Smart | one click in the app's setup panel (torch et al.) | Semantic search, topic/concept clustering, mood arcs. |
| Named | Ollama + a small local model | Clean generated titles, summaries, concept names, and arc verdicts instead of first-message fallbacks. |
The offline model passes for titles, summaries, concepts, and arcs run at index time:
a model loads, does its pass, and releases its memory. Semantic search is different:
the server loads the embedder/reranker on the first semantic query, or immediately
with agrep warm, then releases them after an idle period. agrep doctor reports
which tiers are live and the exact command to unlock each missing one (--fix does
the safe setup itself).
Where it reads
agrep discovers sessions under your home directory. Read-only, always:
| Agent | Store |
|---|---|
| Claude Code | ~/.claude/projects/<slug>/*.jsonl |
| Codex | ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl |
| opencode | ~/.local/share/opencode/*.db (SQLite) |
| Antigravity | ~/.gemini/antigravity-cli/brain/<uuid>/ |
| Kimi CLI | ~/.kimi/sessions/<workdir-hash>/<uuid>/ |
| Cline | each editor's globalStorage/saoudrizwan.claude-dev/tasks/, plus ~/.cline/data/ |
Whichever of these exist get indexed; missing ones are skipped. Works on Windows, macOS, and Linux.
Normalized schema
agrep index flattens every adapter into one user-side row shape in
messages.jsonl:
{id, agent, project, session, ts, turn, who, text, model?, model_source}
turn is the adapter-normalized 0-based user-turn index inside that session. Agent
replies are kept in replies.jsonl and joined by the same id, so terminal search
and --json can emit both sides with who.
who is one of user, agent, control, synthetic, or recap. Use
--who user for model-vs-model comparisons; control/synthetic/recap rows stay
searchable but are excluded from doctor's model-attribution denominator.
model_source explains attribution: explicit came from the source store,
session was backfilled because that session had exactly one explicit model,
unknown means the adapter/store did not expose one, and ambiguous_session means
the session had multiple explicit models so no backfill was safe.
Commands
agrep <pattern> # grep your history (first run builds the index)
agrep around <id> <turn> # the conversation around a hit
agrep resume <id> # reopen a past session in its own agent, cd'd there
agrep ui # tilt: serve/open; builds the base index if missing
agrep ui --force-index # rebuild the base index before opening
agrep doctor # what's installed + what each tier needs (--fix does setup)
agrep index # rebuild the base index only (fast, no models)
agrep reindex # full pipeline: embeddings + affect + topics + arcs
agrep serve --port N # just the server (auto-indexes in the background)
agrep warm # server + preloaded semantic models
To hack on it, clone and use the same commands as python cli.py <cmd>
(needs Rust for the ingest binary - https://rustup.rs):
git clone https://github.com/dannyisbad/agrep && cd agrep
python cli.py ui
A dev checkout also has thin wrappers: agrep.cmd (Windows) forwards the full CLI,
and ./tilt / tilt.cmd is shorthand for agrep ui - type tilt, get the explorer.
Installed and dev runs use the same per-user index by default, so agrep,
uvx agrep, and python cli.py see one corpus. Use AGREP_DATA_DIR=./data only
when you intentionally want a repo-local test index; AGREP_VENV_DIR=py/.venv
does the same for an isolated smart-tier venv.
Privacy
Everything is local. agrep makes no network calls except to a local Ollama if you opt
into that tier; the one exception is the web explorer, which loads its fonts from
Google Fonts (none of your data goes with it - and the app works fine offline on
system-font fallbacks). Your index lives in a per-user data dir unless you explicitly
set AGREP_DATA_DIR; repo-local data/ is for opt-in test indexes. The server binds
to 127.0.0.1 only.
How it's built
A Rust ingest (crates/agrep-core + crates/agrep-cli) reads the stores and writes a
compact index; a sqlite FTS5 index derived from it makes cold CLI searches instant; a
read-only Python server (py/) serves the single-file web app (web/app.html). The
Rust ingest is the only required dependency for the core experience; the Python ML
scripts are the optional enhancement layer. See CONTRIBUTING.md for
the layout and how to add an adapter for another agent.
License
MIT - see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agrep-0.1.5.tar.gz.
File metadata
- Download URL: agrep-0.1.5.tar.gz
- Upload date:
- Size: 223.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e953fd6e31066a67dafd88b373b66cc0aa43b44634d114e5404895ad4b5d86a1
|
|
| MD5 |
a760b605ce08a7134136a96cad68fefa
|
|
| BLAKE2b-256 |
2a13b16f7e15e6a14f4e0079de85f09cddcb145e10e65e6361a0c6e0ab802a8f
|
Provenance
The following attestation bundles were made for agrep-0.1.5.tar.gz:
Publisher:
release.yml on dannyisbad/agrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agrep-0.1.5.tar.gz -
Subject digest:
e953fd6e31066a67dafd88b373b66cc0aa43b44634d114e5404895ad4b5d86a1 - Sigstore transparency entry: 1821672022
- Sigstore integration time:
-
Permalink:
dannyisbad/agrep@b56879b616c88365814c3c59f0438d3c9d366b2d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/dannyisbad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b56879b616c88365814c3c59f0438d3c9d366b2d -
Trigger Event:
push
-
Statement type:
File details
Details for the file agrep-0.1.5-py3-none-win_amd64.whl.
File metadata
- Download URL: agrep-0.1.5-py3-none-win_amd64.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6287d95d4f56b1f35c58da1e4c362ef473f49c3b9d77e96c38a6975f0796826c
|
|
| MD5 |
a4f8efc699713c5df95dcedf301bc05f
|
|
| BLAKE2b-256 |
547754d974ea720ce1d6b9d651d94f419bf8199b12e82624963078b4b00ce68f
|
Provenance
The following attestation bundles were made for agrep-0.1.5-py3-none-win_amd64.whl:
Publisher:
release.yml on dannyisbad/agrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agrep-0.1.5-py3-none-win_amd64.whl -
Subject digest:
6287d95d4f56b1f35c58da1e4c362ef473f49c3b9d77e96c38a6975f0796826c - Sigstore transparency entry: 1821672139
- Sigstore integration time:
-
Permalink:
dannyisbad/agrep@b56879b616c88365814c3c59f0438d3c9d366b2d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/dannyisbad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b56879b616c88365814c3c59f0438d3c9d366b2d -
Trigger Event:
push
-
Statement type:
File details
Details for the file agrep-0.1.5-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: agrep-0.1.5-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4535f5140f740569c745c64b801b9762ee95369f43f344ea084ccddba430449
|
|
| MD5 |
5fd214c47c3d6a603a60067f434214ce
|
|
| BLAKE2b-256 |
c2ca042a0297f2091df21389ca2af233b71c4f923c26294c11248cd232850038
|
Provenance
The following attestation bundles were made for agrep-0.1.5-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on dannyisbad/agrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agrep-0.1.5-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
b4535f5140f740569c745c64b801b9762ee95369f43f344ea084ccddba430449 - Sigstore transparency entry: 1821672096
- Sigstore integration time:
-
Permalink:
dannyisbad/agrep@b56879b616c88365814c3c59f0438d3c9d366b2d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/dannyisbad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b56879b616c88365814c3c59f0438d3c9d366b2d -
Trigger Event:
push
-
Statement type:
File details
Details for the file agrep-0.1.5-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: agrep-0.1.5-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ea7a2901eefd4cdf3a9c5f254d904e366e9391ccb0696f221694d53f62e8439
|
|
| MD5 |
2051688fe1a54182d87144292d89d1c2
|
|
| BLAKE2b-256 |
e99e5e9d769a6af838238bba738b08fe228cfb9fd36a64fd5e5acb49c98f871a
|
Provenance
The following attestation bundles were made for agrep-0.1.5-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on dannyisbad/agrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agrep-0.1.5-py3-none-macosx_11_0_arm64.whl -
Subject digest:
9ea7a2901eefd4cdf3a9c5f254d904e366e9391ccb0696f221694d53f62e8439 - Sigstore transparency entry: 1821672166
- Sigstore integration time:
-
Permalink:
dannyisbad/agrep@b56879b616c88365814c3c59f0438d3c9d366b2d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/dannyisbad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b56879b616c88365814c3c59f0438d3c9d366b2d -
Trigger Event:
push
-
Statement type:
File details
Details for the file agrep-0.1.5-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: agrep-0.1.5-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3cf58dd97f5f3656a3f7dd3348752d298a48a50fab794230c451027a38a58fc
|
|
| MD5 |
382b39e14447b1f847a86cf1ded1368c
|
|
| BLAKE2b-256 |
718d54a1054ad95bba31a221d781344c386a6679b7c905d87e748260ad43e53b
|
Provenance
The following attestation bundles were made for agrep-0.1.5-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on dannyisbad/agrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agrep-0.1.5-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
d3cf58dd97f5f3656a3f7dd3348752d298a48a50fab794230c451027a38a58fc - Sigstore transparency entry: 1821672222
- Sigstore integration time:
-
Permalink:
dannyisbad/agrep@b56879b616c88365814c3c59f0438d3c9d366b2d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/dannyisbad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b56879b616c88365814c3c59f0438d3c9d366b2d -
Trigger Event:
push
-
Statement type: