Open source · MIT · v0.1.0

An agent is a row,
not a class.

LUMEN is an open protocol and runtime for AI agents. An agent is a row in a hierarchical database — adding one is a SET, auditing it is reading a row. The engine is a single 1.3 MB WebAssembly binary that runs in a browser, in Docker, or on ARM.

$ docker run -p 8080:8080 ghcr.io/gonzalomzonc/lumen-protocol

What it is

A runtime, not a framework

Frameworks give you a loop to call models. LUMEN gives you the loop, the state, the persistence and the devices — as one engine you can embed anywhere.

◈

State is the database

Agents, sessions and work live in the PDB — a hierarchical store with MUMPS heritage. Restart the process and nothing is lost.

⚙

Devices, not integrations

HTTP, SQL, LLM, files, hardware, MCP — 54 operations across 16 families, declared by the engine itself.

↻

Survives a restart

Work can be in WAITING or HIBERNATE without burning CPU, and move to another node picking up from the same instruction.

◎

Orchestration costs zero tokens

Choosing which agent answers is a database lookup, not a model call. Deterministic, free, and the same every time.

Quick start

An agent is five lines

No class, no subclass, no config file. You write rows into the database and the engine picks them up.

; one agent = five SETs SET ^PERSONALITY("lawyer","label") = "Corporate lawyer" SET ^PERSONALITY("lawyer","identity") = "You review contracts and flag risk." SET ^PERSONALITY("lawyer","keywords") = "contract,legal,clause,risk" SET ^PERSONALITY("lawyer","provider") = "openrouter" SET ^PERSONALITY("lawyer","model") = "deepseek-chat" ; that's it. It is already in the registry and gets selected. WRITE $$DETECT("review this contract",3) ; -> lawyer

Selection is deterministic: the text is normalised, each agent's keyword row is checked, and the first three matches answer. If nothing matches, a base agent answers.

What's inside

The engine, not a wrapper

Everything below ships in the same binary. Nothing here calls out to a hosted service.

Component What it does Status
M-LightMUMPS-style VM with compiler. 60k lines of routines run on it.stable
PDBHierarchical persistent store. SQLite, LMDB and in-memory backends.stable
Devices54 operations: http, sql, llm, sys, hw, audio, img, cam, rag, mcp, ddp.stable
FibersCooperative concurrency with await, for parallel model calls.stable
DDPEdge ↔ local replication of namespaces.stable
MCPModel Context Protocol server and client.stable

Documentation

Start here

Deep-dives live in the repository. These are the ones worth reading first.