ChloeDB documentation
Every example on this page runs in CI against the code it documents (docs/guide/run.py).
These docs follow main, which can be ahead of the latest release, 0.3.11 (its docs): a change made after it says so where it is described.
ChloeDB is an embedded search database with SQL: full text, structured columns, vectors and graph edges over the same rows, in one file, combined in one query by one planner. It runs inside your program like SQLite, or as a server and a cluster with the same SQL.
QuickstartInstall it and run your first search in five minutes. ConceptsThe file, tables, the three indexes, scores and the planner. Search guideWords, typos, filters, facets, vectors and hybrid ranking, on one small catalogue. SQL referenceEvery statement, function and option.
Where to start#
| you are making | start with | then |
|---|---|---|
| a Python app, script or notebook, with the database in your process | the quickstart's Python section (pip install chloedb, no server) |
Python, the search guide, and Build a search page for a web app |
| a JavaScript or TypeScript app (Node, Bun, Deno, a framework's server code) | JavaScript: npm install chloedb and a database in your process |
the search guide, whose queries run as await db.query(sql, params) |
| a server that several programs, languages or machines use | the quickstart: install chloedb-server, a table, a search, the command center |
chloedb-server, and Build an app on chloedb-server for an app over its HTTP API |
| a cluster: shards, replicas, failover | Operate a cluster, on one machine first | Runbooks and cluster limits |
| retrieval for a language model | Retrieval for RAG | LangChain, LangGraph, LlamaIndex |
| a move from Elasticsearch or OpenSearch | the OpenSearch API: --opensearch-listen answers OpenSearch's REST API, so an app on an OpenSearch or Elasticsearch 7 client indexes and searches unchanged, and its differences say what it refuses |
the search guide for the same searches in SQL, and multi-tenant isolation for an index per customer |
| a move from PostgreSQL's SQL | Differences from PostgreSQL: what answers otherwise and what is refused, with what to write instead | Following Postgres copies a Postgres database in and keeps it current |
| long-term memory for Claude Code | Install ChloeCtx: it plugs into Claude Code, and needs neither chloedb-server nor Python | ChloeCtx |
Something failed? Troubleshooting has the usual messages, each with what to do, and chloedb-server doctor checks this machine for their causes.
Cookbook#
Complete programs for common jobs. Each one runs, as written, every time the code changes.
Build a search pageA search box for a small web app: typos, highlights, did you mean, more like this and a filter. Retrieval for RAGChunk documents, search them by words and meaning, and hand a model the passages with their sources. Memory for an agentRemember turns and facts, recall what matters to a new message, and keep facts current. Crawl a site into searchPoint the crawler at a site, get a table with its fields, and search it. Search your logsSend syslog and OpenTelemetry logs to a table, and find the last 15 minutes' errors, a flapping interface, an IP.
Use it from#
| Python | import chloedb: a database in your process, or a client of a server, with the same methods; DataFrames too |
| JavaScript | Node, Bun and Deno in-process, or a fetch client for any runtime |
| Java | in-process over JNI, and a JDBC driver |
| HTTP and gRPC | chloedb-server, its command center, and a cluster of them |
Apps#
Apps on a cluster run beside chloedb-server and show in its command center: the crawler, Sheets and ChloeCtx, memory for Claude Code.
How these pages are tested#
The guide and cookbook pages are run as scripts: docs/guide/run.py runs every code block on a page, in order, in an empty directory, against the programs built from the same commit, and checks the output shown under a block against what it printed. A page that says so at its top has passed. The reference pages (SQL, server, clients, apps) are rendered from the Markdown in docs/chloedb/ and docs/chloectx/.