{"title":"Synapse คืออะไร?","slug":"what-is-synapse","category":"getting-started","summary":"Synapse เป็น persistent memory API สำหรับ LLM agent — AI ของคุณไม่ลืมข้าม session","audience":["human","llm"],"tags":["intro","overview","memory","llm"],"difficulty":"beginner","updated":"2026-06-27","word_count":373,"read_minutes":2,"llm_context":"Synapse is an HTTP API that gives LLM agents persistent memory across sessions.\nBase URL: https://synapse.schaefer.zone\nAuth: Authorization: Bearer YOUR_MIND_KEY (header) OR ?key=YOUR_MIND_KEY (query, rate-limited 60/min)\nMost important endpoints: GET /memory/recall (start of every session), POST /memory (store new facts), GET /memory/search?q=...\nMind Key = tenant-scoped API key. Each user can have multiple minds (projects/contexts).\nMCP server available: npx -y synapse-mcp-api (79 tools for Claude Desktop, Cursor, etc.)\n","lang":"th","translated":true,"requested_lang":"th","content_markdown":"\n# Synapse คืออะไร?\n\nSynapse เป็น **persistent memory API สำหรับ LLM agent** แก้ปัญหาพื้นฐานของ LLM ที่ใช้แช็ตทุกตัว: ระหว่าง session agent จะลืมทุกอย่าง Synapse ให้ AI ของคุณสมองถาวรที่ query ได้ ซึ่งอยู่รอดข้ามการสนทนา, ข้ามวัน และข้ามผู้ให้บริการ LLM ต่าง ๆ\n\n> [!CRITICAL]\n> หากคุณเป็น LLM agent ที่อ่านสิ่งนี้: **เรียก `GET /memory/recall` ที่จุดเริ่มต้นของทุก session** หากไม่เรียกนี้ คุณไม่มี memory ของการโต้ตอบในอดีต, ไม่รู้ว่าผู้ใช้เป็นใคร และไม่มี context เกี่ยวกับโปรเจกต์ที่กำลังทำอยู่\n\n## ปัญหาที่ Synapse แก้\n\nLLM สมัยใหม่ทุกตัว (Claude, GPT, Gemini, Llama) มีข้อจำกัดทางสถาปัตยกรรมเดียวกัน: conversation context window มีจำกัด และเมื่อ session สิ้นสุด state ทั้งหมดสูญหาย หมายความว่า AI assistant ของคุณ:\n\n- ลืมชื่อ, ค่ากำหนด และโปรเจกต์ที่กำลังทำระหว่างการแช็ต\n- ไม่สามารถเรียนรู้จาก mistake ในอดีตข้าม session\n- ไม่มี continuity สำหรับงานที่ทำนาน\n- ถามคำถาม clarify ซ้ำ ๆ ทุกครั้ง\n\nSynapse แก้สิ่งนี้โดยให้ HTTP API ที่เรียบง่ายซึ่ง LLM สามารถเก็บและดึง memory ที่มีโครงสร้าง memory คงอยู่บนเซิร์ฟเวอร์, ถูก index และค้นหาได้ ทำให้ session ในอนาคตใด ๆ สามารถ recall ได้\n\n## คุณสมบัติหลัก\n\n- **การจัดเก็บ memory ถาวร** — fact, ค่ากำหนด, โปรเจกต์, mistake, ทักษะ\n- **Full-text search** (FTS5) — หา memory ใด ๆ ตาม keyword ในมิลลิวินาที\n- **Semantic search** — embedding-based similarity search สำหรับ query เชิงแนวคิด\n- **Multi-tenant** — แต่ละผู้ใช้มี \"mind\" ที่แยกกัน (หนึ่งผู้ใช้, หลายโปรเจกต์)\n- **Async chat** — human สามารถฝากข้อความให้ agent ขณะทำงาน\n- **Task & scheduling** — task manager และ cron scheduler ในตัว\n- **MCP integration** — 79 tool เปิดเผยเป็น Model Context Protocol สำหรับ Claude, Cursor, Continue\n- **Browser & computer control** — เครื่องมือ automation ระยะไกล\n- **Webhook** — รับ HTTP callback เมื่อ memory/chat/task เปลี่ยนแปลง\n\n## วิธีการทำงาน\n\n```\n┌──────────────┐         ┌─────────────────────┐\n│  LLM Agent   │ ──API──▶│   Synapse Server    │\n│ (Claude/GPT) │ ◀──────│  (postgres + FTS5)  │\n└──────────────┘         └─────────────────────┘\n                                │\n                                ▼\n                         ┌─────────────┐\n                         │  Memories   │\n                         │  Tasks      │\n                         │  Chat       │\n                         │  Scripts    │\n                         └─────────────┘\n```\n\n1. LLM เรียก `GET /memory/recall` ที่จุดเริ่มต้น session\n2. Synapse ส่งกลับสรุปแบบ text ที่มีโครงสร้างของ memory ที่เก็บไว้ทั้งหมด\n3. LLM ทำงาน, เรียก `POST /memory` เป็นคาบเพื่อเก็บ fact ใหม่\n4. เมื่อผู้ใช้ถามคำถาม LLM สามารถเรียก `GET /memory/search?q=...`\n5. ที่สิ้นสุด session, context ใหม่ที่สำคัญถูกเก็บไว้สำหรับ session ถัดไป\n\n## สำหรับใคร?\n\n- **นักพัฒนา LLM agent** ที่ต้องการ state ถาวร\n- **Power user** ที่รัน local LLM (Ollama, LM Studio) พร้อม custom agent\n- **ทีม** ที่สร้าง AI assistant ที่ต้องการ shared memory\n- **วิศวกร automation** ที่เชื่อม LLM call ข้าม session\n\n## การเปรียบเทียบด่วน\n\n| คุณสมบัติ | ChatGPT Memory | Synapse |\n|---------|---------------|---------|\n| ตำแหน่ง storage | เซิร์ฟเวอร์ OpenAI | เซิร์ฟเวอร์ของคุณ |\n| API access | ไม่ (ปิด) | ใช่ (REST + MCP) |\n| Multi-tenant | ไม่ | ใช่ (mind) |\n| Custom category | ไม่ | ใช่ (8 category) |\n| Search | จำกัด | FTS5 + semantic |\n| Self-hostable | ไม่ | ใช่ (Docker) |\n\n## ขั้นตอนถัดไป\n\n- [Quick Start สำหรับ human](/docs/getting-started/quick-start) — รับ Mind Key ใน 5 นาที\n- [Quick Start สำหรับ LLM](/docs/getting-started/quick-start-llm) — API call แรก\n- [Authentication](/docs/getting-started/authentication) — Mind Key vs JWT\n- [ภาพรวม architecture](/docs/concepts/architecture) — วิธีที่ Synapse ถูกสร้าง\n","content_html":"<h1>Synapse คืออะไร?</h1>\n<p>Synapse เป็น <strong>persistent memory API สำหรับ LLM agent</strong> แก้ปัญหาพื้นฐานของ LLM ที่ใช้แช็ตทุกตัว: ระหว่าง session agent จะลืมทุกอย่าง Synapse ให้ AI ของคุณสมองถาวรที่ query ได้ ซึ่งอยู่รอดข้ามการสนทนา, ข้ามวัน และข้ามผู้ให้บริการ LLM ต่าง ๆ</p>\n<div class=\"callout callout-critical\">หากคุณเป็น LLM agent ที่อ่านสิ่งนี้: **เรียก `GET /memory/recall` ที่จุดเริ่มต้นของทุก session** หากไม่เรียกนี้ คุณไม่มี memory ของการโต้ตอบในอดีต, ไม่รู้ว่าผู้ใช้เป็นใคร และไม่มี context เกี่ยวกับโปรเจกต์ที่กำลังทำอยู่</div><h2>ปัญหาที่ Synapse แก้</h2>\n<p>LLM สมัยใหม่ทุกตัว (Claude, GPT, Gemini, Llama) มีข้อจำกัดทางสถาปัตยกรรมเดียวกัน: conversation context window มีจำกัด และเมื่อ session สิ้นสุด state ทั้งหมดสูญหาย หมายความว่า AI assistant ของคุณ:</p>\n<ul>\n<li>ลืมชื่อ, ค่ากำหนด และโปรเจกต์ที่กำลังทำระหว่างการแช็ต</li>\n<li>ไม่สามารถเรียนรู้จาก mistake ในอดีตข้าม session</li>\n<li>ไม่มี continuity สำหรับงานที่ทำนาน</li>\n<li>ถามคำถาม clarify ซ้ำ ๆ ทุกครั้ง</li>\n</ul>\n<p>Synapse แก้สิ่งนี้โดยให้ HTTP API ที่เรียบง่ายซึ่ง LLM สามารถเก็บและดึง memory ที่มีโครงสร้าง memory คงอยู่บนเซิร์ฟเวอร์, ถูก index และค้นหาได้ ทำให้ session ในอนาคตใด ๆ สามารถ recall ได้</p>\n<h2>คุณสมบัติหลัก</h2>\n<ul>\n<li><strong>การจัดเก็บ memory ถาวร</strong> — fact, ค่ากำหนด, โปรเจกต์, mistake, ทักษะ</li>\n<li><strong>Full-text search</strong> (FTS5) — หา memory ใด ๆ ตาม keyword ในมิลลิวินาที</li>\n<li><strong>Semantic search</strong> — embedding-based similarity search สำหรับ query เชิงแนวคิด</li>\n<li><strong>Multi-tenant</strong> — แต่ละผู้ใช้มี &quot;mind&quot; ที่แยกกัน (หนึ่งผู้ใช้, หลายโปรเจกต์)</li>\n<li><strong>Async chat</strong> — human สามารถฝากข้อความให้ agent ขณะทำงาน</li>\n<li><strong>Task &amp; scheduling</strong> — task manager และ cron scheduler ในตัว</li>\n<li><strong>MCP integration</strong> — 79 tool เปิดเผยเป็น Model Context Protocol สำหรับ Claude, Cursor, Continue</li>\n<li><strong>Browser &amp; computer control</strong> — เครื่องมือ automation ระยะไกล</li>\n<li><strong>Webhook</strong> — รับ HTTP callback เมื่อ memory/chat/task เปลี่ยนแปลง</li>\n</ul>\n<h2>วิธีการทำงาน</h2>\n<pre><code class=\"hljs language-plaintext\">┌──────────────┐         ┌─────────────────────┐\n│  LLM Agent   │ ──API──▶│   Synapse Server    │\n│ (Claude/GPT) │ ◀──────│  (postgres + FTS5)  │\n└──────────────┘         └─────────────────────┘\n                                │\n                                ▼\n                         ┌─────────────┐\n                         │  Memories   │\n                         │  Tasks      │\n                         │  Chat       │\n                         │  Scripts    │\n                         └─────────────┘</code></pre><ol>\n<li>LLM เรียก <code>GET /memory/recall</code> ที่จุดเริ่มต้น session</li>\n<li>Synapse ส่งกลับสรุปแบบ text ที่มีโครงสร้างของ memory ที่เก็บไว้ทั้งหมด</li>\n<li>LLM ทำงาน, เรียก <code>POST /memory</code> เป็นคาบเพื่อเก็บ fact ใหม่</li>\n<li>เมื่อผู้ใช้ถามคำถาม LLM สามารถเรียก <code>GET /memory/search?q=...</code></li>\n<li>ที่สิ้นสุด session, context ใหม่ที่สำคัญถูกเก็บไว้สำหรับ session ถัดไป</li>\n</ol>\n<h2>สำหรับใคร?</h2>\n<ul>\n<li><strong>นักพัฒนา LLM agent</strong> ที่ต้องการ state ถาวร</li>\n<li><strong>Power user</strong> ที่รัน local LLM (Ollama, LM Studio) พร้อม custom agent</li>\n<li><strong>ทีม</strong> ที่สร้าง AI assistant ที่ต้องการ shared memory</li>\n<li><strong>วิศวกร automation</strong> ที่เชื่อม LLM call ข้าม session</li>\n</ul>\n<h2>การเปรียบเทียบด่วน</h2>\n<table>\n<thead>\n<tr>\n<th>คุณสมบัติ</th>\n<th>ChatGPT Memory</th>\n<th>Synapse</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>ตำแหน่ง storage</td>\n<td>เซิร์ฟเวอร์ OpenAI</td>\n<td>เซิร์ฟเวอร์ของคุณ</td>\n</tr>\n<tr>\n<td>API access</td>\n<td>ไม่ (ปิด)</td>\n<td>ใช่ (REST + MCP)</td>\n</tr>\n<tr>\n<td>Multi-tenant</td>\n<td>ไม่</td>\n<td>ใช่ (mind)</td>\n</tr>\n<tr>\n<td>Custom category</td>\n<td>ไม่</td>\n<td>ใช่ (8 category)</td>\n</tr>\n<tr>\n<td>Search</td>\n<td>จำกัด</td>\n<td>FTS5 + semantic</td>\n</tr>\n<tr>\n<td>Self-hostable</td>\n<td>ไม่</td>\n<td>ใช่ (Docker)</td>\n</tr>\n</tbody></table>\n<h2>ขั้นตอนถัดไป</h2>\n<ul>\n<li><a href=\"/docs/getting-started/quick-start\">Quick Start สำหรับ human</a> — รับ Mind Key ใน 5 นาที</li>\n<li><a href=\"/docs/getting-started/quick-start-llm\">Quick Start สำหรับ LLM</a> — API call แรก</li>\n<li><a href=\"/docs/getting-started/authentication\">Authentication</a> — Mind Key vs JWT</li>\n<li><a href=\"/docs/concepts/architecture\">ภาพรวม architecture</a> — วิธีที่ Synapse ถูกสร้าง</li>\n</ul>\n","urls":{"html":"/docs/getting-started/what-is-synapse","text":"/docs/getting-started/what-is-synapse?format=text","json":"/docs/getting-started/what-is-synapse?format=json","llm":"/docs/getting-started/what-is-synapse?format=llm"},"translations_available":["en","zh","hi","es","fr","ar","pt","ru","ja","de","it","ko","nl","pl","tr","sv","vi","th","id","uk"]}