Features

July 17, 2026 ยท View on GitHub

What Barrel does today and what is planned, by capability. Read this to see which features are usable now, which are opt-in, and which are still ahead. Each row links to a guide where one exists.

Status legend

  • Ready: usable now, has tests.
  • Opt-in: usable now, off by default or behind a build profile.
  • Planned: not built yet.

Data model

A barrel record is one id with three faces: a JSON document, its attachments (blobs), and its vector. Documents live in barrel_docdb, vectors in barrel_vectordb, blobs are document attachments. The barrel API composes them; each underlying app stays usable on its own.

Capabilities

CapabilityStatusNotes
Documents (CRUD, MVCC, query)Readybarrel_docdb; find/2 over the path index. See embedding.
Batches (put_docs/get_docs/delete_docs, vector_add_batch)ReadyPer-element results, in order.
Attachments (blobs)ReadyDocument attachments; pluggable backend per db via barrel_att_backend (RocksDB BlobDB default). Streaming read/write.
Vector searchReadybarrel_vectordb; HNSW by default.
Record mode (policy-driven vector indexing)ReadyDocuments auto-embed per policy; async (healed) or sync (read-your-write); explicit vectors via put option. See record-mode.
BM25 keyword searchOpt-inEnable with bm25_backend => memory (or disk) at open; disk by default in record mode.
Hybrid search (vector + BM25)Opt-inNeeds BM25 enabled; results carry text/metadata. Text queries need an embedder (or query_vector).
EmbeddingsOpt-inbarrel_embed (local Python, Ollama, OpenAI, ...). Auto-embed and text hybrid need it.
RerankingOpt-inbarrel_rerank (cross-encoder).
FAISS index backendOpt-inbarrel_faiss; needs the FAISS C++ library, excluded from the default build (rebar3 as faiss).
Changes feedReadychanges/2, subscribe/2; HLC cursor via hlc_encode/1.
BQL queriesReadyPartiQL dialect over docs, vectors, and BM25; live SUBSCRIBE queries. See query-bql.
Synchronization / replicationReadySame VM and over HTTP (/db/:db/_sync/*); documents, attachments, channels, continuous tasks. Bearer, Ed25519 signed-request, and mTLS auth (opt-in; bearer is the default). Vectors rebuild locally. See synchronization.
Timeline (branch, PITR, merge)ReadyO(1) forks, point-in-time rewind, merge back as sync. See timeline.
Audit and provenanceReadyRetained history log; actor/session/source on writes; past bodies by version. See audit-provenance.
Document TTLReadyexpires_at write option, lazy expiry, opt-in sweeper (ttl_sweep_interval).
Encryption at restOpt-inPer-database keys via barrel_keyprovider; EncryptedEnv plus a sector cipher for flat files. See encryption.
REST/JSON serverOpt-inbarrel_server over livery, rebar3 as server; serves HTTP/1.1 (default) plus opt-in HTTP/2 and HTTP/3 over TLS. See rest-server.
Agent layer (spaces, capabilities, sessions, handoffs)Readybarrel_spaces; capability bearers on REST and MCP. See spaces.
MCP endpoint (tools, resources, live queries)Opt-in/mcp in barrel_server, on by default there. See mcp.
Browser client (barrel-lite)ReadyOffline-first TypeScript client (clients/barrel-lite): OPFS store, HLC-stamped writes, sync over the wire (polling or continuous SSE), multi-tab, attachment sync, a local BQL subset matching the server, and vector search (embedding pull + brute-force cosine top-k over the synced set, with server /search delegation; no ANN in the browser). See barrel-lite.
CORS + capability tokens on /dbReadyCORS middleware and bsp_ bearers scoped to their space's /db routes, so browsers can sync. See rest-server.
gRPC, WebTransport, unix socket, OpenAPIPlannedLater transports on barrel_server.
SQL API, agentfsPlannedLater.

Where things run

  • Embedded: depend on barrel (no transports pulled in). See embedding.
  • Server: run barrel_server for HTTP. See rest-server.