CentralIntelligence API

Persistent memory for AI agents. Machine-readable spec →

Authentication

All endpoints except POST /keys require a Bearer token:

Authorization: Bearer ci_sk_your_key_here

Create a key with POST /keys — no auth needed. Or run: npx central-intelligence-cli signup

Endpoints

POST /keys Create a new API key

Create a new API key. No authentication required.

ParameterTypeDescription
name string = defaultKey name
org_id stringOrganization ID for org-scoped memories
Example
curl -X POST https://central-intelligence-api.fly.dev/keys -H "Content-Type: application/json" -d '{"name": "my-agent"}'
Response
{ "id": "uuid", "key": "ci_sk_...", "message": "Save this key — it won't be shown again." }
POST /memories/remember 🔒 Store a memory

Store a memory. The content is embedded for semantic search and persisted across sessions.

ParameterTypeDescription
agent_id *stringIdentifier for the agent storing this memory
content *stringThe information to remember
user_id stringUser identifier for user-scoped memories
scope enum = agentVisibility scope
tags string[] = Tags for categorization
Example
curl -X POST https://central-intelligence-api.fly.dev/memories/remember -H "Authorization: Bearer ci_sk_..." -H "Content-Type: application/json" -d '{"agent_id": "my-agent", "content": "User prefers TypeScript", "tags": ["preference"]}'
Response
{ "memory": { "id": "uuid", "agent_id": "string", "content": "string", "scope": "agent", "tags": [ "string" ], "created_at": "ISO8601" } }
POST /memories/recall 🔒 Search memories using semantic similarity

Search memories using semantic similarity. Returns the most relevant memories ranked by cosine similarity to the query.

ParameterTypeDescription
agent_id *stringAgent identifier
query *stringNatural language search query
user_id stringInclude user-scoped memories
scope enumSearch scope
tags string[]Filter by tags
limit integer = 10Maximum results
Example
curl -X POST https://central-intelligence-api.fly.dev/memories/recall -H "Authorization: Bearer ci_sk_..." -H "Content-Type: application/json" -d '{"agent_id": "my-agent", "query": "what language does the user prefer?"}'
Response
{ "memories": [ { "id": "uuid", "content": "string", "relevance_score": 0.434, "scope": "agent", "tags": [ "string" ], "created_at": "ISO8601" } ] }
POST /memories/context 🔒 Auto-load relevant memories for the current task

Auto-load relevant memories for the current task. Describe what you're working on and get back everything relevant from past sessions.

ParameterTypeDescription
agent_id *stringAgent identifier
current_context *stringDescription of current task
user_id stringInclude user-scoped memories
max_memories integer = 5Maximum memories to return
Example
curl -X POST https://central-intelligence-api.fly.dev/memories/context -H "Authorization: Bearer ci_sk_..." -H "Content-Type: application/json" -d '{"agent_id": "my-agent", "current_context": "Setting up auth for the project"}'
Response
{ "memories": [ { "id": "uuid", "content": "string", "relevance_score": 0.5, "scope": "agent" } ] }
DELETE /memories/:id 🔒 Soft-delete a memory by ID

Soft-delete a memory by ID.

Example
curl -X DELETE https://central-intelligence-api.fly.dev/memories/MEMORY_ID -H "Authorization: Bearer ci_sk_..."
Response
{ "deleted": true }
POST /memories/:id/share 🔒 Share a memory with a broader scope so other agents can access it

Share a memory with a broader scope so other agents can access it.

ParameterTypeDescription
target_scope *enumTarget scope
user_id stringRequired when sharing to user scope
Example
curl -X POST https://central-intelligence-api.fly.dev/memories/MEMORY_ID/share -H "Authorization: Bearer ci_sk_..." -H "Content-Type: application/json" -d '{"target_scope": "org"}'
Response
{ "shared": true }
GET /usage 🔒 Get memory counts, usage events, and active agents for the authenticated API key

Get memory counts, usage events, and active agents for the authenticated API key.

Example
curl https://central-intelligence-api.fly.dev/usage -H "Authorization: Bearer ci_sk_..."
Response
{ "memories": { "total": 42, "by_scope": { "agent": 30, "user": 10, "org": 2 } }, "events_30d": { "remember": { "count": 100, "tokens": 5000 }, "recall": { "count": 200, "tokens": 3000 } }, "active_agents": [ "agent-1", "agent-2" ] }

Rate Limits

Free

30

req/min

500 memories

Pro

120

req/min

50000 memories

Team

600

req/min

500000 memories

Enterprise

3000

req/min

unlimited memories

Error Codes

401 Missing or invalid API key

403 Memory limit reached for your tier

429 Rate limit exceeded

500 Internal server error