REST API Reference

All endpoints require a Bearer token. Get your token from the dashboard.

# Base URL

https://api.agent-memo.ai

# Authentication header

Authorization: Bearer YOUR_API_KEY

Memories

GET/api/memories

List memories with optional filters

Query: ?topic=&type=&importance=&limit=&offset=

POST/api/memories

Create a new memory

{ "content": "...", "type": "project", "topic": "auth", "importance": 2, "tags": ["decision"] }
GET/api/memories/:id

Get a single memory by ID

PUT/api/memories/:id

Update an existing memory

{ "content": "updated content", "importance": 3 }
DELETE/api/memories/:id

Delete a memory

POST/api/memories/search

Semantic search across memories

{ "query": "database choice", "type": ["project"], "limit": 5 }
GET/api/memories/topics

List all topics with memory counts

POST/api/memories/check-duplicate

Check for semantic duplicates before storing

{ "content": "...", "threshold": 0.92 }

Knowledge Graph

POST/api/kg/add

Add an entity relationship (fact)

{ "subject": "auth-service", "predicate": "uses", "object": "JWT", "confidence": 0.95 }
POST/api/kg/query

Query entity relationships

{ "entity": "auth-service", "direction": "outgoing" }
POST/api/kg/invalidate

Invalidate a fact (mark as no longer true)

{ "factId": "..." }
POST/api/kg/timeline

View timeline of facts for an entity

{ "entity": "auth-service" }
GET/api/kg/stats

Knowledge graph statistics

Response format

All responses are JSON. Successful responses return the data directly. Errors return a JSON object with an error field.

Success (200)

{
  "id": "abc-123",
  "content": "Use PostgreSQL",
  "type": "project",
  "topic": "database",
  "importance": 3,
  "created_at": "2026-04-08T..."
}

Error (4xx/5xx)

{
  "error": "Memory not found"
}

Rate limits

During beta, there are no enforced rate limits. Be a good citizen — typical usage is well under 100 requests/minute. Rate limiting will be introduced with paid tiers.