{"title":"Das Memory-Modell","slug":"memory-model","category":"concepts","summary":"Wie Memories strukturiert sind — Kategorien, Keys, Tags, Prioritäten, Quellen, Verifikation.","audience":["human","llm"],"tags":["concept","memory","model","structure"],"difficulty":"intermediate","updated":"2026-06-27","word_count":664,"read_minutes":3,"lang":"de","translated":true,"requested_lang":"de","content_markdown":"\n# Das Memory-Modell\n\nSynapses Memory-Modell ist für LLM-Agenten gestaltet — strukturiert genug für\nzuverlässiges Abrufen, flexibel genug für jede Domäne.\n\n## Anatomie eines Memories\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## Felder\n\n| Feld | Typ | Pflicht | Beschreibung |\n|-------|------|---------|--------------|\n| `id` | string | auto | Eindeutige ID (mem_xxx) |\n| `category` | enum | ✅ | Eine von 8 Kategorien |\n| `key` | string | ✅ | Stabiler Bezeichner (für Updates genutzt) |\n| `content` | string | ✅ | Der Memory-Inhalt (beliebiger Text) |\n| `tags` | string[] | – | Für Suche und Filterung |\n| `priority` | enum | – | low, normal, high, critical (Standard: normal) |\n| `source` | enum | auto | user, agent (wer hat es gespeichert) |\n| `verified` | bool | auto | Wurde das von einem Menschen verifiziert? |\n| `confidence` | float | – | 0.0 bis 1.0 (Standard: 1.0 für user, 0.7 für agent) |\n| `expires_at` | timestamp | – | Wann dieser Memory vergessen werden soll |\n| `mind_id` | string | auto | Welcher Mind ihn besitzt |\n| `created_at` | timestamp | auto | Erstmalig gespeichert |\n| `updated_at` | timestamp | auto | Zuletzt geändert |\n\n## Kategorien\n\nAcht Kategorien decken die gängigen LLM-Agent-Anwendungsfälle ab:\n\n| Kategorie | Zweck | Beispielinhalt |\n|-----------|-------|----------------|\n| `identity` | Wer der Nutzer ist | „Nutzer ist Michael Schäfer, Software Engineer in Berlin\" |\n| `preference` | Nutzerpräferenzen | „Bevorzugt prägnante technische Antworten\" |\n| `fact` | Überprüfbare Fakten | „Büro in Berlin, Zeitzone Europe/Berlin\" |\n| `project` | Projektstatus | „Synapse v1.5.0 deployed, arbeite an v1.6.0-Docs\" |\n| `skill` | Fähigkeiten des Nutzers | „Fortgeschrittenes Python, 10+ Jahre\" |\n| `mistake` | Frühere Fehler | „NPM-Version nicht gebumpt — CI fehlgeschlagen\" |\n| `context` | Session-Kontext | „Prüfe gerade PR #42\" |\n| `note` | Sonstige Notizen | „Nächstes Sprint Redis fürs Caching testen\" |\n\n## Keys: Stabile Bezeichner\n\nDas Feld `key` ist entscheidend — so aktualisierst du Memories, ohne Duplikate\nzu erzeugen.\n\n```python\n# First store\nstore(\"project\", \"project_synapse_status\", \"v1.4.0 deployed\", priority=\"high\")\n\n# Update with same key (overwrites, doesn't duplicate)\nstore(\"project\", \"project_synapse_status\", \"v1.5.0 deployed\", priority=\"high\")\n```\n\n**Key-Regeln:**\n\n- Muss innerhalb (Kategorie, Mind) eindeutig sein\n- Verwende `snake_case`\n- Präfix mit Kategorie für Klarheit: `preference_communication`, `mistake_npm_version`\n- Stabil halten — Keys nach Anlage nicht ändern\n\n## Tags: Für die Suche\n\nTags ermöglichen schnelle Filterung und Suche:\n\n```bash\n# Find all memories with tag \"docker\"\nGET /memory/by-tag?tag=docker\n\n# FTS5 search within tagged subset\nGET /memory/search?q=swarm&tag=docker\n```\n\n**Tag-Best-Practices:**\n\n- 2-5 Tags pro Memory (nicht übertrieben)\n- Kleinschreibung für Konsistenz\n- Projektnamen, Themen, Technologien verwenden\n- Tags sind Case-insensitive\n\n## Prioritätsstufen\n\n| Priorität | Wann verwenden | Recall-Verhalten |\n|-----------|----------------|-------------------|\n| `critical` | Identität, rechtlich, unumkehrbar | Immer oben im Recall |\n| `high` | Aktive Projekte, zentrale Präferenzen | Prominent im Recall |\n| `normal` | Die meisten Memories (Standard) | Standard-Reihenfolge |\n| `low` | Flüchtig, nett zu wissen | Kann zusammengefasst werden |\n\n`/memory/recall` sortiert nach Priorität (critical zuerst), dann nach Aktualität.\n\n## Quelle: User vs Agent\n\nMemories werden mit `source` markiert:\n\n- `user` — von einem Menschen gespeichert (via JWT oder Human-UI)\n- `agent` — von einem LLM-Agenten gespeichert (via Mind Key)\n\nDas beeinflusst:\n\n- **Verifikation**: `user`-Memories sind auto-verifiziert, `agent`-Memories nicht\n- **Confidence**: `user` defaults auf 1.0, `agent` auf 0.7\n- **Recall**: `/memory/recall` markiert unverified Memories mit „(unverified)\"\n\n> [!NOTE]\n> Behandle `agent`-Memories mit angemessenem Skepsis. Sie könnten gefolgert\n> oder angenommen statt direkt vom Nutzer geäußert sein.\n\n## Verifikation\n\nDas Flag `verified` zeigt an, dass ein Mensch den Memory bestätigt hat:\n\n- `user`-Memories: auto-verifiziert (`true`)\n- `agent`-Memories: standardmäßig unverified (`false`)\n\nMemories verifizieren via:\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> Verifikation erfordert JWT (Human-Auth), nicht Mind Key (Agent-Auth). So wird\n> sichergestellt, dass nur Menschen Memories als verifiziert markieren können.\n\n## Confidence\n\nDas Feld `confidence` (0.0 bis 1.0) zeigt, wie zuverlässig der Memory ist:\n\n- 1.0 — direkt vom Nutzer geäußert\n- 0.7 — vom Agenten gefolgert\n- 0.5 — unsicher, needs Verifikation\n- 0.0 — explizit angezweifelt\n\nBeim Speichern Confidence setzen:\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## Ablauf\n\nFür zeitkritische Memories `expires_at` setzen:\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\nAbgelaufene Memories werden von `/memory/recall` nicht zurückgegeben (bleiben\naber in der DB). Verwende `/memory/expiring?within=7d`, um bald ablaufende\nMemories zu sehen.\n\n## Memory-Lebenszyklus\n\n```\n                  ┌─────────────────┐\n                  │     Create      │\n                  │  POST /memory   │\n                  └────────┬────────┘\n                           │\n                           ▼\n                  ┌─────────────────┐\n                  │     Active      │ ◀──── PUT /memory/:id (update)\n                  │  (in recall)    │\n                  └────────┬────────┘\n                           │\n              ┌────────────┼────────────┐\n              │            │            │\n              ▼            ▼            ▼\n        ┌──────────┐ ┌──────────┐ ┌──────────┐\n        │ Expired  │ │ Verified │ │ Deleted  │\n        │ (in DB)  │ │ (flag)   │ │ (gone)   │\n        └──────────┘ └──────────┘ └──────────┘\n```\n\n## Recall-Verhalten\n\n`GET /memory/recall` liefert eine Klartext-Zusammenfassung, optimiert für\nLLM-Kontext:\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- Sortiert nach Priorität (critical → low), dann nach Aktualität\n- Unverified Memories markiert mit `[unverified]`\n- Tags für Kontext enthalten\n- Klartext (kein JSON-Parsing nötig)\n\n## Nächste Schritte\n\n- [Memory-API](/docs/api/memory)\n- [Memory-Best-Practices](/docs/guides/memory-best-practices)\n- [FTS5-Suche](/docs/concepts/fts5-search)\n","content_html":"<h1>Das Memory-Modell</h1>\n<p>Synapses Memory-Modell ist für LLM-Agenten gestaltet — strukturiert genug für\nzuverlässiges Abrufen, flexibel genug für jede Domäne.</p>\n<h2>Anatomie eines Memories</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>Felder</h2>\n<table>\n<thead>\n<tr>\n<th>Feld</th>\n<th>Typ</th>\n<th>Pflicht</th>\n<th>Beschreibung</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>auto</td>\n<td>Eindeutige ID (mem_xxx)</td>\n</tr>\n<tr>\n<td><code>category</code></td>\n<td>enum</td>\n<td>✅</td>\n<td>Eine von 8 Kategorien</td>\n</tr>\n<tr>\n<td><code>key</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Stabiler Bezeichner (für Updates genutzt)</td>\n</tr>\n<tr>\n<td><code>content</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Der Memory-Inhalt (beliebiger Text)</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>string[]</td>\n<td>–</td>\n<td>Für Suche und Filterung</td>\n</tr>\n<tr>\n<td><code>priority</code></td>\n<td>enum</td>\n<td>–</td>\n<td>low, normal, high, critical (Standard: normal)</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>enum</td>\n<td>auto</td>\n<td>user, agent (wer hat es gespeichert)</td>\n</tr>\n<tr>\n<td><code>verified</code></td>\n<td>bool</td>\n<td>auto</td>\n<td>Wurde das von einem Menschen verifiziert?</td>\n</tr>\n<tr>\n<td><code>confidence</code></td>\n<td>float</td>\n<td>–</td>\n<td>0.0 bis 1.0 (Standard: 1.0 für user, 0.7 für agent)</td>\n</tr>\n<tr>\n<td><code>expires_at</code></td>\n<td>timestamp</td>\n<td>–</td>\n<td>Wann dieser Memory vergessen werden soll</td>\n</tr>\n<tr>\n<td><code>mind_id</code></td>\n<td>string</td>\n<td>auto</td>\n<td>Welcher Mind ihn besitzt</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>timestamp</td>\n<td>auto</td>\n<td>Erstmalig gespeichert</td>\n</tr>\n<tr>\n<td><code>updated_at</code></td>\n<td>timestamp</td>\n<td>auto</td>\n<td>Zuletzt geändert</td>\n</tr>\n</tbody></table>\n<h2>Kategorien</h2>\n<p>Acht Kategorien decken die gängigen LLM-Agent-Anwendungsfälle ab:</p>\n<table>\n<thead>\n<tr>\n<th>Kategorie</th>\n<th>Zweck</th>\n<th>Beispielinhalt</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>identity</code></td>\n<td>Wer der Nutzer ist</td>\n<td>„Nutzer ist Michael Schäfer, Software Engineer in Berlin&quot;</td>\n</tr>\n<tr>\n<td><code>preference</code></td>\n<td>Nutzerpräferenzen</td>\n<td>„Bevorzugt prägnante technische Antworten&quot;</td>\n</tr>\n<tr>\n<td><code>fact</code></td>\n<td>Überprüfbare Fakten</td>\n<td>„Büro in Berlin, Zeitzone Europe/Berlin&quot;</td>\n</tr>\n<tr>\n<td><code>project</code></td>\n<td>Projektstatus</td>\n<td>„Synapse v1.5.0 deployed, arbeite an v1.6.0-Docs&quot;</td>\n</tr>\n<tr>\n<td><code>skill</code></td>\n<td>Fähigkeiten des Nutzers</td>\n<td>„Fortgeschrittenes Python, 10+ Jahre&quot;</td>\n</tr>\n<tr>\n<td><code>mistake</code></td>\n<td>Frühere Fehler</td>\n<td>„NPM-Version nicht gebumpt — CI fehlgeschlagen&quot;</td>\n</tr>\n<tr>\n<td><code>context</code></td>\n<td>Session-Kontext</td>\n<td>„Prüfe gerade PR #42&quot;</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>Sonstige Notizen</td>\n<td>„Nächstes Sprint Redis fürs Caching testen&quot;</td>\n</tr>\n</tbody></table>\n<h2>Keys: Stabile Bezeichner</h2>\n<p>Das Feld <code>key</code> ist entscheidend — so aktualisierst du Memories, ohne Duplikate\nzu erzeugen.</p>\n<pre><code class=\"hljs language-python\"><span class=\"hljs-comment\"># First store</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\"># Update with same key (overwrites, doesn&#x27;t duplicate)</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-Regeln:</strong></p>\n<ul>\n<li>Muss innerhalb (Kategorie, Mind) eindeutig sein</li>\n<li>Verwende <code>snake_case</code></li>\n<li>Präfix mit Kategorie für Klarheit: <code>preference_communication</code>, <code>mistake_npm_version</code></li>\n<li>Stabil halten — Keys nach Anlage nicht ändern</li>\n</ul>\n<h2>Tags: Für die Suche</h2>\n<p>Tags ermöglichen schnelle Filterung und Suche:</p>\n<pre><code class=\"hljs language-bash\"><span class=\"hljs-comment\"># Find all memories with tag &quot;docker&quot;</span>\nGET /memory/by-tag?tag=docker\n\n<span class=\"hljs-comment\"># FTS5 search within tagged subset</span>\nGET /memory/search?q=swarm&amp;tag=docker</code></pre><p><strong>Tag-Best-Practices:</strong></p>\n<ul>\n<li>2-5 Tags pro Memory (nicht übertrieben)</li>\n<li>Kleinschreibung für Konsistenz</li>\n<li>Projektnamen, Themen, Technologien verwenden</li>\n<li>Tags sind Case-insensitive</li>\n</ul>\n<h2>Prioritätsstufen</h2>\n<table>\n<thead>\n<tr>\n<th>Priorität</th>\n<th>Wann verwenden</th>\n<th>Recall-Verhalten</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>critical</code></td>\n<td>Identität, rechtlich, unumkehrbar</td>\n<td>Immer oben im Recall</td>\n</tr>\n<tr>\n<td><code>high</code></td>\n<td>Aktive Projekte, zentrale Präferenzen</td>\n<td>Prominent im Recall</td>\n</tr>\n<tr>\n<td><code>normal</code></td>\n<td>Die meisten Memories (Standard)</td>\n<td>Standard-Reihenfolge</td>\n</tr>\n<tr>\n<td><code>low</code></td>\n<td>Flüchtig, nett zu wissen</td>\n<td>Kann zusammengefasst werden</td>\n</tr>\n</tbody></table>\n<p><code>/memory/recall</code> sortiert nach Priorität (critical zuerst), dann nach Aktualität.</p>\n<h2>Quelle: User vs Agent</h2>\n<p>Memories werden mit <code>source</code> markiert:</p>\n<ul>\n<li><code>user</code> — von einem Menschen gespeichert (via JWT oder Human-UI)</li>\n<li><code>agent</code> — von einem LLM-Agenten gespeichert (via Mind Key)</li>\n</ul>\n<p>Das beeinflusst:</p>\n<ul>\n<li><strong>Verifikation</strong>: <code>user</code>-Memories sind auto-verifiziert, <code>agent</code>-Memories nicht</li>\n<li><strong>Confidence</strong>: <code>user</code> defaults auf 1.0, <code>agent</code> auf 0.7</li>\n<li><strong>Recall</strong>: <code>/memory/recall</code> markiert unverified Memories mit „(unverified)&quot;</li>\n</ul>\n<div class=\"callout callout-note\">Behandle `agent`-Memories mit angemessenem Skepsis. Sie könnten gefolgert\noder angenommen statt direkt vom Nutzer geäußert sein.</div><h2>Verifikation</h2>\n<p>Das Flag <code>verified</code> zeigt an, dass ein Mensch den Memory bestätigt hat:</p>\n<ul>\n<li><code>user</code>-Memories: auto-verifiziert (<code>true</code>)</li>\n<li><code>agent</code>-Memories: standardmäßig unverified (<code>false</code>)</li>\n</ul>\n<p>Memories verifizieren via:</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\">Verifikation erfordert JWT (Human-Auth), nicht Mind Key (Agent-Auth). So wird\nsichergestellt, dass nur Menschen Memories als verifiziert markieren können.</div><h2>Confidence</h2>\n<p>Das Feld <code>confidence</code> (0.0 bis 1.0) zeigt, wie zuverlässig der Memory ist:</p>\n<ul>\n<li>1.0 — direkt vom Nutzer geäußert</li>\n<li>0.7 — vom Agenten gefolgert</li>\n<li>0.5 — unsicher, needs Verifikation</li>\n<li>0.0 — explizit angezweifelt</li>\n</ul>\n<p>Beim Speichern Confidence setzen:</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>Ablauf</h2>\n<p>Für zeitkritische Memories <code>expires_at</code> setzen:</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>Abgelaufene Memories werden von <code>/memory/recall</code> nicht zurückgegeben (bleiben\naber in der DB). Verwende <code>/memory/expiring?within=7d</code>, um bald ablaufende\nMemories zu sehen.</p>\n<h2>Memory-Lebenszyklus</h2>\n<pre><code class=\"hljs language-plaintext\">                  ┌─────────────────┐\n                  │     Create      │\n                  │  POST /memory   │\n                  └────────┬────────┘\n                           │\n                           ▼\n                  ┌─────────────────┐\n                  │     Active      │ ◀──── PUT /memory/:id (update)\n                  │  (in recall)    │\n                  └────────┬────────┘\n                           │\n              ┌────────────┼────────────┐\n              │            │            │\n              ▼            ▼            ▼\n        ┌──────────┐ ┌──────────┐ ┌──────────┐\n        │ Expired  │ │ Verified │ │ Deleted  │\n        │ (in DB)  │ │ (flag)   │ │ (gone)   │\n        └──────────┘ └──────────┘ └──────────┘</code></pre><h2>Recall-Verhalten</h2>\n<p><code>GET /memory/recall</code> liefert eine Klartext-Zusammenfassung, optimiert für\nLLM-Kontext:</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>Sortiert nach Priorität (critical → low), dann nach Aktualität</li>\n<li>Unverified Memories markiert mit <code>[unverified]</code></li>\n<li>Tags für Kontext enthalten</li>\n<li>Klartext (kein JSON-Parsing nötig)</li>\n</ul>\n<h2>Nächste Schritte</h2>\n<ul>\n<li><a href=\"/docs/api/memory\">Memory-API</a></li>\n<li><a href=\"/docs/guides/memory-best-practices\">Memory-Best-Practices</a></li>\n<li><a href=\"/docs/concepts/fts5-search\">FTS5-Suche</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"]}