Agent 配套工具

Cortex Memory|AI编程助手跨会话项目记忆插件

Cortex Memory

Cortex 是一款 VS Code 扩展(含 CLI 与 MCP Server),自动捕获 AI 编程会话中的决策、Bug 与上下文,并在下一次会话前注入 CLAUDE.md,让 Claude Code、Cursor、Cline 等助手记住项目。

获取与使用

需要部署

按官方资料自行安装或部署

使用难度待核验
国内可用性待核验

2026-11-09 更新 · 本站尚未实测

项目介绍

Agent 配套工具 · 2026-11-09 更新 · 本站尚未实测

Cortex(仓库名 cortex-memory)是一款面向 AI 编程助手的项目记忆工具。README 指出的痛点是:每次开启新的 AI 编程会话,都要重新解释项目架构、历史决策、已知 Bug 和约定。Cortex 的做法是在你与 AI 协作时后台记录这些内容,并在下一次会话开始前把上下文注入 CLAUDE.md。

它同时提供 VS Code 扩展、命令行工具(CLI)和 MCP Server 三种形态,README 声称可配合 Claude Code、Cursor、Cline、Copilot、Zed、Continue 使用。需要注意:本仓库是原始资料,实际组合可用性、各客户端当前版本兼容情况均待核验。

待核查事项

  • 各客户端实际接入步骤与兼容性。
  • 免费额度与计费口径。
  • 支持的操作系统与 Windows 兼容性。
  • 仓库是否仍在活跃维护及版本状态。

核心能力

点击能力名称查看输入、输出和原文依据。

据 README,Cortex 的能力包括:

  • 实时记忆捕获:README 描述为每秒检查新消息、每 15 秒做一次本地快速提取(不调用 API)、每 20 条消息做一次后台深度 LLM 提取,检测到决策或 Bug 时立即捕获。
  • 三层记忆结构:工作记忆(热,约 800 tokens,自动注入)、情景记忆(每次会话一个文件)、语义记忆(知识图谱与全文检索,向量嵌入标注为 v0.2 规划)。
  • 自动生成决策记录:以 ADR 格式记录决策内容、原因、备选方案与涉及文件。
  • VSCode 侧边栏:记忆层树视图、记忆健康度评分、Token 预算跟踪。
  • CLAUDE.md 自动注入:在标记块内写入上次会话摘要、近期决策与未解决问题。
  • MCP 工具:README 列出 cortex_get_context、cortex_search、cortex_save_memory、cortex_get_decisions、cortex_status。

上述频率、token 数、健康度评分等均为 README 声明,未经独立验证。

实际应用场景

适用场景

  • 长期在同一代码库上与 AI 编程助手协作,希望保留架构决策与历史背景的开发者。
  • 使用 Claude Code 等原生读取 CLAUDE.md 的助手,希望自动维护项目记忆文件。
  • 使用 Cursor、Cline、Zed、Continue 等支持 MCP 的客户端,希望通过 MCP 查询与写入记忆。
  • 需要把决策整理成 ADR 形式留档的团队。

README 提到团队通过 git 同步记忆计划在 v0.2 提供,目前可手动提交 .cortex/ 目录。

安装与接入

README 给出的获取方式:

  1. README 给出 VS Code 扩展安装方式,但其命令标识与元数据中的市场链接不一致,需核对实际条目;可另选下文 npm CLI 路径。原文扩展命令为:
ext install cortex-dev.cortex-memory
  1. 可选:在 aistudio.google.com/apikey 获取 Gemini API Key,运行 Ctrl+Shift+P → Cortex: Set API Key 粘贴。
  2. 直接用 AI 助手编码,Cortex 在后台运行。

CLI 安装(原文):

npm install -g cortex-memory

README 给出的 CLI 命令为 cortex status、cortex query "..."、cortex export。

MCP Server 配置按 README 原文为 node 启动 path/to/cortex/dist/mcp/index.js,需自行替换为实际安装路径。README 未提供完整的客户端配置向导或 MCP 配置文件 404 资料,具体接入步骤待核验。

使用条件与限制

是否需要部署
需自行准备运行环境,具体要求见正文
是否需要注册
账号和认证要求见正文;未明确说明的项目仍待核验
是否需要 API Key
待核验
费用与额度
费用边界见正文,项目许可不代表模型或托管服务免费
所需权限
待核验
许可证与服务条款
待核验

权限费用与限制

  • 权限:README 称数据全部保存在本机 .cortex/ 目录,无遥测、无云端,并自动加入 .gitignore。这意味着插件会读取会话内容与文件变更记录,使用前应确认本地数据存放与提交策略。
  • 模型与费用:README 列出 Gemini(默认,声称免费 500 请求/天)、Anthropic(README 估算约 $0.01/会话)、Ollama(本地免费)、无 API Key(本地基础模式)。免费额度、价格与速率为本仓库转述,需向对应服务商核验,本项目开源不代表模型调用免费。
  • 限制:不配 API Key 时仅能使用基础模式;团队记忆同步、向量嵌入尚未在 v0.2 实现;README 未说明支持的操作系统范围,Windows 支持情况待核验。
  • 隐私自述:README 称唯一外部调用是你选择的 LLM,实际网络行为需自行核验。

国内使用情况

网友核验 用户经验分享

与站长实测独立,不代表官方认证或本站已实测。

我要核验
0 位参与者0 份有效分项记录

最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。

分项统计、有效期与样本量
核验项目有效人数成功 / 部分 / 失败 / 无法判断成功率最近核验 / 有效期
官方网站访问00 / 0 / 0 / 0样本不足暂无 / 7 天
GitHub 仓库访问00 / 0 / 0 / 0样本不足暂无 / 7 天
安装与运行00 / 0 / 0 / 0样本不足暂无 / 30 天
官方服务国内连接 / MCP 连接00 / 0 / 0 / 0样本不足暂无 / 30 天
国内网络情况00 / 0 / 0 / 0样本不足暂无 / 7 天
国内模型兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
自定义 API00 / 0 / 0 / 0样本不足暂无 / 30 天
海外服务依赖
00 / 0 / 0 / 0样本不足暂无 / 30 天
海外账号要求
00 / 0 / 0 / 0样本不足暂无 / 30 天
中文界面
00 / 0 / 0 / 0样本不足暂无 / 30 天
客户端兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
账号及费用信息
00 / 0 / 0 / 0样本不足暂无 / 30 天

成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。

最近有效核验

暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。

查看全部有效核验 →

国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。

官方网站访问
尚未实测 待核验
GitHub 仓库访问
尚未实测 待核验
官方服务国内连接
尚未实测 待核验
国内网络情况
尚未实测 待核验
国内模型兼容性
尚未实测 待核验
自定义 API
尚未实测 待核验
海外服务依赖
尚未实测 待核验
海外账号要求
尚未实测 待核验
中文界面
尚未实测 待核验
国内最后核验时间
尚未实测

许可与国内使用

仓库 LICENSE 为 MIT License,版权声明为 “Copyright (c) 2025 Recall”。MIT 只覆盖本仓库代码,不覆盖 Gemini、Anthropic、Ollama 等第三方模型或服务,也不代表扩展市场上架的服务条款。

国内可用性方面,README 未说明任何国内模型或国内网络环境支持情况,Gemini、Anthropic 等境外 API 的可用性、地区限制与代理要求均待核验;VS Code 扩展市场与 npm 的国内访问体验也未在资料中说明。

项目资料与来源

官方网站 ↗

GitHub 仓库 ↗

官方文档 ↗

字段依据与待核验事项

access:来源确认 · npm install -g cortex-memory

project_type:来源确认 · Cortex - Project Memory for AI Coding Assistants

原始 README(折叠技术参考)
# Cortex - Project Memory for AI Coding Assistants

> **Your AI forgets everything between sessions. Cortex gives it a brain.**

Every time you start a new AI coding session, you waste 15-30 minutes re-explaining your project. Architecture, past decisions, known bugs, conventions — all gone.

**Cortex captures everything automatically** and injects it into your next session before you type a single character.

Works with **Claude Code** | **Cursor** | **Cline** | **Copilot** | **Any MCP client**

---

## Why Cortex?

| Without Cortex | With Cortex |
|---|---|
| "Here's my project structure again..." | AI already knows your architecture |
| "We decided to use Redis because..." | Decision auto-captured with full context |
| "The bug was in the auth middleware..." | Bug pattern recorded, never repeated |
| "Don't touch that file, it's..." | Convention remembered across sessions |
| 15-30 min context loading per session | **0 min.** Full context injected automatically |

---

## How It Works

```
You code with AI  -->  Cortex watches silently  -->  Memory builds automatically
                                                           |
Next session starts  <--  Context injected into CLAUDE.md  <--  Best context selected
```

**Install. Code. That's it.** Zero configuration needed.

---

## Features

### Real-Time Memory Capture
Cortex monitors your AI sessions live — not just at the end:
- **Every 1 second** — Watches for new messages
- **Every 15 seconds** — Fast local extraction (no API call)
- **Every 20 messages** — Deep LLM extraction in background
- **On decisions/bugs detected** — Immediate capture
- Status bar shows `Cortex: Live` during active sessions

### 3-Layer Memory Architecture
Inspired by how human memory works:

**Layer 1: Working Memory (hot)** — Always injected (~800 tokens)
- Last session summary, recent decisions, open problems
- Auto-injected into `CLAUDE.md` before every session
- Your AI reads this automatically

**Layer 2: Episodic Memory (warm)** — Session histories
- One file per session with full context
- Auto-generated Architectural Decision Records (ADRs)
- Searchable via CLI and MCP

**Layer 3: Semantic Memory (cold)** — Knowledge graph
- Full-text search across all layers
- Vector embeddings (coming in v0.2)

### Auto-Generated Decision Logs
Every architectural decision captured with:
- What was decided and why
- Alternatives considered
- Files affected
- Full session context

### VSCode Sidebar
- Memory Layers tree view (Working, Episodes, Decisions)
- Memory Health dashboard (0-100 score)
- Token budget tracking
- Live updates during sessions

### CLAUDE.md Auto-Injection
```markdown
<!-- CORTEX:START -->
## Project Memory (auto-managed by Cortex)

### Last Session
Fixed authentication bug in session middleware...

### Recent Decisions
- **Use Redis for sessions**: Latency requirements...

### Open Problems
- Rate limiting not implemented yet

_Last updated: 2026-03-26T10:30:00Z | Tokens: 227/800_
<!-- CORTEX:END -->
```
Claude Code, Cursor, and Cline read `CLAUDE.md` natively.

---

## Quick Start

### 1. Install
Search **"Cortex Memory"** in VS Code Extensions, or:
```
ext install cortex-dev.cortex-memory
```

### 2. (Optional) Add a free API key for smarter extraction
- Get a free Gemini key at [aistudio.google.com/apikey](https://aistudio.google.com/apikey)
- Run `Ctrl+Shift+P` → **Cortex: Set API Key** → paste key

### 3. Code
Start coding with your AI assistant. Cortex runs silently in the background.

> Works without an API key too — basic pattern-matching extraction runs locally.

---

## What Gets Captured

| Signal | Example | Where It's Stored |
|--------|---------|-------------------|
| **Decisions** | "Let's go with Redis for sessions" | `decisions.md` (ADR format) |
| **Bug patterns** | "Root cause was a race condition" | Episode + working memory |
| **Architecture** | "Refactor auth into its own module" | Episode + decision log |
| **File changes** | Every file read, edited, created | Tracked per episode |
| **Session context** | What you worked on, what's next | Working memory |
| **Open problems** | Unresolved bugs, TODOs | Working memory |

---

## LLM Providers

| Provider | Cost | Setup |
|----------|------|-------|
| **Gemini** (default) | **Free** (500 req/day) | Get key at [aistudio.google.com/apikey](https://aistudio.google.com/apikey) |
| **Anthropic** | ~$0.01/session | Set `cortex.apiKey` in settings |
| **Ollama** | Free (local) | Install Ollama, set provider to `ollama` |
| **No API key** | Free | Works with basic pattern matching |

---

## CLI Tool

```bash
npm install -g cortex-memory

cortex status              # Memory health score
cortex query "auth flow"   # Search across all layers
cortex export              # Export as single markdown
```

## MCP Server (Cursor, Cline, Zed)

```json
{
  "cortex": {
    "command": "node",
    "args": ["path/to/cortex/dist/mcp/index.js"]
  }
}
```

Tools: `cortex_get_context` | `cortex_search` | `cortex_save_memory` | `cortex_get_decisions` | `cortex_status`

---

## Settings

| Setting | Default | Description |
|---------|---------|-------------|
| `cortex.llmProvider` | `gemini` | Provider: `gemini`, `anthropic`, `ollama` |
| `cortex.apiKey` | — | API key for Gemini or Anthropic |
| `cortex.maxWorkingMemoryTokens` | `800` | Token budget for working memory |
| `cortex.autoInjectClaudeMd` | `true` | Auto-inject into CLAUDE.md |

## Commands

| Command | Description |
|---------|-------------|
| **Cortex: Set API Key** | Configure your LLM API key |
| **Cortex: Show Memory Status** | Health score, token usage, stats |
| **Cortex: Search Memories** | Full-text search |
| **Cortex: Refresh Memory View** | Force refresh sidebar |
| **Cortex: Initialize Project Memory** | Manual init (usually automatic) |

---

## Privacy

- **100% local** — All data in `.cortex/` on your machine
- **No telemetry** — Zero data collection, zero tracking
- **No cloud** — Only external call is to your chosen LLM
- **Your data** — Delete `.cortex/` to erase everything
- **Git-safe** — Auto-added to `.gitignore`

---

## Supported AI Assistants

| Assistant | Integration | How |
|-----------|------------|-----|
| **Claude Code** | Native | CLAUDE.md injection + session watching |
| **Cursor** | MCP | Via MCP server |
| **Cline** | MCP | Via MCP server |
| **Copilot** | Passive | Reads CLAUDE.md if present |
| **Zed** | MCP | Via MCP server |
| **Continue** | MCP | Via MCP server |

---

## FAQ

**Does this slow down my editor?**
No. <200KB bundle. All processing in background.

**Does it work without an API key?**
Yes. Basic extraction works out of the box. API key enables deeper LLM-powered extraction.

**How much does Gemini cost?**
$0. Free tier = 500 requests/day. More than enough.

**Can my team share memories?**
Team sync via git planned for v0.2. You can commit `.cortex/` to share now.

---

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). PRs welcome.

## License

MIT

---

**Stop explaining your codebase to AI. Let Cortex remember it for you.**
历史前置条件说明(补充参考)

VS Code(扩展形态);Node.js 与 npm(CLI 与 MCP Server,README 示例使用 node 启动);可选 LLM API Key(Gemini 或 Anthropic),或本地安装 Ollama;无 Key 时仅基础模式;费用涉及第三方模型服务,价格与免费额度待核验;境外 API 访问与国内网络可用性待核验;操作系统支持范围未说明。

项目来源与清单版权许可

https://github.com/SKULLFIRE07/cortex-memory

整理来源:https://github.com/slavakurilyak/awesome-ai-agents

清单版权与许可:

MIT License

Copyright (c) 2024 Slava Kurilyak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.