Agents commonly waste expensive context by opening whole files or grepping repositories; XERJ changes the flow by turning a folder into typed, queryable indices and returning the precise passages an agent needs. The measured benefit: a reference-coding case study reported 2.7× fewer output tokens than a grep-driven agent while keeping the same solve rate, making retrieval-based workflows cheaper and more reliable for private or post-cutoff codebases.
What Sets It Apart
- Zero-config autoindexing with wide format support — XERJ content-sniffs files (code, PDF, DOCX, SQLite, CSV, logs, notebooks, etc.) and creates explicit indices automatically. So what? You can point it at a repo or data dump and get immediately queryable indices without schema or pipeline work.
- Elasticsearch-compatible API in one static binary — speaks the Elasticsearch wire protocol and runs as a single prebuilt executable (Linux/macOS/Windows, x86-64/arm64). So what? Existing clients, dashboards and tooling (Kibana, ES clients) work unchanged and deployment is lightweight.
- Built-in embedding and per-agent memory — embeds text on ingest (lexical by default, neural optional) and exposes a namespaced
/_memory/{ns}store for durable agent memory. So what? Agents recall facts by meaning and vectors without a separate vector DB or external embedding key. - AST-aware code indexing and agent-oriented primitives — tree-sitter-backed code records include symbols and line numbers; MCP tooling exposes search, semantic/knn/hybrid queries, and memory tools. So what? Coding agents retrieve functions or passages (file:line) instead of whole files, cutting token costs and improving citation of sources.
Who It's For and Trade-offs
Great fit if you run coding agents, perform codebase Q&A, RAG pipelines, security audits, log/incident analysis, or want a lightweight Elasticsearch-compatible local engine for agent memory. It is particularly valuable when models do not already memorise the target code (private, niche, post-cutoff code).
Look elsewhere if you need a full distributed Elasticsearch cluster or require exact parity with every Elasticsearch internal behaviour (XERJ is API-compatible but not a reimplementation of Elasticsearch internals). Note the dev convenience-mode (--insecure) disables TLS/auth and is intended for single-user dev machines; optional reranking can send document text to an external judge when enabled, so operators should read the security docs before turning it on.