Read-only search for local AI agent prompts and history across Codex, Claude Code, Cursor, and Gemini.
agentgrep ships two surfaces 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.
$ uvx agentgrep --helpOther install methods (pipx, uv add, pip install) and full setup snippets live in the installer widget on agentgrep.org/cli/.
Search prompts and history across every configured agent:
$ agentgrep search "deploy"Stream JSON so a non-MCP agent or shell pipeline can consume the results:
$ agentgrep find --jsonOpen the read-only Textual TUI for interactive browsing:
$ agentgrep search --ui--json and --ndjson make every command pipe-friendly. Agents that
don't speak MCP can drive the CLI directly; see
https://agentgrep.org/cli/ for the per-subcommand reference.
In Claude Code:
$ claude mcp add agentgrep -- uvx --from agentgrep agentgrep-mcpFor Claude Desktop / Codex / Cursor / Gemini snippets, see https://agentgrep.org/mcp/.
from pathlib import Path
import agentgrep
backends = agentgrep.select_backends()
query = agentgrep.SearchQuery(
terms=("hello",),
search_type="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)- Documentation: https://agentgrep.org/
- Source: https://github.com/tony/agentgrep
- Issues: https://github.com/tony/agentgrep/issues
- Changelog: CHANGES
- License: MIT