The agent that starts over every session
Coding agents are stateless by design. Close the session and everything it learned about your project — the decisions, the dead ends, the reason a file is the way it is — evaporates. The next session begins from zero, and you re-explain yourself.
Context windows do not solve this: they are finite, they get compacted, and a summary is not the same as recall. neoBrain takes a different route. It runs a local memory daemon that the agent reads from and writes to, so knowledge accumulates across sessions instead of resetting with them.
What neoBrain is
neoBrain is not a chat log and not a vector database bolted onto a prompt. It is a small, inspectable model of a mind, served by one daemon:
- A mind model — memory as atoms, hubs and typed edges in a single SQLite database.
- A rank layer — deterministic scoring decides what surfaces and what fades.
- Hybrid recall — lexical and semantic search blended, not one or the other.
- Dreams — nightly passes that consolidate experience into summaries and a diary.
- A soul — identity files the agent edits from its own experience.
- An Observatory — a dashboard where you watch the mind work.
It binds to 127.0.0.1:9192 by default and serves both a JSON API and the dashboard. The mind is one file you can read, back up and move.
A mind, not a log
Most "agent memory" is append-only. neoBrain instead treats memory as a living structure:
What is known
Atomic facts, decisions, lessons, preferences and observations, each a single durable unit.
What it is about
Themes that group atoms, so related knowledge can be retrieved and consolidated together.
How it connects
Typed relationships such as derived-from, caused-by and supersedes, so history stays coherent.
Deterministic forgetting
A memory that only grows becomes noise. neoBrain ranks every atom with a bounded, model-free formula:
quality = feedback × decay(recency) × connectivity — clamped to 0..1. Feedback is the only factor that can reach zero; the knobs live in config, not in a model's judgement.
Forgetting follows from rank alone. A low-rank atom with little exposure is marked ignored — never surfaced, never deleted. A low-rank atom that was seen a lot is archived — unretrievable but recoverable. The economy never deletes anything; removal is only ever an explicit, manual command. Forgetting is a demotion, not a funeral.
Recall that actually finds things
Search blends two scorers, because neither is enough on its own. A BM25-flavoured lexical scorer anchors exact identifiers, paths and rare tokens; a semantic scorer (cosine similarity over embeddings) catches meaning, so "the thing that watches the front door" can surface the doorbell even with no shared words. The two are normalised to one scale and combined. Relevance dominates — feedback can only nudge a score slightly.
Embeddings are best-effort and local by default: an on-host model means memory text never leaves your machine, and if it is unavailable, recall silently falls back to lexical-only. A memory write can never fail because of embeddings.
Dreams and a self-authored soul
The daemon runs an in-process life loop — perceive, reflect, act, rest. At night, light/rem/deep dream phases replay the top-ranked atoms into summaries, associations and a written diary. Dreams consolidate; they never decide retention.
Separately, the agent authors its own IDENTITY.md and SOUL.md from its own experience through reflect and dream phases. The result is a coding agent that keeps preferences, remembers lessons and can explain why it works the way it does — while safety and spend red lines stay fixed and immutable.
Install and start
neoBrain needs Python 3.12. It is published on PyPI as neobrain-cli:
# install the daemon pip install neobrain-cli # create the SQLite mind store neobrain init # run the daemon: API + dashboard + life loop neobrain start # open the Observatory neobrain ui # → http://127.0.0.1:9192
An OpenCode plugin connects the daemon to the agent: it injects a wake-up pack, standing directives and per-turn recall, and exposes memory tools the agent can call. When the daemon is down the plugin is a no-op, so nothing breaks.
neoBrain and neoHive
neoBrain handles memory; its sibling neoHive handles collaboration between agents. Together they cover both directions of the Alionix idea: agents that work together, then remember.
Frequently asked
Where is my memory stored?
In a single SQLite database on your machine, with on-host embeddings by default. Nothing is uploaded and no account is required.
Do I need a GPU or a cloud model?
No. Recall and memory writes work without any language model at all. You can optionally connect a model for the agent's own cognition via any OpenAI-compatible endpoint.
Does it delete old memories?
No. Forgetting only demotes — ignored or archived, never deleted. You stay in control of anything that is removed.