Skip to main content

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 doctor prints it): ~/Library/Application Support/agrep on macOS, ~/.local/share/agrep on Linux, or %LOCALAPPDATA%\agrep on Windows.
  • A current, exhaustive keyword miss exits 1; an unverified absence exits 2.

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.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agrep 0.4.9
File Size Uploaded Provenance Actions
agrep-0.4.9.tar.gz 1.7 MB With provenance Details for agrep-0.4.9.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for agrep 0.4.9
File Actions
agrep-0.4.9-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for agrep-0.4.9-py3-none-win_arm64.whl
agrep-0.4.9-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for agrep-0.4.9-py3-none-win_amd64.whl
agrep-0.4.9-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for agrep-0.4.9-py3-none-manylinux_2_28_x86_64.whl
agrep-0.4.9-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for agrep-0.4.9-py3-none-manylinux_2_28_aarch64.whl
agrep-0.4.9-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for agrep-0.4.9-py3-none-macosx_11_0_x86_64.whl
agrep-0.4.9-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for agrep-0.4.9-py3-none-macosx_11_0_arm64.whl

Total release size: 30.3 MB

Release files / agrep-0.4.9.tar.gz

Download URL agrep-0.4.9.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e9c1833db3d90d2bcc35d5f3b980f6467793e5ffe7f8bf0b4ebbec922a0ee52f
BLAKE2b-256 checksum
How to use checksums
0b8748f23de6e5a36266ebc148a934e766af2dc180472612566fa9283c549f4e
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 28, 2026.

Transparency log

Release files / agrep-0.4.9-py3-none-win_arm64.whl

Download URL agrep-0.4.9-py3-none-win_arm64.whl
Size 4.6 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
fe47f81a243e934b25c8386ff752429272470b91de8f7521384e9c5bdbb4a52a
BLAKE2b-256 checksum
How to use checksums
f0de51a16ff023b3334ae544a6e9ce0bc38abd6347866d1e7bfa4cc2ee0eafe4
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 28, 2026.

Transparency log

Release files / agrep-0.4.9-py3-none-win_amd64.whl

Download URL agrep-0.4.9-py3-none-win_amd64.whl
Size 5.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2266fbd24888bfd66287394270f4fee6ef6c630c2a957b1192da37ac91b641cc
BLAKE2b-256 checksum
How to use checksums
bb9e078633ed21f44c5ca740d529f78fceaf64f3507cbd2670c0a8f31ae63bb4
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 28, 2026.

Transparency log

Release files / agrep-0.4.9-py3-none-manylinux_2_28_x86_64.whl

Download URL agrep-0.4.9-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
a564e3d9513ad774e46ba4db2dfa38d495e0686643ccf33439f0c6ea0269a7ef
BLAKE2b-256 checksum
How to use checksums
2c96663f712951b474abbdb62468885a1a38b3349787a3c8512340a40ce0c11e
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 28, 2026.

Transparency log

Release files / agrep-0.4.9-py3-none-manylinux_2_28_aarch64.whl

Download URL agrep-0.4.9-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
66f5c8ae57f9abefd18df39874898c92f8c1940e4bd043d31f27bce2f4f302d3
BLAKE2b-256 checksum
How to use checksums
16f26f64879d6d7770507b6e12587931441935a7c6a36ecd0c981c939b961847
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 28, 2026.

Transparency log

Release files / agrep-0.4.9-py3-none-macosx_11_0_x86_64.whl

Download URL agrep-0.4.9-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
22df71119e87488ef8c81a6683b3133a32aacabd8728916fa812922fb8027f1a
BLAKE2b-256 checksum
How to use checksums
40b2042bab8ced2a45e11be0706913fe1788ab881a7ac27255cbdd4b0a8bbb2c
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 28, 2026.

Transparency log

Release files / agrep-0.4.9-py3-none-macosx_11_0_arm64.whl

Download URL agrep-0.4.9-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
fb2dbc42f94728a6a63fe69a9b207b306656d77f59363be7d5844a5375cba407
BLAKE2b-256 checksum
How to use checksums
c251c03e1c280c983bef17c008b31439b1fc8870652e47dd6b3e72d2e2d1fe9d
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 28, 2026.

Transparency log

Security for agrep 0.4.9

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.

Select from 7 files

Attestation for agrep-0.4.9.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 28, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page