AI memory and a knowledge graph in one SQLite file. Pure Go, no service to run, works without an embedding model.
> /plugin marketplace add liliang-cn/cortexdb> /plugin install cortexdb@cortexdb
AI memory and a knowledge graph in one SQLite file. Pure Go, no service to run, works without an embedding model.

| Go library | go get github.com/liliang-cn/cortexdb/v2 |
| Claude Code | /plugin marketplace add liliang-cn/cortexdb, then /plugin install cortexdb@cortexdb |
| Codex | codex plugin marketplace add liliang-cn/cortexdb && codex plugin add cortexdb@cortexdb |
| Claude Code mod (optional) | /plugin install cortexdb-live@cortexdb |
| DeepSeek Harness | dsh plugin --profile web add "github:liliang-cn/cortexdb#semver:^2&path:/plugins/dsh-cortexdb-memory" (guide) |
| Obsidian | unzip a release's cortexdb-obsidian.zip into <vault>/.obsidian/plugins/ (guide) |
| Shared-brain server | go install github.com/liliang-cn/cortexdb/v2/cmd/cortexdb-grpc@latest |
| Clients | cargo add cortexdb-client · pip install cortexdb-client · npm install cortexdb-client |
db, _ := cortexdb.Open(cortexdb.DefaultConfig("brain.db"))
defer db.Close()
brain := db.KnowledgeMemory()
_, _ = brain.Remember(ctx, cortexdb.KnowledgeMemoryRememberRequest{Content: "Alice prefers tabs.", Scope: "user"})
rec, _ := brain.Recall(ctx, cortexdb.KnowledgeMemoryRecallRequest{Query: "what does Alice prefer?"})
fmt.Println(rec.ContextPack.Text)
The plugin gives Claude Code and Codex one global brain at ~/.cortexdb/cortexdb.db, /remember, /recall and an auto-recall hook. A session starts with an index of what the brain knows about its project, an agent about to open a file is told what happened to it before, and a session's durable facts are captured with <private> text and credentials kept out. Point several agents or machines at one cortexdb-grpc and they share the same memory and graph.
In Codex, review and trust the plugin hooks in /hooks to activate automatic
recall. See the plugin guide for setup and
cortexdb-mcp --doctor --self-test diagnostics (v2.119.0+).
cortexdb-live is an optional mod that runs inside Claude Code on top of the cortexdb plugin. Install it after the plugin:
/plugin install cortexdb-live@cortexdb
The mod calls three of the plugin's tools itself, and a hook gets no permission prompt, so allow them once in ~/.claude/settings.json (not needed in bypass mode):
"permissions": {
"allow": [
"mcp__plugin_cortexdb_cortexdb__knowledge_memory_recall",
"mcp__plugin_cortexdb_cortexdb__graph_statistics",
"mcp__plugin_cortexdb_cortexdb__memory_save"
]
}
Without them the status line names the missing rules.
/cortexdb-show brings the hidden one back.auto:<session>:<slug>). Each later pass replaces a memory under the same slug rather than adding a copy. Older memories a new one makes untrue (a host moved, a decision reversed) are marked superseded: kept, but no longer recalled as current.Haiku runs on Claude Code's own model access, so no API key is needed. Language: /config → cortexdb-live → language (auto, zh, en). The mod honours the plugin's own switches: cortexdb-recall --disable and cortexdb-session-end --disable turn recall and capture off for both. While the mod runs, the plugin's shell recall and capture hooks stand down, so nothing is done twice. Codex keeps those hooks. Mods are an early-access Claude Code feature (built against 2.1.290).
EmbeddedConfig for small devices: an SQ8 index, bounded SQLite caches, snapshots that survive a power cut — 100k 768-d vectors open in 0.28 s with a 193 MB heapserve_graph_3d: a live 3D view to find, ask, query and expand, on desktop or phone — or the same brain as a library, each memory a book on its project's shelfimport_agent_memory: bring in what Claude Code, Codex and DeepSeek Harness already remember — memory notes, CLAUDE.md / AGENTS.md, Codex's memories, and optionally past sessions distilled into memories — into a local or shared brainpostgres:// DSN| Variable | Meaning |
|---|---|
CORTEXDB_PATH | Database file (default ~/.cortexdb/cortexdb.db) |
CORTEXDB_REMOTE | Use a shared cortexdb-grpc at host:port (plaintext) or https://host (TLS, behind a proxy) instead of a local file |
CORTEXDB_GRPC_TOKEN | Bearer token for that server |
CORTEXDB_GRPC_ADDR | Server listen address (default 127.0.0.1:47821) |
CORTEXDB_EMBED_BASE_URL | OpenAI-compatible embeddings endpoint; unset = lexical mode |
CORTEXDB_EMBED_MODEL / CORTEXDB_EMBED_DIM | Embedding model and dimension |
CORTEXDB_SLOW_MS | Server: log calls slower than this, with the time each stage took (default 1000, 0 = none) |
CORTEXDB_TRACE / CORTEXDB_TRACE_FILE | Server: log every call; also append the records to a JSON-lines file |
Website · Guide (full feature reference) · Examples · Changelog · 中文
MIT
cortexdb is a Claude Code plugin with 3 hand-picked skills, indexed on Flowy in the Agent Memory category. Install it with the command on its page. It includes cortexdb, cortexdb-memory-hermes, cortexdb-memory-openclaw. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it