{"title":"Het Memory-model","slug":"memory-model","category":"concepts","summary":"Hoe herinneringen zijn gestructureerd — categorieën, sleutels, tags, prioriteiten, bronnen, verificatie.","audience":["human","llm"],"tags":["concept","memory","model","structure"],"difficulty":"intermediate","updated":"2026-06-27","word_count":687,"read_minutes":3,"lang":"nl","translated":true,"requested_lang":"nl","content_markdown":"\n# Het Memory-model\n\nHet memory-model van Synapse is ontworpen voor LLM-agents — gestructureerd genoeg voor\nbetrouwbare recall, flexibel genoeg voor elk domein.\n\n## Anatomie van een herinnering\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## Velden\n\n| Veld | Type | Vereist | Beschrijving |\n|------|------|---------|--------------|\n| `id` | string | auto | Unieke ID (mem_xxx) |\n| `category` | enum | ✅ | Een van 8 categorieën |\n| `key` | string | ✅ | Stabiele identificator (gebruikt voor updates) |\n| `content` | string | ✅ | De memory-inhoud (willekeurige tekst) |\n| `tags` | string[] | – | Voor zoeken en filteren |\n| `priority` | enum | – | low, normal, high, critical (standaard: normal) |\n| `source` | enum | auto | user, agent (wie heeft het opgeslagen) |\n| `verified` | bool | auto | Heeft een mens dit geverifieerd? |\n| `confidence` | float | – | 0.0 tot 1.0 (standaard: 1.0 voor user, 0.7 voor agent) |\n| `expires_at` | timestamp | – | Wanneer deze herinnering vergeten moet worden |\n| `mind_id` | string | auto | Welke mind eigenaar is |\n| `created_at` | timestamp | auto | Eerst opgeslagen |\n| `updated_at` | timestamp | auto | Laatst gewijzigd |\n\n## Categorieën\n\nAcht categorieën dekken de veelvoorkomende LLM-agent-toepassingen:\n\n| Categorie | Doel | Voorbeeldinhoud |\n|-----------|------|-----------------|\n| `identity` | Wie de gebruiker is | \"Gebruiker is Michael Schäfer, software engineer in Berlin\" |\n| `preference` | Gebruikersvoorkeuren | \"Geeft de voorkeur aan beknopte technische antwoorden\" |\n| `fact` | Verifieerbare feiten | \"Kantoor is in Berlin, tijdzone Europe/Berlin\" |\n| `project` | Projectstatus | \"Synapse v1.5.0 uitgerold, bezig met v1.6.0 docs\" |\n| `skill` | Vaardigheden van de gebruiker | \"Gevorderd Python, 10+ jaar\" |\n| `mistake` | Eerdere fouten | \"Vergeten npm-versie te verhogen — CI faalde\" |\n| `context` | Sessie-context | \"Momenteel PR #42 aan het beoordelen\" |\n| `note` | Diverse notities | \"Probeer Redis voor caching in volgende sprint\" |\n\n## Sleutels: stabiele identificatoren\n\nHet `key`-veld is kritiek — het is hoe u herinneringen bijwerkt zonder duplicaten\nte maken.\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**Sleutelregels:**\n\n- Moet uniek zijn binnen (category, mind)\n- Gebruik `snake_case`\n- Voorvoeg met categorie voor duidelijkheid: `preference_communication`, `mistake_npm_version`\n- Houd stabiel — wijzig sleutels niet na aanmaak\n\n## Tags: voor zoeken\n\nTags maken snelle filtering en zoekopdrachten mogelijk:\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 per herinnering (over-tag niet)\n- Kleine letters voor consistentie\n- Gebruik projectnamen, onderwerpen, technologieën\n- Tags zijn niet hoofdlettergevoelig\n\n## Prioriteitsniveaus\n\n| Prioriteit | Wanneer te gebruiken | Recall-gedrag |\n|------------|----------------------|---------------|\n| `critical` | Identiteit, juridisch, onomkeerbaar | Altijd bovenaan recall |\n| `high` | Actieve projecten, kernvoorkeuren | Prominent in recall |\n| `normal` | Meeste herinneringen (standaard) | Standaard recall-volgorde |\n| `low` | Efemeer, leuk-om-te-weten | Kan worden samengevat |\n\n`/memory/recall` sorteert op prioriteit (critical eerst), dan op recentheid.\n\n## Bron: User versus Agent\n\nHerinneringen worden getagd met `source`:\n\n- `user` — opgeslagen door een mens (via JWT of human-UI)\n- `agent` — opgeslagen door een LLM-agent (via Mind Key)\n\nDit beïnvloedt:\n\n- **Verificatie**: `user`-herinneringen worden automatisch geverifieerd, `agent`-herinneringen niet\n- **Betrouwbaarheid**: `user` standaard 1.0, `agent` 0.7\n- **Recall**: `/memory/recall` markeert niet-geverifieerde herinneringen met \"(unverified)\"\n\n> [!NOTE]\n> Behandel `agent`-bron-herinneringen met gepast skepticisme. Ze kunnen zijn\n> afgeleid of aangenomen in plaats van direct door de gebruiker gesteld.\n\n## Verificatie\n\nDe `verified`-vlag geeft aan dat een mens de herinnering heeft bevestigd:\n\n- `user`-herinneringen: automatisch geverifieerd (`true`)\n- `agent`-herinneringen: standaard niet-geverifieerd (`false`)\n\nVerifieer herinneringen 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> Verificatie vereist JWT (mens-auth), niet Mind Key (agent-auth). Dit\n> zorgt ervoor dat alleen mensen herinneringen als geverifieerd kunnen markeren.\n\n## Betrouwbaarheid\n\nHet `confidence`-veld (0.0 tot 1.0) geeft aan hoe betrouwbaar de herinnering is:\n\n- 1.0 — direct door gebruiker gesteld\n- 0.7 — door agent afgeleid\n- 0.5 — onzeker, vereist verificatie\n- 0.0 — expliciet betwijfeld\n\nStel betrouwbaarheid in bij opslaan:\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## Verval\n\nStel `expires_at` in voor tijdgevoelige herinneringen:\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\nVerlopen herinneringen worden niet geretourneerd door `/memory/recall` (maar bestaan nog wel in DB).\nGebruik `/memory/expiring?within=7d` om herinneringen te zien die binnenkort verlopen.\n\n## Memory-levenscyclus\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-gedrag\n\n`GET /memory/recall` retourneert een platte-tekst samenvatting geoptimaliseerd voor LLM-context:\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- Gesorteerd op prioriteit (critical → low), dan op recentheid\n- Niet-geverifieerde herinneringen gemarkeerd met `[unverified]`\n- Tags inbegrepen voor context\n- Platte tekst (geen JSON-parsing nodig)\n\n## Volgende stappen\n\n- [Memory API](/docs/api/memory)\n- [Memory-best-practices](/docs/guides/memory-best-practices)\n- [FTS5-zoekopdracht](/docs/concepts/fts5-search)\n","content_html":"<h1>Het Memory-model</h1>\n<p>Het memory-model van Synapse is ontworpen voor LLM-agents — gestructureerd genoeg voor\nbetrouwbare recall, flexibel genoeg voor elk domein.</p>\n<h2>Anatomie van een herinnering</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>Velden</h2>\n<table>\n<thead>\n<tr>\n<th>Veld</th>\n<th>Type</th>\n<th>Vereist</th>\n<th>Beschrijving</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>auto</td>\n<td>Unieke ID (mem_xxx)</td>\n</tr>\n<tr>\n<td><code>category</code></td>\n<td>enum</td>\n<td>✅</td>\n<td>Een van 8 categorieën</td>\n</tr>\n<tr>\n<td><code>key</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Stabiele identificator (gebruikt voor updates)</td>\n</tr>\n<tr>\n<td><code>content</code></td>\n<td>string</td>\n<td>✅</td>\n<td>De memory-inhoud (willekeurige tekst)</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>string[]</td>\n<td>–</td>\n<td>Voor zoeken en filteren</td>\n</tr>\n<tr>\n<td><code>priority</code></td>\n<td>enum</td>\n<td>–</td>\n<td>low, normal, high, critical (standaard: normal)</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>enum</td>\n<td>auto</td>\n<td>user, agent (wie heeft het opgeslagen)</td>\n</tr>\n<tr>\n<td><code>verified</code></td>\n<td>bool</td>\n<td>auto</td>\n<td>Heeft een mens dit geverifieerd?</td>\n</tr>\n<tr>\n<td><code>confidence</code></td>\n<td>float</td>\n<td>–</td>\n<td>0.0 tot 1.0 (standaard: 1.0 voor user, 0.7 voor agent)</td>\n</tr>\n<tr>\n<td><code>expires_at</code></td>\n<td>timestamp</td>\n<td>–</td>\n<td>Wanneer deze herinnering vergeten moet worden</td>\n</tr>\n<tr>\n<td><code>mind_id</code></td>\n<td>string</td>\n<td>auto</td>\n<td>Welke mind eigenaar is</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>timestamp</td>\n<td>auto</td>\n<td>Eerst opgeslagen</td>\n</tr>\n<tr>\n<td><code>updated_at</code></td>\n<td>timestamp</td>\n<td>auto</td>\n<td>Laatst gewijzigd</td>\n</tr>\n</tbody></table>\n<h2>Categorieën</h2>\n<p>Acht categorieën dekken de veelvoorkomende LLM-agent-toepassingen:</p>\n<table>\n<thead>\n<tr>\n<th>Categorie</th>\n<th>Doel</th>\n<th>Voorbeeldinhoud</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>identity</code></td>\n<td>Wie de gebruiker is</td>\n<td>&quot;Gebruiker is Michael Schäfer, software engineer in Berlin&quot;</td>\n</tr>\n<tr>\n<td><code>preference</code></td>\n<td>Gebruikersvoorkeuren</td>\n<td>&quot;Geeft de voorkeur aan beknopte technische antwoorden&quot;</td>\n</tr>\n<tr>\n<td><code>fact</code></td>\n<td>Verifieerbare feiten</td>\n<td>&quot;Kantoor is in Berlin, tijdzone Europe/Berlin&quot;</td>\n</tr>\n<tr>\n<td><code>project</code></td>\n<td>Projectstatus</td>\n<td>&quot;Synapse v1.5.0 uitgerold, bezig met v1.6.0 docs&quot;</td>\n</tr>\n<tr>\n<td><code>skill</code></td>\n<td>Vaardigheden van de gebruiker</td>\n<td>&quot;Gevorderd Python, 10+ jaar&quot;</td>\n</tr>\n<tr>\n<td><code>mistake</code></td>\n<td>Eerdere fouten</td>\n<td>&quot;Vergeten npm-versie te verhogen — CI faalde&quot;</td>\n</tr>\n<tr>\n<td><code>context</code></td>\n<td>Sessie-context</td>\n<td>&quot;Momenteel PR #42 aan het beoordelen&quot;</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>Diverse notities</td>\n<td>&quot;Probeer Redis voor caching in volgende sprint&quot;</td>\n</tr>\n</tbody></table>\n<h2>Sleutels: stabiele identificatoren</h2>\n<p>Het <code>key</code>-veld is kritiek — het is hoe u herinneringen bijwerkt zonder duplicaten\nte maken.</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>Sleutelregels:</strong></p>\n<ul>\n<li>Moet uniek zijn binnen (category, mind)</li>\n<li>Gebruik <code>snake_case</code></li>\n<li>Voorvoeg met categorie voor duidelijkheid: <code>preference_communication</code>, <code>mistake_npm_version</code></li>\n<li>Houd stabiel — wijzig sleutels niet na aanmaak</li>\n</ul>\n<h2>Tags: voor zoeken</h2>\n<p>Tags maken snelle filtering en zoekopdrachten mogelijk:</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 per herinnering (over-tag niet)</li>\n<li>Kleine letters voor consistentie</li>\n<li>Gebruik projectnamen, onderwerpen, technologieën</li>\n<li>Tags zijn niet hoofdlettergevoelig</li>\n</ul>\n<h2>Prioriteitsniveaus</h2>\n<table>\n<thead>\n<tr>\n<th>Prioriteit</th>\n<th>Wanneer te gebruiken</th>\n<th>Recall-gedrag</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>critical</code></td>\n<td>Identiteit, juridisch, onomkeerbaar</td>\n<td>Altijd bovenaan recall</td>\n</tr>\n<tr>\n<td><code>high</code></td>\n<td>Actieve projecten, kernvoorkeuren</td>\n<td>Prominent in recall</td>\n</tr>\n<tr>\n<td><code>normal</code></td>\n<td>Meeste herinneringen (standaard)</td>\n<td>Standaard recall-volgorde</td>\n</tr>\n<tr>\n<td><code>low</code></td>\n<td>Efemeer, leuk-om-te-weten</td>\n<td>Kan worden samengevat</td>\n</tr>\n</tbody></table>\n<p><code>/memory/recall</code> sorteert op prioriteit (critical eerst), dan op recentheid.</p>\n<h2>Bron: User versus Agent</h2>\n<p>Herinneringen worden getagd met <code>source</code>:</p>\n<ul>\n<li><code>user</code> — opgeslagen door een mens (via JWT of human-UI)</li>\n<li><code>agent</code> — opgeslagen door een LLM-agent (via Mind Key)</li>\n</ul>\n<p>Dit beïnvloedt:</p>\n<ul>\n<li><strong>Verificatie</strong>: <code>user</code>-herinneringen worden automatisch geverifieerd, <code>agent</code>-herinneringen niet</li>\n<li><strong>Betrouwbaarheid</strong>: <code>user</code> standaard 1.0, <code>agent</code> 0.7</li>\n<li><strong>Recall</strong>: <code>/memory/recall</code> markeert niet-geverifieerde herinneringen met &quot;(unverified)&quot;</li>\n</ul>\n<div class=\"callout callout-note\">Behandel `agent`-bron-herinneringen met gepast skepticisme. Ze kunnen zijn\nafgeleid of aangenomen in plaats van direct door de gebruiker gesteld.</div><h2>Verificatie</h2>\n<p>De <code>verified</code>-vlag geeft aan dat een mens de herinnering heeft bevestigd:</p>\n<ul>\n<li><code>user</code>-herinneringen: automatisch geverifieerd (<code>true</code>)</li>\n<li><code>agent</code>-herinneringen: standaard niet-geverifieerd (<code>false</code>)</li>\n</ul>\n<p>Verifieer herinneringen 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\">Verificatie vereist JWT (mens-auth), niet Mind Key (agent-auth). Dit\nzorgt ervoor dat alleen mensen herinneringen als geverifieerd kunnen markeren.</div><h2>Betrouwbaarheid</h2>\n<p>Het <code>confidence</code>-veld (0.0 tot 1.0) geeft aan hoe betrouwbaar de herinnering is:</p>\n<ul>\n<li>1.0 — direct door gebruiker gesteld</li>\n<li>0.7 — door agent afgeleid</li>\n<li>0.5 — onzeker, vereist verificatie</li>\n<li>0.0 — expliciet betwijfeld</li>\n</ul>\n<p>Stel betrouwbaarheid in bij opslaan:</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>Verval</h2>\n<p>Stel <code>expires_at</code> in voor tijdgevoelige herinneringen:</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>Verlopen herinneringen worden niet geretourneerd door <code>/memory/recall</code> (maar bestaan nog wel in DB).\nGebruik <code>/memory/expiring?within=7d</code> om herinneringen te zien die binnenkort verlopen.</p>\n<h2>Memory-levenscyclus</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-gedrag</h2>\n<p><code>GET /memory/recall</code> retourneert een platte-tekst samenvatting geoptimaliseerd voor LLM-context:</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>Gesorteerd op prioriteit (critical → low), dan op recentheid</li>\n<li>Niet-geverifieerde herinneringen gemarkeerd met <code>[unverified]</code></li>\n<li>Tags inbegrepen voor context</li>\n<li>Platte tekst (geen JSON-parsing nodig)</li>\n</ul>\n<h2>Volgende stappen</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-zoekopdracht</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"]}