Pensieve is a free, open-source (MIT) macOS tool that indexes files, git repos and agent sessions locally and exposes semantic plus exact search to coding agents over MCP—aiming to replace wide grep/read loops with targeted passages (file + line).
Agent integration
Connects to Claude Code, Codex, Cursor, Gemini CLI, Windsurf, Claude Desktop, VS Code and other MCP clients. pensieve integrate recommended wires MCP servers and adds a “search before you grep” instruction block plus optional skills/hooks.
Benchmark claims (vendor-run)
Claude Sonnet in Claude Code on 72 held-out tasks × 4 repos (504–34,847 files), Pensieve 0.5.6:
- Right file found: 131/144 runs vs 123/144 with grep alone.
- 43% fewer tool calls per lookup (2.0 vs 3.4).
- 18% lower reported API cost per lookup (0.050).
- 21% faster per lookup (8.6s vs 10.9s).
- 82/144 runs answered after a single Pensieve call.
Scripts are open source in bench/ on GitHub.
Features
- Hybrid search: natural-language meaning, quoted exact phrases, minus exclusions, filters (
kind:,ext:,in:). - Scoped context per repo/worktree; watches uncommitted edits and re-indexes.
- Ownership maps from git blame; “bus factor” warnings for areas with departed experts.
- Local embeddings in
~/.pensieve; secrets (.env, keys, password exports) skipped; optional cloud AI for summaries (Qwen 3.5 9B built-in, LM Studio, or Claude/Codex).
Distribution
Version 0.5.9; Apple Silicon; macOS 14+. Intel/Linux get backend + browser visualizer; app requires Apple Silicon.