What is a local AI search engine?
What is a local AI search engine? It is a search engine that runs on your machine, indexes your files, and returns cited hits an agent can use. XERJ is one Apache-2.0 Rust binary for that job: a CLI, an MCP server, and the Elasticsearch REST API, with no separate vector database.
Key number: On main, xerj mcp registers 24 MCP tools, or 21 when the binary has no Corpus Hub key. (as of 2026-10-28 · source: landing/docs/agents/schemas/mcp-tools.json)
TL;DR A local AI search engine indexes code, docs, specs and logs on your machine and returns cited passages, without uploading the corpus. XERJ is one Apache-2.0 Rust binary that does this through a CLI, an MCP server (24 tools on main) and the Elasticsearch REST API. The default embedding mode is lexical, not neural.
A local AI search engine, four surfaces
Search from a shell
Start a node, run xerj autoindex on a folder, then xerj search or xerj def. Hits come back with file:line and a passage. Nothing is uploaded.
Tools an agent can call
xerj mcp registers 24 MCP tools on main, or 21 when the binary has no Corpus Hub key. The agent searches the same local index, with cited paths.
The Elasticsearch REST API
The same node answers POST /_search. XERJ passes 1444 of 1454 Elasticsearch YAML cases on every commit. The wire protocol is the transport, not the product.
Namespaced memory
The same process serves agent memory at /_memory/{namespace}. Facts the agent chooses to save stay on this machine and can be looked up later.
Act as a coding agent. Read https://xerj.org/llms.txt, start a node with `xerj --insecure --data-dir ./.xerj-data`, run `xerj autoindex ./docs --url http://127.0.0.1:9200 --prefix docs --progress plain` on the folder you were handed, then answer with `xerj search` or one MCP tool and cite ax_path for every hit.
curl -fsSL https://xerj.org/get | sh
Install the release binary into ~/.local/bin.
xerj --insecure --data-dir ./.xerj-data
Start a local development node. Put the data dir outside the folder you will index.
xerj autoindex ./docs --url http://127.0.0.1:9200 --prefix docs --progress plain
Index a local folder with no schema file.
xerj search "how is pagination implemented"
Ranked passages with file:line, from the local index.
What "local" means here
A local AI search engine runs on hardware you control. You point it at a folder. It builds an index. An agent, or you, then asks questions and gets passages with file:line or another cited path. The source files are not uploaded as part of that loop.
XERJ is one Apache-2.0 Rust binary for this job. The positioning is a new way for AI to search for data. The longer product identity page is What is XERJ?.
Four surfaces, one index
The same index is reachable as:
- a CLI, with
xerj searchandxerj def - an MCP server, through
xerj mcp - the Elasticsearch REST API, with
POST /_search - namespaced agent memory at
/_memory/{namespace}
The protocol is What is the Model Context Protocol?. Memory is What is agentic memory?. Ranking is What is hybrid search? and What is semantic search?.
What this is not
This is not a hosted index of your private files. It is also not a cluster. XERJ is single-node only. If you need a cluster or a broader Elasticsearch API, see Elasticsearch alternatives.
Local RAG, where a model writes from retrieved hits, is a use of this engine, not a second product. That walkthrough is What is local RAG?.
Start it
Put the data dir outside the folder you will index.
curl -fsSL https://xerj.org/get | sh
xerj --insecure --data-dir ./.xerj-data
xerj autoindex ./docs --url http://127.0.0.1:9200 --prefix docs --progress plain
xerj search "how is pagination implemented"
Read next
Hybrid search, BM25, grounded answers and semantic code search.
FAQ
What is a local AI search engine?
It is a search engine that runs on your machine, indexes your files, and returns cited hits an agent can use. The corpus stays local. XERJ is one Apache-2.0 binary built for that job.
How does an agent talk to it?
Through the CLI, through an MCP server, or over the Elasticsearch REST API. On main, xerj mcp registers 24 tools, or 21 with no Corpus Hub key.
Does it need a vector database?
XERJ does not. The embedder ships in the binary. The default embedding mode is lexical, not neural. Start the node with --embed-mode neural when you want the built-in neural embedder.
How is this different from Elasticsearch?
XERJ speaks the Elasticsearch REST API as a transport and passes 1444 of 1454 YAML cases on every commit. It is a single-node search engine for AI agents, not a cluster.
Can it also keep agent memory?
Yes. The same process serves namespaced memory at /_memory/{namespace}. See What is agentic memory? for the concept.
Evidence
- On main, xerj mcp registers 24 MCP tools, or 21 when the binary has no Corpus Hub key. —
landing/docs/agents/schemas/mcp-tools.json - XERJ's conformance suite runs on every commit and passes 1444 of 1454 cases. —
README.md
Related
- What is hybrid search?
- What is semantic search?
- What is the Model Context Protocol?
- What is agentic memory?
- What is XERJ?
- What is local RAG?
- Elasticsearch alternatives, with published tests
- What's a local MCP search engine for Claude? · same intent: Find the right tool
- Can ChatGPT search a folder on my laptop, or do I need something else? · same intent: Find the right tool
- How do I let an agent search a folder on my laptop instead of crawling the web? · same intent: Find the right tool