Lethe docs · Architecture

Architecture

Components

                 agents
   ChatGPT · Claude · Claude Code · Cursor · IDE assistants · MCP clients
                |
                | OAuth (S256 PKCE) or Obol — MCP (streamable HTTP)
                v
   ┌─────────────────────────────┐
   | Charon (optional gateway)   |  authorization, project grants, scopes,
   |  :18484 OAuth · :18486 Obol |  owned refs, proposals, independent review,
   └──────────────┬──────────────┘  protected merges, audit ledger
                  | bearer `LETHE_API_KEY`, private typed API
                  v
   ┌─────────────────────────────┐
   | Lethe                       |  canonical persistent memory
   |  :18483 legacy · :18485 git |
   |  SQLite (WAL, FULL sync)    |
   └─────────────────────────────┘

   OpenClaw (optional) → plugin → legacy Lethe :18483 (session memory)

Lethe runs fine without Charon (direct bearer-key API). Charon is required only when you want scoped principals, review separation, and replay-protected merges enforced in front of the store.

The boundary

Data model

One embedded SQLite database per instance (WAL mode, synchronous=FULL, busy timeout enforced, startup-verified durability):

System Tables Notes
Legacy sessions, events, checkpoints, threads, flags, assemblies append-only events, parent_event_id threading
Memory Git changesets, changeset ops, refs, manifests, conflicts, merge-authorization nonces immutable changesets, parent-linked; consumed merge nonces survive restarts (replay protection)

Git mode is served from its own data directory by convention (docker-compose.git.yml, port 18485) so it never touches an existing OpenLethe store. Hybrid mode serves both systems from one database.

Modes and surfaces

Mode HTTP surface
legacy legacy session API + dashboard UI
git Memory Git API + repository-style Memory Git UI
hybrid both APIs and both UIs on one port

Details: runtime-modes.md · api.md.

Security posture

Availability and recovery