Open Source
🇪🇺 European

The edge-AI database for agents
Built in Europe

One embeddable database for documents, blobs, and vectors under a single id, with local search, offline-first sync, encryption, and an agent layer over REST and MCP. Erlang. Apache 2.0.

One record. Documents, blobs, and vectors.

Barrel keeps a document, its attachments, and its embedding under one id, so an agent's memory is one write and one read. Embed it as a library, run it as a server, or sync it to the browser.

Unified record

A document, its blobs, and its vector share one id. No glue code between a doc store and a vector index.

Local search

Vector, BM25, and hybrid search in-process, plus BQL queries. Brute-force vector search even in the browser.

Offline-first sync

HLC version vectors track causality, so sync converges without a coordinator and never silently drops a write.

Encryption at rest

AES-256-GCM with per-database keys and a pluggable key provider. Your keys, your data.

Timeline

Branch a database, restore it to a point in time, and merge branches back. Version control for state.

Agents & MCP

Spaces, capability tokens, sessions, and handoffs, exposed over REST and the Model Context Protocol.

One API. Documents and vectors.

No glue between a document store and a separate vector index. You write a record once, then query it as documents or search it as vectors. Embed Barrel in your Erlang application, or run barrel_server in front of it and reach the same records over REST and the Model Context Protocol.

%% Open a database. Text is embedded into a vector on write.
{ok, _} = barrel:open(<<"notes">>, #{embedding => #{provider => openai}}).

%% One write stores the document, its vector, and its blobs under one id.
{ok, _} = barrel:put_doc(<<"notes">>, #{
    <<"id">>    => <<"n1">>,
    <<"title">> => <<"Design review">>,
    <<"text">>  => <<"Ship the edge sync protocol">>
}).

%% Query the document layer with BQL.
{ok, Rows, _} = barrel:query(<<"notes">>,
    <<"SELECT id, title FROM db WHERE title LIKE 'Design%'">>).

%% Search the vector layer over the very same records.
{ok, Hits, _} = barrel:query(<<"notes">>,
    <<"SELECT id, _score FROM vector_top_k('edge sync', k => 5) AS v">>).
# Run barrel_server for a REST/JSON and MCP surface over the same database.
$ curl -X PUT localhost:8080/db/notes
{"ok":true,"db":"notes"}

$ curl -X PUT localhost:8080/db/notes/doc/n1 \
    -H 'content-type: application/json' \
    -d '{"title":"Design review","text":"Ship the edge sync protocol"}'
{"id":"n1","ok":true,"rev":"0000019f46b4c08900000000@8c0010c983917d4b"}

# Vector search over the same records.
$ curl -X POST localhost:8080/db/notes/search/vector \
    -H 'content-type: application/json' -d '{"vector":[...],"k":5}'

# Agents speak MCP against the same endpoint.
$ curl -X POST localhost:8080/mcp -H 'content-type: application/json' -d '{...}'

Why Barrel?

Built different. Built in Europe. Built to last.

Open Source

Apache 2.0 licensed. Fork it, modify it, deploy it anywhere.

Built in Erlang

Battle-tested VM. Fault-tolerant by design. No garbage collection pauses.

🇪🇺

Made in Europe

European company. No US Cloud Act. GDPR compliant by design.

Runs anywhere

Embed it in Erlang or Elixir, run it as a server, or sync it to the browser.

🇪🇺 Made in Europe

Powers Barrel Platform

The same open source database powers Barrel Platform, our managed, privacy-first infrastructure for AI agents. Self-host it, or let us run it. Same code either way.

No lock-in

Open source core

Privacy First

GDPR by design

Need help?

Contact Us

Support & managed hosting
available on request

100% Open Source

Every component is Apache 2.0 licensed. Fork it, modify it, deploy it anywhere. No vendor lock-in, no usage fees.

Ready to Get Started?

Self-host the open-source database, or work with Enki Bridge on a fixed-scope pilot, production deployment, or managed Barrel DB.