Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

agentgrep

PyPI version Python versions License: MIT

Read-only search for local AI agent prompts and opt-in conversations across Codex, Claude Code, Cursor, Gemini, Antigravity, Grok, Pi, OpenCode, and VS Code.

agentgrep provides a CLI and an MCP server over the same discovery + parsing layer:

  • A terminal CLI (agentgrep) with a Textual TUI for interactive browsing of normalized records.
  • An MCP server (agentgrep-mcp) that exposes search, discovery, catalog, and validation tools to any client that speaks Model Context Protocol.

Requires Python 3.14+. Runs on Linux and macOS; native Windows is not supported, but Windows Subsystem for Linux (WSL) is.

[!WARNING] Alpha. Releases carry an -alpha prerelease tag. The API is not settled, and any release may change or remove exported identifiers without a deprecation period. Pin an exact version. Not recommended for production.

Install

$ uvx agentgrep --help

Other install methods (pipx, uv add, pip install) and full setup snippets live in the installer widget on agentgrep.org/cli/.

CLI quickstart

Search fast prompt-history stores — ranked by relevance, deduped, with newest as the stable tie-break:

$ agentgrep search "deploy"

Use prompt matches to search selected conversations. Targeted search attempts at most 25 conversations by default and reports approximate coverage:

$ agentgrep search "deploy" --deep

Search prompt records across every readable conversation backend:

$ agentgrep search "deploy" --exhaustive

Search prompts and conversations together in one explicit deep sweep:

$ agentgrep search "deploy" --exhaustive --scope all

Prefer ripgrep-shaped flags? grep mirrors rg / ag against the same records:

$ agentgrep grep "deploy" --scope conversations

Stream JSON so a non-MCP agent or shell pipeline can consume the results:

$ agentgrep find --json

Open the read-only Textual explorer, seeded with a query:

$ agentgrep ui "deploy"

--json and --ndjson make every command pipe-friendly, and any search-shaped subcommand takes --ui to hand the same query to the explorer (e.g. agentgrep grep "deploy" --ui). Agents that don't speak MCP can drive the CLI directly; see https://agentgrep.org/cli/ for the per-subcommand reference.

Results and JSON/NDJSON payloads write to stdout; progress and diagnostics write to stderr, so a piped command never sees the spinner. search exits 0 for at least one result and 1 for none; grep follows rg's convention and adds 2 for a search error such as invalid regex. See https://agentgrep.org/cli/ for the exit codes of each command.

MCP server: quickest setup

In Claude Code:

$ claude mcp add agentgrep -- uvx --from agentgrep agentgrep-mcp

For Claude Desktop / Codex / Cursor / Gemini snippets, see https://agentgrep.org/mcp/.

Library quickstart

from pathlib import Path

import agentgrep

backends = agentgrep.select_backends()
query = agentgrep.SearchQuery(
    terms=("hello",),
    scope="prompts",
    any_term=False,
    regex=False,
    case_sensitive=False,
    agents=agentgrep.AGENT_CHOICES,
    limit=10,
    effort="prompt",
)
result = agentgrep.run_search_result(Path.home(), query, backends=backends)
for record in result.records:
    print(record.agent, record.title or record.path)
print(result.summary.status.state, result.summary.coverage)

Links

Release files for agentgrep 0.1.0a51

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

Source distribution (sdist)

Source distribution for agentgrep 0.1.0a51
File Size Uploaded
agentgrep-0.1.0a51.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentgrep 0.1.0a51
File Interpreter ABI Platform
agentgrep-0.1.0a51-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / agentgrep-0.1.0a51.tar.gz

Download URL agentgrep-0.1.0a51.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
e9706fc9e8ce0dafa5d3b52a7997a3e086c7677aaf8ae687b01e238c5fa82805
BLAKE2b-256 checksum
How to use checksums
1be6c2b3090477e44daa51385e726173b6e330cce3c4b2a4d7bc3d0edd3938e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 6, 2026.

Transparency log

Release files / agentgrep-0.1.0a51-py3-none-any.whl

Download URL agentgrep-0.1.0a51-py3-none-any.whl
Size 536.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fb4ad4ec5ba59d561ee64fab004b0d447f3dc2c6c663d379caaf6d0420453c1
BLAKE2b-256 checksum
How to use checksums
81104d4c0d6e2820a85e5368df3082837df96a3c0724574361c9babe72467cda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a51 This release

2 release files

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