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.

Pre-alpha. APIs may change.

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.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentgrep-0.1.0a49.tar.gz (972.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentgrep-0.1.0a49-py3-none-any.whl (527.9 kB view details)

Uploaded Python 3

File details

Details for the file agentgrep-0.1.0a49.tar.gz.

File metadata

  • Download URL: agentgrep-0.1.0a49.tar.gz
  • Upload date:
  • Size: 972.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentgrep-0.1.0a49.tar.gz
Algorithm Hash digest
SHA256 7e798a504987f51881f639248476aaf3e685d1b211dfdc44a05dae10c2d91d5d
MD5 6704a2cde965c36a139b063c516003f1
BLAKE2b-256 199b965763faaf8e6501a1d41040525c9eb87153d031d9fce59d95849b508d11

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgrep-0.1.0a49.tar.gz:

Publisher: tests.yml on tony/agentgrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentgrep-0.1.0a49-py3-none-any.whl.

File metadata

  • Download URL: agentgrep-0.1.0a49-py3-none-any.whl
  • Upload date:
  • Size: 527.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentgrep-0.1.0a49-py3-none-any.whl
Algorithm Hash digest
SHA256 f966e2b0df363441c7618023943da363bb898544ed8c7f604ff682bb2599a3e9
MD5 16f603a67658f046bbbfa6a25ad76dc0
BLAKE2b-256 e36a7c30ed62bae4ed7c715669c9ba58ae48fffab295a449b36cf3a67699b7ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgrep-0.1.0a49-py3-none-any.whl:

Publisher: tests.yml on tony/agentgrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page