memory for your
AI brain.
Local-first nervous system for AI agents. Engrams in, curated memories out, all in a folder you control.
// one brain, many machines
// the moment it clicks
An agent with memory doesn't duplicate work, doesn't contradict decisions, and doesn't repeat mistakes you've already learned from.
// get started
Jump to install to set it up in 2 minutes, or read the concepts to understand the full pipeline.
// concepts
Engrams are physical traces of thoughts.
Memories are the ones worth keeping.
Cortex is the workspace they live in.
Recall plugs you back into them on demand.
engrams
Physical traces of thoughts — raw work events. Every think sync creates an engram. Stored locally in SQLite. Engrams never leave your machine; they're the substrate the curator reads from.
memories
Curated engrams — the ones worth recalling later. The curator reads engrams, weighs them against what's already known, promotes what matters, and drops the rest. Memories are what your future self (or your future agent) actually pulls back.
cortex
The workspace your engrams and memories live in. Each cortex is a named scope — personal, work, a team-shared one — with its own SQLite database and its own folder of memories. You can have several and switch between them; the active cortex is where new engrams land.
recall
Access your memories on demand — plugs you back into what you saved across past sessions. Searches across memories and local engrams; reads hit local SQLite, so it's instant and offline.
// v3 alpha — what's new
Three architectural upgrades in @openthink/think@alpha that change the read and write paths.
vector recall
Recall now runs semantic similarity over a resident bge-small-en-v1.5 embedding model — right entries come back even when the query vocabulary doesn't overlap with stored text. BM25 keyword matching still runs in parallel; results are fused. No external API call; the model is local.
write-time compaction
The daemon folds each new engram into a single self-contained memory line via an LLM call at write time. No batch curation step required. The result: think recall hits local storage only — sub-100 ms reads, no model call at recall time.
resident daemon
A background daemon keeps the embedding model warm in memory. CLI calls communicate over a Unix socket — no cold-start penalty per recall. The daemon starts on first use and stays resident; think daemon status shows its state.
agent integration
A UserPromptSubmit Claude Code hook and an MCP server both talk to the same daemon. Agents get semantic recall injected at prompt-submit time with no cold-start; the MCP surface exposes the same capabilities to any MCP-compatible client.
// architecture
Three tiers of memory, each with a clear job. Engrams capture the moment. Memories distill what matters. Library is the long-term archive for memories you've outgrown but want to keep findable.
+- engrams ----------------+ +- memories ---------------+ +- library ----------------+ | | | | | | | raw work events | ───>| curated memories | ───>| offloaded memories | | in SQLite | | as .jsonl files | | for long-term storage | | | | | | and recall | | ~/.think/engrams/ | | in your cortex folder, | | | | <cortex>.db | | synced via iCloud / | | forthcoming — the third | | | | Dropbox / Syncthing / | | tier of long-term recall | | | | Drive / any folder | | | +--------------------------+ +--------------------------+ +--------------------------+
Local-first by design. All reads and writes go to local SQLite. Engrams never leave the machine — only curated memories propagate, via a folder you already sync. No server, no relay; the folder is the propagation layer.
// install
Two minutes from zero to persistent agent memory.
-
Install & initialize
$npm install -g @openthink/think$think initRequires Node 22.5+.
think initwrites auto-logging instructions into your project's CLAUDE.md — your agents start logging work immediately. The curator and summary features use the Claude Agent SDK and require a Claude subscription.v3 alpha Try the alpha: vector recall, daemon, MCP server$npm install -g @openthink/think@alphav3 reads v2 storage. First launch reindexes existing memories into the vector store automatically — no manual migration step.
-
Point cortex at a folder
$think cortex setup --fs ~/Dropbox/think-cortex$think cortex create personalA cortex is your AI's memory workspace. Pass
--fsa path inside any sync tool you already use (iCloud, Dropbox, Google Drive, Syncthing) and the same memories will land on every machine you own. The folder is created if it doesn't exist. Skip--fsfor offline-only.Already on a git-backed setup?
think cortex setup <git-remote-url>is still supported and existing setups keep working unchanged —--fsis just the recommended path for new ones. -
You're done
$think sync "shipped the feature"$think curate$think recall "what did I ship?"Agents log work with
think sync. Curation promotes the important stuff to memories. Recall pulls them back next session.think cortex syncwrites memories out to the folder so your other machines can pick them up.
// docs
Reference, source, and where to find help.
// all commands
think sync <message> Log a work event think sync -e <key> <msg> Log an episode-tagged event think log <message> Log a note (--category, --tags) think list List entries (--week, --since, --category) think summary AI summary (--raw for plain text) think delete Soft-delete entries think cortex setup [--fs <path> | <repo>] Configure backend (or no args for offline) think cortex create <name> Create a cortex think cortex list Show all cortexes think cortex switch <name> Set active cortex think cortex current Show active cortex think cortex push Push local memories to remote think cortex pull Pull remote memories to local think cortex sync Push + pull think cortex status Show sync state think curate Run curation (--dry-run to preview) think curate --episode <key> Curate episode into narrative memory think curate --consolidate Compress older memories into summary think monitor Show promoted vs dropped engrams think recall <query> Search memories + engrams think memory Show memories (--history for timeline) think pull <cortex> Read memories from another cortex think curator edit Edit personal curator guidance think curator show Show current guidance think pause Suppress engram creation think resume Re-enable engram creation think migrate-data Import git memories into local SQLite think init Set up CLAUDE.md for auto-logging think export Export entries as sync bundle think import <file> Import sync bundle think audit Show sync audit log think config show Print configuration think config set <key> <val> Update a config value think update Update to latest version
// links
- githubgithub.com/OpenThinkAi/think-cli
- npmnpmjs.com/package/@openthink/think
- npm alphanpmjs.com/package/@openthink/think
- v3 designgithub.com/OpenThinkAi/think-cli/blob/main/docs/think-v3.md
- issuesgithub.com/OpenThinkAi/think-cli/issues
- licenseMIT
// where things live
- ~/.think/data directory (override with
$THINK_HOME) - engrams/*.dbper-cortex SQLite (engrams, memories, sync)
- curator.mdpersonal curator guidance
- cortex folderJSONL files for synced memories (path you set with
--fs) - ~/.config/think/config.json