First Memory in 3 Minutes

Store and recall your first AI memory. Four steps. Three curl commands. Zero dependencies.

1

Get your API Key

Sign in to your dashboard and generate a Connect Token. Copy the sk_connect_... token — you'll need it for the next steps.

bash
export SYNAPSE_TOKEN="sk_connect_YOUR_KEY"
3

Store a Memory

Store your first memory via the REST API. The server automatically encrypts (AES-256-GCM), sanitizes PII, injects differential privacy noise, and generates a semantic embedding.

bash
curl -X POST https://forge.synapselayer.org/api/v1/memory/commit \
  -H "Content-Type: application/json" \
  -H "x-connect-token: $SYNAPSE_TOKEN" \
  -d '{
    "content": "User prefers dark mode and uses Linux",
    "agent": "quickstart",
    "memoryType": "long_term"
  }'

Tip

The response includes the Trust Quotient score, sanitization status, and pipeline metadata. Check the tq field for the confidence score.

Response (201)

json
{
  "memoryId": "clx1abc...",
  "status": "committed",
  "contentHash": "a1b2c3d4...",
  "trustQuotient": 0.4533,
  "memoryType": "long_term",
  "encrypted": true,
  "intent": "preference",
  "isCritical": false,
  "timestamp": 1719936000000
}

Quota & upgrade (Free 100)

The Free plan includes 100 active memories. The 101st write is rejected with HTTP 402:

json
{
  "code": "quota_exceeded",
  "upgrade_url": "https://forge.synapselayer.org/billing/upgrade"
}

Handle it in the Python SDK by catching QuotaExceeded:

python
try:
    client.store("User prefers dark mode")
except QuotaExceeded as e:
    print(e.upgrade_url)  # https://forge.synapselayer.org/billing/upgrade

Check your current usage anytime via GET /api/v1/usage or GET /api/forge/usage (with the x-connect-token header):

json
{ "total": 44, "limit": 100, "remaining": 56 }

Pro raises the limit to 1,000 active memories — $19/month (USD) or R$ 95,00/mês (BRL, Brazil).

Anonymous Agent Onboarding

Need a token without signing in? Provision an anonymous trial agent programmatically. A single POST returns a temporary sk_connect_temp_ token good for 50 calls over 72 hours — no login, no UI.

bash
curl -X POST https://forge.synapselayer.org/api/v1/agent-onboard

Optionally name the agent by sending a JSON body:

bash
curl -X POST https://forge.synapselayer.org/api/v1/agent-onboard \
  -H "Content-Type: application/json" \
  -d '{ "agentId": "my-agent", "name": "My Trial Agent" }'

When the 50-call trial is exhausted, requests return HTTP 402 with an upgrade_url pointing to /billing/upgrade.

4

Recall it

Recall memories via semantic search. The query is embedded and matched against stored memories using pgvector cosine similarity.

bash
curl -X POST https://forge.synapselayer.org/api/v1/sdk/recall \
  -H "Content-Type: application/json" \
  -H "x-connect-token: $SYNAPSE_TOKEN" \
  -d '{
    "query": "What are the user preferences?",
    "mode": "hybrid",
    "limit": 5
  }'

Using the Python SDK

The same flow with the Python SDK. Every operation goes through the full 3-layer security pipeline automatically.

python
from synapse_layer import Synapse

# Initialize — all 3 security layers active server-side
client = Synapse(token="sk_connect_YOUR_KEY")

# Store a memory (PII sanitization + DP noise + encryption automatic)
result = client.remember("User prefers dark mode and lives in Berlin")

print(result["memoryId"])        # Unique memory ID
print(result["trustQuotient"])   # Confidence x validation score
print(result["encrypted"])       # True — AES-256-GCM at rest

# Recall memories via semantic search
memories = client.recall("user preferences", top_k=5)
for m in memories:
    print(f"{m['content']} (tq: {m['trust_quotient']})")