PDB: The Memory Your Agent Doesn't Lose When You Log Off
A hierarchical database with MUMPS heritage that enables AI agents to persist knowledge between sessions, work offline-first, and share memory without relying on the cloud.
Gonzalo Monzón
July 7, 2026 · Series: LUMEN Protocol — The Foundation (2/4)
TL;DR
PDB (*Process Database*) is a hierarchical storage system with MUMPS heritage that solves the fundamental problem of AI agents: shared, persistent memory across sessions. Unlike Redis (flat key→value) or Chroma (vectors in the cloud), PDB organizes knowledge in deterministic trees with operations like $ORDER, $DATA, and MERGE, all on SQLite with offline-first capability. It's MIT, open source, and runs wherever your agent runs.
Does your agent forget what it learned yesterday?
You ask the same thing every morning because your previous session was wiped. You have to re-embed, re-index, re-learn every time you switch models. The LLM context is a volatile cache — when the session ends, knowledge is lost.
Traditional systems try to solve this with RAG over vectors (Pinecone, Chroma) or in-memory caches (Redis). But none of them understand hierarchy, time, or determinism:
| Feature | Redis | Chroma / Pinecone | PDB |
|---|---|---|---|
| Structure | Key → flat value | Flat vector | Hierarchical tree |
| Cross-session persistence | Configurable (RDB/AOF) | Cloud (requires network) | Native (SQLite) |
| Offline-first | Yes (local persistence) | No (100% cloud) | Yes, by design |
| Deterministic operations | SCAN (non-deterministic) | Similarity (non-deterministic) | $ORDER pure |
| Latency P50 (local read) | ~1 ms (in RAM) | ~50 ms (API) | ~3 ms (SQLite, warm) |
| Latency P99 (local read) | ~5 ms (in RAM) | ~200 ms (API) | ~8 ms (SQLite, warm) |
| Persistence | In-memory (+ optional RDB/AOF) | Cloud (remote disk) | Local disk (SQLite, WAL) |
| License | SSPL (Redis) | Apache 2.0 (Chroma) / Proprietary (Pinecone) | MIT |
Hierarchy, not tables
MUMPS, the language of healthcare systems that have been running for decades without losing a single piece of data, understood something that relational databases ignore: information is hierarchical, not flat.
A conversation is not a table. A project is not a row. Knowledge is not normalized into 3NF — it is organized in trees.
^GLOBAL("project", "lumen", "version") = "1.0.0"
^GLOBAL("project", "lumen", "status") = "stable"
^GLOBAL("project", "zalo", "trust") = 8.5
^GLOBAL("project", "zalo", "kb", "client", "A") = "prefers email" Compared to Redis: Redis is key → flat value. Each key is independent. PDB is key → tree: ^GLOBAL("project", "zalo", "kb", ...) gives you an entire subtree with a single operation. No need to concatenate keys or manage wildcards.
Operations that LLMs understand
PDB is not just a key-value store. It's a system with operations that directly model how an agent thinks:
| Operation | What it does | What it's used for |
|---|---|---|
$ORDER | Iterates in deterministic order | $ORDER(^KB("trust","")) → first contact; repeat → next. Zalo traverses its list without a for loop |
$DATA | Checks if a node exists, has children, or both | Before reading, you check if it exists. Returns 0/1/10/11 depending on state |
MERGE | Copies subtrees atomically | Share context between agents without serializing. One operation, not a loop |
KILL | Deletes a node + its entire subtree | Forget an entire branch without leaving orphans. Consistency guaranteed |
$INCREMENT | Atomic counter without race conditions | Multi-agent event tracking: two agents increment simultaneously without collision |
LOCK | Mutual exclusion by namespace | Prevent two agents from writing to the same context at the same time |
Real-world case: Zalo looks up a contact's trust level in its KB. Without PDB, it would need to maintain an in-memory map that gets lost when the session ends, or serialize/deserialize JSON every time. With PDB: a single $GET(^KB("trust","client42")) that responds in ~3 ms warm (~8 ms P99) — and the data persists even if Zalo restarts, the process dies, or the machine shuts down. SQLite with WAL mode guarantees transactional integrity even during power failures.
Cross-session persistence + offline-first
Here's the superpower that neither Redis nor Chroma offer.
When an agent learns something in one session — a conversation pattern, a user preference, an architecture decision — PDB retains it for the next session. No re-learning, no re-indexing, no re-embedding.
And because PDB runs on SQLite, it works offline-first. You don't need a cloud connection for your agent to remember. In edge computing, where every millisecond counts and connectivity isn't guaranteed, this makes all the difference compared to solutions like Pinecone (100% cloud) or Redis (needs network for clusters).
Learn today, remember tomorrow. No re-indexing
No internet. No cloud. No problems
Local read latency. Like RAM
What else PDB offers
On top of this core, PDB adds additional capabilities: triggers (when Zalo saves data, PDB auto-reindexes — though they're synchronous, not async, so use them sparingly on high-throughput operations), FTS5 for full-text search over stored values, partitioning across files for horizontal scaling, M-Light REPL for evaluating MUMPS expressions in real time (SET ^demo("hello")="world" → WRITE $GET(^demo("hello"))), and scratchpad as temporary LLM memory during an active session.
Who uses it?
Every agent in the Cadences ecosystem reads and writes to PDB:
It's not a database for your web app. It's the memory of a system that thinks.
LLMs forget. PDB remembers.
Every time your agent learns something, it should be able to save it. Every time it makes a decision, it should be able to justify it. Every pattern it discovers should persist. That's PDB. The memory that doesn't get erased when you change models. The backpack the agent carries everywhere — even when there's no internet.
Series: LUMEN Protocol — The Foundation
← Previous
What is LUMEN — The Binary ProtocolWant your agents to remember?
PDB is part of the LUMEN ecosystem (MIT). You can use it today in Hermes Agent.
PDB is open source within LUMEN (MIT). Cadences Lab © 2026.