{"title":"मेमोरी मॉडल","slug":"memory-model","category":"concepts","summary":"मेमोरीज़ कैसे संरचित हैं — श्रेणियाँ, कुंजी, टैग्स, प्राथमिकताएँ, स्रोत, सत्यापन।","audience":["human","llm"],"tags":["concept","memory","model","structure"],"difficulty":"intermediate","updated":"2026-06-27","word_count":784,"read_minutes":4,"lang":"hi","translated":true,"requested_lang":"hi","content_markdown":"\n# मेमोरी मॉडल\n\nSynapse का मेमोरी मॉडल LLM एजेंट्स के लिए डिज़ाइन किया गया है — विश्वसनीय रिकॉल के लिए पर्याप्त संरचित, किसी भी डोमेन के लिए पर्याप्त लचीला।\n\n## मेमोरी शरीर रचना\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## फ़ील्ड्स\n\n| फ़ील्ड | प्रकार | आवश्यक | विवरण |\n|-------|------|----------|-------------|\n| `id` | string | auto | अद्वितीय ID (mem_xxx) |\n| `category` | enum | ✅ | 8 श्रेणियों में से एक |\n| `key` | string | ✅ | स्थिर पहचानकर्ता (अपडेट के लिए उपयोग) |\n| `content` | string | ✅ | मेमोरी सामग्री (कोई भी टेक्स्ट) |\n| `tags` | string[] | – | खोज और फ़िल्टरिंग के लिए |\n| `priority` | enum | – | low, normal, high, critical (डिफ़ॉल्ट: normal) |\n| `source` | enum | auto | user, agent (किसने स्टोर किया) |\n| `verified` | bool | auto | क्या किसी मानव ने इसे सत्यापित किया? |\n| `confidence` | float | – | 0.0 से 1.0 (डिफ़ॉल्ट: user के लिए 1.0, agent के लिए 0.7) |\n| `expires_at` | timestamp | – | यह मेमोरी कब भूलनी है |\n| `mind_id` | string | auto | कौन सा mind इसका मालिक है |\n| `created_at` | timestamp | auto | पहले स्टोर किया गया |\n| `updated_at` | timestamp | auto | अंतिम बार संशोधित |\n\n## श्रेणियाँ\n\nआठ श्रेणियाँ सामान्य LLM एजेंट उपयोग के मामलों को कवर करती हैं:\n\n| श्रेणी | उद्देश्य | उदाहरण सामग्री |\n|----------|---------|-----------------|\n| `identity` | उपयोगकर्ता कौन है | \"User is Michael Schäfer, software engineer in Berlin\" |\n| `preference` | उपयोगकर्ता प्राथमिकताएँ | \"Prefers concise technical responses\" |\n| `fact` | सत्यापित योग्य तथ्य | \"Office is in Berlin, timezone Europe/Berlin\" |\n| `project` | परियोजना स्थिति | \"Synapse v1.5.0 deployed, working on v1.6.0 docs\" |\n| `skill` | उपयोगकर्ता के कौशल | \"Advanced Python, 10+ years\" |\n| `mistake` | पिछली त्रुटियाँ | \"Forgot to bump npm version — CI failed\" |\n| `context` | सत्र संदर्भ | \"Currently reviewing PR #42\" |\n| `note` | विविध नोट्स | \"Try Redis for caching next sprint\" |\n\n## कुंजी: स्थिर पहचानकर्ता\n\n`key` फ़ील्ड महत्वपूर्ण है — यह डुप्लिकेट बनाए बिना मेमोरीज़ अपडेट करने का तरीका है।\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**कुंजी नियम:**\n\n- (category, mind) के भीतर अद्वितीय होनी चाहिए\n- `snake_case` का उपयोग करें\n- स्पष्टता के लिए श्रेणी के साथ उपसर्ग: `preference_communication`, `mistake_npm_version`\n- स्थिर रखें — निर्माण के बाद कुंजी न बदलें\n\n## टैग्स: खोज के लिए\n\nटैग्स तेज़ फ़िल्टरिंग और खोज सक्षम बनाते हैं:\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**टैग सर्वोत्तम प्रथाएँ:**\n\n- प्रति मेमोरी 2-5 टैग्स (अधिक टैग न करें)\n- निरंतरता के लिए लोअरकेस\n- परियोजना नाम, विषय, तकनीकों का उपयोग करें\n- टैग्स केस-असंवेदनशील हैं\n\n## प्राथमिकता स्तर\n\n| प्राथमिकता | कब उपयोग करें | रिकॉल व्यवहार |\n|----------|-------------|-----------------|\n| `critical` | पहचान, कानूनी, अपरिवर्तनीय | हमेशा रिकॉल के शीर्ष पर |\n| `high` | सक्रिय परियोजनाएँ, मुख्य प्राथमिकताएँ | रिकॉल में प्रमुख |\n| `normal` | अधिकांश मेमोरीज़ (डिफ़ॉल्ट) | मानक रिकॉल क्रम |\n| `low` | क्षणिक, जानना-अच्छा | सारांशित हो सकता है |\n\n`/memory/recall` प्राथमिकता द्वारा (critical पहले), फिर नवीनता द्वारा क्रमबद्ध करता है।\n\n## स्रोत: User बनाम Agent\n\nमेमोरीज़ को `source` के साथ टैग किया जाता है:\n\n- `user` — किसी मानव द्वारा स्टोर किया गया (JWT या human UI के माध्यम से)\n- `agent` — किसी LLM एजेंट द्वारा स्टोर किया गया (Mind Key के माध्यम से)\n\nयह प्रभावित करता है:\n\n- **सत्यापन**: `user` मेमोरीज़ ऑटो-सत्यापित हैं, `agent` मेमोरीज़ नहीं\n- **विश्वास्यता**: `user` का डिफ़ॉल्ट 1.0, `agent` का 0.7\n- **रिकॉल**: `/memory/recall` असत्यापित मेमोरीज़ को \"(unverified)\" से चिह्नित करता है\n\n> [!NOTE]\n> `agent`-स्रोत मेमोरीज़ के प्रति उचित संदेह रखें। ये सीधे उपयोगकर्ता द्वारा बताई गई नहीं, बल्कि अनुमानित या मानी गई हो सकती हैं।\n\n## सत्यापन\n\n`verified` फ़्लैग दर्शाता है कि किसी मानव ने मेमोरी की पुष्टि की है:\n\n- `user` मेमोरीज़: ऑटो-सत्यापित (`true`)\n- `agent` मेमोरीज़: डिफ़ॉल्ट असत्यापित (`false`)\n\nमेमोरीज़ इसके माध्यम से सत्यापित करें:\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> सत्यापन के लिए Mind Key (एजेंट प्रमाणीकरण) नहीं, JWT (मानव प्रमाणीकरण) आवश्यक है। यह सुनिश्चित करता है कि केवल मानव ही मेमोरीज़ को सत्यापित के रूप में चिह्नित कर सकें।\n\n## विश्वास्यता\n\n`confidence` फ़ील्ड (0.0 से 1.0) दर्शाता है कि मेमोरी कितनी विश्वसनीय है:\n\n- 1.0 — उपयोगकर्ता द्वारा सीधे बताई गई\n- 0.7 — एजेंट द्वारा अनुमानित\n- 0.5 — अनिश्चित, सत्यापन चाहिए\n- 0.0 — स्पष्ट रूप से संदिग्ध\n\nस्टोर करते समय विश्वास्यता सेट करें:\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## समाप्ति\n\nसमय-संवेदनशील मेमोरीज़ के लिए `expires_at` सेट करें:\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\nसमाप्त मेमोरीज़ `/memory/recall` द्वारा लौटाई नहीं जातीं (लेकिन DB में अभी भी मौजूद हैं)।\nजल्द ही समाप्त होने वाली मेमोरीज़ देखने के लिए `/memory/expiring?within=7d` का उपयोग करें।\n\n## मेमोरी जीवनचक्र\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## रिकॉल व्यवहार\n\n`GET /memory/recall` 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- प्राथमिकता द्वारा क्रमबद्ध (critical → low), फिर नवीनता द्वारा\n- असत्यापित मेमोरीज़ `[unverified]` से चिह्नित\n- संदर्भ के लिए टैग्स शामिल\n- सादा टेक्स्ट (कोई JSON पार्सिंग आवश्यक नहीं)\n\n## अगले कदम\n\n- [Memory API](/docs/api/memory)\n- [मेमोरी सर्वोत्तम प्रथाएँ](/docs/guides/memory-best-practices)\n- [FTS5 Search](/docs/concepts/fts5-search)\n","content_html":"<h1>मेमोरी मॉडल</h1>\n<p>Synapse का मेमोरी मॉडल LLM एजेंट्स के लिए डिज़ाइन किया गया है — विश्वसनीय रिकॉल के लिए पर्याप्त संरचित, किसी भी डोमेन के लिए पर्याप्त लचीला।</p>\n<h2>मेमोरी शरीर रचना</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>फ़ील्ड्स</h2>\n<table>\n<thead>\n<tr>\n<th>फ़ील्ड</th>\n<th>प्रकार</th>\n<th>आवश्यक</th>\n<th>विवरण</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>id</code></td>\n<td>string</td>\n<td>auto</td>\n<td>अद्वितीय ID (mem_xxx)</td>\n</tr>\n<tr>\n<td><code>category</code></td>\n<td>enum</td>\n<td>✅</td>\n<td>8 श्रेणियों में से एक</td>\n</tr>\n<tr>\n<td><code>key</code></td>\n<td>string</td>\n<td>✅</td>\n<td>स्थिर पहचानकर्ता (अपडेट के लिए उपयोग)</td>\n</tr>\n<tr>\n<td><code>content</code></td>\n<td>string</td>\n<td>✅</td>\n<td>मेमोरी सामग्री (कोई भी टेक्स्ट)</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>string[]</td>\n<td>–</td>\n<td>खोज और फ़िल्टरिंग के लिए</td>\n</tr>\n<tr>\n<td><code>priority</code></td>\n<td>enum</td>\n<td>–</td>\n<td>low, normal, high, critical (डिफ़ॉल्ट: normal)</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>enum</td>\n<td>auto</td>\n<td>user, agent (किसने स्टोर किया)</td>\n</tr>\n<tr>\n<td><code>verified</code></td>\n<td>bool</td>\n<td>auto</td>\n<td>क्या किसी मानव ने इसे सत्यापित किया?</td>\n</tr>\n<tr>\n<td><code>confidence</code></td>\n<td>float</td>\n<td>–</td>\n<td>0.0 से 1.0 (डिफ़ॉल्ट: user के लिए 1.0, agent के लिए 0.7)</td>\n</tr>\n<tr>\n<td><code>expires_at</code></td>\n<td>timestamp</td>\n<td>–</td>\n<td>यह मेमोरी कब भूलनी है</td>\n</tr>\n<tr>\n<td><code>mind_id</code></td>\n<td>string</td>\n<td>auto</td>\n<td>कौन सा mind इसका मालिक है</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>timestamp</td>\n<td>auto</td>\n<td>पहले स्टोर किया गया</td>\n</tr>\n<tr>\n<td><code>updated_at</code></td>\n<td>timestamp</td>\n<td>auto</td>\n<td>अंतिम बार संशोधित</td>\n</tr>\n</tbody></table>\n<h2>श्रेणियाँ</h2>\n<p>आठ श्रेणियाँ सामान्य LLM एजेंट उपयोग के मामलों को कवर करती हैं:</p>\n<table>\n<thead>\n<tr>\n<th>श्रेणी</th>\n<th>उद्देश्य</th>\n<th>उदाहरण सामग्री</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>identity</code></td>\n<td>उपयोगकर्ता कौन है</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>उपयोगकर्ता प्राथमिकताएँ</td>\n<td>&quot;Prefers concise technical responses&quot;</td>\n</tr>\n<tr>\n<td><code>fact</code></td>\n<td>सत्यापित योग्य तथ्य</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>परियोजना स्थिति</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>उपयोगकर्ता के कौशल</td>\n<td>&quot;Advanced Python, 10+ years&quot;</td>\n</tr>\n<tr>\n<td><code>mistake</code></td>\n<td>पिछली त्रुटियाँ</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>सत्र संदर्भ</td>\n<td>&quot;Currently reviewing PR #42&quot;</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>विविध नोट्स</td>\n<td>&quot;Try Redis for caching next sprint&quot;</td>\n</tr>\n</tbody></table>\n<h2>कुंजी: स्थिर पहचानकर्ता</h2>\n<p><code>key</code> फ़ील्ड महत्वपूर्ण है — यह डुप्लिकेट बनाए बिना मेमोरीज़ अपडेट करने का तरीका है।</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>कुंजी नियम:</strong></p>\n<ul>\n<li>(category, mind) के भीतर अद्वितीय होनी चाहिए</li>\n<li><code>snake_case</code> का उपयोग करें</li>\n<li>स्पष्टता के लिए श्रेणी के साथ उपसर्ग: <code>preference_communication</code>, <code>mistake_npm_version</code></li>\n<li>स्थिर रखें — निर्माण के बाद कुंजी न बदलें</li>\n</ul>\n<h2>टैग्स: खोज के लिए</h2>\n<p>टैग्स तेज़ फ़िल्टरिंग और खोज सक्षम बनाते हैं:</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>टैग सर्वोत्तम प्रथाएँ:</strong></p>\n<ul>\n<li>प्रति मेमोरी 2-5 टैग्स (अधिक टैग न करें)</li>\n<li>निरंतरता के लिए लोअरकेस</li>\n<li>परियोजना नाम, विषय, तकनीकों का उपयोग करें</li>\n<li>टैग्स केस-असंवेदनशील हैं</li>\n</ul>\n<h2>प्राथमिकता स्तर</h2>\n<table>\n<thead>\n<tr>\n<th>प्राथमिकता</th>\n<th>कब उपयोग करें</th>\n<th>रिकॉल व्यवहार</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>critical</code></td>\n<td>पहचान, कानूनी, अपरिवर्तनीय</td>\n<td>हमेशा रिकॉल के शीर्ष पर</td>\n</tr>\n<tr>\n<td><code>high</code></td>\n<td>सक्रिय परियोजनाएँ, मुख्य प्राथमिकताएँ</td>\n<td>रिकॉल में प्रमुख</td>\n</tr>\n<tr>\n<td><code>normal</code></td>\n<td>अधिकांश मेमोरीज़ (डिफ़ॉल्ट)</td>\n<td>मानक रिकॉल क्रम</td>\n</tr>\n<tr>\n<td><code>low</code></td>\n<td>क्षणिक, जानना-अच्छा</td>\n<td>सारांशित हो सकता है</td>\n</tr>\n</tbody></table>\n<p><code>/memory/recall</code> प्राथमिकता द्वारा (critical पहले), फिर नवीनता द्वारा क्रमबद्ध करता है।</p>\n<h2>स्रोत: User बनाम Agent</h2>\n<p>मेमोरीज़ को <code>source</code> के साथ टैग किया जाता है:</p>\n<ul>\n<li><code>user</code> — किसी मानव द्वारा स्टोर किया गया (JWT या human UI के माध्यम से)</li>\n<li><code>agent</code> — किसी LLM एजेंट द्वारा स्टोर किया गया (Mind Key के माध्यम से)</li>\n</ul>\n<p>यह प्रभावित करता है:</p>\n<ul>\n<li><strong>सत्यापन</strong>: <code>user</code> मेमोरीज़ ऑटो-सत्यापित हैं, <code>agent</code> मेमोरीज़ नहीं</li>\n<li><strong>विश्वास्यता</strong>: <code>user</code> का डिफ़ॉल्ट 1.0, <code>agent</code> का 0.7</li>\n<li><strong>रिकॉल</strong>: <code>/memory/recall</code> असत्यापित मेमोरीज़ को &quot;(unverified)&quot; से चिह्नित करता है</li>\n</ul>\n<div class=\"callout callout-note\">`agent`-स्रोत मेमोरीज़ के प्रति उचित संदेह रखें। ये सीधे उपयोगकर्ता द्वारा बताई गई नहीं, बल्कि अनुमानित या मानी गई हो सकती हैं।</div><h2>सत्यापन</h2>\n<p><code>verified</code> फ़्लैग दर्शाता है कि किसी मानव ने मेमोरी की पुष्टि की है:</p>\n<ul>\n<li><code>user</code> मेमोरीज़: ऑटो-सत्यापित (<code>true</code>)</li>\n<li><code>agent</code> मेमोरीज़: डिफ़ॉल्ट असत्यापित (<code>false</code>)</li>\n</ul>\n<p>मेमोरीज़ इसके माध्यम से सत्यापित करें:</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\">सत्यापन के लिए Mind Key (एजेंट प्रमाणीकरण) नहीं, JWT (मानव प्रमाणीकरण) आवश्यक है। यह सुनिश्चित करता है कि केवल मानव ही मेमोरीज़ को सत्यापित के रूप में चिह्नित कर सकें।</div><h2>विश्वास्यता</h2>\n<p><code>confidence</code> फ़ील्ड (0.0 से 1.0) दर्शाता है कि मेमोरी कितनी विश्वसनीय है:</p>\n<ul>\n<li>1.0 — उपयोगकर्ता द्वारा सीधे बताई गई</li>\n<li>0.7 — एजेंट द्वारा अनुमानित</li>\n<li>0.5 — अनिश्चित, सत्यापन चाहिए</li>\n<li>0.0 — स्पष्ट रूप से संदिग्ध</li>\n</ul>\n<p>स्टोर करते समय विश्वास्यता सेट करें:</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>समाप्ति</h2>\n<p>समय-संवेदनशील मेमोरीज़ के लिए <code>expires_at</code> सेट करें:</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>समाप्त मेमोरीज़ <code>/memory/recall</code> द्वारा लौटाई नहीं जातीं (लेकिन DB में अभी भी मौजूद हैं)।\nजल्द ही समाप्त होने वाली मेमोरीज़ देखने के लिए <code>/memory/expiring?within=7d</code> का उपयोग करें।</p>\n<h2>मेमोरी जीवनचक्र</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>रिकॉल व्यवहार</h2>\n<p><code>GET /memory/recall</code> 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>प्राथमिकता द्वारा क्रमबद्ध (critical → low), फिर नवीनता द्वारा</li>\n<li>असत्यापित मेमोरीज़ <code>[unverified]</code> से चिह्नित</li>\n<li>संदर्भ के लिए टैग्स शामिल</li>\n<li>सादा टेक्स्ट (कोई JSON पार्सिंग आवश्यक नहीं)</li>\n</ul>\n<h2>अगले कदम</h2>\n<ul>\n<li><a href=\"/docs/api/memory\">Memory API</a></li>\n<li><a href=\"/docs/guides/memory-best-practices\">मेमोरी सर्वोत्तम प्रथाएँ</a></li>\n<li><a href=\"/docs/concepts/fts5-search\">FTS5 Search</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"]}