TLDRocket
Sign in

Qwen Developers Open-Sources zg (zvec-grep): A Local-First Search Layer Unifying ripgrep, BM25, and Vector Search

MarkTechPost Michal Sutter

Qwen Developers open-sourced zg, a local search layer that mixes ripgrep, BM25, and vectors. It’s built for agents, and the default setup runs on-device with no GPU.

Based on reporting by MarkTechPost, Michal Sutter — read the original for the full story.

Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error

Qwen Developers has opened up zg, or zvec-grep: a local-first search layer that gives code search one front door instead of three separate tools. For agents, that’s the point. If the answer is a symbol, ripgrep is still the fastest way to get there. If the clue is fuzzy, semantic search or BM25 can pull in the right file without forcing the model to guess at keywords and read half the repository first.

The package is already usable. It installs from npm as @zvec/zvec-grep, runs on Node.js 22 or newer across macOS, Linux, and Windows, and ships under Apache 2.0. The default model does not need a GPU. The code lives under the zvec-ai GitHub organization, and the setup is meant to stay local unless someone explicitly opts into remote embeddings.

zg indexes a workspace once, then offers four retrieval paths: a hybrid default, --fts for BM25-ranked exact terms, --vector for conceptual similarity, and --rg for literal or regex matching. The first three use the index. --rg does not, which is useful when a repo has not been indexed yet. The index itself sits in <root>/.zvec-grep/, while .git and .zvec-grep are always excluded along with common dependency, build, cache, and log directories, plus whatever the repository’s own ignore rules skip.

The agent-facing design is unusually tight. The default MCP toolset exposes only two tools: zvec_grep_search and zvec_grep_rg. Index creation, deletion, and status checks stay outside the agent by default, with a fuller six-tool set available only if someone turns on zg server with --mcp-toolset full. The docs also say an agent must never silently create, rebuild, or delete a persistent index. That restraint is the whole trick here: keep the model from doing admin work it should not be trusted to improvise.

There is more under the hood. Results are grouped by file with line spans, previews are hidden unless requested, and output-changing ripgrep flags such as --json, --count, -l, and -vimgrep are rejected so the format stays compact. Embeddings can run locally through a catalog that includes ten local models and three remote Qwen endpoints, with remote use gated by either --allow-remote for one command or a signed workspace grant. The launch post also cites vendor A/B tests showing fewer tool calls and tokens, but those numbers are their own runs, not an independent verdict.

My take — AI-written commentary, not fact-checked reporting

This is the right kind of boring: fewer tools, tighter rules, less agent swagger. The industry keeps pretending every problem needs a bigger model, when a sane search layer often saves more time than another chunk of hype. Closed by default would’ve been the easy sell; open-source plus local-first is the more useful one.

Read more about this at: MarkTechPost

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.