SuperAPI AI Directory

cortex-memory

Cortex-memory is an open-source project that provides persistent memory for AI coding assistants, supporting tools such as Claude Code, Cursor, and Cline. It can automatically capture architectural decisions, code patterns, and context during sessions, and inject them before the next session, reducing the time spent repeatedly explaining the project. It provides a VSCode extension, CLI, and MCP server, requires zero configuration, and stores all data locally in the .cortex/ directory.

Open website

About this tool

Cortex-memory is a persistent memory tool for AI coding assistants. Its core purpose is to solve the problem of AI assistants forgetting project context between sessions: every time a new AI coding session begins, users often need to spend 15-30 minutes re-explaining the project architecture, past decisions, known defects, and conventions. Cortex automatically captures this information and injects it before the next session begins, so the AI assistant has the background before the user types the first character.

Main capabilities

  1. Real-time memory capture: Cortex monitors in real time during a session, checks for new messages every 1 second, performs a local quick extraction every 15 seconds (without calling an API), performs a background deep LLM extraction every 20 messages, and captures immediately when a decision or bug is detected. The status bar shows "Cortex: Live" during an active session.
  2. Three-layer memory architecture: The first layer is working memory (hot), always injecting about 800 tokens, including the last session summary, recent decisions, and unresolved issues; it is automatically injected into CLAUDE.md before each session, and the AI can read it automatically. The second layer is episodic memory (warm), one file per session, containing the complete context and automatically generating Architecture Decision Records (ADRs), searchable via CLI and MCP. The third layer is semantic memory (cold), providing full-text search across all layers; vector embeddings are planned for v0.2.
  3. Automatically generated decision log: Each architectural decision records what was decided, why, the alternatives considered, and the complete session context.
  4. Memory layer tree view: View working memory, episodes, and decisions; provides a memory health score (0-100), token budget tracking, and updates in real time during a session.
  5. Automatic CLAUDE.md injection: Claude Code, Cursor, and Cline natively read CLAUDE.md, and Cortex uses this to automatically bring memory into the session.

How to use

  • Search for "Cortex Memory" in the VS Code extension to install, or use the CLI from the command line, or connect via the MCP server.
  • Optional: Add a free API key to enable smarter extraction. You can get a free Gemini key at aistudio.google.com/apikey, run Ctrl+Shift+P → Cortex: Set API Key → paste the key.
  • No API key requiredIt can also be used, with basic pattern matching extraction running locally.
  • The MCP server supports Cursor, Cline, and Zed, providing the tools: cortex_get_context, cortex_search, cortex_save_memory, cortex_get_decisions, cortex_status.

Use cases

  • For developers using Claude Code, Cursor, Cline, Copilot, or any MCP client who want AI to remember project architecture, decisions, and conventions.
  • For teams that want to share memory by committing the .cortex/ directory (the official plan is to provide git-based team sync in v0.2).

Limitations and privacy

  • Data is 100% local, all stored in the .cortex/ directory on the user's machine.
  • No telemetry, no data collection, no tracking, no cloud storage; the only external call is to the LLM chosen by the user.
  • Deleting .cortex/ clears all data, and this directory is automatically added to .gitignore.
  • Editing performance impact: the package size is less than 200KB, all processing is done in the background, and it will not slow down the editor.
  • The Gemini free tier allows 500 requests per day, at a cost of $0.
  • Features such as team sync and vector embeddings are planned for v0.2 and are not yet available in the current version.

Other information The project is open source, contributions are welcome through CONTRIBUTING.md, and PRs are accepted.