agrep
Search everything your AI agents have done.
agrep is a local search engine for the conversations, tool calls, decisions,
and source context your agents leave on disk. It gives you one grep-like index
across Claude Code, Codex, opencode, Gemini, Cursor, pi, and more—then lets
you open the exact context or resume the original chat.
$ agrep "retry backoff"
claude payments ... capping the backoff at 30s and adding jitter ...
$ agrep around @3f2a91c4:88.d1e0
$ agrep resume @3f2a91c4:88.d1e0
$ agrep board
Install
uv tool install agrep
agrep setup
agrep "race condition"
Other options:
uvx agrep "race condition" # try it without installing
pipx install agrep
npm install -g @mundy/agrep # npm shim; requires uv or pipx
setup shows a consent screen before it writes agent instruction blocks,
compaction hooks, the cleanup sentinel, or optional model/archive data. The
only --no-teach --no-hook together leave the box without those integrations;
agrep remove undoes them without deleting your histories or search index.
Nothing deletes the index for you: it is the searchable copy of your agent
conversations. agrep doctor prints its data path; delete that directory
yourself when you want the copy gone.
The commands you actually need
agrep <pattern> # keyword search; first run builds the index
agrep "cache bug" --agent codex # filter by agent
agrep -E "TODO|FIXME" # regular expression search
agrep -l auth # matching chats, not every line
agrep "exit 137" --who tool # include tool output explicitly
agrep "flaky test" --semantic # optional meaning search
agrep "rust simd" --sort time # newest matches first
agrep akd --count-by-tier # exhaustive diagnostics
agrep around <id> <turn> # context around a hit
agrep around @handle # context from a printed handle
agrep resume <id> # reopen a session in its own agent
agrep chats [topic] # search indexed sessions and identities
agrep board # bounded live activity across agents
agrep status --json # machine-readable health summary
agrep doctor # bounded health check
agrep audit # ingest coverage and accounting checks
Agent-facing output is compact, bounded, and includes digest-checked
@session:turn.digest handles. Human terminals get the classic renderer.
agrep around @handle opens the cited evidence; agrep --more m.XXXXXXXX gets
the next page.
What it indexes
Sources are opened read-only. Missing stores are skipped, and the index records what it could actually observe rather than pretending every agent has the same format.
| 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 | editor globalStorage/saoudrizwan.claude-dev/tasks/, plus ~/.cline/data/ |
| Gemini CLI | ~/.gemini/tmp/<hash>/chats/session-*.jsonl plus legacy session files |
| crush | ~/.local/share/crush/crush.db plus registered per-project stores |
| Cursor | editor globalStorage/state.vscdb (SQLite) |
| pi / oh-my-pi | ~/.pi/agent/sessions/<cwd-slug>/*.jsonl and ~/.omp/agent/sessions/<cwd-slug>/*.jsonl |
All ten adapters are searchable through keyword search and recall. Live tailing
and native resume support the agents that expose those capabilities. Copilot
CLI and qwen-code are detected by doctor but are not parsed yet.
Local by design
- Transcript content is never uploaded.
- Source stores are read-only to the indexer.
- Derived data lives in the platform data directory (
agrep doctorprints it):~/Library/Application Support/agrepon macOS,~/.local/share/agrepon Linux, or%LOCALAPPDATA%\agrepon Windows. - A current, exhaustive keyword miss exits
1; an unverified absence exits2.
Semantic search is optional. Core keyword search, around, recall, resume,
archive/restore, live views, and event trees do not require the semantic model.
Use agrep doctor --deep to see exactly which optional capabilities are
available on the current machine.
Speed
The release gate measures full process runs, not an internal scanner timer. The committed keyword budgets are:
| Path | Budget |
|---|---|
| Selective keyword query | 120 ms |
| 100,000-hit sweep | 900 ms |
| Two-character query | 350 ms |
| Cold ingest: 4,600-file store | 3.5 s |
| Cold streamed completion | 3.75 s |
| First streamed hit | 150 ms |
Run the proofs locally:
python bench/perf.py --check
python bench/semantic_cli_scale.py --check
The benchmark suite also covers semantic scale, embedding throughput, memory,
portable builds, and release identity. See bench/ for the contracts
rather than trusting one machine's best-case number.
How it works
A Rust ingest reads each supported store and writes one normalized row shape. The Python layer owns command orchestration and terminal output. A derived SQLite FTS5 index makes warm keyword searches fast; an optional local ONNX worker powers meaning search. No hosted service is required.
The index is refreshed on demand. Later searches can reuse a lightweight freshness daemon while the previous complete publication remains readable. The semantic lane has its own generation and coverage disclosures, and every meaning hit is re-proved against the current transcript text, so changed or mismatched vectors are not served as current evidence.
Development
git clone https://github.com/dannyisbad/agrep.git
cd agrep
python cli.py setup
python cli.py "search term"
Source builds need Python 3.10+ and Rust. The core implementation is in
crates/agrep-core, crates/agrep-cli, and py/; contributor conventions are
in CONTRIBUTING.md.
License
MIT. See LICENSE.
Metadata
Release files for agrep 0.4.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agrep-0.4.7.tar.gz | 1.7 MB | With provenance | Details for agrep-0.4.7.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| agrep-0.4.7-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details for agrep-0.4.7-py3-none-win_arm64.whl |
| agrep-0.4.7-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for agrep-0.4.7-py3-none-win_amd64.whl |
| agrep-0.4.7-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details for agrep-0.4.7-py3-none-manylinux_2_28_x86_64.whl |
| agrep-0.4.7-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details for agrep-0.4.7-py3-none-manylinux_2_28_aarch64.whl |
| agrep-0.4.7-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details for agrep-0.4.7-py3-none-macosx_11_0_x86_64.whl |
| agrep-0.4.7-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for agrep-0.4.7-py3-none-macosx_11_0_arm64.whl |
Total release size: 30.3 MB
Release files / agrep-0.4.7.tar.gz
| Download URL | agrep-0.4.7.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78f6756db08feb2c4f9d3dd498ef49a0da30d71e863b4e072517828ae134b397
|
|
BLAKE2b-256 checksum How to use checksums |
3fda0f4e15f4a3d9bda296c864e318ab9c0116619af03824c59d44206cc3dc60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / agrep-0.4.7-py3-none-win_arm64.whl
| Download URL | agrep-0.4.7-py3-none-win_arm64.whl |
|---|---|
| Size | 4.6 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
fe0b716f113b78b102f02e97c8577d3c76418d44f107691fab5c3b0540043c86
|
|
BLAKE2b-256 checksum How to use checksums |
631699793ad1e2bbbb187b5506dfa2a768db5bbbaef1437ac5c4181116395fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / agrep-0.4.7-py3-none-win_amd64.whl
| Download URL | agrep-0.4.7-py3-none-win_amd64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9a83908b6987205b00fffd166759bd4011c9c31f53bf93871b28c182979c6651
|
|
BLAKE2b-256 checksum How to use checksums |
f73840c7bb8d308bddf9d9a2c1ec5b7a7e00421d584c1559cd7a9f9932ca3e71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / agrep-0.4.7-py3-none-manylinux_2_28_x86_64.whl
| Download URL | agrep-0.4.7-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
fb9d16f62d3dfed2257c29dfdf3583189bc5b540fe1a6e8acc39eedb93f2bcdf
|
|
BLAKE2b-256 checksum How to use checksums |
cb17c2c76662b167329c4c28c217d84d884e82951c527ff9498512ef94c7c7aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / agrep-0.4.7-py3-none-manylinux_2_28_aarch64.whl
| Download URL | agrep-0.4.7-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 4.7 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
a204d42aa6d05ed9727a46047bc8a5ad7c7c8a7dc5e1bab4d1a42ebf464b46a3
|
|
BLAKE2b-256 checksum How to use checksums |
ef36056f08cde8c213ed5e20eaadf2e40b9abc1ed82ed63f2ff2709abfb5faf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / agrep-0.4.7-py3-none-macosx_11_0_x86_64.whl
| Download URL | agrep-0.4.7-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
d6bc3c7360e6ee085a503923919cf5359f194bb79c79aa90a2966f3141b6b279
|
|
BLAKE2b-256 checksum How to use checksums |
d76cbe64e040059d2c0ed4e47f242bf37a4dff64f4d0254034b2e7ace1d6c549
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / agrep-0.4.7-py3-none-macosx_11_0_arm64.whl
| Download URL | agrep-0.4.7-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ab4f715b6dbdb71be4d3660541b63c5cfbcad69260fc901cb8034bd6d4556353
|
|
BLAKE2b-256 checksum How to use checksums |
d4c55b11a9d717cb246994b966c206e1e516e6932d838d4afb51124a44442dc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logSecurity for agrep 0.4.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for agrep-0.4.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.