XERJ: A New Search Engine Built for AI Agents, 40× Fewer Tokens Than Grep
A new Rust-built search engine called XERJ hit GitHub trending this week. The pitch: 40× fewer tokens than grep, Elasticsearch-compatible, designed for AI agents that search code, docs, logs, and PDFs. The case study is the most concrete: a coding agent cut output tokens by 2.7× at the same 16/16 solve rate, and field reports put the everyday gain around 5×.
A new Rust-built search engine called XERJ hit GitHub trending this week. The pitch: 40× fewer tokens than grep, Elasticsearch-compatible, designed for AI agents that search code, docs, logs, and PDFs. The case study on the XERJ site is the most concrete claim — a coding agent cut output tokens by 2.7× at the same 16/16 solve rate, and field reports put the everyday gain around 5×.
XERJ is the first product that is positioning itself as the search layer underneath AI agents, not the search box in front of humans. That is the interesting bet.
Key Takeaways: What Matters Most?
- XERJ is a Rust-built search engine designed for AI agents, with autoindex and Elasticsearch-compatible APIs
- The pitch: 40× fewer tokens than grep on the same corpus, 2.7× fewer output tokens in a controlled coding-agent benchmark at the same solve rate
- One-command install wires XERJ into Claude Code and Cursor; existing Elasticsearch clients work without changes
- Use cases: code search, RAG, security audits, agent memory, reference coding
- The bet: the next productivity jump in agentic coding is not bigger models, it is the agent's search layer
The Pitch
The install: curl -fsSL https://xerj.org/get | sh, then xerj init to wire it into Claude Code or Cursor. Once wired, every search the agent performs against the local corpus goes through XERJ's index rather than grep, find, or ripgrep.
The interface: Elasticsearch-compatible. Existing Elasticsearch clients work without changes. A team that has built on Elasticsearch for log search can use the same client code against XERJ for agent search.
The benchmark: 40× fewer tokens than grep on the same corpus. The number is XERJ's, on XERJ's own benchmark, but the mechanism is straightforward — grep returns line-by-line text, XERJ returns a focused, indexed result. An agent that searches with grep has to read every match; an agent that searches with XERJ gets the relevant section in one structured response. The savings compound on every agent turn that touches the corpus.
The reference coding case study: a coding agent given a task, with XERJ available, cloned the closest open-source repositories, indexed them, and searched how they solved the problem before writing new code. The result: 2.7× fewer output tokens at the same 16/16 solve rate. Field reports from production users put the everyday gain around 5×.
Why This Matters
The next agent productivity jump is not bigger models. The pattern in 2026 is: bigger models help on hard tasks, but on the everyday work — searching a codebase, reading documentation, finding a function definition — the bottleneck is the agent's search layer, not its reasoning capability. XERJ is built for that bottleneck.
The 5× field-report number is the more interesting claim. The 2.7× controlled benchmark is one number on one benchmark. The 5× field reports are dozens of teams reporting their everyday experience. The gap between controlled benchmarks and field reality is usually 2-3× — the 5× field number, if accurate, suggests the controlled benchmark is the floor, not the ceiling.
Elasticsearch compatibility is the strategic move. Most teams that have built log search have built on Elasticsearch. XERJ's compatibility with the Elasticsearch API means a team can swap the underlying engine without rewriting the client. The bet: every Elasticsearch deployment in a company is a candidate XERJ deployment for the team's coding agent.
The Rust build is the operational story. Rust is the right choice for an agent-search layer — fast, low-memory, embeddable. A team running a coding agent in production wants the search layer to add latency measured in milliseconds, not seconds. XERJ's benchmarks are consistent with that operational profile.
The Trade-Off
XERJ is one command to install but it is still a local search engine. A team adopting it is adopting the operational burden of running the index, updating it as code changes, and tuning it for the corpus. The integration with Claude Code and Cursor is the developer experience layer; the production deployment is the operational reality.
The 5× field reports are self-reported by users who chose to install XERJ, which is a selection effect. The average user who tries XERJ and sees no benefit does not post a field report. The 5× number is real for the people reporting it; it is not necessarily the median experience.
The Rust build and Elasticsearch compatibility are also a constraint. A team that has built a search layer on a different API (Solr, OpenSearch, Meilisearch, Typesense) does not get the Elasticsearch compatibility for free. The compatibility helps the largest cohort of search users; it does not help everyone.
The Bottom Line
XERJ is the first search engine positioning itself as the layer underneath AI agents, not the search box in front of humans. The pitch is 40× fewer tokens than grep, with a controlled benchmark showing 2.7× fewer output tokens in a coding agent and field reports around 5×. The Rust build and Elasticsearch compatibility are the right choices for the target audience. For teams shipping coding agents on Claude Code or Cursor, XERJ is worth a benchmark on your own corpus before committing — the controlled 2.7× is the floor, and the field 5× is plausible if your agent does a lot of codebase search.
Sources
Get the next briefing
Signal first. Three signals, why they matter, and one action.
One concise briefing with three signals, why they matter, and one action to take.
New posts daily, briefing weekday mornings. We use your email only to send the briefing. Unsubscribe anytime. Privacy policy.
Share this article