Skip to content

Commit 357df48

Browse files
gambletanclaude
andcommitted
docs: update READMEs with 18 MCP tools, v1.4/v1.5 roadmap, GHCR Docker
- MCP tools: 13→18 (EN), 11→18 (CN) - REST endpoints: add compress, relationships/extract - Docker: add GHCR pre-built image pull command - CN: add Claude Desktop config, OpenClaw section - Roadmap: add v1.4 (incremental HNSW, SQL queries, LLM hooks) and v1.5 (Docker, feature freeze) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 935c366 commit 357df48

2 files changed

Lines changed: 49 additions & 7 deletions

File tree

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,22 +280,27 @@ Add to `~/.claude/settings.json`:
280280

281281
Now every new Claude Code session automatically loads your memory context — **zero manual effort**. Claude learns as you work and remembers across sessions.
282282

283-
### 13 Tools
283+
### 18 Tools
284284

285285
| Tool | Purpose |
286286
|------|---------|
287287
| `memory_ingest` | Store a memory (text, channel, person context) |
288288
| `memory_search` | Semantic search across all memory tiers |
289289
| `memory_context` | Generate LLM-ready context summary (token-budgeted) |
290290
| `memory_consolidate` | Run decay + promotion + sweep cycle |
291+
| `memory_infer` | Preview inference without storing |
292+
| `memory_compress` | Compress old conversation sessions |
293+
| `memory_stats` | Get memory statistics (counts per tier, index size) |
294+
| `memory_decay` | Run temporal decay on episodic memories |
291295
| `belief_observe` | Update a Bayesian belief with evidence |
292296
| `belief_list` | Query beliefs above confidence threshold |
293297
| `fact_add` | Store structured knowledge (subject-predicate-object) |
298+
| `fact_query` | Query facts by entity (SQL-indexed) |
294299
| `preference_set` | Store user preference with confidence |
300+
| `preference_query` | Query preferences by key pattern |
295301
| `person_resolve` | Cross-channel identity resolution |
296-
| `memory_infer` | Preview inference without storing |
302+
| `person_list` | List all known people |
297303
| `contradiction_check` | Check for fact contradictions |
298-
| `memory_compress` | Compress old conversation sessions |
299304
| `relationship_extract` | Extract relationships from text |
300305

301306
## OpenClaw Plugin
@@ -339,7 +344,10 @@ Cortex ships a lightweight HTTP server for integration with any language or fram
339344
cargo build --release -p cortex-http
340345
./target/release/cortex-http --port 3315 --db ~/.cortex/memory.db
341346

342-
# Or via Docker (self-hosted)
347+
# Or via Docker (pre-built from GHCR)
348+
docker run -v ~/.cortex:/data -p 3315:3315 ghcr.io/gambletan/cortex/cortex-http:latest
349+
350+
# Or build locally
343351
docker build -t cortex .
344352
docker run -v ~/.cortex:/data -p 3315:3315 cortex
345353
```
@@ -360,6 +368,8 @@ docker run -v ~/.cortex:/data -p 3315:3315 cortex
360368
| GET | `/v1/beliefs` | List beliefs |
361369
| POST | `/v1/beliefs/observe` | Update belief with evidence |
362370
| POST | `/v1/people` | Resolve person identity |
371+
| POST | `/v1/memories/compress` | Compress old conversation sessions |
372+
| POST | `/v1/relationships/extract` | Extract relationships from text |
363373
| GET | `/v1/export` | Export all data (JSON backup) |
364374
| POST | `/v1/import` | Import data from backup |
365375

@@ -395,6 +405,8 @@ curl -X POST http://localhost:3315/v1/import \
395405
- **v1.1** ✅ — HNSW vector index (50K search: 12ms → 91µs), Python SDK (`pip install cortex-ai-memory`)
396406
- **v1.2** ✅ — Negation detection (EN + CN), multi-hop retrieval, 117 tests
397407
- **v1.3** ✅ — Context quality optimization, query expansion, bidirectional relationships, 126 tests
408+
- **v1.4** ✅ — Incremental HNSW, SQL-indexed entity queries, LLM summarizer hook, 18 MCP tools, configurable decay, LLM-assisted inference, 131 tests
409+
- **v1.5** ✅ — Docker image (GHCR auto-publish), feature freeze
398410
- **v2.0** — Cross-device sync (CRDTs, no cloud), plugin system, mobile (iOS/Android)
399411

400412
## License

README_CN.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ Cortex 提供轻量 HTTP 服务,可与任意语言/框架集成。默认绑定
176176
cargo build --release -p cortex-http
177177
./target/release/cortex-http --port 3315 --db ~/.cortex/memory.db
178178

179-
# 或通过 Docker(自托管)
179+
# 或通过 Docker(预构建镜像)
180+
docker run -v ~/.cortex:/data -p 3315:3315 ghcr.io/gambletan/cortex/cortex-http:latest
181+
182+
# 或本地构建
180183
docker build -t cortex .
181184
docker run -v ~/.cortex:/data -p 3315:3315 cortex
182185
```
@@ -197,6 +200,8 @@ docker run -v ~/.cortex:/data -p 3315:3315 cortex
197200
| GET | `/v1/beliefs` | 列出信念 |
198201
| POST | `/v1/beliefs/observe` | 用证据更新信念 |
199202
| POST | `/v1/people` | 解析人物身份 |
203+
| POST | `/v1/memories/compress` | 压缩旧对话会话 |
204+
| POST | `/v1/relationships/extract` | 从文本中提取关系 |
200205
| GET | `/v1/export` | 导出全部数据(JSON 备份) |
201206
| POST | `/v1/import` | 从备份导入数据 |
202207

@@ -246,6 +251,18 @@ claude mcp add cortex --scope user -- ~/.local/bin/cortex-mcp-server ~/.cortex/m
246251
claude mcp add cortex -- ~/.local/bin/cortex-mcp-server ~/.cortex/memory.db
247252
```
248253

254+
Claude Desktop — 添加到 `~/Library/Application Support/Claude/claude_desktop_config.json`
255+
```json
256+
{
257+
"mcpServers": {
258+
"cortex": {
259+
"command": "/Users/you/.local/bin/cortex-mcp-server",
260+
"args": ["/Users/you/.cortex/memory.db"]
261+
}
262+
}
263+
}
264+
```
265+
249266
**3. 在 CLAUDE.md 中启用自动记忆:**
250267

251268
```markdown
@@ -260,7 +277,7 @@ claude mcp add cortex -- ~/.local/bin/cortex-mcp-server ~/.cortex/memory.db
260277
- 定期:调用 memory_consolidate 清理过期记忆
261278
```
262279

263-
### 11 个工具
280+
### 18 个工具
264281

265282
| 工具 | 用途 |
266283
|------|------|
@@ -269,12 +286,23 @@ claude mcp add cortex -- ~/.local/bin/cortex-mcp-server ~/.cortex/memory.db
269286
| `memory_context` | 生成 LLM 就绪的上下文摘要(token 预算控制) |
270287
| `memory_consolidate` | 运行衰减 + 晋升 + 清扫周期 |
271288
| `memory_infer` | 主动推理预览(不存储) |
272-
| `contradiction_check` | 检查事实矛盾 |
289+
| `memory_compress` | 压缩旧对话会话 |
290+
| `memory_stats` | 获取记忆统计(各层数量、索引大小) |
291+
| `memory_decay` | 对情景记忆执行时间衰减 |
273292
| `belief_observe` | 用证据更新贝叶斯信念 |
274293
| `belief_list` | 查询高于阈值的信念 |
275294
| `fact_add` | 存储结构化知识(主语-谓语-宾语) |
295+
| `fact_query` | 按实体查询事实(SQL 索引) |
276296
| `preference_set` | 存储用户偏好 |
297+
| `preference_query` | 按键模式查询偏好 |
277298
| `person_resolve` | 跨渠道身份解析 |
299+
| `person_list` | 列出所有已知人物 |
300+
| `contradiction_check` | 检查事实矛盾 |
301+
| `relationship_extract` | 从文本中提取关系 |
302+
303+
## OpenClaw 插件
304+
305+
同时提供 OpenClaw 记忆插件,支持自动记忆和自动召回钩子。详见 `openclaw-plugin/` 目录。
278306

279307
## 项目结构
280308

@@ -314,6 +342,8 @@ cortex/
314342
- **v1.1** ✅ — HNSW 向量索引(5万条搜索:12ms → 91µs),Python SDK(`pip install cortex-ai-memory`
315343
- **v1.2** ✅ — 否定检测(中英双语),多跳检索,117 个测试
316344
- **v1.3** ✅ — 上下文质量优化,查询扩展,双向关系推理,126 个测试
345+
- **v1.4** ✅ — 增量 HNSW,SQL 索引实体查询,LLM 摘要钩子,18 个 MCP 工具,可配置衰减,LLM 辅助推理,131 个测试
346+
- **v1.5** ✅ — Docker 镜像(GHCR 自动发布),功能冻结
317347
- **v2.0** — 跨设备同步(CRDT,无需云端),插件系统,移动端(iOS/Android)
318348

319349
## 许可证

0 commit comments

Comments
 (0)