First Memory in 3 Minutes
Store and recall your first AI memory. Four steps. Three curl commands. Zero dependencies.
On this page
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.
export SYNAPSE_TOKEN="sk_connect_YOUR_KEY"Grant Consent (one-time)
Before storing memories, you need to grant consent for the agent to read and write on your behalf. This is a one-time operation per agent — once granted, all future calls are authorized automatically.
curl -X POST https://forge.synapselayer.org/api/v1/consent \
-H "Content-Type: application/json" \
-H "x-connect-token: $SYNAPSE_TOKEN" \
-d '{
"agentId": "default",
"scopes": ["memory:write", "memory:read"]
}'Response (200)
{
"consentId": "clx1def...",
"scopes": ["memory:write", "memory:read"],
"consentedAt": "2026-07-03T00:00:00.000Z"
}Tip
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.
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
tq field for the confidence score.Response (201)
{
"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:
{
"code": "quota_exceeded",
"upgrade_url": "https://forge.synapselayer.org/billing/upgrade"
}Handle it in the Python SDK by catching QuotaExceeded:
try:
client.store("User prefers dark mode")
except QuotaExceeded as e:
print(e.upgrade_url) # https://forge.synapselayer.org/billing/upgradeCheck your current usage anytime via GET /api/v1/usage or GET /api/forge/usage (with the x-connect-token header):
{ "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.
curl -X POST https://forge.synapselayer.org/api/v1/agent-onboardOptionally name the agent by sending a JSON body:
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.
Recall it
Recall memories via semantic search. The query is embedded and matched against stored memories using pgvector cosine similarity.
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.
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']})")