Veles brings fast local code search to AI agents and developers

Veles is a new local code search tool written in Rust that combines BM25 keyword search with semantic retrieval. It runs on CPU, stores a persistent on-disk index, and exposes MCP and gRPC interfaces for use with AI agents and other tools.

Veles brings fast local code search to AI agents and developers

Veles is a local code search tool for AI agents and developers that combines BM25 keyword search with semantic search, and it does so entirely on CPU, according to its GitHub project page. The project is written in pure Rust and is designed to return results in tens of milliseconds from a persistent on-disk index.

The project is called Veles, and its author says it was originally inspired by Semble. Veles started as a Rust port of the same hybrid retrieval approach and has since added persistent and incremental indexing, tree-sitter-based symbol lookups, multiple output formats, glob and language filters, gRPC support, shell completions, and an MCP server for AI tools.

⚡ New to this?

This matters because local code search is a common bottleneck in AI coding workflows. BM25 is classic keyword search, while semantic search tries to match meaning instead of exact words; Veles combines both so it can find code by symbol names and by natural-language descriptions.

MCP, or Model Context Protocol, is a way for AI tools to call external services in a standard format. gRPC is another service protocol used for program-to-program calls, so Veles is trying to fit both human workflows and agent workflows.

🦞 OpenClaw angle

If you run self-hosted AI agents over private repos, treat Veles as a local retrieval layer instead of sending code snippets to a cloud search API. Wire it through MCP for agent access, and use the gRPC service if you want to embed search into your own orchestration code.

For automation jobs, prefer the JSON or JSONL output so downstream steps can parse results reliably. If you maintain large repos, rely on the persistent index and incremental update flow so your agent only refreshes changed files instead of reindexing everything on every run.

The core search mode blends BM25 and semantic scores using reciprocal rank fusion, or RRF, a ranking method that combines different result lists into one. The tool also uses an identifier-aware tokenizer that splits camelCase and snake_case names, and it can detect whether a query is likely asking for an exact symbol or a natural-language concept.

For code navigation, Veles supports tree-sitter commands for symbols, definitions, and references in Rust, Python, JavaScript, TypeScript, and Go. It also adds definition boosting, path penalties that push down test or compatibility files, and file saturation so one file does not dominate the results list.

The project includes a terminal UI called veles tui, which loads the cache once and updates searches as you type, with results in about 10 milliseconds per keystroke, according to the project description. The UI includes shortcuts to switch between hybrid, BM25, and semantic search, and it can show related code, definitions, and references for the current identifier.

Veles also ships with built-in MCP support over stdio, so tools like Claude and Cursor can call it through JSON-RPC. For service integrations, it exposes a gRPC server built on tonic with RPCs such as Index, Search, FindRelated, and GetStats.

The CLI can index a repo, refresh the cache after edits, and search with filters for language, path, exclude patterns, and minimum score. Output formats include pretty, compact, ripgrep-style, paths, JSON, and JSONL, which makes the tool usable both interactively and in scripts.

The project page says Veles keeps its index under <repo>/.veles/ and reuses embeddings for files that have not changed, based on size and modification time. It also lists prebuilt binaries for macOS, Linux, and Windows, plus install options through Homebrew, crates.io, and direct downloads from GitHub Releases.

According to the repository, the first search downloads a roughly 64 MB embedding model from Hugging Face and caches it locally. The project is released under the MIT license.

Source: HN Show HN ↗

More from OpenClaw News