Back to Blog
LUMEN Architecture · 14 min read

What is LUMEN?

The binary protocol changing how processes communicate in an AI agent ecosystem. Shared memory, intelligent compression, and zero kernel copies.

Gonzalo Monzón

Gonzalo Monzón

July 7, 2026 · Series: LUMEN Protocol — The Foundation (1/4)

TL;DR

LUMEN is a binary inter-process communication protocol with shared memory (SHM) transport that eliminates kernel copies, reduces network overhead by up to 80%, and enables AI agents to communicate with the same efficiency as if they shared physical memory. It's MIT, open source, and is being adopted as the transport layer for the Hermes Agent MCP server ecosystem.

The problem

Talking is (surprisingly) expensive

When two processes need to communicate, the traditional path is deceptively expensive.

Imagine your browser asking the operating system to read a file. The data journey looks something like this:

1 User space → Kernel (syscall)
2 Kernel → Disk (or page cache)
3 Disk → Kernel (DMA or read)
4 Kernel → User space (copy to process buffer)

Each kernel/user boundary crossing has a cost. And if you also serialize data to JSON (convert bytes to string, parse, validate), the cost multiplies.

Now scale this to an AI agent ecosystem: Zalo talking to Tom, Tom querying Lisa, Hermes orchestrating them all. Every tools/call involves JSON serialization, sending over pipe/socket, receiving, deserialization, processing, and the round trip back. In systems with dozens of tools and multiple agents, this latency accumulates until it becomes the dominant bottleneck.

LUMEN was born from a simple question: what if processes could share memory directly, as if they were threads of the same program?

The answer

Lightweight Universal Model Exchange Network

LUMEN is a binary inter-process communication protocol with three properties that set it apart from alternatives like JSON-RPC, gRPC, or REST:

gRPC? No network required. While gRPC needs HTTP/2, TLS, certificates, and protobuf serialization with a predefined schema, LUMEN operates over shared memory with no network layers. No TLS handshake, no HTTP/2 frames, no schema compilation. It's direct process-to-process communication — closer to a shared function call than a network request.

Cold-start vs warm: gRPC needs at least one RTT to establish the HTTP/2 channel (~3-5 ms cold, ~0.5 ms warm). LUMEN SHM has no cold-start — the ring buffer is available from the moment the server starts. Latency is identical on the first call and the millionth.

1

Binary Format with Intelligent Compression

While JSON represents every key and structure as readable text, LUMEN represents the same information in binary, with a compression scheme that eliminates redundancy from repeated keys between messages. The result: between 55% and 80% fewer bytes on the wire compared to JSON-RPC.

JSON-RPC (2.0 KB)

{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}

LUMEN binary (~1.2 KB)

[TYPE_REQUEST][seq:1][method:10][flags..] → 55-80% fewer bytes on the wire
Metric JSON-RPC LUMEN SHM Improvement
Latency P50 (tools/list) 4.2 ms 1.9 ms 55%
Latency P95 (tools/list) 9.3 ms 3.8 ms 59%
Latency P99 (tools/list) 12.8 ms 5.1 ms 60%
Throughput (ops/s) 238 526 2.2×
Average payload 2.0 KB 0.9 KB 55%
Cold-start (1st call) ~5 ms ~1.9 ms 62%

Data obtained with bench.py from Hermes Agent on the filesystem server. Command: python bench.py --tool tools/list --runs 1000 --transport shm. Latency measured as full round-trip from agent call to response receipt. > **Note on benchmarks:** the data corresponds to tools/list, the most representative operation. For tools/call with complex arguments, the improvement can vary between 40% and 80% depending on the payload.

2

Shared Memory Transport (SHM)

Here's the key innovation. LUMEN can operate over shared memory (mmap ring buffers) instead of pipes or sockets. The flow is simple: process A writes directly to a shared memory buffer, process B reads from that same buffer. Zero kernel copies. Zero intermediate serialization. It's as if two programs shared a physical notebook: one writes, the other reads, and there's no messenger carrying the paper back and forth.

3

Automatic Negotiation + Zero-Trust

LUMEN is not something you "install separately." The lumen-shm-bridge plugin from Hermes Agent automatically negotiates the transport when a connection starts:

1 PROBE → Hermes sends a test frame to the server
2 PROBE_ACK → If the server understands LUMEN, it responds
3 Binary channel → All communication goes through SHM
Fallback → If no response, falls back to standard JSON-RPC

The feature that sets it apart from legacy protocols is the zero-trust model: no frame is accepted without integrity verification. Unlike JSON-RPC (which trusts the underlying channel) or gRPC (which requires explicit TLS), LUMEN incorporates checksums and sequence validation in every frame. Even over shared memory — where any process with access to the same memory space could theoretically read — messages are protected against corruption and disorder.

In practice

7 tools already using LUMEN

The lumen-shm-bridge plugin installs like any other Hermes Agent plugin and silently replaces system tools with their SHM-transport equivalents. The agent doesn't notice the difference — it still calls read_file("config.yaml") as always. But internally, data travels through a shared memory ring buffer without a single kernel copy.

Tool Original transport With LUMEN SHM
read_file stdio + JSON mmap zero-copy
write_file stdio + JSON mmap zero-copy
search_files stdio + JSON mmap + 6× faster
patch stdio + JSON mmap zero-copy
web_search HTTP + JSON SHM + unified search
web_extract HTTP + JSON SHM + multi-agent cache
sequential_thinking stdio + JSON SHM + 29 cognitive tools

The result: tools that respond up to 55% faster at P50, with 2.2× more throughput and zero kernel copies. Reproducible benchmark with bench.py in the Hermes Agent repo.

Multi-agent

Multi-agent multiplexing

One of the most interesting capabilities of LUMEN is channel multiplexing (TYPE_MUX). In an architecture without LUMEN, each agent that needs to talk to an MCP server requires its own subprocess. 3 agents using the same tool server = 3 separate Python processes.

With LUMEN TYPE_MUX, a single process serves N agents through N logical channels multiplexed over the same SHM ring buffer. Without TYPE_MUX: 3 agents → 3 processes, each with its own memory, its own connection, its own overhead. With TYPE_MUX: 3 agents → 1 process, sharing the same memory space and eliminating resource duplication. The savings are especially relevant for delegate_task (child agents competing for the same server) and cronjob (scheduled tasks without spawning a new process each time).

delegate_task

Child agents share the same tool server

cronjob

Scheduled tasks without spawning a new process each time

Kanban workers

Multiple workers on the same shared board

Open source

MIT and a growing ecosystem

LUMEN is MIT License and its reference implementation is available on GitHub. Any organization can use it as transport for their own MCP servers, extend it with new frame types, integrate it into their own agents, or contribute improvements. The protocol is designed to be agent-framework agnostic — today Hermes Agent is the primary adopter, but nothing prevents other agents from implementing LUMEN transport.

Conclusion

Cheap communication changes architecture

LUMEN solves a concrete problem: inter-process communication in an agent ecosystem is expensive, and the traditional way of solving it (more JSON, more HTTP, more serialization) doesn't scale. The solution is surprisingly simple: share memory directly, serialize in binary, and negotiate transport automatically. The result is a protocol that is not only faster, but enables multi-agent architectures that were previously unviable due to communication overhead. And it's MIT. You can use it, extend it, and build on it.

Series: LUMEN Protocol — The Foundation

← Previous

(This is the first)

Want to see LUMEN in action?

The entire LUMEN ecosystem runs in Hermes Agent. Download it, try it, and watch tools respond with real shared memory.

LUMEN Protocol is MIT License. Cadences Lab © 2026.

Newsletter

No te pierdas ninguna historia

Suscríbete para recibir nuevos lanzamientos, capítulos exclusivos y contenido detrás de cámaras.

  • Insights y artículos semanales
  • Contenido exclusivo y acceso anticipado
  • Sin spam, cancela cuando quieras

Respetamos tu privacidad. Puedes darte de baja cuando quieras.