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
}
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(api_key="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']})")