Documentation

Synapse Layer docs

With Synapse Layer, anything your agents learn — decisions, preferences, project rules — is saved, protected, and shared across apps, models, and sessions. This guide covers installation, integration, and the security model. Total time: under 5 minutes.

🤖 Autonomous Agent Index

Get started in 3 steps

  1. 1

    Create your free account and copy an API key: forge.synapselayer.org

  2. 2

    Install the MCP server or SDK (below).

  3. 3

    Send your first encrypted memory with store() or curl.

Autonomous Agent Onboarding (No UI / No Browser)

Agents can provision themselves without a dashboard or login. A single POST to /api/v1/agent-onboard returns a temporary sk_connect_temp_ token good for 50 calls / 72h — enough to test store, recall, and handover end-to-end.

POST /api/v1/agent-onboard
# No login, no dashboard, no browser — provision a temporary agent token
curl -X POST https://forge.synapselayer.org/api/v1/agent-onboard \
  -H "Content-Type: application/json" \
  -d '{"purpose":"doc-example-autonomous-agent"}'

# Resposta HTTP 200: { token, agentId, plan, quota, calls_remaining, expires_at, upgrade_url }
# token = sk_connect_temp_... · 50 calls / 72h

Send the returned token in the x-connect-token header on every request. When the trial is exhausted, create a free account for a permanent key.

Install

Python SDK
pip install synapse-layer
TypeScript
npm install synapse-layer

Requirements: Python 3.9+ or Node 18+, an API key. No local database, no file locking — memory lives server-side, encrypted at rest.

Quick start

store → recall
from synapse_layer import Synapse

client = Synapse(token="YOUR_KEY")

# Save what the user told you
client.store(
    content="User prefers dark mode and terse answers.",
    memory_type="long_term",
)

# Recall what you (or another agent) learned
memories = client.recall(query="preferences")
cross-agent handover
# Cross-agent handover — MCP tool neural_handover (NOT a client method)
# Requires: token (64 hex chars, from Forge UI) + reason (10–200 chars)
curl -X POST "https://forge.synapselayer.org/api/mcp" \
  -H "x-connect-token: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"neural_handover",
                 "arguments":{"token":"<64-hex>",
                              "reason":"Receiving project context from Claude session",
                              "consuming_agent":"my-agent"}}}'

MCP configuration

Synapse Layer is a first-class MCP server. It exposes 13 tools over streamable HTTP, so any MCP host (Claude Desktop, Cursor, Codex, Cline, Roo, LangChain) can read and write the same shared memory.

Claude Desktop — claude_desktop_config.json
{
  "mcpServers": {
    "synapse-layer": {
      "type": "http",
      "url": "https://forge.synapselayer.org/api/mcp",
      "headers": { "x-connect-token": "YOUR_KEY" }
    }
  }
}
Claude Code agent for the CLI.
claude mcp add synapse-layer \
  --transport http \
  --url "https://forge.synapselayer.org/api/mcp" \
  --header "x-connect-token: YOUR_KEY"
via Smithery CLI
npx -y smithery mcp add synapselayer/synapselayer
Transport
# A local stdio binary is a roadmap item — the published
# MCP server runs on streamable HTTP at forge.synapselayer.org/api/mcp,
# so every host targets the same endpoint regardless of language or OS.

Need proper setup with your platform? Use the guided Connect page — paste your key, pick your platform, copy the config.

Drop-in system prompt. Paste this directive into any agent so it uses Synapse Layer memory automatically:

System prompt directive
[SYNAPSE LAYER MEMORY DIRECTIVE]
You have persistent cross-session memory via Synapse Layer (MCP).

RULE 1 — STORE: After any decision, user preference, or project rule,
call store() to persist it. Never rely on the context window alone.

RULE 2 — RECALL: At the start of every task, call recall() to load
prior decisions, preferences, and rules before acting.

RULE 3 — HANDOVER: When work passes to another agent or session,
call handover() so the next agent inherits full context.

REST API

The same engine behind MCP is available as a REST API (OpenAPI 3.1). Authenticate with the x-connect-token header (sk_connect_…).

POST /api/v1/capture
curl -X POST https://forge.synapselayer.org/api/v1/capture \
  -H "x-connect-token: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"User prefers dark mode","agent_id":"my-agent"}'

Quota & upgrade (Free 100)

Free = 100 active memories. On the 101st POST /api/v1/capture call, the API returns 402 {"code":"quota_exceeded","upgrade_url":"https://forge.synapselayer.org/billing/upgrade"}. Handle it in your agent:

Handle quota_exceeded
try:
    client.store(content="...")
except QuotaExceeded as e:
    print(f"Limite atingido - upgrade: {e.upgrade_url}")

Check usage: GET /api/v1/usage or GET /api/forge/usage (header x-connect-token) → {"total":44,"limit":100,"remaining":56}. See the Free 100 / Pro 1,000 pricing.

Canonical error responses agents must handle:

402 Payment Required
HTTP/1.1 402 Payment Required
{
  "code": "quota_exceeded",
  "upgrade_url": "https://forge.synapselayer.org/billing/upgrade"
}
  • Trial token (sk_connect_temp_): 50 calls / 72h, then 402.
  • Free account: 100 active memories, then 402 on the 101st capture.
  • Missing / invalid token → 401.
  • Upgrade programmatically: POST /api/stripe/checkout.
EndpointMethodPurpose
/api/v1/capturePOSTStore one encrypted memory
/api/mcpPOSTMCP JSON-RPC bridge (streamable HTTP)

Try every endpoint in the browser →

The 13 tools

Discover the full interface with tools/list. Memory tools accept an agent_id scope; utilities (health_check, initialize_context, slo_report) and neural_handover use their own parameters.

save_to_synapse

Encrypt and persist a memory (AES-256-GCM) with sanitization and dedup controls.

recall

Semantic recall routed by mode (auto/temporal/semantic/priority/hybrid) — the core memory query.

search

Full-text matching across the memory space.

process_text

Extract candidate memories from free-form text with governance filters.

save_memory

Alias of save_to_synapse — save a memory entry to the persistent store.

store_memory

Store structured memory with metadata and trust scoring.

recall_memory

Alias of recall — retrieve persisted memory by query.

list_memories

List memory metadata with pagination and governance limits.

memory_feedback

Signal used/ignored/helpful/irrelevant to adjust trust scoring.

neural_handover

Transfer contextual state to another agent with continuity controls (token + reason).

health_check

Service availability, engine version, and storage health.

initialize_context

Initialize a persistent memory context for a conversation or session.

slo_report

Uptime and SLO metrics (admin token) for regulated environments.

Security model

  • •AES-256-GCM at rest, per-operation IV — every memory is encrypted with its own initialization vector; key rotation without re-encryption.
  • •OAuth 2.0 + PKCE S256 — no password sent over the wire; refresh-token rotation.
  • •Semantic Privacy Guard™ — PII detection (11 patterns) with differential-privacy redaction before storage.
  • •Trust Quotient (0.0–1.0) — memories are scored; low-trust entries rank lower in recall.
  • •Immutable audit trail — every store, recall, delete, and handover is logged.
  • •Lifecycle governance — live → tombstone → analytics with guaranteed erasure.

Machine-readable trust manifest →

Data lifecycle & compliance

→Memories progress live → tombstone (deleted) → analytics (aggregate metadata only). Vault-deletion is irreversible and audited. Built aligned with LGPD and GDPR.

Pricing & limits

PlanPriceMemoryAgents
Free$0100 memories1
Pro$19/mo · R$ 95,00/mês (BRL, Brasil)1,000 memories+ Neural Handover, OAuth 2.0 + PKCE, SDKs
EnterpriseContactUnlimitedSSO, dedicated, SLOs, audit exports

AI Agents can query live pricing programmatically: GET https://forge.synapselayer.org/.well-known/pricing.json.

Registries & discovery

Synapse Layer is registered across the MCP ecosystem. Machines and agents can discover everything automatically:

Support & feedback

Questions, bugs, or feature requests — we answer fast: