Documentation
Everything you need to integrate Memory Spine into your AI agent.
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.
| Tier | Rate Limit | Max Entries |
|---|---|---|
| Free | 100 req/min | 1,000 |
| Pro | 1,000 req/min | 10,000 |
| Sovereign | 10,000 req/min | Unlimited |
API Endpoints
Store Memory
Store a new memory entry. Automatically chains to previous entry.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| agent_id | string | Yes | Unique identifier for your agent |
| state | object | Yes | JSON state to store (max 64KB) |
| label | string | No | Human-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
Retrieve the full memory chain for an agent.
Query Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| limit | int | 100 | Max entries to return |
| offset | int | 0 | Entries to skip |
| since | ISO8601 | — | Filter by timestamp |
Get Single Entry
Retrieve a specific memory entry by ID.
Verify Chain
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
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:
- The exact state that was stored
- The timestamp of storage
- The position in the chain
- The integrity of the chain at that moment
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": {...}
}
}
| Code | HTTP Status | Description |
|---|---|---|
| UNAUTHORIZED | 401 | Invalid or missing API key |
| RATE_LIMITED | 429 | Too many requests |
| QUOTA_EXCEEDED | 403 | Entry limit reached for tier |
| INVALID_STATE | 400 | State exceeds 64KB or invalid JSON |
| AGENT_NOT_FOUND | 404 | No chain exists for agent_id |
| CHAIN_INTEGRITY_FAILED | 500 | Internal chain verification failed |
SDKs & Libraries
Official SDKs coming soon:
- Python:
pip install memory-spine(coming soon) - Node.js:
npm install memory-spine(coming soon) - Go:
go get github.com/six-sov/memory-spine-go(coming soon)
In the meantime, use any HTTP client with the REST API.