AI-NATIVE SEARCH ENGINE · ONE RUST BINARY · APACHE-2.0
SEARCH BUILT
FOR AI AGENTS.
XERJ indexes your code, documents and data, then answers an agent's questions from the index instead of its context window. It speaks the Elasticsearch API, so the clients you already have connect unchanged.
INSTALL · ONE LINE · STATIC BINARY · SHA-256 VERIFIED, FAIL-CLOSED
curl -fsSL https://xerj.org/get | sh
Linux, macOS and Windows, on x86_64 and arm64. Static musl by default, so any distro including Alpine. Windows, glibc and all eight targets →
Install XERJ (docs: https://xerj.org/llms.txt), index this project's sources, and set up reference coding: clone and index the open-source repos closest to what we're building, and search how they solved a problem before writing code.
Agents that query an index instead of re-reading files finished the same tasks on 2.7× fewer output tokens. Every number on this site names the run behind it, wins and losses alike, on the benchmarks page.
CODE YOUR AGENT
HASN'T MEMORISED.
A coding agent that hits an API it has not memorised invents method names, fails to compile, and loops. Every lap spends output tokens, which are the expensive kind. Grep does not save it, because grep only says where to look and the agent still has to read the source into context.
Reference coding flips that loop. Clone the open-source repos closest to
what you are building, index them once with
xerj autoindex, and the agent retrieves the
exact definition, with its contract, before it writes a line.
We measured it over eight tasks in four languages, sixteen runs per arm, counting the tokens each run actually billed. Retrieval used 2.7× fewer output tokens than a grep-driven agent at the same solve rate, and cost roughly half as much. On a Rust library the model had never seen, retrieval solved nine of nine and memory solved none. The loop is four commands, and llms.txt walks your agent through all of them.
$ xerj --insecure --data-dir ./.xerj-data & # a node, running $ git clone --depth 1 https://github.com/spacejam/sled ref/sled $ xerj autoindex ref/sled # index once — tree-sitter AST fields $ xerj search "fsync the WAL segment on rotation" → the exact function, its file:line and contract — one plain-English line in, a passage to read out $ xerj def "euler_to_rotationmatrix" → where it is defined: file:line + signature — go-to-definition, one call
One binary, no wrapper scripts. xerj search is a
client: it finds the running node and asks a definition-first query, pairing
an exact-symbol clause with a phrase match on the AST
defs field, so what comes back is the function
rather than a list of line matches. On an eighty-task cross-file benchmark
that puts the right file first 94% of the time, against
38% for ordinary body-text search.
When you already know the name, xerj def answers
the sharper question in one call: where is this defined, and what is its
signature. For a whole team, xerj corpus add
records a corpus definition of pinned commit SHAs and licences under
tools/xerj-code/,
a few hundred bytes and no source, so another machine rebuilds exactly the
same commits.
THE FULL CASE STUDY — EVERY NUMBER, EVERY TASK, THE EXACT PROMPT →·THE FIELD REPORTS BEHIND THE TOKEN SAVINGS →
ONE COMMAND.
ANY FOLDER.
The fastest way to make data useful to an agent is to skip the pipeline
entirely. xerj autoindex <folder> is a
subcommand of the same binary. It walks the tree and identifies every file
by its content, because extensions lie.
It covers thirteen format families, from JSONL and dialect-sniffed CSV through SQL dumps, SQLite, PDF, DOCX, HTML, XML, YAML and gzip. It infers field types and date encodings from the data itself, writes explicit mappings, and streams everything in with idempotent IDs. Junk files are recorded rather than fatal.
It finishes by writing a catalog index, so the agent's first question, "what is even in here?", is answered by the engine instead of by another script. Here is a real captured run:
$ xerj autoindex ./sample autoindex: 4 files (0 MB) under /tmp/xerj-pubpass/sample phase A: sniffing + sampling 4 files… phase A: 3 datasets inferred, 1 junk/skipped files phase B: indexing 3 files with 8 workers → http://localhost:9280 done in 0.2s — 3 datasets, 5801 records live, 0 junk records, 1 junk/skipped files ax-logs 5000 docs ax-exports 800 docs ax-docs 1 docs next: `xerj autoindex map --url http://localhost:9280` for the data map; search via GET /ax-*/_search
CAPTURE NOTE · THAT RUN'S NODE WAS STARTED ON A NON-DEFAULT PORT, SO THE OUTPUT ECHOES :9280. THE DEFAULT ES-COMPAT PORT IS :9200 — USE http://localhost:9200 UNLESS YOU CHANGED IT. THE TRANSCRIPT ABOVE IS REPRODUCED UNEDITED.
Honesty first. In a controlled ten-question exam on that 518 MB corpus, a XERJ-backed agent scored nine correct and one partial against a fair grep-and-python baseline's ten out of ten. That is a tie on accuracy, not a rout.
What XERJ wins is structural. A full corpus inventory takes four API calls, aggregations over millions of rows come back in under a second, and SQLite, DOCX, gzip and decimal-comma CSV all arrive through one API. Those are the advantages that matter at scale and under repeated querying. The pipeline streams and resumes, verified on multi-gigabyte corpora.
ONE HTTP API.
NO SDK.
Every operation an agent needs is a plain HTTP call on :9200. No SDK, no signup, no external embedding key. Store what an agent learns, then recall it later by meaning.
We should be precise about what that means. The built-in embedder is lexical hash-based, so this is honest hybrid lexical and vector retrieval rather than neural understanding. Each namespace is physically isolated, so agents never read one another's memories. Here is a real run against an empty XERJ:
$ curl -sXPOST localhost:9200/_memory/agent-demo \
-H 'content-type: application/json' \
-d '{"text":"The user prefers metric units and a dark UI theme.","metadata":{"kind":"preference"}}'
{"created":true,"id":"77eff57b-e432-431c-8b49-8a16b33ab551","namespace":"agent-demo"}
$ curl -sXPOST localhost:9200/_memory/agent-demo/_recall \
-H 'content-type: application/json' \
-d '{"query":"what display settings does the user like?","semantic":true,"k":1}'
{"hits":[{"id":"77eff57b-e432-431c-8b49-8a16b33ab551",
"score":0.655571460723877,
"text":"The user prefers metric units and a dark UI theme."}], // metadata trimmed
"namespace":"agent-demo"}
xerj autoindex <folder>. Sniffed formats, inferred mappings, a self-describing data map, resumable idempotent ingest.
The /_memory REST API: store, recall by meaning, keyword or vector, filter, forget, per-agent isolation.
First-class documentation, each validated end-to-end against a live XERJ: RAG, hybrid search, log analytics, anomaly detection, ES migration.
FEATURE
BY FEATURE.
Every feature exists to cut the thing agents actually spend: context. Reading a file costs a context window; asking an index costs kilobytes. XERJ puts everything an agent needs to ask, from code and documents to vectors and memory, behind one query surface.
/_memory REST API — store, recall by meaning / keyword / vector, filter, forget, physically isolated per agent — and a /_graph knowledge layer with evidence on every link.gitignore, records junk instead of crashing on it, and resumes incrementallyFROM THE BLOG
We write up the measurements as they happen and leave the losing rows in the tables. Every post names the runs behind it, so you can check a number instead of taking it.
Five hundred decisions each on two public datasets. A statistical tie on spam, a nine-point win on 77-way intent at zero marginal cost, and one dataset where Jev beats us outright.
2026-09-21 · BENCHMARKS · RERANKING Does XERJ beat JEV? On the bill, outright. On FiQA, no.1,271 judged BEIR queries. The hosted judge wins SciFact and FiQA, our local hybrid keeps NFCorpus, and the rerank run billed $0.6375 against our zero.
CEO for Xerj / [Your Name]