API Reference
SharedMemory exposes a REST API for agent integration. All endpoints use JSON request/response bodies.
Getting Started
If you prefer a higher-level interface, check out the TypeScript SDK or MCP Server which wrap these endpoints.
Base URL
| Environment | URL |
|---|---|
| Production | https://api.sharedmemory.ai |
| Local dev | http://localhost:3000 |
Authentication
All agent API endpoints require a Bearer token in the Authorization header:
curl -X POST https://api.sharedmemory.ai/agent/memory/write \
-H "Authorization: Bearer sm_agent_..." \
-H "Content-Type: application/json" \
-d '{"content": "hello", "volume_id": "..."}'
info
API keys are created when you create an agent in the dashboard, or via POST /agents. See Authentication for details.
Common Response Format
Success 200 OK
{
"status": "ok",
"data": { ... }
}
Error 4xx / 5xx
{
"error": "error_code",
"details": "Human-readable description"
}
Validation Error 400
{
"error": "validation_failed",
"details": {
"content": ["String must contain at least 1 character(s)"],
"volume_id": ["Invalid uuid"]
}
}
Rate Limits
| Endpoint | Limit | Window |
|---|---|---|
| Memory write | 30 requests | per minute |
| Memory query | 60 requests | per minute |
| Document upload | 50 requests | per hour |
Rate limit headers are included in every response:
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1700000000