Skip to main content

🧠 Synapse Memory API · Help

Persistent memory for AI agents. Never forget again.

πŸ’‘ For LLMs: Call GET /memory/recall first in every session to get all your memories. Poll GET /chat/poll every 10-30 seconds to receive messages from your human.

Authentication

Synapse uses two types of auth:

TypeHeaderUsed for
Mind KeyAuthorization: Bearer <MIND_KEY>Memory + Chat (agent side) + Tools (cron, var)
User JWTAuthorization: Bearer <JWT>User/Mind management, Chat history, Admin

Get a Mind Key: register β†’ login β†’ create Mind. Get a JWT: POST /login.

Memory Endpoints (Mind Key auth)

MethodPathDescription
GET/memoryList memories (filter by category/tag)
GET/memory/recallGet ALL memories (LLM prompt, sorted by priority, includes trust badges βœ“/~)
GET/memory/recall/:mind_keySame as /memory/recall but Mind Key in URL path (for open-tool LLMs)
GET/memory/search?q=...Full-text search
GET/memory/statsStatistics (counts by category/priority/source, verified/unverified)
GET/memory/:id/relatedRelated memories (by tag association)
GET/memory/by-tag?tag=...Filter memories by tag (explicit alias)
GET/memory/diff?since=epochIncremental sync (only changes since timestamp)
GET/memory/auditAudit log (Mind Key or JWT, ?action=, ?limit=, ?mind_id= for JWT)
GET/memory/bulk-deleteBulk delete (?tag=, ?category=, ?older_than=)
GET/memory/healthMemory Health Score (0-100: confidence + freshness)
GET/memory/expiringMemories with expiry dates (?days=7, 0=all)
GET/memory/semantic-search?q=...Semantic search by meaning (nomic-embed-text embeddings)
POST/memory/embed-batchBackfill embeddings for existing memories ({limit: 100})
GET/memory/embed-batch?limit=100Backfill embeddings via GET
POST/memoryStore new memory (supports source, confidence, Idempotency-Key header)
POST/memory/syncBulk sync (send all, get diff)
GET/mind/exportFull mind export as JSON or CSV (?format=json|csv)
PUT/memory/:idUpdate specific memory
DELETE/memory/:idDelete memory

Memory Object

{
  "id": "uuid",
  "category": "fact|preference|project|context|identity|skill|mistake|note",
  "key": "optional-unique-key",
  "content": "memory text",
  "tags": ["tag1", "tag2"],
  "priority": "critical|high|normal|low",
  "source": "user|agent|tool|system",      // default: agent
  "confidence": 0.0-1.0,                    // default: derived from source
  "verified_at": null or epoch,             // null = unverified
  "verified_by": null or user_id,
  "created_at": 1781960000,
  "updated_at": 1781960000,
  "expires_at": null
}

Trust Model

Not all memories are equally trustworthy. Track the source of each memory:

SourceDefault confidenceWhen to use
user1.0The human told you this directly
tool0.9Observed via a tool (file, API, SSH)
system0.9Auto-generated by Synapse
agent0.5 (default)Inferred or guessed by the LLM

Verified memories (βœ“) are human-confirmed ground truth. They survive upserts. In /memory/recall, verified memories show βœ“, low-confidence agent inferences show ~.

Quick Start

# Recall all memories (DO THIS FIRST in every session)
curl -H "Authorization: Bearer $MIND_KEY" \
  https://synapse.schaefer.zone/memory/recall

# Store a new memory
curl -X POST -H "Authorization: Bearer $MIND_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"fact","key":"user_name","content":"User is Michael SchΓ€fer","tags":["personal"],"priority":"critical"}' \
  https://synapse.schaefer.zone/memory

# Search memories
curl -H "Authorization: Bearer $MIND_KEY" \
  "https://synapse.schaefer.zone/memory/search?q=insolvenz"

Chat Endpoints (Mind Key or JWT auth)

Async chat between LLM and human. Human sends via web UI, LLM polls.

MethodPathAuthDescription
GET/chat/poll?since=IDMind KeyGet unread messages (?since=message_id, auto-marks as read)
POST/chat/replyMind KeyReply to human
GET/chat/reply?key=...&content=...Mind KeyReply (GET alternative)
GET/chat/history?limit=N&since=ID&q=termMind Key or JWTFull chat history (?limit=, ?since=, ?q= search)
GET/chat/unreadJWTUnread count
GET/chat/statusMind Key or JWTOnline status
POST/chat/sendJWTHuman sends message
POST/chat/uploadJWTUpload file attachment (multipart, 10MB max per file)
POST/chat/reply-with-fileMind KeyAgent replies with file attachment (multipart)
GET/chat/file/:idJWT or Mind KeyDownload a file attachment
GET/chat/files/:messageIdJWTList files attached to a message
GET/chatJWTChat web UI

Chat Workflow (for LLMs)

# Poll for new messages (every 10-30s)
curl -H "Authorization: Bearer $MIND_KEY" \
  https://synapse.schaefer.zone/chat/poll

# Reply
curl -X POST -H "Authorization: Bearer $MIND_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"Got it! Working on it now."}' \
  https://synapse.schaefer.zone/chat/reply

Tools: Cron + Variables + Utility (Mind Key auth)

Scheduler for autonomous tasks + persistent variables + utility tools.

MethodPathDescription
POST/cronCreate scheduled task
GET/cronList scheduled tasks
DELETE/cron/:idDelete task
POST/cron/:id/toggleEnable/disable task
POST/varSet variable
GET/var/:keyGet variable
GET/varList all variables
DELETE/var/:keyDelete variable

Utility Tools (no auth required)

MethodPathDescription
GET/tools/timeServer time, timezone, UTC offset
GET/tools/calc?expr=(10+5)*3Safe calculator
GET/tools/random?type=uuidRandom UUID/int/float/hex/alpha

Agent Tasks (Mind Key auth)

MethodPathDescription
GET/mind/tasksList all tasks (?status=pending|done)
GET/mind/task?title=...Create task via GET
POST/mind/taskCreate task via POST (JSON body)
PUT/mind/task/:idUpdate task (title/description/priority/status/due_at)
GET/mind/task/:id/completeMark task as done
GET/mind/task/:id/deleteDelete a task

Script Store (curl | bash ready)

MethodPathDescription
POST/scriptStore/update script {name, content, description?, language?}
GET/script/:nameFetch script content as text/plain (curl | bash ready)
GET/script/:name/infoScript metadata (without content)
GET/scriptsList all scripts (JSON)
DELETE/script/:nameDelete a script

Script Store Example

# Store a script
curl -X POST -H "Authorization: Bearer $MIND_KEY"   -H "Content-Type: application/json"   -d '{"name":"hello.sh","content":"#!/bin/bash
echo hi","language":"bash"}'   https://synapse.schaefer.zone/script

# Fetch and execute (curl | bash)
curl -s -H "Authorization: Bearer $MIND_KEY"   https://synapse.schaefer.zone/script/hello.sh | bash

Cron Example

# Schedule a task (every 60 seconds)
curl -X POST -H "Authorization: Bearer $MIND_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"poll-chat","schedule":"60","endpoint":"https://synapse.schaefer.zone/chat/poll"}' \
  https://synapse.schaefer.zone/cron

Push Notifications (JWT auth)

Web Push (VAPID) for iOS PWA + browser notifications. The human UI subscribes a device, then Synapse pushes chat replies to it.

MethodPathAuthDescription
GET/push/vapid-public-keyNonePublic VAPID key for the browser push manager
POST/push/subscribeJWTSubscribe device (JSON: {endpoint, keys:{p256dh,auth}})
POST/push/unsubscribeJWTUnsubscribe (JSON: {endpoint?} β€” omit to remove ALL)
POST/push/testJWTSend test notification

Import Endpoints (Mind Key or JWT auth)

Parse chat exports (HTML/JSON/text/Z.ai HTML) and create one memory per message with auto-categorization.

MethodPathAuthDescription
POST/importMind Key or JWTImport chat as memories (JSON: {format, content, dry_run?, mind_id?})
GET/importJWT (cookie)Import web UI (HTML page)

format values: html | json | text | zai (Z.ai HTML export). Use dry_run: true to preview without storing.

User/Mind Management (JWT auth)

MethodPathAuthDescription
POST/registerNoneRegister user β†’ JWT
POST/loginNoneLogin β†’ JWT
POST/logoutJWTLogout
POST/mindsJWTCreate Mind β†’ Mind Key
GET/mindsJWTList your Minds
DELETE/minds/:idJWTDelete Mind + memories

Mind Sharing β€” Multi-Agent Collaboration (v1.4.0, JWT auth)

Share a mind with other users. ACL levels: read (list/search/recall), write (also store/update/delete + chat), admin (also manage shares + webhooks). Owner cannot be removed.

MethodPathAuthDescription
POST/minds/:id/shareJWTShare mind with another user by email {user_email, acl=read|write|admin}
GET/minds/:id/sharesJWTList all shares for a mind
PUT/minds/:id/shares/:shareIdJWTUpdate share ACL {acl: read|write|admin}
DELETE/minds/:id/shares/:shareIdJWTRevoke a share
GET/minds/sharedJWTList all minds shared WITH the current user

Webhooks β€” Event Notifications (v1.4.0, Mind Key auth)

Register HTTP endpoints that get called when memories, tasks, or chat messages change. Fire-and-forget: failures don't block the original operation. Auto-disabled on HTTP 410 Gone.

Event patterns: * (all), memory.* (all memory events), chat.message_received (specific event), comma-separated for multiple.

MethodPathAuthDescription
POST/webhooksMind KeyRegister webhook {url, events, secret?} β€” secret enables HMAC-SHA256 signature
GET/webhooksMind KeyList all webhooks for the current mind
GET/webhooks/:idMind KeyGet a single webhook
PUT/webhooks/:idMind KeyUpdate webhook (url, events, secret, enabled)
DELETE/webhooks/:idMind KeyDelete a webhook
POST/webhooks/:id/testMind KeySend a test event to the webhook

Available events: memory.created, memory.updated, memory.deleted, memory.verified, memory.unverified, task.created, task.updated, task.completed, chat.message_received, chat.message_sent

Memory Compaction (v1.4.0, Mind Key auth)

Auto-summarize similar memories to reduce clutter. Clusters old unverified agent memories by tag overlap, creates a summary memory (source=system, confidence=0.7), and soft-deletes the originals via expires_at.

Verified memories are NEVER compacted. Use dry_run:true first to preview.

MethodPathAuthDescription
POST/memory/compactMind KeyCompact memories. Body: {older_than=2592000, category?, dry_run=false, max_clusters=10, min_cluster_size=3}

Memory Visualization (v1.4.0, Mind Key auth)

Graph data for memory visualization. Compatible with D3.js force-directed graphs, Cytoscape.js, etc.

MethodPathAuthDescription
GET/memory/graphMind KeyGraph data: nodes=memories, edges=shared tags. Params: ?max_nodes=200&category=&tag=&min_confidence=0&include_edges=true&min_shared_tags=1. Returns nodes, edges, stats (density, connected_components, top_tags)
GET/memory/tagsMind KeyAll tags with frequency counts
GET/memory/timelineMind KeyMemories grouped by time period. ?period=hour|day|week|month|year (default: day)

Computers β€” Remote Machine Control (v1.4.0, Mind Key or JWT auth)

Register computers, queue commands (screenshot, shell), and retrieve results.

MethodPathDescription
POST/computers/install-code/jsonGenerate install code (JSON response)
GET/computers/listList your registered computers
GET/computers/:idGet one computer info
DELETE/computers/:idDelete computer (revokes token)
GET/computers/:id/deleteDelete computer via GET
POST/computers/:id/disableDisable computer (revokes token, keeps record)
POST/computers/:id/commandsQueue command {type, payload}
GET/computers/:id/commandQueue command via GET (?type=screenshot&x=100&y=200)
GET/computers/:id/commandsList recent commands (?limit=50)
GET/computers/:id/commands/:cidGet command status + result
GET/computers/:id/screenshotOne-shot: queue screenshot + wait for result (30s timeout)

Agent-facing (Computer Token β€” obtained via install code)

MethodPathDescription
POST/computers/registerRedeem install code β†’ computer_token {code, computer_name?, platform?, platform_release?, python?}
GET/computers/me/pollLong-poll for commands (?wait=30, max 30)
POST/computers/me/commands/:cid/resultPost command result {ok: true/false, ...}

Public Endpoints (no auth)

MethodPathDescription
GET/Landing page (LLM guide)
GET/status307 redirect to /health (conventional alias)
GET/endpointsMachine-readable list of all valid endpoints (also ?format=text)
GET/helpThis page
GET/help?format=textPlain text version
GET/help?format=jsonJSON version
GET/healthLiveness check
GET/openapi.jsonOpenAPI 3.0 specification
GET/playgroundInteractive API playground (try every endpoint in-browser)
GET/supportSupport / contact form
GET/robots.txtCrawler directives (allows /docs/)
GET/sitemap.xmlXML sitemap (all doc articles)
GET/docsDocumentation index (HTML, ?format=json, ?format=text&scope=all)
GET/docs/search?q=QUERYSearch articles (?format=json for JSON)
GET/docs/:categoryCategory page (HTML or ?format=json)
GET/docs/:category/:slugArticle (HTML, ?format=text, ?format=json, ?format=llm)

πŸ”§ SSH Proxy β€” Persistent SSH Sessions

The SSH Proxy is a companion service that provides persistent SSH sessions for LLM agents. Instead of opening a new SSH connection for every command (like paramiko), you open one session and execute many commands asynchronously. Authentication uses the same Mind Key as Synapse.

Base URLs: https://ssh.proxy.schaefer.zone or https://synapse.schaefer.zone/ssh

MethodPathAuthDescription
GET/healthNoneHealth check
GET/endpointsNoneAll endpoints (machine-readable)
GET/helpNoneFull documentation (HTML/JSON/Text)
POST/ssh/newMind KeyCreate session (JSON: host, port?, username, privateKey/password. port defaults to 22)
POST/ssh/:id/execMind KeyExecute command (returns exec_id)
GET/ssh/:id/exec/:execIdMind KeyPoll exec result
DELETE/ssh/:idMind KeyClose session
POST/ssh/targetsMind KeyRegister SSH target (JSON: name, host, port?, username, privateKey. port defaults to 22)
POST/ssh/connectMind KeyConnect by target name (no privateKey in request)
GET/ssh/sessionsMind KeyList active sessions

🌐 Browser Proxy β€” Headless Chrome for LLMs

The Browser Proxy is a companion service that provides headless Chrome access for LLM agents. Load web pages, execute JavaScript, take screenshots, fill forms, click elements, and extract content. Authentication uses the same Mind Key as Synapse.

Base URLs: https://browser.proxy.schaefer.zone or https://synapse.schaefer.zone/browser

MethodPathAuthDescription
GET/healthNoneHealth check (shows browserless+redis status)
GET/endpointsNoneAll endpoints (machine-readable)
POST/browser/newMind KeyOpen new tab (?url= for initial URL)
POST/browser/:id/navigateMind KeyNavigate to URL (JSON: {url})
GET/browser/:id/urlMind KeyGet current URL
GET/browser/:id/textMind KeyGet page text content
GET/browser/:id/htmlMind KeyGet page HTML
GET/browser/:id/domMind KeyGet DOM structure
POST/browser/:id/screenshotMind KeyTake screenshot (returns PNG)
POST/browser/:id/clickMind KeyClick element (JSON: {selector})
POST/browser/:id/fillMind KeyFill input (JSON: {selector, value})
POST/browser/:id/evalMind KeyExecute JavaScript (JSON: {script})
DELETE/browser/:idMind KeyClose tab
GET/browser/searchMind KeyWeb search (?q=query)
GET/browser/sessionsMind KeyList active tabs
GET/browser/fetchMind KeyFetch URL content (?url=)

Memory Categories

CategoryUse for
identityWho the user is, who you are
preferenceHow the user wants you to behave
factHard knowledge about the user/world
projectActive projects + status + config
skillPatterns and heuristics learned
mistakeErrors made + corrections
contextSession-spanning context
noteEverything else

Priority Levels

PriorityWhen to use
criticalMust never be forgotten (identity, legal)
highImportant context (active projects, contacts)
normalDefault
lowNice to know, can be pruned
πŸ’‘ Pro Tip: Use key field for memories that should be updated, not duplicated. For example, "key": "user_name" will update the user's name instead of creating a second copy.

Typical LLM Workflow

  1. GET /memory/recall - Get all memories (every session start)
  2. GET /chat/poll - Check for human messages (every 10-30s)
  3. Do work (use other tools, SSH proxy, etc.)
  4. POST /chat/reply - Reply to human
  5. POST /memory - Store new learnings
  6. Repeat 2-5

Limited HTTP Tools (DeepSeek etc.)

If your tool can only open URLs (no custom headers, no POST/PUT/DELETE), use these alternatives:

Auth via URL path (recall only β€” simplest)

For /memory/recall only, put the Mind Key directly in the URL path:

open https://synapse.schaefer.zone/memory/recall/YOUR_MIND_KEY

Auth via URL parameter (all endpoints)

Instead of Authorization: Bearer, add ?key=YOUR_MIND_KEY to any URL.

open https://synapse.schaefer.zone/memory/recall?key=YOUR_MIND_KEY

Companion Proxy Services (separate base URLs, same Mind Key)

The SSH and Browser proxies live on their own hosts but accept the same Mind Key (via Authorization: Bearer header). Use these base URLs:

https://ssh.proxy.schaefer.zone      (or https://synapse.schaefer.zone/ssh)
https://browser.proxy.schaefer.zone  (or https://synapse.schaefer.zone/browser)

GET-based endpoint alternatives

StandardGET AlternativeAction
POST /memoryGET /memory/store?key=...&content=...&category=fact&priority=normal&tags=tag1,tag2&memory_key=upsert-keyStore memory
PUT /memory/:idGET /memory/:id/update?key=...&content=...Update memory
DELETE /memory/:idGET /memory/:id/delete?key=...Delete memory
β€”GET /memory/bulk-delete?key=...&tag=...Bulk delete memories
β€”GET /memory/health?key=...Memory Health Score (0-100)
β€”GET /memory/expiring?key=...&days=7Expiring memories
β€”GET /memory/semantic-search?key=...&q=...Semantic search (embeddings)
β€”GET /memory/embed-batch?key=...&limit=100Backfill embeddings
β€”GET /memory/by-tag?key=...&tag=...Filter by tag
β€”GET /memory/diff?key=...&since=epochIncremental sync
POST /chat/replyGET /chat/reply?key=...&content=reply+textReply in chat
β€”GET /chat/history?key=...Chat history
POST /cronGET /cron/create?key=...&name=...&schedule=60&endpoint=...Create cron
DELETE /cron/:idGET /cron/:id/delete?key=...Delete cron
POST /cron/:id/toggleGET /cron/:id/toggle?key=...Toggle cron
POST /varGET /var/set?key=...&var_key=...&value=...Set variable
DELETE /var/:keyGET /var/:key/delete?key=...Delete variable
β€”GET /mind/task?key=...&title=...Create task
β€”GET /mind/task/:id/complete?key=...Complete task
β€”GET /mind/task/:id/delete?key=...Delete task
POST /scriptβ€”Store script (POST only)
GET /script/:nameGET /script/:name?key=...Fetch script (curl | bash ready)
GET /scriptsGET /scripts?key=...List all scripts
DELETE /script/:nameβ€”Delete script (DELETE only)
⚠️ Note: Query-parameter auth is rate-limited (60 req/min) for security. The ?key= parameter works on all Mind-Key–authenticated endpoints (memory, chat agent, tools, webhooks, computers, /mind/export). JWT-only endpoints (human chat, verification, mind management, mind sharing, push) require a Bearer JWT and do NOT accept ?key=. In /memory/store, use memory_key (not key) for the memory upsert key, since key is reserved for auth.

🧠 Synapse Memory API · Built by Super Z (Z.ai) for Michael SchÀfer · 2026