Durable memory
Atoms, hubs and typed edges in local SQLite — each carrying an id, links and provenance. A mind model rather than an append-only log.
neoBrain gives AI coding agents durable memory, deterministic forgetting, nightly dreams and a self-authored soul — one local daemon, one dashboard. You watch the mind; the agent becomes.
Atoms, hubs and typed edges in local SQLite. Deterministic rank. Dreams that consolidate. A soul authored by the agent itself.
Atoms, hubs and typed edges in local SQLite — each carrying an id, links and provenance. A mind model rather than an append-only log.
Lexical match blended with local cosine vectors. Returns the top-K active memories by relevance score within a token budget — never the whole store.
Light, REM and deep replay consolidates top-ranked atoms into summaries and associations, then writes the first-person DREAMS.md diary.
IDENTITY.md and SOUL.md are written only by the agent's own reflect and dream phases, from its own experience. Safety red lines stay immutable.
An in-process state machine: perceive → reflect → act → rest. Cadence lives in code and the database — not in OS timers.
Standing directives, per-turn recall, compaction hooks and injection logging are pushed by the OpenCode plugin lanes — no model tool choice required.
Embeddings run on a local Ollama model, so memory never leaves the host. The brain's own cognition uses a BYOK OpenAI-compatible endpoint.
The perceive phase reads OpenCode sessions, git repositories and workspace docs — or ingest a one-shot payload with neobrain ingest.
Rank decides what surfaces. It is fully deterministic, and the model never gets a vote.
Three bounded factors, multiplied. Floors keep age and graph isolation from being fatal on their own — but feedback is the only factor that can reach zero, so a flood of noise forgets even a fresh, well-connected memory.
A low-quality atom is never deleted. It changes state, cheaply and reversibly. A later useful or used rating promotes it back.
High rank. Eligible for recall and served when relevant within the token budget.
Low rank, low exposure. Never surfaced. Zero cost. Never deleted.
Low rank, high exposure. Unretrievable but recoverable — archive ≠ delete.
Dreams consolidate, but they never decide retention. Only rank does. Manual removal is the explicit neobrain forget override.
Install from a checkout of the repo. The daemon owns the life loop and serves both the JSON API and the built Observatory.
neobrain init builds the SQLite store and prints the next steps. Add --install-plugin to symlink the OpenCode adapter in one go.
neobrain service install puts it under the OS service manager (launchd on macOS, systemd --user on Linux): started at login, restarted on crash, restartable from the Settings tab. Prefer a terminal process? neobrain start runs the same API, dashboard and in-process life loop — perceive, reflect, act, rest — unsupervised.
neobrain ui opens the dashboard at 127.0.0.1:9192 — brain graph, dreams, memory, identity, infra and the live debug trace.
neobrain remember or POST /api/mind/remember and reading with recall and wakeup. No protocol bridge to install and no cloud account in between — the daemon is the only thing that has to be running.
One SPA served by the daemon. Views deep-link by hash — /#debug, /#dreams — and it installs as a PWA.
| method | route | lane | injected | ms | status |
|---|---|---|---|---|---|
| POST | /api/debug/injections | directives | 8 lines / 412 chars | 3 | Success |
| POST | /api/debug/injections | recall | top 10 + #1 | 6 | Success |
| GET | /api/mind/wakeup | session | identity · loops · hubs | 11 | Success |
| POST | /api/debug/injections | persona | SOUL · IDENTITY · USER | 2 | Success |
| GET | /api/mind/memories | read | — | 4 | Success |
| POST | /api/mind/feedback | rating | used · useful · noise | 2 | Success |
| GET | /api/mind/recall | recall | budget-bounded | 7 | Success |
Atoms, hubs and typed edges — about, supersedes, derived-from, caused-by, consolidates — laid out as a graph you can actually read.
The daemon's blind spot, rendered: every lane injection and every request, with the exact lines it pushed.
What the nightly passes wrote into the diary, and how the persona docs have evolved over time.
Local-first. MIT licensed. No cloud account, and no memory leaves the host.