Documentation

Everything you need to integrate Memory Spine into your AI agent.

Contents

Quick Start

Get up and running in under 5 minutes.

1. Get Your API Key

Sign up at memory.six-sov.com/signup to get your API key.

2. Store Your First Memory

curl -X POST https://memory.six-sov.com/v1/memory/store \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "my-agent",
    "state": {"user_name": "Alice", "preferences": {"theme": "dark"}},
    "label": "user-init"
  }'

3. Retrieve Memory Chain

curl https://memory.six-sov.com/v1/memory/chain/my-agent \
  -H "Authorization: Bearer YOUR_API_KEY"

4. Verify Chain Integrity

curl https://memory.six-sov.com/v1/memory/verify/my-agent \
  -H "Authorization: Bearer YOUR_API_KEY"

Authentication

All API requests require a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY

API keys are scoped to your account and have full access to your agent memories. Keep them secure.

TierRate LimitMax Entries
Free100 req/min1,000
Pro1,000 req/min10,000
Sovereign10,000 req/minUnlimited

API Endpoints

Store Memory

POST /v1/memory/store

Store a new memory entry. Automatically chains to previous entry.

Request Body

FieldTypeRequiredDescription
agent_idstringYesUnique identifier for your agent
stateobjectYesJSON state to store (max 64KB)
labelstringNoHuman-readable label for this entry

Response

{
  "entry_id": "mem_a1b2c3d4e5f6",
  "agent_id": "my-agent",
  "chain_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb924...",
  "prev_hash": "sha256:d7a8fbb307d7809469ca9abcb0082e4f...",
  "depth": 47,
  "timestamp": "2026-02-13T12:00:00Z",
  "receipt": "rcpt_f8c505ce7a2b..."
}

Get Memory Chain

GET /v1/memory/chain/{agent_id}

Retrieve the full memory chain for an agent.

Query Parameters

ParamTypeDefaultDescription
limitint100Max entries to return
offsetint0Entries to skip
sinceISO8601Filter by timestamp

Get Single Entry

GET /v1/memory/entry/{entry_id}

Retrieve a specific memory entry by ID.

Verify Chain

GET /v1/memory/verify/{agent_id}

Verify the integrity of an agent's memory chain.

Response

{
  "agent_id": "my-agent",
  "chain_valid": true,
  "depth": 47,
  "first_entry": "mem_genesis123",
  "last_entry": "mem_a1b2c3d4e5f6",
  "verified_at": "2026-02-13T12:00:00Z"
}

Health Check

GET /health

Check API status. No authentication required.

Core Concepts

Hash Chaining

Every memory entry contains a hash of the previous entry. This creates an immutable chain — if any entry is modified, all subsequent hashes become invalid.

Entry N:
  state: {...}
  prev_hash: sha256(Entry N-1)
  chain_hash: sha256(state + prev_hash + timestamp)

Receipts

Every store operation returns a cryptographic receipt. This receipt proves:

Checkpoints

Mark significant states as checkpoints for faster recovery:

POST /v1/memory/store
{
  "agent_id": "my-agent",
  "state": {...},
  "label": "checkpoint:daily-backup",
  "checkpoint": true
}

Error Handling

All errors return a consistent JSON structure:

{
  "error": {
    "code": "CHAIN_INTEGRITY_FAILED",
    "message": "Chain hash mismatch at depth 23",
    "details": {...}
  }
}
CodeHTTP StatusDescription
UNAUTHORIZED401Invalid or missing API key
RATE_LIMITED429Too many requests
QUOTA_EXCEEDED403Entry limit reached for tier
INVALID_STATE400State exceeds 64KB or invalid JSON
AGENT_NOT_FOUND404No chain exists for agent_id
CHAIN_INTEGRITY_FAILED500Internal chain verification failed

SDKs & Libraries

Official SDKs coming soon:

In the meantime, use any HTTP client with the REST API.