CortexDB plugin

Agent memory and a knowledge graph in one SQLite file: the plugin adds /remember and /recall to Claude Code and Codex.

  • 480 ★ on the repository
  • Last commit
  • MIT
Plugin

Extended access

Why this level

  • Hooks automatically save session content to a shared file in the home directory.
  • Texts can go to an external embeddings endpoint or a shared server.
All reasons and checks

liliang-cn/cortexdb

Install

Manual install

/plugin marketplace add liliang-cn/cortexdb
/plugin install cortexdb@cortexdb

The Claude Code row from the README Install table.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Hooks automatically save session content to a shared file in the home directory.
  • Texts can go to an external embeddings endpoint or a shared server.

This is third-party code. Review the repository files before installing.

What it does

CortexDB keeps memory and a knowledge graph in a single SQLite file, is written in pure Go and runs without a service or an embedding model. The Claude Code and Codex plugin creates one global brain at `~/.cortexdb/cortexdb.db`, adds `/remember` and `/recall`, and an auto-recall hook. A session starts with an index of what the brain knows about the project, an agent about to open a file is told what happened to it before, and a session's durable facts are saved while `<private>` text and credentials stay out. Several agents or machines can point at one `cortexdb-grpc` server.

Who it is for. People running long projects in Claude Code or Codex who are tired of repeating the same agreements to the agent every new session.

Good fit when

  • A new session starts with retelling decisions made last week.
  • Before editing a file the agent should recall what has already happened to it.
  • Several agents and machines share one memory through a single server.
  • You want to bring Claude Code, Codex and DeepSeek Harness memory into one store.

Not a fit when

  • You need memory without automatic capture of facts from sessions.
  • Notes cannot be stored even in a local file in the home directory.
  • A plain `CLAUDE.md` or `AGENTS.md` without a graph is enough.

Example request

Remember: this project uses tabs and PostgreSQL 16. Then call `/recall` and show what is known about code style.

Limitations

Automatic capture saves factual session content into the shared `~/.cortexdb/cortexdb.db`. `<private>` text and credentials are excluded, but the owner answers for what the memory holds. In Codex auto-recall activates after you review the hooks in `/hooks`. Semantic search needs an OpenAI-compatible embeddings endpoint, otherwise lexical mode runs, and texts go to the chosen provider. Claude Code mods such as `cortexdb-live` are labeled early access in the README.

How to disable. Run `/plugin uninstall cortexdb@cortexdb`. To disable without removing, use `cortexdb-recall --disable` and `cortexdb-session-end --disable`. Delete the database file by hand.

FAQ

Is an embedding model required?

No, without one CortexDB runs in lexical mode. For semantic search set `CORTEXDB_EMBED_BASE_URL` and a key.

Where is the database kept?

By default in `~/.cortexdb/cortexdb.db`. Change the path with `CORTEXDB_PATH`.

How do I use a shared server?

Run `cortexdb-grpc` and set `CORTEXDB_REMOTE` plus, when needed, `CORTEXDB_GRPC_TOKEN` on clients.

How do I install the plugin in Codex?

With `codex plugin marketplace add liliang-cn/cortexdb && codex plugin add cortexdb@cortexdb`.

What appears in Claude Code after the mod is installed?

The optional `cortexdb-live` mod adds a band above the prompt with recalled memories and a status line. Install it with `/plugin install cortexdb-live@cortexdb`.

Discussion

No questions or reviews yet.

Plugins

Cortex keeps decisions and project context between Claude Code and Codex sessions in a local database and shows what it recalled

MCP serverExtended access76Repository stars

Memory for agents: a Claude Code session resumes in Codex with the same decisions and open tasks.

MCP serverExtended access83Repository stars

Knowledge-graph memory for agents: Claude Code and Codex plugins, an MCP server and a Python library

PluginExtended access33.3KRepository stars

Local memory for agents with a review queue: SQLite, an audit log and a token ledger, one vault for Claude Code, Codex and Cursor

PluginExtended access180Repository stars

hipocampus gives an agent file-based memory: a 3,000-token topic index loads each session and shows what came up before

PluginExtended access211Repository stars

One local memory shared by Claude Code, Codex and OpenClaw: tell one agent, another knows tomorrow, no cloud or keys.

PluginExtended access111Repository stars

README in short

The README opens with an install table for several routes, followed by a Go example, the plugin and mod description and an environment variable table.

README badge

Report a problem