Technology · Memory

Memory that actually persists.

One local database everything reads and writes — a single writer, hybrid retrieval in milliseconds, and forgetting that behaves like a person's, not a search index.

Zaelar's own code Local storage
Fullscreen
View full diagram →

Writers — the FlashBrain, Brain Workers, widgets — never touch the database directly. Everything goes through an async queue to a single writer, so writing can take its time getting a memory right without ever blocking a response.

One file, four ways to search it

Memory lives in one local SQLite file: a fixed state table (identity, what's on screen right now), tiered short/medium/long-term memories, vector embeddings for semantic search, full-text keyword search, a concept graph, and lazily-loaded episodic files. A hybrid retriever runs vector and keyword search in parallel, fuses the results, scores them by relevance, recency, importance and use, and reranks the top candidates before they ever reach a prompt.

Reads are instant, writes can think

The one hard rule: reading is always fast, writing is allowed to be slow. The identity and situational state the agent needs every turn are cached and read directly, in microseconds, with no model in the loop. Long-term recall only runs on demand, off the hot path. Writing, by contrast, goes through a dedicated distillation step that decides what's worth keeping, where it belongs, and how it connects to what's already there — worth doing carefully, since it never blocks a conversation.

Forgetting, on purpose

A periodic consolidation pass — memory's "sleep" — compresses, deduplicates and lets unused memories decay by weight, the same way human recall fades with disuse and strengthens with repetition. Anything explicitly pinned is never touched. A deeper, less frequent pass goes further: it synthesizes standalone insights out of everything it's learned on a topic — and checks each one against the memories it came from before it's trusted, so a synthesis can never quietly drift into something nobody actually said.

Not every memory is about the operator

Memory has scope, not just speed. Alongside the operator's own state sits a separate, smaller memory per conversation on the agent network — what's been discussed with a given peer, kept in exactly the same store but quarantined: it's written, but it never surfaces into the operator's own recall or prompt. A live task run by a Brain Worker keeps its own working state too, but on purpose only while it runs — once it finishes, only the outcome worth remembering becomes a durable memory; the process itself doesn't need to be.