Integration: Cohere models on XERJ

YOUR DATA STAYS HERE.
COHERE MODELS ON TOP.
ONE BINARY UNDERNEATH.

Enterprise teams that run search on their own hardware keep asking for the same setup: index the files and databases where they already live, keep the data inside the network, and use Cohere Rerank, Embed and Command on top. XERJ is that layer. It indexes files, folders, object storage and live Postgres tables on one CPU server, serves hybrid search and exact aggregations, answers structured questions with evidence through XERJ Query-1, and hands the best hits to Cohere models when you turn them on. XERJ is not affiliated with Cohere; the names below only say which API a setting talks to.

FOR·ON-PREM AI TEAMS·REGULATED DATA·AGENT BUILDERS

WHAT PLUGS IN WHERE.

On-prem architecture: files, a Postgres database and object storage feed one XERJ node on a CPU server inside the network. XERJ serves hybrid search, aggregations and XERJ Query-1 answers. Optional calls go to Cohere Rerank, Embed and Command, at a private Cohere endpoint or Cohere's API. YOUR NETWORK · ONE CPU SERVER FILES · PDF · OFFICExerj autoindex POSTGRESxerj connect (live) S3 · MINIO · ARCHIVESxerj autoindex s3:// XERJ NODE (ONE BINARY) · BM25 + kNN + RRF hybrid search · aggregations over live tables · XERJ Query-1: answers with evidence · memory + MCP tools for agents · Elasticsearch-compatible API rerank / embed hooks (off by default) COHERE MODELS Rerank · Embed · Command private endpoint, or api.cohere.com optional · text leaves only when you turn it on
ON MAIN · SHIPS IN RC.102

RERANK ON _SEARCH

Add "rerank": {"provider": "cohere"} to a search and XERJ returns its top hits in Cohere Rerank's order. Endpoint configurable, so a private deployment keeps text inside. #2985

ON MAIN · SHIPS IN RC.102

EMBED FOR SEMANTIC FIELDS

The proxy embedder calls Cohere's OpenAI-compatible route for semantic_text fields. Fixes a response-parsing bug on that route found while building it. #2983

ON MAIN · SHIPS IN RC.102

COMMAND TOOLS + RAG

cohere-tools.json gives Command six XERJ tools. The cookbook runs hybrid search, Rerank and /v2/chat; every citation resolves to a file and page. #2983

SHIPPED

MCP + XERJ QUERY-1

Any MCP client can call XERJ search, memory and XERJ Query-1 today. Query-1 compiles a question into a program over your facts and says UNKNOWN instead of guessing. How it works

STATUS, STATED PLAINLY.

CapabilityStatusTested how
Files, folders, S3, SQLite, SQL dumps via xerj autoindexshipped (rc.101)measured, see the worked example
XERJ Query-1 answers with evidence, MCP server (stdio)shipped (rc.101)measured
Live Postgres source: connect once, stays current (#2984)on main, ships in rc.102measured against Postgres 16
Table rows to facts for XERJ Query-1 (#2988)on main, ships in rc.102measured
Cohere Rerank provider on _search (#2985)on main, ships in rc.102against a mock of Cohere's API; live run pending
Cohere Embed via proxy, Command tools, RAG cookbook (#2983)on main, ships in rc.102against a mock; live run pending
Native /v2/embed with input_type, int8/binary vectors; MCP over HTTP; MySQL sourceroadmapnot built

"Live run pending" means every request and response shape was tested against a mock of Cohere's documented API, and no call to Cohere's real API has been made yet. This page claims no Cohere accuracy, latency or cost figure.

CONFIGURE IT IN TWO BLOCKS.

# xerj.toml
[rerank.cohere]
api_key  = "co-..."                             # or COHERE_API_KEY
endpoint = "https://api.cohere.com/v2/rerank"   # or a private Cohere deployment

[embedding]
mode = "proxy"
default_endpoint = "https://api.cohere.ai/compatibility/v1"
default_model = "embed-v5.0-pro"
curl -s -XPOST localhost:9200/policy-docs/_search -H 'content-type: application/json' -d '{
  "query": {"match": {"body": "appeal deadline"}},
  "rerank": {"provider": "cohere", "model": "rerank-v5.0-fast", "window": 30}
}'
# verify: the response has "_rerank": {"applied": true, "provider": "cohere", ...}

What leaves the machine, and only when you turn it on: the query and the text of up to window hits for Rerank; the text of embedded fields for Embed; the question and the selected hits for Command. Point each setting at a private Cohere deployment to keep all of it inside. Full reference: docs/COHERE.md.

SEE IT RUN ON REAL DATA.

We ran the whole setup on one machine with public regulations and claims manuals plus a live claims table: the worked example, with every number measured.