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, apps — 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, keyword and paraphrase search in parallel, fuses the results, expands them over the concept graph, and scores them by relevance, recency, importance and use — with an optional reranker you can switch on for the top candidates.

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, and that part is deliberately temporary. What outlives it is the commission: one durable row holding what you asked in your own words, how it ended, and the report it produced — including the candidates it discarded and why. It is full-text indexed, so months later you can ask for it by what it was rather than what it was called, and the report is rebuilt from the row long after the card was closed.