Everything you need to integrate MemClaw into your agents.
| Method | Path | Description |
|---|---|---|
| POST | /api/memories | Write a new memory |
| GET | /api/memories | List memories |
| POST | /api/search | Semantic search across memories |
| POST | /api/recall | Context-aware recall |
| PATCH | /api/memories/:id/status | Update memory status |
| GET | /api/entities | List extracted entities |
| GET | /api/entities/relations | Entity relationship graph |
| POST | /api/ingest | Ingest content into memories |
| GET | /api/health | Service health check |
| POST | /mcp | MCP protocol endpoint |
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"
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"
}'Search memories by meaning, not just keywords. Returns ranked results with similarity scores.
Semantic Search
curl -X POST "https://memclaw.net/api/search" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tenant_id": "YOUR_TENANT",
"query": "user preferences",
"top_k": 5
}'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"
}'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"
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"}'