{"title":"Démarrage rapide pour les agents LLM","slug":"quick-start-llm","category":"getting-started","summary":"En 3 appels d'API : rappeler toutes les mémoires, en stocker une nouvelle, rechercher. Le workflow LLM essentiel.","audience":["llm"],"tags":["llm","agent","quickstart","memory"],"difficulty":"beginner","updated":"2026-06-27","word_count":408,"read_minutes":2,"llm_context":"Base URL: https://synapse.schaefer.zone\nAuth: Authorization: Bearer YOUR_MIND_KEY (header) OR ?key=YOUR_MIND_KEY (query)\nALWAYS call /memory/recall at the start of every session.\nWichtigste Befehle: GET /memory/recall, POST /memory, GET /memory/search?q=...\nCategories: identity, preference, fact, project, skill, mistake, context, note, credentials\nPriorities: low, normal, high, critical\nFTS5 search: multiple words = AND, \"phrases\" in quotes, prefix* for prefix search\n","lang":"fr","translated":true,"requested_lang":"fr","content_markdown":"\n# Démarrage rapide pour les agents LLM\n\nVous perdez toute mémoire entre les sessions. Synapse est votre cerveau externe. Ce\nguide présente les trois appels d'API essentiels que tout agent LLM doit connaître.\n\n> [!CRITICAL]\n> Appelez `GET /memory/recall` au DÉBUT de CHAQUE session.\n> Sans cet appel, vous n'avez aucune mémoire de qui est l'utilisateur, de ce que vous\n> avez promis, ou de ce sur quoi vous travailliez la dernière fois.\n\n## Étape 1 : rappeler toutes les mémoires (TOUJOURS EN PREMIER)\n\n```\nGET /memory/recall\nAuthorization: Bearer YOUR_MIND_KEY\n```\n\nRenvoie un résumé structuré en texte brut de toutes les mémoires stockées. Analysez-le\npour reconstruire votre modèle mental de l'utilisateur, ses projets et les\ninteractions passées.\n\nExemple de réponse :\n\n```\nMind: Michael's Mind\nMemories: 12 total (10 verified)\n\n[001] identity (CRITICAL)\n  user_name\n  Michael Schäfer\n  Tags: person, identity\n\n[002] preference (HIGH)\n  communication_style\n  Prefers concise technical responses, no fluff\n  Tags: communication, preference\n\n[003] project (HIGH)\n  project_synapse\n  Synapse v1.5.0 deployed on vps1.schaefer.zone. Admin panel at /admin.\n  Tags: synapse, deployment\n  ...\n```\n\n## Étape 2 : stocker une nouvelle mémoire\n\nQuand vous apprenez quelque chose qui mérite d'être retenu :\n\n```\nPOST /memory\nAuthorization: Bearer YOUR_MIND_KEY\nContent-Type: application/json\n\n{\n  \"category\": \"fact\",\n  \"key\": \"user_name\",\n  \"content\": \"The user's name is Michael Schäfer\",\n  \"tags\": [\"person\", \"identity\"],\n  \"priority\": \"critical\"\n}\n```\n\n**Catégories :** `identity`, `preference`, `fact`, `project`, `skill`, `mistake`, `context`, `note`, `credentials`\n\n**Priorités :** `low`, `normal`, `high`, `critical`\n\n> [!TIP]\n> Incluez toujours un champ `key` — un identifiant court pour la mémoire. Cela vous\n> permet de mettre à jour la même mémoire plus tard en re-POSTant avec la même clé.\n\n## Étape 3 : rechercher une mémoire spécifique\n\n```\nGET /memory/search?q=Docker+Swarm\nAuthorization: Bearer YOUR_MIND_KEY\n```\n\n> [!TIP]\n> Syntaxe FTS5 : plusieurs mots = recherche AND. Phrases entre guillemets :\n> `\"docker swarm\"`. Recherche par préfixe : `docker*`. Booléen : `docker OR kubernetes`.\n\n## Outils ouverts (sans en-têtes d'auth)\n\nSi votre outil ne peut qu'ouvrir des URLs (pas d'en-têtes personnalisés), utilisez le\nparamètre `?key=` :\n\n```\nGET /memory/recall?key=YOUR_MIND_KEY\nPOST /memory?key=YOUR_MIND_KEY (+ JSON body)\nGET /memory/search?key=YOUR_MIND_KEY&q=suchbegriff\n```\n\n> [!WARNING]\n> `?key=` est limité à 60 requêtes/minute. L'en-tête Bearer n'a pas de limite de\n> débit. Utilisez l'en-tête Bearer chaque fois que possible.\n\n## Workflow complet de session\n\n1. **Début de session :** `GET /memory/recall` — charger toutes les mémoires\n2. **Pendant le travail :** `GET /memory/search?q=...` — trouver des faits spécifiques\n3. **Sur nouvelle info :** `POST /memory` — la stocker (avec catégorie, clé, tags, priorité)\n4. **Périodiquement :** `GET /chat/poll` — vérifier les messages humains\n5. **Fin de session :** Stocker tout apprentissage final via `POST /memory`\n\n## Schémas courants\n\n### Mettre à jour une mémoire existante\n\nPOST `/memory` avec la même `category` et `key` — la mémoire existante est mise à\njour, pas dupliquée.\n\n### Stocker un statut de projet\n\n```json\n{\n  \"category\": \"project\",\n  \"key\": \"project_synapse_status\",\n  \"content\": \"Synapse v1.5.0 deployed. Next: v1.6.0 with docs system. CI green.\",\n  \"tags\": [\"synapse\", \"deployment\", \"status\"],\n  \"priority\": \"high\"\n}\n```\n\n### Enregistrer une erreur (pour ne pas la répéter)\n\n```json\n{\n  \"category\": \"mistake\",\n  \"key\": \"mistake_npm_version_bump\",\n  \"content\": \"Always bump package.json version after changes — npm publish fails otherwise.\",\n  \"tags\": [\"npm\", \"ci\", \"deployment\"],\n  \"priority\": \"high\"\n}\n```\n\n### Vérifier les messages humains\n\n```\nGET /chat/poll\nAuthorization: Bearer YOUR_MIND_KEY\n```\n\nRenvoie les messages non lus de l'humain. Répondez avec :\n\n```\nPOST /chat/reply\nAuthorization: Bearer YOUR_MIND_KEY\nContent-Type: application/json\n\n{\"content\": \"Got it! Working on it now.\"}\n```\n\n## Prochaines étapes\n\n- [Authentification](/docs/getting-started/authentication) — Mind Key vs JWT\n- [Référence API Memory](/docs/api/memory) — tous les 22 endpoints mémoire\n- [API Chat](/docs/api/chat) — communication asynchrone avec les humains\n- [Cookbook LLM](/docs/llm-cookbook/session-start-pattern) — schémas pratiques\n","content_html":"<h1>Démarrage rapide pour les agents LLM</h1>\n<p>Vous perdez toute mémoire entre les sessions. Synapse est votre cerveau externe. Ce\nguide présente les trois appels d&#39;API essentiels que tout agent LLM doit connaître.</p>\n<div class=\"callout callout-critical\">Appelez `GET /memory/recall` au DÉBUT de CHAQUE session.\nSans cet appel, vous n'avez aucune mémoire de qui est l'utilisateur, de ce que vous\navez promis, ou de ce sur quoi vous travailliez la dernière fois.</div><h2>Étape 1 : rappeler toutes les mémoires (TOUJOURS EN PREMIER)</h2>\n<pre><code class=\"hljs language-plaintext\">GET /memory/recall\nAuthorization: Bearer YOUR_MIND_KEY</code></pre><p>Renvoie un résumé structuré en texte brut de toutes les mémoires stockées. Analysez-le\npour reconstruire votre modèle mental de l&#39;utilisateur, ses projets et les\ninteractions passées.</p>\n<p>Exemple de réponse :</p>\n<pre><code class=\"hljs language-plaintext\">Mind: Michael&#x27;s Mind\nMemories: 12 total (10 verified)\n\n[001] identity (CRITICAL)\n  user_name\n  Michael Schäfer\n  Tags: person, identity\n\n[002] preference (HIGH)\n  communication_style\n  Prefers concise technical responses, no fluff\n  Tags: communication, preference\n\n[003] project (HIGH)\n  project_synapse\n  Synapse v1.5.0 deployed on vps1.schaefer.zone. Admin panel at /admin.\n  Tags: synapse, deployment\n  ...</code></pre><h2>Étape 2 : stocker une nouvelle mémoire</h2>\n<p>Quand vous apprenez quelque chose qui mérite d&#39;être retenu :</p>\n<pre><code class=\"hljs language-plaintext\">POST /memory\nAuthorization: Bearer YOUR_MIND_KEY\nContent-Type: application/json\n\n{\n  &quot;category&quot;: &quot;fact&quot;,\n  &quot;key&quot;: &quot;user_name&quot;,\n  &quot;content&quot;: &quot;The user&#x27;s name is Michael Schäfer&quot;,\n  &quot;tags&quot;: [&quot;person&quot;, &quot;identity&quot;],\n  &quot;priority&quot;: &quot;critical&quot;\n}</code></pre><p><strong>Catégories :</strong> <code>identity</code>, <code>preference</code>, <code>fact</code>, <code>project</code>, <code>skill</code>, <code>mistake</code>, <code>context</code>, <code>note</code>, <code>credentials</code></p>\n<p><strong>Priorités :</strong> <code>low</code>, <code>normal</code>, <code>high</code>, <code>critical</code></p>\n<div class=\"callout callout-ok\">Incluez toujours un champ `key` — un identifiant court pour la mémoire. Cela vous\npermet de mettre à jour la même mémoire plus tard en re-POSTant avec la même clé.</div><h2>Étape 3 : rechercher une mémoire spécifique</h2>\n<pre><code class=\"hljs language-plaintext\">GET /memory/search?q=Docker+Swarm\nAuthorization: Bearer YOUR_MIND_KEY</code></pre><div class=\"callout callout-ok\">Syntaxe FTS5 : plusieurs mots = recherche AND. Phrases entre guillemets :\n`\"docker swarm\"`. Recherche par préfixe : `docker*`. Booléen : `docker OR kubernetes`.</div><h2>Outils ouverts (sans en-têtes d&#39;auth)</h2>\n<p>Si votre outil ne peut qu&#39;ouvrir des URLs (pas d&#39;en-têtes personnalisés), utilisez le\nparamètre <code>?key=</code> :</p>\n<pre><code class=\"hljs language-plaintext\">GET /memory/recall?key=YOUR_MIND_KEY\nPOST /memory?key=YOUR_MIND_KEY (+ JSON body)\nGET /memory/search?key=YOUR_MIND_KEY&amp;q=suchbegriff</code></pre><div class=\"callout callout-warn\">`?key=` est limité à 60 requêtes/minute. L'en-tête Bearer n'a pas de limite de\ndébit. Utilisez l'en-tête Bearer chaque fois que possible.</div><h2>Workflow complet de session</h2>\n<ol>\n<li><strong>Début de session :</strong> <code>GET /memory/recall</code> — charger toutes les mémoires</li>\n<li><strong>Pendant le travail :</strong> <code>GET /memory/search?q=...</code> — trouver des faits spécifiques</li>\n<li><strong>Sur nouvelle info :</strong> <code>POST /memory</code> — la stocker (avec catégorie, clé, tags, priorité)</li>\n<li><strong>Périodiquement :</strong> <code>GET /chat/poll</code> — vérifier les messages humains</li>\n<li><strong>Fin de session :</strong> Stocker tout apprentissage final via <code>POST /memory</code></li>\n</ol>\n<h2>Schémas courants</h2>\n<h3>Mettre à jour une mémoire existante</h3>\n<p>POST <code>/memory</code> avec la même <code>category</code> et <code>key</code> — la mémoire existante est mise à\njour, pas dupliquée.</p>\n<h3>Stocker un statut de projet</h3>\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;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. Next: v1.6.0 with docs system. 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;status&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>\n<span class=\"hljs-punctuation\">}</span></code></pre><h3>Enregistrer une erreur (pour ne pas la répéter)</h3>\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;mistake&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;mistake_npm_version_bump&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;Always bump package.json version after changes — npm publish fails otherwise.&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;npm&quot;</span><span class=\"hljs-punctuation\">,</span> <span class=\"hljs-string\">&quot;ci&quot;</span><span class=\"hljs-punctuation\">,</span> <span class=\"hljs-string\">&quot;deployment&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>\n<span class=\"hljs-punctuation\">}</span></code></pre><h3>Vérifier les messages humains</h3>\n<pre><code class=\"hljs language-plaintext\">GET /chat/poll\nAuthorization: Bearer YOUR_MIND_KEY</code></pre><p>Renvoie les messages non lus de l&#39;humain. Répondez avec :</p>\n<pre><code class=\"hljs language-plaintext\">POST /chat/reply\nAuthorization: Bearer YOUR_MIND_KEY\nContent-Type: application/json\n\n{&quot;content&quot;: &quot;Got it! Working on it now.&quot;}</code></pre><h2>Prochaines étapes</h2>\n<ul>\n<li><a href=\"/docs/getting-started/authentication\">Authentification</a> — Mind Key vs JWT</li>\n<li><a href=\"/docs/api/memory\">Référence API Memory</a> — tous les 22 endpoints mémoire</li>\n<li><a href=\"/docs/api/chat\">API Chat</a> — communication asynchrone avec les humains</li>\n<li><a href=\"/docs/llm-cookbook/session-start-pattern\">Cookbook LLM</a> — schémas pratiques</li>\n</ul>\n","urls":{"html":"/docs/getting-started/quick-start-llm","text":"/docs/getting-started/quick-start-llm?format=text","json":"/docs/getting-started/quick-start-llm?format=json","llm":"/docs/getting-started/quick-start-llm?format=llm"},"translations_available":["en","zh","hi","es","fr","ar","pt","ru","ja","de","it","ko","nl","pl","tr","sv","vi","th","id","uk"]}