{"title":"Quick Start for LLM Agents","slug":"quick-start-llm","category":"getting-started","summary":"In 3 API calls: recall all memories, store a new one, search. The essential LLM workflow.","audience":["llm"],"tags":["llm","agent","quickstart","memory"],"difficulty":"beginner","updated":"2026-06-27","word_count":353,"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":"en","translated":true,"requested_lang":"en","content_markdown":"\n# Quick Start for LLM Agents\n\nYou lose all memory between sessions. Synapse is your external brain. This guide\nshows the three essential API calls every LLM agent must know.\n\n> [!CRITICAL]\n> Call `GET /memory/recall` at the START of EVERY session.\n> Without this call, you have no memory of who the user is, what you've promised,\n> or what you were working on last time.\n\n## Step 1: Recall All Memories (ALWAYS FIRST)\n\n```\nGET /memory/recall\nAuthorization: Bearer YOUR_MIND_KEY\n```\n\nReturns a structured plain-text summary of all stored memories. Parse this to\nrebuild your mental model of the user, their projects, and past interactions.\n\nExample response:\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## Step 2: Store a New Memory\n\nWhen you learn something worth remembering:\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**Categories:** `identity`, `preference`, `fact`, `project`, `skill`, `mistake`, `context`, `note`, `credentials`\n\n**Priorities:** `low`, `normal`, `high`, `critical`\n\n> [!TIP]\n> Always include a `key` field — a short identifier for the memory. This lets you\n> update the same memory later by re-POSTing with the same key.\n\n## Step 3: Search for a Specific Memory\n\n```\nGET /memory/search?q=Docker+Swarm\nAuthorization: Bearer YOUR_MIND_KEY\n```\n\n> [!TIP]\n> FTS5 syntax: multiple words = AND search. Phrases in quotes: `\"docker swarm\"`.\n> Prefix search: `docker*`. Boolean: `docker OR kubernetes`.\n\n## Open Tools (No Auth Headers)\n\nIf your tool can only open URLs (no custom headers), use the `?key=` parameter:\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=` is rate-limited to 60 requests/minute. Bearer header has no rate limit.\n> Use Bearer header whenever possible.\n\n## Complete Session Workflow\n\n1. **Session start:** `GET /memory/recall` — load all memories\n2. **During work:** `GET /memory/search?q=...` — find specific facts\n3. **On new info:** `POST /memory` — store it (with category, key, tags, priority)\n4. **Periodically:** `GET /chat/poll` — check for human messages\n5. **Session end:** Store any final learnings via `POST /memory`\n\n## Common Patterns\n\n### Update an existing memory\n\nPOST `/memory` with the same `category` and `key` — the existing memory is\nupdated, not duplicated.\n\n### Store a project status\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### Record a mistake (so you don't repeat it)\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### Check for human messages\n\n```\nGET /chat/poll\nAuthorization: Bearer YOUR_MIND_KEY\n```\n\nReturns unread messages from the human. Reply with:\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## Next Steps\n\n- [Authentication](/docs/getting-started/authentication) — Mind Key vs JWT\n- [Memory API reference](/docs/api/memory) — all 22 memory endpoints\n- [Chat API](/docs/api/chat) — async communication with humans\n- [LLM Cookbook](/docs/llm-cookbook/session-start-pattern) — practical patterns\n","content_html":"<h1>Quick Start for LLM Agents</h1>\n<p>You lose all memory between sessions. Synapse is your external brain. This guide\nshows the three essential API calls every LLM agent must know.</p>\n<div class=\"callout callout-critical\">Call `GET /memory/recall` at the START of EVERY session.\nWithout this call, you have no memory of who the user is, what you've promised,\nor what you were working on last time.</div><h2>Step 1: Recall All Memories (ALWAYS FIRST)</h2>\n<pre><code class=\"hljs language-plaintext\">GET /memory/recall\nAuthorization: Bearer YOUR_MIND_KEY</code></pre><p>Returns a structured plain-text summary of all stored memories. Parse this to\nrebuild your mental model of the user, their projects, and past interactions.</p>\n<p>Example response:</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>Step 2: Store a New Memory</h2>\n<p>When you learn something worth remembering:</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>Categories:</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>Priorities:</strong> <code>low</code>, <code>normal</code>, <code>high</code>, <code>critical</code></p>\n<div class=\"callout callout-ok\">Always include a `key` field — a short identifier for the memory. This lets you\nupdate the same memory later by re-POSTing with the same key.</div><h2>Step 3: Search for a Specific Memory</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\">FTS5 syntax: multiple words = AND search. Phrases in quotes: `\"docker swarm\"`.\nPrefix search: `docker*`. Boolean: `docker OR kubernetes`.</div><h2>Open Tools (No Auth Headers)</h2>\n<p>If your tool can only open URLs (no custom headers), use the <code>?key=</code> parameter:</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=` is rate-limited to 60 requests/minute. Bearer header has no rate limit.\nUse Bearer header whenever possible.</div><h2>Complete Session Workflow</h2>\n<ol>\n<li><strong>Session start:</strong> <code>GET /memory/recall</code> — load all memories</li>\n<li><strong>During work:</strong> <code>GET /memory/search?q=...</code> — find specific facts</li>\n<li><strong>On new info:</strong> <code>POST /memory</code> — store it (with category, key, tags, priority)</li>\n<li><strong>Periodically:</strong> <code>GET /chat/poll</code> — check for human messages</li>\n<li><strong>Session end:</strong> Store any final learnings via <code>POST /memory</code></li>\n</ol>\n<h2>Common Patterns</h2>\n<h3>Update an existing memory</h3>\n<p>POST <code>/memory</code> with the same <code>category</code> and <code>key</code> — the existing memory is\nupdated, not duplicated.</p>\n<h3>Store a project status</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>Record a mistake (so you don&#39;t repeat it)</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>Check for human messages</h3>\n<pre><code class=\"hljs language-plaintext\">GET /chat/poll\nAuthorization: Bearer YOUR_MIND_KEY</code></pre><p>Returns unread messages from the human. Reply with:</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>Next Steps</h2>\n<ul>\n<li><a href=\"/docs/getting-started/authentication\">Authentication</a> — Mind Key vs JWT</li>\n<li><a href=\"/docs/api/memory\">Memory API reference</a> — all 22 memory endpoints</li>\n<li><a href=\"/docs/api/chat\">Chat API</a> — async communication with humans</li>\n<li><a href=\"/docs/llm-cookbook/session-start-pattern\">LLM Cookbook</a> — practical patterns</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"]}