{"title":"Le modèle de mémoire","slug":"memory-model","category":"concepts","summary":"Comment les mémoires sont structurées — catégories, clés, tags, priorités, sources, vérification.","audience":["human","llm"],"tags":["concept","memory","model","structure"],"difficulty":"intermediate","updated":"2026-06-27","word_count":803,"read_minutes":4,"lang":"fr","translated":true,"requested_lang":"fr","content_markdown":"\n# Le modèle de mémoire\n\nLe modèle de mémoire de Synapse est conçu pour les agents LLM — suffisamment structuré\npour un rappel fiable, suffisamment flexible pour tout domaine.\n\n## Anatomie d'une mémoire\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## Champs\n\n| Champ | Type | Requis | Description |\n|-------|------|----------|-------------|\n| `id` | string | auto | Identifiant unique (mem_xxx) |\n| `category` | enum | ✅ | Une des 8 catégories |\n| `key` | string | ✅ | Identifiant stable (utilisé pour les mises à jour) |\n| `content` | string | ✅ | Le contenu de la mémoire (n'importe quel texte) |\n| `tags` | string[] | – | Pour la recherche et le filtrage |\n| `priority` | enum | – | low, normal, high, critical (par défaut : normal) |\n| `source` | enum | auto | user, agent (qui l'a stockée) |\n| `verified` | bool | auto | Un humain a-t-il vérifié ceci ? |\n| `confidence` | float | – | 0.0 à 1.0 (par défaut : 1.0 pour user, 0.7 pour agent) |\n| `expires_at` | timestamp | – | Quand oublier cette mémoire |\n| `mind_id` | string | auto | Quel mind possède ceci |\n| `created_at` | timestamp | auto | Premier stockage |\n| `updated_at` | timestamp | auto | Dernière modification |\n\n## Catégories\n\nHuit catégories couvrent les cas d'usage courants des agents LLM :\n\n| Catégorie | Rôle | Exemple de contenu |\n|----------|---------|-----------------|\n| `identity` | Qui est l'utilisateur | \"User is Michael Schäfer, software engineer in Berlin\" |\n| `preference` | Préférences utilisateur | \"Prefers concise technical responses\" |\n| `fact` | Faits vérifiables | \"Office is in Berlin, timezone Europe/Berlin\" |\n| `project` | Statut de projet | \"Synapse v1.5.0 deployed, working on v1.6.0 docs\" |\n| `skill` | Compétences de l'utilisateur | \"Advanced Python, 10+ years\" |\n| `mistake` | Erreurs passées | \"Forgot to bump npm version — CI failed\" |\n| `context` | Contexte de session | \"Currently reviewing PR #42\" |\n| `note` | Notes diverses | \"Try Redis for caching next sprint\" |\n\n## Clés : identifiants stables\n\nLe champ `key` est critique — c'est ainsi que vous mettez à jour les mémoires sans\ncréer de doublons.\n\n```python\n# Premier stockage\nstore(\"project\", \"project_synapse_status\", \"v1.4.0 deployed\", priority=\"high\")\n\n# Mise à jour avec la même clé (écrase, ne duplique pas)\nstore(\"project\", \"project_synapse_status\", \"v1.5.0 deployed\", priority=\"high\")\n```\n\n**Règles de clé :**\n\n- Doit être unique dans (catégorie, mind)\n- Utilisez `snake_case`\n- Préfixez avec la catégorie pour plus de clarté : `preference_communication`, `mistake_npm_version`\n- Gardez-la stable — ne changez pas les clés après création\n\n## Tags : pour la recherche\n\nLes tags permettent le filtrage et la recherche rapides :\n\n```bash\n# Trouver toutes les mémoires avec le tag \"docker\"\nGET /memory/by-tag?tag=docker\n\n# Recherche FTS5 dans un sous-ensemble tagué\nGET /memory/search?q=swarm&tag=docker\n```\n\n**Bonnes pratiques de tag :**\n\n- 2-5 tags par mémoire (ne pas sur-tagger)\n- Minuscules pour la cohérence\n- Utilisez des noms de projet, sujets, technologies\n- Les tags sont insensibles à la casse\n\n## Niveaux de priorité\n\n| Priorité | Quand l'utiliser | Comportement de rappel |\n|----------|-------------|-----------------|\n| `critical` | Identité, juridique, irréversible | Toujours en haut du rappel |\n| `high` | Projets actifs, préférences clés | Proéminent dans le rappel |\n| `normal` | La plupart des mémoires (par défaut) | Ordre de rappel standard |\n| `low` | Éphémère, utile à savoir | Peut être résumé |\n\n`/memory/recall` trie par priorité (critical d'abord), puis par récence.\n\n## Source : User vs Agent\n\nLes mémoires sont marquées avec `source` :\n\n- `user` — stockée par un humain (via JWT ou interface humaine)\n- `agent` — stockée par un agent LLM (via Mind Key)\n\nCela affecte :\n\n- **Vérification** : les mémoires `user` sont auto-vérifiées, les mémoires `agent` ne le sont pas\n- **Confiance** : `user` par défaut à 1.0, `agent` à 0.7\n- **Rappel** : `/memory/recall` marque les mémoires non vérifiées avec « (unverified) »\n\n> [!NOTE]\n> Traitez les mémoires `agent` avec un scepticisme approprié. Elles peuvent être\n> déduites ou supposées plutôt que directement énoncées par l'utilisateur.\n\n## Vérification\n\nLe drapeau `verified` indique qu'un humain a confirmé la mémoire :\n\n- Mémoires `user` : auto-vérifiées (`true`)\n- Mémoires `agent` : non vérifiées par défaut (`false`)\n\nVérifiez les mémoires 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> La vérification nécessite un JWT (auth humaine), pas une Mind Key (auth agent).\n> Cela garantit que seuls les humains peuvent marquer des mémoires comme vérifiées.\n\n## Confiance\n\nLe champ `confidence` (0.0 à 1.0) indique la fiabilité de la mémoire :\n\n- 1.0 — directement énoncée par l'utilisateur\n- 0.7 — déduite par l'agent\n- 0.5 — incertaine, nécessite vérification\n- 0.0 — explicitement doutée\n\nDéfinissez la confiance lors du stockage :\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## Expiration\n\nDéfinissez `expires_at` pour les mémoires sensibles au temps :\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\nLes mémoires expirées ne sont pas renvoyées par `/memory/recall` (mais existent\ntoujours en base). Utilisez `/memory/expiring?within=7d` pour voir les mémoires\nexpirant bientôt.\n\n## Cycle de vie d'une mémoire\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## Comportement de rappel\n\n`GET /memory/recall` renvoie un résumé en texte brut optimisé pour le contexte 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- Trié par priorité (critical → low), puis par récence\n- Mémoires non vérifiées marquées avec `[unverified]`\n- Tags inclus pour le contexte\n- Texte brut (pas d'analyse JSON nécessaire)\n\n## Prochaines étapes\n\n- [API Memory](/docs/api/memory)\n- [Bonnes pratiques mémoire](/docs/guides/memory-best-practices)\n- [Recherche FTS5](/docs/concepts/fts5-search)\n","content_html":"<h1>Le modèle de mémoire</h1>\n<p>Le modèle de mémoire de Synapse est conçu pour les agents LLM — suffisamment structuré\npour un rappel fiable, suffisamment flexible pour tout domaine.</p>\n<h2>Anatomie d&#39;une mémoire</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>Champs</h2>\n<table>\n<thead>\n<tr>\n<th>Champ</th>\n<th>Type</th>\n<th>Requis</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>auto</td>\n<td>Identifiant unique (mem_xxx)</td>\n</tr>\n<tr>\n<td><code>category</code></td>\n<td>enum</td>\n<td>✅</td>\n<td>Une des 8 catégories</td>\n</tr>\n<tr>\n<td><code>key</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Identifiant stable (utilisé pour les mises à jour)</td>\n</tr>\n<tr>\n<td><code>content</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Le contenu de la mémoire (n&#39;importe quel texte)</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>string[]</td>\n<td>–</td>\n<td>Pour la recherche et le filtrage</td>\n</tr>\n<tr>\n<td><code>priority</code></td>\n<td>enum</td>\n<td>–</td>\n<td>low, normal, high, critical (par défaut : normal)</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>enum</td>\n<td>auto</td>\n<td>user, agent (qui l&#39;a stockée)</td>\n</tr>\n<tr>\n<td><code>verified</code></td>\n<td>bool</td>\n<td>auto</td>\n<td>Un humain a-t-il vérifié ceci ?</td>\n</tr>\n<tr>\n<td><code>confidence</code></td>\n<td>float</td>\n<td>–</td>\n<td>0.0 à 1.0 (par défaut : 1.0 pour user, 0.7 pour agent)</td>\n</tr>\n<tr>\n<td><code>expires_at</code></td>\n<td>timestamp</td>\n<td>–</td>\n<td>Quand oublier cette mémoire</td>\n</tr>\n<tr>\n<td><code>mind_id</code></td>\n<td>string</td>\n<td>auto</td>\n<td>Quel mind possède ceci</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>timestamp</td>\n<td>auto</td>\n<td>Premier stockage</td>\n</tr>\n<tr>\n<td><code>updated_at</code></td>\n<td>timestamp</td>\n<td>auto</td>\n<td>Dernière modification</td>\n</tr>\n</tbody></table>\n<h2>Catégories</h2>\n<p>Huit catégories couvrent les cas d&#39;usage courants des agents LLM :</p>\n<table>\n<thead>\n<tr>\n<th>Catégorie</th>\n<th>Rôle</th>\n<th>Exemple de contenu</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>identity</code></td>\n<td>Qui est l&#39;utilisateur</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>Préférences utilisateur</td>\n<td>&quot;Prefers concise technical responses&quot;</td>\n</tr>\n<tr>\n<td><code>fact</code></td>\n<td>Faits vérifiables</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>Statut de projet</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>Compétences de l&#39;utilisateur</td>\n<td>&quot;Advanced Python, 10+ years&quot;</td>\n</tr>\n<tr>\n<td><code>mistake</code></td>\n<td>Erreurs passées</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>Contexte de session</td>\n<td>&quot;Currently reviewing PR #42&quot;</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>Notes diverses</td>\n<td>&quot;Try Redis for caching next sprint&quot;</td>\n</tr>\n</tbody></table>\n<h2>Clés : identifiants stables</h2>\n<p>Le champ <code>key</code> est critique — c&#39;est ainsi que vous mettez à jour les mémoires sans\ncréer de doublons.</p>\n<pre><code class=\"hljs language-python\"><span class=\"hljs-comment\"># Premier stockage</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\"># Mise à jour avec la même clé (écrase, ne duplique pas)</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>Règles de clé :</strong></p>\n<ul>\n<li>Doit être unique dans (catégorie, mind)</li>\n<li>Utilisez <code>snake_case</code></li>\n<li>Préfixez avec la catégorie pour plus de clarté : <code>preference_communication</code>, <code>mistake_npm_version</code></li>\n<li>Gardez-la stable — ne changez pas les clés après création</li>\n</ul>\n<h2>Tags : pour la recherche</h2>\n<p>Les tags permettent le filtrage et la recherche rapides :</p>\n<pre><code class=\"hljs language-bash\"><span class=\"hljs-comment\"># Trouver toutes les mémoires avec le tag &quot;docker&quot;</span>\nGET /memory/by-tag?tag=docker\n\n<span class=\"hljs-comment\"># Recherche FTS5 dans un sous-ensemble tagué</span>\nGET /memory/search?q=swarm&amp;tag=docker</code></pre><p><strong>Bonnes pratiques de tag :</strong></p>\n<ul>\n<li>2-5 tags par mémoire (ne pas sur-tagger)</li>\n<li>Minuscules pour la cohérence</li>\n<li>Utilisez des noms de projet, sujets, technologies</li>\n<li>Les tags sont insensibles à la casse</li>\n</ul>\n<h2>Niveaux de priorité</h2>\n<table>\n<thead>\n<tr>\n<th>Priorité</th>\n<th>Quand l&#39;utiliser</th>\n<th>Comportement de rappel</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>critical</code></td>\n<td>Identité, juridique, irréversible</td>\n<td>Toujours en haut du rappel</td>\n</tr>\n<tr>\n<td><code>high</code></td>\n<td>Projets actifs, préférences clés</td>\n<td>Proéminent dans le rappel</td>\n</tr>\n<tr>\n<td><code>normal</code></td>\n<td>La plupart des mémoires (par défaut)</td>\n<td>Ordre de rappel standard</td>\n</tr>\n<tr>\n<td><code>low</code></td>\n<td>Éphémère, utile à savoir</td>\n<td>Peut être résumé</td>\n</tr>\n</tbody></table>\n<p><code>/memory/recall</code> trie par priorité (critical d&#39;abord), puis par récence.</p>\n<h2>Source : User vs Agent</h2>\n<p>Les mémoires sont marquées avec <code>source</code> :</p>\n<ul>\n<li><code>user</code> — stockée par un humain (via JWT ou interface humaine)</li>\n<li><code>agent</code> — stockée par un agent LLM (via Mind Key)</li>\n</ul>\n<p>Cela affecte :</p>\n<ul>\n<li><strong>Vérification</strong> : les mémoires <code>user</code> sont auto-vérifiées, les mémoires <code>agent</code> ne le sont pas</li>\n<li><strong>Confiance</strong> : <code>user</code> par défaut à 1.0, <code>agent</code> à 0.7</li>\n<li><strong>Rappel</strong> : <code>/memory/recall</code> marque les mémoires non vérifiées avec « (unverified) »</li>\n</ul>\n<div class=\"callout callout-note\">Traitez les mémoires `agent` avec un scepticisme approprié. Elles peuvent être\ndéduites ou supposées plutôt que directement énoncées par l'utilisateur.</div><h2>Vérification</h2>\n<p>Le drapeau <code>verified</code> indique qu&#39;un humain a confirmé la mémoire :</p>\n<ul>\n<li>Mémoires <code>user</code> : auto-vérifiées (<code>true</code>)</li>\n<li>Mémoires <code>agent</code> : non vérifiées par défaut (<code>false</code>)</li>\n</ul>\n<p>Vérifiez les mémoires 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\">La vérification nécessite un JWT (auth humaine), pas une Mind Key (auth agent).\nCela garantit que seuls les humains peuvent marquer des mémoires comme vérifiées.</div><h2>Confiance</h2>\n<p>Le champ <code>confidence</code> (0.0 à 1.0) indique la fiabilité de la mémoire :</p>\n<ul>\n<li>1.0 — directement énoncée par l&#39;utilisateur</li>\n<li>0.7 — déduite par l&#39;agent</li>\n<li>0.5 — incertaine, nécessite vérification</li>\n<li>0.0 — explicitement doutée</li>\n</ul>\n<p>Définissez la confiance lors du stockage :</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>Expiration</h2>\n<p>Définissez <code>expires_at</code> pour les mémoires sensibles au temps :</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>Les mémoires expirées ne sont pas renvoyées par <code>/memory/recall</code> (mais existent\ntoujours en base). Utilisez <code>/memory/expiring?within=7d</code> pour voir les mémoires\nexpirant bientôt.</p>\n<h2>Cycle de vie d&#39;une mémoire</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>Comportement de rappel</h2>\n<p><code>GET /memory/recall</code> renvoie un résumé en texte brut optimisé pour le contexte 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>Trié par priorité (critical → low), puis par récence</li>\n<li>Mémoires non vérifiées marquées avec <code>[unverified]</code></li>\n<li>Tags inclus pour le contexte</li>\n<li>Texte brut (pas d&#39;analyse JSON nécessaire)</li>\n</ul>\n<h2>Prochaines étapes</h2>\n<ul>\n<li><a href=\"/docs/api/memory\">API Memory</a></li>\n<li><a href=\"/docs/guides/memory-best-practices\">Bonnes pratiques mémoire</a></li>\n<li><a href=\"/docs/concepts/fts5-search\">Recherche 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"]}