{"title":"记忆模型","slug":"memory-model","category":"concepts","summary":"记忆的结构 — 分类、键、标签、优先级、来源、验证。","audience":["human","llm"],"tags":["concept","memory","model","structure"],"difficulty":"intermediate","updated":"2026-06-27","word_count":424,"read_minutes":2,"lang":"zh","translated":true,"requested_lang":"zh","content_markdown":"\n# 记忆模型\n\nSynapse 的记忆模型专为 LLM Agent 设计 — 既结构化以保证可靠回放，又足够灵活以适应任何领域。\n\n## 记忆结构\n\n```json\n{\n  \"id\": \"mem_abc123\",\n  \"category\": \"project\",\n  \"key\": \"project_synapse_status\",\n  \"content\": \"Synapse v1.5.0 deployed on vps1. CI green.\",\n  \"tags\": [\"synapse\", \"deployment\", \"v1.5.0\"],\n  \"priority\": \"high\",\n  \"source\": \"agent\",\n  \"verified\": false,\n  \"confidence\": 0.85,\n  \"expires_at\": null,\n  \"mind_id\": \"m_xyz789\",\n  \"created_at\": \"2026-06-27T...\",\n  \"updated_at\": \"2026-06-27T...\"\n}\n```\n\n## 字段\n\n| 字段 | 类型 | 必填 | 说明 |\n|-------|------|----------|-------------|\n| `id` | string | 自动 | 唯一 ID（mem_xxx） |\n| `category` | enum | ✅ | 8 种分类之一 |\n| `key` | string | ✅ | 稳定标识符（用于更新） |\n| `content` | string | ✅ | 记忆内容（任意文本） |\n| `tags` | string[] | – | 用于搜索和过滤 |\n| `priority` | enum | – | low、normal、high、critical（默认：normal） |\n| `source` | enum | 自动 | user、agent（存储者） |\n| `verified` | bool | 自动 | 是否经过人类验证 |\n| `confidence` | float | – | 0.0 到 1.0（user 默认 1.0，agent 默认 0.7） |\n| `expires_at` | timestamp | – | 何时遗忘此记忆 |\n| `mind_id` | string | 自动 | 所属 Mind |\n| `created_at` | timestamp | 自动 | 首次存储时间 |\n| `updated_at` | timestamp | 自动 | 最后修改时间 |\n\n## 分类\n\n八种分类覆盖了常见的 LLM Agent 用例：\n\n| 分类 | 用途 | 内容示例 |\n|----------|---------|-----------------|\n| `identity` | 用户是谁 | \"User is Michael Schäfer, software engineer in Berlin\" |\n| `preference` | 用户偏好 | \"Prefers concise technical responses\" |\n| `fact` | 可验证的事实 | \"Office is in Berlin, timezone Europe/Berlin\" |\n| `project` | 项目状态 | \"Synapse v1.5.0 deployed, working on v1.6.0 docs\" |\n| `skill` | 用户的技能 | \"Advanced Python, 10+ years\" |\n| `mistake` | 过去犯的错 | \"Forgot to bump npm version — CI failed\" |\n| `context` | 会话上下文 | \"Currently reviewing PR #42\" |\n| `note` | 其他备注 | \"Try Redis for caching next sprint\" |\n\n## Key：稳定标识符\n\n`key` 字段至关重要 — 它是更新记忆而不产生重复的方式。\n\n```python\n# 首次存储\nstore(\"project\", \"project_synapse_status\", \"v1.4.0 deployed\", priority=\"high\")\n\n# 用相同的 key 更新（覆盖，不重复）\nstore(\"project\", \"project_synapse_status\", \"v1.5.0 deployed\", priority=\"high\")\n```\n\n**Key 规则：**\n\n- 在 (category, mind) 内必须唯一\n- 使用 `snake_case`\n- 以分类为前缀提高可读性：`preference_communication`、`mistake_npm_version`\n- 创建后不要修改 key\n\n## Tags：用于搜索\n\n标签可加速过滤与搜索：\n\n```bash\n# 查找所有带 \"docker\" 标签的记忆\nGET /memory/by-tag?tag=docker\n\n# 在带标签的子集中进行 FTS5 搜索\nGET /memory/search?q=swarm&tag=docker\n```\n\n**标签最佳实践：**\n\n- 每条记忆 2-5 个标签（不要过度打标签）\n- 使用小写以保持一致\n- 使用项目名、主题、技术名\n- 标签不区分大小写\n\n## 优先级\n\n| 优先级 | 何时使用 | 回放行为 |\n|----------|-------------|-----------------|\n| `critical` | 身份、法律、不可逆信息 | 始终位于回放顶部 |\n| `high` | 进行中的项目、关键偏好 | 回放中突出显示 |\n| `normal` | 大多数记忆（默认） | 标准回放顺序 |\n| `low` | 临时、知道就好的信息 | 可能被摘要 |\n\n`/memory/recall` 按优先级排序（critical 在前），其次按时间。\n\n## 来源：User 与 Agent\n\n记忆用 `source` 标记：\n\n- `user` — 由人类存储（通过 JWT 或人类 UI）\n- `agent` — 由 LLM Agent 存储（通过 Mind Key）\n\n这会影响：\n\n- **验证**：`user` 记忆自动验证，`agent` 记忆不自动验证\n- **置信度**：`user` 默认 1.0，`agent` 默认 0.7\n- **回放**：`/memory/recall` 会标记未验证记忆为 \"(unverified)\"\n\n> [!NOTE]\n> 对 `agent` 来源的记忆应保持适当的怀疑。它们可能是推断或假设而来，而非用户直接陈述。\n\n## 验证\n\n`verified` 标志表示人类已确认该记忆：\n\n- `user` 记忆：自动验证（`true`）\n- `agent` 记忆：默认未验证（`false`）\n\n通过以下方式验证记忆：\n\n```bash\ncurl -X POST https://synapse.schaefer.zone/memory/mem_001/verify \\\n  -H \"Authorization: Bearer YOUR_JWT\"\n```\n\n> [!NOTE]\n> 验证需要 JWT（人类认证），而非 Mind Key（Agent 认证）。这确保只有人类才能将记忆标记为已验证。\n\n## 置信度\n\n`confidence` 字段（0.0 到 1.0）表示记忆的可靠程度：\n\n- 1.0 — 用户直接陈述\n- 0.7 — 由 Agent 推断\n- 0.5 — 不确定，需要验证\n- 0.0 — 明确存疑\n\n存储时设置置信度：\n\n```json\n{\n  \"category\": \"preference\",\n  \"key\": \"prefers_dark_mode\",\n  \"content\": \"User seems to prefer dark mode (based on their IDE screenshots)\",\n  \"confidence\": 0.5,\n  \"source\": \"agent\"\n}\n```\n\n## 过期\n\n为时效性记忆设置 `expires_at`：\n\n```json\n{\n  \"category\": \"context\",\n  \"key\": \"current_meeting_topic\",\n  \"content\": \"Discussing Q3 roadmap\",\n  \"expires_at\": \"2026-06-28T00:00:00Z\"\n}\n```\n\n已过期的记忆不会出现在 `/memory/recall` 中（但仍在数据库中）。使用 `/memory/expiring?within=7d` 查看即将过期的记忆。\n\n## 记忆生命周期\n\n```\n                  ┌─────────────────┐\n                  │     创建        │\n                  │  POST /memory   │\n                  └────────┬────────┘\n                           │\n                           ▼\n                  ┌─────────────────┐\n                  │     活跃        │ ◀──── PUT /memory/:id (更新)\n                  │  (在回放中)     │\n                  └────────┬────────┘\n                           │\n              ┌────────────┼────────────┐\n              │            │            │\n              ▼            ▼            ▼\n        ┌──────────┐ ┌──────────┐ ┌──────────┐\n        │ 已过期   │ │ 已验证   │ │ 已删除   │\n        │ (在 DB)  │ │ (标志)   │ │ (已消失) │\n        └──────────┘ └──────────┘ └──────────┘\n```\n\n## 回放行为\n\n`GET /memory/recall` 返回为 LLM 上下文优化的纯文本摘要：\n\n```\nMind: Michael's Mind\nMemories: 12 total (10 verified, 2 unverified)\n\n[001] identity (CRITICAL) [verified]\n  user_name\n  Michael Schäfer\n  Tags: person, identity\n\n[002] preference (HIGH) [verified]\n  communication_style\n  Prefers concise technical responses\n  Tags: communication\n\n[003] project (HIGH) [unverified]\n  synapse_status\n  v1.5.0 deployed, working on v1.6.0 docs\n  Tags: synapse, deployment\n\n...\n```\n\n- 按优先级排序（critical → low），其次按时间\n- 未验证记忆用 `[unverified]` 标记\n- 包含标签以提供上下文\n- 纯文本（无需解析 JSON）\n\n## 下一步\n\n- [Memory API](/docs/api/memory)\n- [记忆最佳实践](/docs/guides/memory-best-practices)\n- [FTS5 搜索](/docs/concepts/fts5-search)\n","content_html":"<h1>记忆模型</h1>\n<p>Synapse 的记忆模型专为 LLM Agent 设计 — 既结构化以保证可靠回放，又足够灵活以适应任何领域。</p>\n<h2>记忆结构</h2>\n<pre><code class=\"hljs language-json\"><span class=\"hljs-punctuation\">{</span>\n  <span class=\"hljs-attr\">&quot;id&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;mem_abc123&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;category&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;project&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;key&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;project_synapse_status&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;content&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;Synapse v1.5.0 deployed on vps1. CI green.&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;tags&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-punctuation\">[</span><span class=\"hljs-string\">&quot;synapse&quot;</span><span class=\"hljs-punctuation\">,</span> <span class=\"hljs-string\">&quot;deployment&quot;</span><span class=\"hljs-punctuation\">,</span> <span class=\"hljs-string\">&quot;v1.5.0&quot;</span><span class=\"hljs-punctuation\">]</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;priority&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;high&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;source&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;agent&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;verified&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-literal\"><span class=\"hljs-keyword\">false</span></span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;confidence&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">0.85</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;expires_at&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-literal\"><span class=\"hljs-keyword\">null</span></span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;mind_id&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;m_xyz789&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;created_at&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;2026-06-27T...&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;updated_at&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;2026-06-27T...&quot;</span>\n<span class=\"hljs-punctuation\">}</span></code></pre><h2>字段</h2>\n<table>\n<thead>\n<tr>\n<th>字段</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>自动</td>\n<td>唯一 ID（mem_xxx）</td>\n</tr>\n<tr>\n<td><code>category</code></td>\n<td>enum</td>\n<td>✅</td>\n<td>8 种分类之一</td>\n</tr>\n<tr>\n<td><code>key</code></td>\n<td>string</td>\n<td>✅</td>\n<td>稳定标识符（用于更新）</td>\n</tr>\n<tr>\n<td><code>content</code></td>\n<td>string</td>\n<td>✅</td>\n<td>记忆内容（任意文本）</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>string[]</td>\n<td>–</td>\n<td>用于搜索和过滤</td>\n</tr>\n<tr>\n<td><code>priority</code></td>\n<td>enum</td>\n<td>–</td>\n<td>low、normal、high、critical（默认：normal）</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>enum</td>\n<td>自动</td>\n<td>user、agent（存储者）</td>\n</tr>\n<tr>\n<td><code>verified</code></td>\n<td>bool</td>\n<td>自动</td>\n<td>是否经过人类验证</td>\n</tr>\n<tr>\n<td><code>confidence</code></td>\n<td>float</td>\n<td>–</td>\n<td>0.0 到 1.0（user 默认 1.0，agent 默认 0.7）</td>\n</tr>\n<tr>\n<td><code>expires_at</code></td>\n<td>timestamp</td>\n<td>–</td>\n<td>何时遗忘此记忆</td>\n</tr>\n<tr>\n<td><code>mind_id</code></td>\n<td>string</td>\n<td>自动</td>\n<td>所属 Mind</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>timestamp</td>\n<td>自动</td>\n<td>首次存储时间</td>\n</tr>\n<tr>\n<td><code>updated_at</code></td>\n<td>timestamp</td>\n<td>自动</td>\n<td>最后修改时间</td>\n</tr>\n</tbody></table>\n<h2>分类</h2>\n<p>八种分类覆盖了常见的 LLM Agent 用例：</p>\n<table>\n<thead>\n<tr>\n<th>分类</th>\n<th>用途</th>\n<th>内容示例</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>identity</code></td>\n<td>用户是谁</td>\n<td>&quot;User is Michael Schäfer, software engineer in Berlin&quot;</td>\n</tr>\n<tr>\n<td><code>preference</code></td>\n<td>用户偏好</td>\n<td>&quot;Prefers concise technical responses&quot;</td>\n</tr>\n<tr>\n<td><code>fact</code></td>\n<td>可验证的事实</td>\n<td>&quot;Office is in Berlin, timezone Europe/Berlin&quot;</td>\n</tr>\n<tr>\n<td><code>project</code></td>\n<td>项目状态</td>\n<td>&quot;Synapse v1.5.0 deployed, working on v1.6.0 docs&quot;</td>\n</tr>\n<tr>\n<td><code>skill</code></td>\n<td>用户的技能</td>\n<td>&quot;Advanced Python, 10+ years&quot;</td>\n</tr>\n<tr>\n<td><code>mistake</code></td>\n<td>过去犯的错</td>\n<td>&quot;Forgot to bump npm version — CI failed&quot;</td>\n</tr>\n<tr>\n<td><code>context</code></td>\n<td>会话上下文</td>\n<td>&quot;Currently reviewing PR #42&quot;</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>其他备注</td>\n<td>&quot;Try Redis for caching next sprint&quot;</td>\n</tr>\n</tbody></table>\n<h2>Key：稳定标识符</h2>\n<p><code>key</code> 字段至关重要 — 它是更新记忆而不产生重复的方式。</p>\n<pre><code class=\"hljs language-python\"><span class=\"hljs-comment\"># 首次存储</span>\nstore(<span class=\"hljs-string\">&quot;project&quot;</span>, <span class=\"hljs-string\">&quot;project_synapse_status&quot;</span>, <span class=\"hljs-string\">&quot;v1.4.0 deployed&quot;</span>, priority=<span class=\"hljs-string\">&quot;high&quot;</span>)\n\n<span class=\"hljs-comment\"># 用相同的 key 更新（覆盖，不重复）</span>\nstore(<span class=\"hljs-string\">&quot;project&quot;</span>, <span class=\"hljs-string\">&quot;project_synapse_status&quot;</span>, <span class=\"hljs-string\">&quot;v1.5.0 deployed&quot;</span>, priority=<span class=\"hljs-string\">&quot;high&quot;</span>)</code></pre><p><strong>Key 规则：</strong></p>\n<ul>\n<li>在 (category, mind) 内必须唯一</li>\n<li>使用 <code>snake_case</code></li>\n<li>以分类为前缀提高可读性：<code>preference_communication</code>、<code>mistake_npm_version</code></li>\n<li>创建后不要修改 key</li>\n</ul>\n<h2>Tags：用于搜索</h2>\n<p>标签可加速过滤与搜索：</p>\n<pre><code class=\"hljs language-bash\"><span class=\"hljs-comment\"># 查找所有带 &quot;docker&quot; 标签的记忆</span>\nGET /memory/by-tag?tag=docker\n\n<span class=\"hljs-comment\"># 在带标签的子集中进行 FTS5 搜索</span>\nGET /memory/search?q=swarm&amp;tag=docker</code></pre><p><strong>标签最佳实践：</strong></p>\n<ul>\n<li>每条记忆 2-5 个标签（不要过度打标签）</li>\n<li>使用小写以保持一致</li>\n<li>使用项目名、主题、技术名</li>\n<li>标签不区分大小写</li>\n</ul>\n<h2>优先级</h2>\n<table>\n<thead>\n<tr>\n<th>优先级</th>\n<th>何时使用</th>\n<th>回放行为</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>critical</code></td>\n<td>身份、法律、不可逆信息</td>\n<td>始终位于回放顶部</td>\n</tr>\n<tr>\n<td><code>high</code></td>\n<td>进行中的项目、关键偏好</td>\n<td>回放中突出显示</td>\n</tr>\n<tr>\n<td><code>normal</code></td>\n<td>大多数记忆（默认）</td>\n<td>标准回放顺序</td>\n</tr>\n<tr>\n<td><code>low</code></td>\n<td>临时、知道就好的信息</td>\n<td>可能被摘要</td>\n</tr>\n</tbody></table>\n<p><code>/memory/recall</code> 按优先级排序（critical 在前），其次按时间。</p>\n<h2>来源：User 与 Agent</h2>\n<p>记忆用 <code>source</code> 标记：</p>\n<ul>\n<li><code>user</code> — 由人类存储（通过 JWT 或人类 UI）</li>\n<li><code>agent</code> — 由 LLM Agent 存储（通过 Mind Key）</li>\n</ul>\n<p>这会影响：</p>\n<ul>\n<li><strong>验证</strong>：<code>user</code> 记忆自动验证，<code>agent</code> 记忆不自动验证</li>\n<li><strong>置信度</strong>：<code>user</code> 默认 1.0，<code>agent</code> 默认 0.7</li>\n<li><strong>回放</strong>：<code>/memory/recall</code> 会标记未验证记忆为 &quot;(unverified)&quot;</li>\n</ul>\n<div class=\"callout callout-note\">对 `agent` 来源的记忆应保持适当的怀疑。它们可能是推断或假设而来，而非用户直接陈述。</div><h2>验证</h2>\n<p><code>verified</code> 标志表示人类已确认该记忆：</p>\n<ul>\n<li><code>user</code> 记忆：自动验证（<code>true</code>）</li>\n<li><code>agent</code> 记忆：默认未验证（<code>false</code>）</li>\n</ul>\n<p>通过以下方式验证记忆：</p>\n<pre><code class=\"hljs language-bash\">curl -X POST https://synapse.schaefer.zone/memory/mem_001/verify \\\n  -H <span class=\"hljs-string\">&quot;Authorization: Bearer YOUR_JWT&quot;</span></code></pre><div class=\"callout callout-note\">验证需要 JWT（人类认证），而非 Mind Key（Agent 认证）。这确保只有人类才能将记忆标记为已验证。</div><h2>置信度</h2>\n<p><code>confidence</code> 字段（0.0 到 1.0）表示记忆的可靠程度：</p>\n<ul>\n<li>1.0 — 用户直接陈述</li>\n<li>0.7 — 由 Agent 推断</li>\n<li>0.5 — 不确定，需要验证</li>\n<li>0.0 — 明确存疑</li>\n</ul>\n<p>存储时设置置信度：</p>\n<pre><code class=\"hljs language-json\"><span class=\"hljs-punctuation\">{</span>\n  <span class=\"hljs-attr\">&quot;category&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;preference&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;key&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;prefers_dark_mode&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;content&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;User seems to prefer dark mode (based on their IDE screenshots)&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;confidence&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">0.5</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;source&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;agent&quot;</span>\n<span class=\"hljs-punctuation\">}</span></code></pre><h2>过期</h2>\n<p>为时效性记忆设置 <code>expires_at</code>：</p>\n<pre><code class=\"hljs language-json\"><span class=\"hljs-punctuation\">{</span>\n  <span class=\"hljs-attr\">&quot;category&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;context&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;key&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;current_meeting_topic&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;content&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;Discussing Q3 roadmap&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;expires_at&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;2026-06-28T00:00:00Z&quot;</span>\n<span class=\"hljs-punctuation\">}</span></code></pre><p>已过期的记忆不会出现在 <code>/memory/recall</code> 中（但仍在数据库中）。使用 <code>/memory/expiring?within=7d</code> 查看即将过期的记忆。</p>\n<h2>记忆生命周期</h2>\n<pre><code class=\"hljs language-plaintext\">                  ┌─────────────────┐\n                  │     创建        │\n                  │  POST /memory   │\n                  └────────┬────────┘\n                           │\n                           ▼\n                  ┌─────────────────┐\n                  │     活跃        │ ◀──── PUT /memory/:id (更新)\n                  │  (在回放中)     │\n                  └────────┬────────┘\n                           │\n              ┌────────────┼────────────┐\n              │            │            │\n              ▼            ▼            ▼\n        ┌──────────┐ ┌──────────┐ ┌──────────┐\n        │ 已过期   │ │ 已验证   │ │ 已删除   │\n        │ (在 DB)  │ │ (标志)   │ │ (已消失) │\n        └──────────┘ └──────────┘ └──────────┘</code></pre><h2>回放行为</h2>\n<p><code>GET /memory/recall</code> 返回为 LLM 上下文优化的纯文本摘要：</p>\n<pre><code class=\"hljs language-plaintext\">Mind: Michael&#x27;s Mind\nMemories: 12 total (10 verified, 2 unverified)\n\n[001] identity (CRITICAL) [verified]\n  user_name\n  Michael Schäfer\n  Tags: person, identity\n\n[002] preference (HIGH) [verified]\n  communication_style\n  Prefers concise technical responses\n  Tags: communication\n\n[003] project (HIGH) [unverified]\n  synapse_status\n  v1.5.0 deployed, working on v1.6.0 docs\n  Tags: synapse, deployment\n\n...</code></pre><ul>\n<li>按优先级排序（critical → low），其次按时间</li>\n<li>未验证记忆用 <code>[unverified]</code> 标记</li>\n<li>包含标签以提供上下文</li>\n<li>纯文本（无需解析 JSON）</li>\n</ul>\n<h2>下一步</h2>\n<ul>\n<li><a href=\"/docs/api/memory\">Memory API</a></li>\n<li><a href=\"/docs/guides/memory-best-practices\">记忆最佳实践</a></li>\n<li><a href=\"/docs/concepts/fts5-search\">FTS5 搜索</a></li>\n</ul>\n","urls":{"html":"/docs/concepts/memory-model","text":"/docs/concepts/memory-model?format=text","json":"/docs/concepts/memory-model?format=json","llm":"/docs/concepts/memory-model?format=llm"},"translations_available":["en","zh","hi","es","fr","ar","pt","ru","ja","de","it","ko","nl","pl","tr","sv","vi","th","id","uk"]}