v1.5.1 · mit · 196 mcp tools · sqlite

brainctl

────────────────────────────────────────────────────────────

memory that outlives the session.

A SQLite-backed memory layer for autonomous agents. Local-first. Typed. Belief-aware. 196 MCP tools plus native plugins for Claude Code, Codex CLI, Eliza, Hermes, Freqtrade, and Jesse — with OpenClaw next. Built on three decades of cognitive-science research.

CAnot deployed — no CA yet
quickstart
# install
$ pip install brainctl

# orient → work → persist
from agentmemory import Brain
brain = Brain(agent_id="my-agent")

ctx = brain.orient(project="api-v2")
brain.remember("rate-limit: 100/15s", category="integration")
brain.entity("RateLimitAPI", "service")
brain.wrap_up("auth module complete")
what it is

Agents forget. This is the fix.

Every agent session starts from zero. brainctl gives your agent a persistent brain it can read at session start, write to during work, and hand off to the next run.

sqlite, zero infra

The entire store lives in brain.db. WAL mode, foreign keys on, portable across machines. No Docker, no servers, no cloud vendor.

hybrid recall

FTS5 full-text search stacks on top of sqlite-vec embeddings via Ollama. Find memories by word or by meaning. Zero API spend on retrieval.

knowledge graph

Entities, observations, typed relations. Your agent builds a living model of people, services, projects, and decisions — not just a chat log.

handoff packets

One agent picks up exactly where another left off. Goal, state, open loops, next step — all preserved. Zero context loss across sessions.

any agent, any stack

Python API, CLI, and a 196-tool MCP server. First-party plugins for Claude Code, Codex CLI, Eliza, Hermes, Freqtrade, and Jesse — OpenClaw next. Speaks stdio MCP to anything else (Cursor, VS Code, Claude Desktop).

mit, forever

The software is free and will remain so under the MIT license, regardless of the token. The token funds the work; the code funds no one.

architecture

Caller → core → storage. All local.

Three layers sit between an agent and its memory. Everything below runs on your machine. No API calls on the hot path.

1 · caller surface
  caller
    ├── claude code · codex cli · cursor · vs code
    ├── eliza · hermes · freqtrade · jesse
    ├── openclaw  (coming)
    ├── ide / cli / python agent
    └── any stdio-speaking mcp client
          │
          ▼
  ┌────────────────────┐     ┌────────────────────┐
  │    Brain API       │     │    MCP server      │
  │    python library  │     │    196 tools       │
  └─────────┬──────────┘     └──────────┬─────────┘
            │                           │
            └─────────────┬─────────────┘
                          ▼
                     brain core
2 · core loop
  session
     │
     ▼
  orient  ────►  work  ────►  wrap_up
               │                  │
     ┌─────────┼──────────┐       ▼
     ▼         ▼          ▼    handoff_packets
  remember   decide    search      (next session)
     │         │          │
     ▼         ▼          ▼
  ┌────────────────────────────────────────────────┐
  │  every write  →  W(m) gate                       │
  │                  surprise score + semantic dedup│
  │                                                 │
  │  every read   →  hybrid retrieval                │
  │                  fts5 + sqlite-vec + rrf merge  │
  │                                                 │
  │  every conflict → AGM belief revision             │
  │                   ranked, collapsed, audited    │
  └────────────────────────┬───────────────────────┘
                           ▼
                       brain.db
3 · storage + consolidation
  brain.db   sqlite · wal · 56 tables · 37 migrations

  primitives
  ──────────
    memories         episodic + semantic, fts5 indexed
    events           temporal thread, causal chains
    entities         typed knowledge graph nodes
    knowledge_edges  typed relations between entities
    decisions        rationale + provenance ledger
    affect_log       emotional salience (VAD coords)
    agent_beliefs    per-agent AGM belief state
    dream_hypotheses consolidation-cycle conjectures
    handoff_packets  session-to-session state
    embeddings       sqlite-vec semantic vectors
    + 46 auxiliary (rbac, quarantine, workspace, audit, …)
                        │
                        │  quiet-hours cron
                        ▼
  ┌─────────────────────────────────────────────────┐
  │  dream cycle                                    │
  │  replay episodic → cluster → promote → decay    │
  │  hypothesis generation over the knowledge graph │
  └─────────────────────────────────────────────────┘

  local deps:  sqlite-vec  ·  ollama nomic-embed-text  (no api calls)
196
mcp tools
37
migrations
56
tables
6
shipped plugins
the token

$BrainCTL will fund the work. The software stays free.

brainctl is and will remain MIT-licensed. The token exists so that the people building the memory layer for autonomous agents can afford to keep building it. No gatekeeping, no paywall, no closed source. Every dollar in and out of the dev wallet is published live on /transparency.

status · pre-launch
  $BrainCTL is not yet deployed.

  there is no contract address. the token has not launched
  on pump.fun. this page will update the moment it does.
  the dev wallet below is already live and tracking any SOL
  or SPL token that lands in it.
dev wallet
  status:   held privately (anti-sniping hold)
  reason:   publishing the pubkey pre-launch lets snipers
            watch it for the createToken tx
  goes live: simultaneously with $BrainCTL launch
  detail:    view the transparency page →
ticker
$BrainCTL (planned)
contract address
none — not deployed
launchpad
pump.fun (planned)
chain
solana (planned)
planned supply
1,000,000,000
team allocation
none — fair launch
utility
funds ongoing dev + research