Anton Models AI Memory on the Brain
Reference: mindsdb/anton — MIT · Python · (the open agent core shipped inside mindsdb/minds)
Anton is the open, MIT-licensed agent core inside MindsDB's Minds platform. It runs anywhere with any model you bring, and its most interesting idea is how it remembers: its long-term memory is modeled on human brain regions — hippocampus, cortex, cerebellum, anterior cingulate — and every memory is stored as a plain Markdown file you can read, edit, diff, and grep.
What exactly is Anton, and what's it part of?
Anton is a self-improving AI agent you hand a task to — clear an inbox, build a report, automate a workflow. Its README pitches it as "an open, powerful alternative to Claude-Cowork that you can run anywhere and use with any model you want — OpenAI, Anthropic, OpenRouter (200+ models), NVIDIA Nemotron, z.ai/GLM, Kimi/Moonshot, MiniMax, or your own endpoint."1 Bring-your-own-key, run-anywhere: you keep control of the model and the data.
One naming caveat worth stating up front. The repo most people star is mindsdb/minds — a 39,299-star umbrella whose history reaches back to 2018, and whose top level is just a docker-compose.yml, two Dockerfiles, and four git submodules.2 The engineering this post examines lives in one of those submodules, the much younger mindsdb/anton (687 stars, created February 2026, Python).3 That is the platform's brain, and it is where the good ideas are.
What problem does a brain-modeled memory solve?
Most agents treat "memory" as a bigger prompt: shovel the transcript, some facts, and a few examples into the context window and hope the model picks the right ones. That scales badly. Context windows are finite and expensive, retrieval is noisy, and nothing the agent learns survives the session unless you bolt on a vector database.
Anton takes a different position: memory is an architecture, not a buffer. It splits remembering into specialized stores — fast episodic logs, always-on facts, on-demand skills — and adds an offline pass that decides, after the fact, what was worth keeping. The design borrows its decomposition wholesale from neuroscience, and it commits the result to Markdown on disk rather than an opaque index.
How is the memory laid out?
The memory engine lives in anton/core/memory/, and each module is named for the brain structure it imitates. The Hippocampus is the read/write engine — its docstring describes "encoding new traces (writing) and pattern-completing partial cues into full memories (reading)."4 Crucially, it writes to four human-readable files per scope:
profile.md → identity (mPFC / Default Mode Network)
rules.md → behavioral gates (Basal Ganglia / OFC)
lessons.md → semantic facts (Anterior Temporal Lobe)
topics/*.md → domain expertise (Cortical Association Areas)
A single fact, rule, or lesson is an Engram — one bullet line in one of those files. Because Engrams are cheap, the Cortex (the "executive memory coordinator," modeled on the prefrontal cortex) loads them into every prompt unconditionally and decides what to commit through an encoding_gate().5 Procedural know-how is handled separately so it does not bloat the prompt.
flowchart TD
SP["Execution scratchpad<br/>(Python cells)"] --> EP["Episodic memory<br/>episodes JSONL"]
SP --> CB["Cerebellum<br/>intent vs outcome"]
SP --> ACC["ACC<br/>cross-cell errors"]
EP --> CON["Consolidator<br/>offline replay"]
CB --> CON
ACC --> CON
CON --> CX["Cortex<br/>encoding gate"]
CX --> HC["Hippocampus<br/>write engine"]
HC --> FILES["profile.md / rules.md<br/>lessons.md / topics/*.md"]
FILES -->|"loaded into prompt"| CX
Figure: Anton's memory flow. Live work happens in the scratchpad; the Cerebellum and ACC catch errors; episodes are logged as JSONL; an offline Consolidator replays a session and routes lessons through the Cortex's gate into the Hippocampus, which writes plain Markdown files that are loaded back into future prompts.
The flow reads top to bottom: the agent works in the scratchpad, lightweight error and episode signals are captured during the turn, and an offline Consolidator later replays the session and decides what becomes a durable Markdown lesson.
Why is the design decision to store memory as Markdown clever?
Storing an agent's mind as profile.md, rules.md, and lessons.md is the most consequential choice here. A vector store is a black box: you cannot easily inspect what your agent believes or why it behaves a certain way. Anton's memory is the opposite — every belief is a line of Markdown you can open, audit, hand-edit, version with Git, or delete.
That white-box property is the same reason MNMNOTE treats Markdown notes as a first-class substrate for AI: text files are portable, diffable, and owned by you, not trapped in a proprietary index. When the migration tool reconsolidator.py moves old data into the new format, it even names the act after biology: "memory reconsolidation (Nader et al., 2000): when a consolidated memory is reactivated, it enters a labile state where it can be modified before being re-stored."67 The content is preserved while the format changes — and because it writes atomically, an interrupted migration cannot corrupt your files.
How does Anton learn from its own mistakes?
Two modules turn execution into supervision. The Cerebellum, "supervised error learning over scratchpad execution," exploits a small trick: before each scratchpad cell runs, the model must declare a one_line_description of its intent. That description is the forward model — the prediction. After the cell runs, Anton compares predicted intent against the actual stdout, stderr, and errors; when they diverge meaningfully, it encodes a correction note that future code-generating calls will see.8 No labels, no human feedback — the prediction-versus-reality gap is the training signal.
@dataclass
class Cell:
"""A single scratchpad execution unit — code in, outputs out."""
code: str
stdout: str
stderr: str
error: str | None
description: str = "" # the LLM's forward model / intent
The Anterior Cingulate Cortex works at a larger scale. Modeled on "the brain's error-detector," it watches a whole turn and extracts lessons from patterns that fire more than once — like the real session where the agent kept switching scratchpad names mid-task and "burned 8 rounds on recovery."9 One slip is noise; a repeated slip is a lesson worth writing down.
What runs the offline "sleep" pass?
The Consolidator is explicitly modeled on sleep — "hippocampal-cortical replay during Slow-Wave Sleep."10 It runs after a session, never during, so it cannot slow down your next interaction. And it is selective: its should_replay() only fires when a session is worth mining — "any cell had an error," "session was long (>=5 cells)," or "any cell was cancelled."11 When it does run, it replays the session, asks "what would I tell myself to do differently?", and routes the answers through the Cortex into long-term Markdown. Routine, successful, short sessions produce no new memory at all — which keeps the lesson files signal-dense instead of a dumping ground.
How does it keep secrets out of the model?
Anton's workspace is a .anton/ directory holding anton.md (project context read at the start of every conversation) and a local .anton/.env the README documents as a "workspace configuration variables file (local file)."12 The workspace.py docstring states the intent bluntly: "store secrets without passing through LLM."1 API keys and credentials are resolved by the runtime, never serialized into the prompt — so they stay off the wire and out of any transcript the model sees. For an agent that connects to your email, calendar, and databases, that boundary matters.
What would I steal from this?
Four ideas travel well beyond Anton. First, memory is architecture — a tiered store of always-on facts, on-demand skills, and raw episode logs beats stuffing everything into one prompt. Second, forward-model error learning is free supervision — make every action declare its intent, then encode the gap between intent and outcome. Third, white-box memory wins — Markdown files are portable, auditable, and yours; you can read and fix your agent's mind. Fourth, keep secrets out of the model — a local .env vault the runtime resolves is a cheap, strong boundary.
Verdict
Anton is worth studying even if you never run it. The neuroscience framing could be dismissed as branding, but the modules earn it: a forward-model error signal, an offline consolidation gate, and a tiered Markdown store are genuinely good engineering, not metaphors painted over a prompt. The honest caveat is maturity — the agent core is a young repo, and "self-improving" is a high bar to clear in practice. As a blueprint for durable, inspectable agent memory, it is one of the clearest open implementations available right now.
Frequently Asked Questions
Is mindsdb/minds the same thing as Anton?
No. mindsdb/minds is the umbrella platform repo — a docker-compose file plus four git submodules — and its star count reflects a project dating to 2018. Anton is one of those submodules (backend/core_agent), a separate MIT-licensed Python repo at mindsdb/anton, and it holds the agent core and memory architecture this post examines.23
What model does Anton use? Any model you bring. The README lists OpenAI, Anthropic, OpenRouter's 200+ models, NVIDIA Nemotron, z.ai/GLM, Kimi/Moonshot, MiniMax, "or your own endpoint."1 It is bring-your-own-key, so you keep control of which provider sees your data and what it costs.
Where does Anton store what it learns?
In plain Markdown files inside the project workspace: profile.md for identity, rules.md for behavioral gates, lessons.md for semantic facts, and topics/*.md for domain expertise.4 You can open, edit, version, or delete any of them with ordinary text tools.
What does "brain-modeled memory" actually mean?
Each memory module is named for and imitates a brain structure: the Hippocampus encodes and retrieves, the Cortex gates what gets written, the Consolidator replays sessions like slow-wave sleep, and the Cerebellum and ACC detect errors. The reconsolidator.py module even cites Nader et al., 2000 for memory reconsolidation.6
How does Anton avoid filling its lesson files with junk?
The Consolidator is selective. Its should_replay() only fires when a session had an error, ran long (five or more cells), or was cancelled.11 Short, successful sessions produce no new memory, so the lesson files stay signal-dense rather than accumulating every routine interaction.
Does Anton send my API keys to the LLM?
No. Secrets live in a local .anton/.env file that the workspace layer is designed to read "without passing through LLM."112 The runtime resolves credentials directly, so they are not serialized into the prompt or any transcript the model receives.
Is Anton free to use? The Anton agent core is open source under the MIT license.3 MindsDB also offers hosted and desktop products built on the platform; this post covers only the open-source repository and its architecture.
A durable agent memory is a tiered store of Markdown files plus an offline pass that decides what was worth keeping — not a bigger context window.
If your notes already live as plain Markdown on your own device, they are halfway to being the memory an agent like this reads from — see how Markdown notes work as AI memory or try mnmnote.com.
Footnotes
-
mindsdb/anton — README and
anton/workspace.pydocstring ("store secrets without passing through LLM"). https://github.com/mindsdb/anton ↩ ↩2 ↩3 ↩4 -
mindsdb/minds — repository (umbrella: docker-compose + Dockerfiles + four git submodules; 39,299 stars, created 2018-08-02, as-of 2026-06-14). https://github.com/mindsdb/minds ↩ ↩2
-
mindsdb/anton — repository metadata (MIT, Python, 687 stars, created 2026-02-19, as-of 2026-06-14). https://github.com/mindsdb/anton ↩ ↩2 ↩3
-
mindsdb/anton —
anton/core/memory/hippocampus.pydocstring (profile.md / rules.md / lessons.md / topics/*.md and brain-region analogues). https://github.com/mindsdb/anton/blob/main/anton/core/memory/hippocampus.py ↩ ↩2 -
mindsdb/anton —
anton/core/memory/cortex.py("executive memory coordinator",build_memory_context(),encoding_gate()). https://github.com/mindsdb/anton/blob/main/anton/core/memory/cortex.py ↩ -
mindsdb/anton —
anton/memory/reconsolidator.py("memory reconsolidation (Nader et al., 2000)..."). https://github.com/mindsdb/anton/blob/main/anton/memory/reconsolidator.py ↩ ↩2 -
Nader, K., Schafe, G. & LeDoux, J. (2000). "Fear memories require protein synthesis in the amygdala for reconsolidation after retrieval." Nature 406, 722–726. ↩
-
mindsdb/anton —
anton/core/memory/cerebellum.py("supervised error learning over scratchpad execution";one_line_descriptionas the forward model). https://github.com/mindsdb/anton/blob/main/anton/core/memory/cerebellum.py ↩ -
mindsdb/anton —
anton/core/memory/acc.py("Anterior Cingulate Cortex... error-detector"; the scratchpad-name-switching example). https://github.com/mindsdb/anton/blob/main/anton/core/memory/acc.py ↩ -
mindsdb/anton —
anton/core/memory/consolidator.py("sleep-like memory consolidation... hippocampal-cortical replay during Slow-Wave Sleep"). https://github.com/mindsdb/anton/blob/main/anton/core/memory/consolidator.py ↩ -
mindsdb/anton —
anton/core/memory/consolidator.py,should_replay()trigger conditions (errors, sessions >=5 cells, cancellations). https://github.com/mindsdb/anton/blob/main/anton/core/memory/consolidator.py ↩ ↩2 -
mindsdb/anton — README, ".anton/.env - workspace configuration variables file (local file)." https://github.com/mindsdb/anton ↩ ↩2