API Documentation

Everything you need to integrate MemClaw into your agents.

Endpoint Reference

MethodPathDescription
POST/api/memoriesWrite a new memory
GET/api/memoriesList memories
POST/api/searchSemantic search across memories
POST/api/recallContext-aware recall
PATCH/api/memories/:id/statusUpdate memory status
GET/api/entitiesList extracted entities
GET/api/entities/relationsEntity relationship graph
POST/api/ingestIngest content into memories
GET/api/healthService health check
POST/mcpMCP protocol endpoint

Authentication

Include your API key in the X-API-Key header. All requests require a tenant_id query parameter.

API Key Header

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://memclaw.net/api/health"

Write Memory

Store a memory. MemClaw automatically generates embeddings, extracts entities, and detects contradictions.

Write Memory

curl -X POST "https://memclaw.net/api/memories" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tenant_id": "YOUR_TENANT",
    "agent_id": "my-agent",
    "content": "The user prefers dark mode and concise responses.",
    "memory_type": "preference"
  }'

Context Recall

Recall combines semantic search with entity lookup. Pass a conversation context to get relevant memories.

Context Recall

curl -X POST "https://memclaw.net/api/recall" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tenant_id": "YOUR_TENANT",
    "query": "What are the user settings?",
    "filter_agent_id": "my-agent"
  }'

Entity Lookup

Browse entities extracted from memories and their relationships.

List Entities

curl "https://memclaw.net/api/entities?tenant_id=YOUR_TENANT&limit=50" \
  -H "X-API-Key: YOUR_API_KEY"

Status Update

Mark memories as archived or contradicted. Active memories are prioritized in search and recall.

Update Status

curl -X PATCH "https://memclaw.net/api/memories/MEMORY_ID/status?tenant_id=YOUR_TENANT" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "archived"}'