Enki Multimedia

Enki Multimedia / Data & Agents

Barrel DB, our database for AI agents

A customer sends a support request with a photo. An AI agent, a program you give a task to, saves the request and the photo in Barrel DB. The next day, another AI agent with access to the case reopens it and finds both.

Same case, same photo, the next day.

What the second agent can do

Barrel keeps the record. A tool lets the agent check the attachment, and another agent can help. This is a design a customer could build from our components.

AgentThe second agentpicks up the case the next day
finds the case
Barrel DBCase 4127the note, the photo and its search vector
calls a tool
MCPCheck the attachmentbarrel_mcp
runs the check, optional
WebAssemblyA WebAssembly moduleerlang_wasm, erlang-wasmtime

The agent can also:

ask for help, optional
A2AA specialist agentbarrel_a2a
returns the result
The resultsaved back into the case
An application a customer could assemble from these parts. Barrel DB is our product; the tool, the specialist agent and the WebAssembly module are what you would build, on your own or with us.
Remember and retrieve the caseBarrel DB stores the case and its files, with keyword and vector search. Its document layer stores data through erlang-rocksdb, a library that lets an Erlang application store data locally using RocksDB. Barrel DB, erlang-rocksdb
Give the agent a toolbarrel_mcp is an Erlang library for applications that use AI agents. With MCP, an agent can use a tool, such as an attachment checker. barrel_mcp
Ask another agentbarrel_a2a is an Erlang library for applications that use AI agents. With A2A, an agent can ask another agent to do a task and return the result. barrel_a2a
Run the tool's codePackage the check as a WebAssembly module. There are two ways to run it from Erlang: erlang_wasm is a runtime written in Erlang, and erlang-wasmtime connects the application to the Wasmtime runtime. erlang_wasm, erlang-wasmtime
Build an agent with ussales@enki-multimedia.eu

One database record holds the document and its attachments

Barrel DB keeps a document, its attachments and its search vector under one ID. When the document changes, they change together, so the search finds the revised text and opens the file that belongs with it.

An illustration with example values.

Barrel DB

Barrel DB keeps a document, its attachments and its search vector under one ID. When the document changes, they change together, so the search finds the revised text and opens the file that belongs with it.

We develop Barrel DB, provide technical support and use it in our own projects.

Read the source

The storage layer underneathfrom Barrel DB down to the disk

RepositoryDocumentation

An illustrative engagement, not a client case

An index shaped by the queries

An application looks up orders by customer and month, but its index was built for lookups by order number, so each query reads far more than it returns. We measure the queries the application actually makes, change the index to match them, and leave a test that shows the difference.

Before: the index follows the order number

“Orders for one customer, this month”the query the application makes
Index by order numberdoes not match the question
Reads every orderthen keeps the few that match

After: the index follows the question asked

“Orders for one customer, this month”the query the application makes
Index by customer and monthchanged to match the query
Reads only those ordersthe same answer, with far less work
An illustration of the kind of change we make; in a real engagement, the measurements come from your application.

Database engineering

Barrel DB is one database we build. We also work on yours: indexes, storage layers, replication and recovery, shaped by what your application actually does.