API Reference
Give your AI agents persistent long-term memory. The LoopMemory REST API lets you store, search, and manage context programmatically.
Authentication
All API requests require an X-API-Key header. Generate keys from the Developer Console.
X-API-Key: lm_sk_your_api_key_here
Rate Limiting
Default: 100 requests/minute per key. Rate limit headers are included in every response:
X-RateLimit-Limit— Max requests per windowX-RateLimit-Remaining— Remaining requestsX-RateLimit-Reset— Window reset timestamp (Unix)
POST
/api/v1/memoriesStore a new memory with automatic semantic embedding and knowledge graph extraction.
Request Body
{
"text": "The user prefers dark mode and uses VS Code",
"source": "onboarding",
"projectId": "optional-uuid",
"tags": ["preferences", "setup"],
"metadata": { "priority": "high" }
}Response
{
"success": true,
"memory": {
"id": "uuid",
"content": "The user prefers dark mode and uses VS Code",
"source": "onboarding",
"project_id": null,
"created_at": "2024-01-01T00:00:00Z"
}
}cURL
curl -X POST https://loopmemory.vercel.app/api/v1/memories \
-H "Content-Type: application/json" \
-H "X-API-Key: lm_sk_your_key" \
-d '{"text": "User prefers dark mode"}'GET
/api/v1/memoriesList all stored memories, optionally filtered by project.
Query Parameters
projectIdstringFilter by project UUIDlimitnumberMax results (default: 50)offsetnumberPagination offset (default: 0)Response
{
"success": true,
"memories": [...],
"count": 20
}cURL
curl https://loopmemory.vercel.app/api/v1/memories?limit=10 \ -H "X-API-Key: lm_sk_your_key"
POST
/api/v1/memories/searchSemantic search across all memories using vector similarity. Returns results enriched with knowledge graph context.
Request Body
{
"query": "What editor does the user use?",
"projectId": "optional-uuid",
"limit": 5,
"minScore": 0.5
}Response
{
"success": true,
"results": [
{
"memory": {
"id": "uuid",
"content": "The user prefers dark mode and uses VS Code",
"graph_context": [
{ "name": "VS Code", "type": "TOOL", "relation": "MENTIONS" }
]
},
"score": 0.92
}
],
"count": 1
}cURL
curl -X POST https://loopmemory.vercel.app/api/v1/memories/search \
-H "Content-Type: application/json" \
-H "X-API-Key: lm_sk_your_key" \
-d '{"query": "user editor preference"}'GET
/api/v1/projectsList all projects for the authenticated user.
Response
{
"success": true,
"projects": [
{ "id": "uuid", "name": "My App", "description": "..." }
]
}cURL
curl https://loopmemory.vercel.app/api/v1/projects \ -H "X-API-Key: lm_sk_your_key"
POST
/api/v1/projectsCreate a new project to organize memories.
Request Body
{
"name": "My Chatbot",
"description": "Memory layer for my production chatbot"
}Response
{
"success": true,
"project": {
"id": "uuid",
"name": "My Chatbot",
"description": "Memory layer for my production chatbot"
}
}cURL
curl -X POST https://loopmemory.vercel.app/api/v1/projects \
-H "Content-Type: application/json" \
-H "X-API-Key: lm_sk_your_key" \
-d '{"name": "My Chatbot"}'Ready to build?
Generate your API key and start giving your AI agents persistent memory in minutes.
Get Your API Key