Skip to main content

Read-only search for local AI agent prompts and history (Codex, Claude Code, Cursor, Gemini, Antigravity, Grok, Pi, OpenCode, VS Code)

Project description

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 your prompts across every configured agent — ranked, deduped, newest first:

$ agentgrep search "deploy"

Search prompts and conversations together in one sweep:

$ agentgrep search "deploy" --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="all",
    any_term=False,
    regex=False,
    case_sensitive=False,
    agents=agentgrep.AGENT_CHOICES,
    limit=10,
)
for record in agentgrep.run_search_query(Path.home(), query, backends=backends):
    print(record.agent, record.title or record.path)

Links

Project details


Release history Release notifications | RSS feed

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.0a38.tar.gz (1.1 MB 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.0a38-py3-none-any.whl (418.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentgrep-0.1.0a38.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentgrep-0.1.0a38.tar.gz
Algorithm Hash digest
SHA256 becd42bf8cac0429ab1d16c90abdced5532f6cde8e4701d66677ca63dc543790
MD5 4b1380307e9c3bbe797160a9bddf5d03
BLAKE2b-256 e2039e9e17d22ab496fc9a49c23480c352689ce86d9063617bff253b8e6b148c

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgrep-0.1.0a38.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.0a38-py3-none-any.whl.

File metadata

  • Download URL: agentgrep-0.1.0a38-py3-none-any.whl
  • Upload date:
  • Size: 418.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentgrep-0.1.0a38-py3-none-any.whl
Algorithm Hash digest
SHA256 9d69c75b6cdf27c7b2ccd247501dee18aa0bf92b75a9eb0fd88af8ef30fb3ffe
MD5 75083567205807fd5cb968fe812a30b2
BLAKE2b-256 59ebdbb5cb709155d7fc74f8780bcc967566a2b4d523ca4852a986711666efa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgrep-0.1.0a38-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.

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