zvec-ai/zvec-grep
Local-first search across your workspace, built for humans and AI agents.
What it solves
zvec-grep (also known as zg) is a local-first search layer designed to help both humans and AI agents efficiently find information within a workspace. It solves the problem of relying on a single search method—like simple keyword matching—which often misses relevant results or provides too much noise. By combining multiple search techniques, it reduces the number of tool calls and tokens an AI agent needs to find the right evidence in a large codebase or document set.
How it works
zg unifies three distinct search methodologies into a single interface:
- Vector Search: Finds information based on meaning (semantic discovery) rather than just exact words.
- BM25: A ranking algorithm for lexical retrieval to ensure relevance.
- ripgrep: Provides exact text or regex matching for verification.
Users can index a workspace locally, and the tool supports various embedding models (including local models via llama.cpp or Transformers.js) to ensure data stays on the machine. It can be used as a standalone CLI tool or integrated into AI agents via the Model Context Protocol (MCP) or specific integrations (e.g., OpenCode, Claude Code, Cursor).
Who it’s for
- AI Agent Developers: Those building agents that need to navigate complex repositories to answer architectural or data-flow questions.
- Developers: People who want a powerful, local-first search tool for their source code, documents, and structured data.
- Agentic Workflows: Users of tools like Claude Code or GitHub Copilot who want to improve the retrieval quality for their AI assistants.
Highlights
- Hybrid Search: Combines semantic, lexical, and regex search in one tool.
- Local-First: Indexes and local models stay on the user's machine for privacy and security.
- Agent-Ready: Specifically optimized to provide compact, ranked evidence to agents to save tokens and reduce noise.
- Multi-Format Support: Capable of searching across source code, documents, and structured data while preserving source locations.
- Broad Integration: Works with various AI agents and IDEs via a server mode or direct CLI access.
Written about in
Related
- Project
- Project
- Project
- Dispatch
- Project