Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

10.5 KB
Raw Blame

title: "What is XERJ?" canonical: "https://xerj.org/answers/what-is-xerj" updated: "2026-10-28" source: "content/answers/what-is-xerj.md"

What is XERJ?

Short answer (updated 2026-10-28): What is XERJ? It is the search engine for AI agents. A new way for AI to search for data: one local Rust binary that indexes your code, docs, specs and logs, plus Corpus Hub packs, and returns cited answers. Query it over the Elasticsearch REST API, or let an agent call it through xerj mcp.

Key number: On main, xerj mcp registers 23 MCP tools, each listed with its input schema in the published tool list. (as of 2026-10-28; source: landing/docs/agents/schemas/mcp-tools.json)

TL;DR: XERJ is one Apache-2.0 Rust binary that indexes a local folder and answers search queries over the Elasticsearch REST API. xerj autoindex needs no schema and no configuration file. The same process serves agent memory at /_memory/{namespace} and 23 MCP tools through xerj mcp.

Agent prompt

Act as a coding agent meeting this tool for the first time. 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, run `xerj autoindex map --url http://127.0.0.1:9200` to learn the real index and field names, then POST one match_phrase query to /docs-*/_search and answer the user question citing the ax_path of every hit.

Commands

Command 1

Note: Start a local development node. One process, no container and no JVM.

xerj --insecure --data-dir ./.xerj-data

Command 2

Note: Make a folder searchable. The command takes no configuration file and no mapping.

xerj autoindex ./docs --url http://127.0.0.1:9200 --prefix docs --progress plain

Command 3

Note: Print the data map, so the next query names a real index and a real field.

xerj autoindex map --url http://127.0.0.1:9200

Command 4

Note: Search the folder over the Elasticsearch REST API and read the file path back from every hit.

curl -s -XPOST http://127.0.0.1:9200/docs-*/_search -H 'content-type: application/json' -d '{"query":{"match_phrase":{"body":"rotate the signing key"}},"size":5,"_source":["ax_path","ax_format","title"]}'

Command 5

Note: Attach the running node to an agent host over stdio MCP. This serves 23 tools on main and starts no node of its own.

xerj mcp --url http://127.0.0.1:9200

Point it at a folder and query the folder

Two commands take a folder from nothing to searchable. Start the node, then hand xerj autoindex the directory.

xerj --insecure --data-dir ./.xerj-data
xerj autoindex ./docs --url http://127.0.0.1:9200 --prefix docs --progress plain

xerj autoindex detects each file family by content rather than by file extension, infers a dataset per file shape, and writes the documents. It takes no configuration file, no mapping and no schema.

xerj autoindex map then prints what the folder became: every dataset, its index name, its fields with their inferred types, and a ready-to-send query. An agent reads that map before it names an index in a query.

Query it with an Elasticsearch client you already have

XERJ answers the Elasticsearch-8 wire protocol, so an existing Elasticsearch client changes its base URL and nothing else. A match_phrase query, a term filter on a keyword field and a terms aggregation all work over plain HTTP.

curl -s -XPOST http://127.0.0.1:9200/docs-*/_search \
  -H 'content-type: application/json' \
  -d '{"query":{"match_phrase":{"body":"rotate the signing key"}},"size":5,"_source":["ax_path","ax_format","title"]}'

Every document carries ax_path, ax_file, ax_format and four more keyword provenance fields. A hit names the file it came from, so an agent can cite its source instead of guessing.

Hand the same node to an agent

xerj mcp is a stdio MCP server inside the same binary. On main it serves 23 tools against a node that is already running.

  • Search and memory: xerj_def, xerj_batch_search, xerj_search, xerj_semantic_search, xerj_vector_search, xerj_hybrid_search, xerj_memory_store and xerj_memory_recall.
  • Link graph: four xerj_brain_* tools.
  • Map and plan: xerj_status, xerj_map, xerj_index_budget, xerj_autoindex_remove, xerj_code_search, xerj_plan, xerj_field_report and xerj_corpus_feedback.
  • Corpus Hub: three xerj_hub_* tools that query Corpus Hub packs.

That list is the published tool schema file, and a test keeps it in step with the server source. A build with no hub key serves 20, without the three hub tools. The v1.0.0-rc.98 release served 20 of them, without xerj_def and xerj_batch_search. A live tools/list from v1.0.0-rc.97 on 2026-10-19 returned 17.

The semantic tool runs whichever embedder the node loaded, and the default embedder is lexical feature hashing rather than a neural model.

The command does not start a node. Start one first, then register xerj mcp --url http://127.0.0.1:9200 in the agent host with an absolute path to the binary.

Store agent memory in the same process

Agent memory is an endpoint on the node, not a second deployment. An agent stores a fact with POST /_memory/{namespace} and reads it back with _recall, on the same port that answers _search.

Each namespace is an ordinary index named .xerj-memory-{namespace} under the node data directory, so memory outlives a restart. Two agents on one host keep separate memory by using separate namespaces.

Which embedder actually runs

The default embedder is lexical feature hashing over word unigrams and character trigrams. It loads no model file and makes no network call, and it matches wording rather than meaning, so it cannot connect a query to a synonym.

The flag --embed-mode neural swaps in a MiniLM-class model that runs on the local CPU. That mode is opt-in, and a node reports the backend it loaded at GET /v1/embedding/identity.

The license and the shape of the binary

XERJ uses the Apache-2.0 license and ships as one native executable. There is no container to pull, no JVM to install and no package manager step between the download and a running node.

property value
license Apache-2.0
distribution one native binary
wire protocol Elasticsearch-8 compatible
default embedder lexical feature hashing
topology single node

What XERJ is not

XERJ is single-node. There is no replication, no sharding and no failover, so one host is the whole deployment and a restore from a copy is the recovery plan.

XERJ has no OCR, so a PDF with no text layer produces no text. It never opens archives: a zip or tar of documents stays closed until you extract it. Mail is read rather than refused: .eml files and mbox mailboxes, a Google Takeout export included, are detected by content and shipped in v1.0.0-rc.75. PST, OST and Maildir stores are still not handled. It fetches no page from the web. The files must already be on local disk, or in an S3 bucket that xerj autoindex reads as a source.

XERJ has no graphical interface. There is no result window and no preview pane, because the intended caller is a program rather than a person at a desk.

FAQ

What is XERJ?

A single Rust binary that indexes local files and answers search queries over the Elasticsearch REST API. The same process also serves agent memory and an MCP tool surface.

What do I actually type to get started?

Two commands. Start a node with xerj --insecure --data-dir ./.xerj-data, then run xerj autoindex ./docs on the folder you want to search.

Do I need Docker, a JVM or a config file to run it?

No. XERJ is one native executable, and xerj autoindex takes no configuration file and no mapping.

Can I point my existing Elasticsearch client at it?

Yes. XERJ answers the Elasticsearch-8 wire protocol, so an existing client changes its base URL and nothing else.

Is it free for commercial use?

Yes. XERJ uses the Apache-2.0 license, which permits commercial use, modification and redistribution without a reciprocal source obligation.

Does XERJ do semantic search out of the box?

No. The default embedder is lexical feature hashing, which matches wording rather than meaning. A neural embedder is opt-in through --embed-mode neural.

Can XERJ run across more than one machine?

No. XERJ is single-node, with no replication, no sharding and no failover. One host is the whole deployment.

Does XERJ crawl websites?

No. XERJ fetches no web page and runs no crawler. Its inputs are folders on local disk and s3:// bucket prefixes read as a source.

Evidence

Related