Store and retrieve memories for MCP integration and personal memory management. Simple APIs to save context, preferences, and interactions.
Get up and running with the Memory API in under 5 minutes
Sign up and generate your API key from the user dashboard
Store user context, preferences, and interactions
Query memories with semantic or keyword search
Simple user memory management for MCP servers and personal AI assistants
Retrieve relevant memories instantly with semantic and keyword matching
Perfect for Model Context Protocol servers that need persistent user memory
User memories are encrypted and isolated with complete privacy
Two endpoints: create and search. That's all you need to manage memories
Complete reference for all Memory API endpoints
https://api.arkios.aiAll API requests require authentication using an API key in the x-api-key header. You can generate your API key from the user dashboard.
x-api-key: YOUR_API_KEY/api/knowledge-base/v1/user/memory/createStore a new memory for the authenticated user. Memories are automatically embedded and made searchable for later retrieval.
contentstringrequiredThe memory content to store. Cannot be empty.
namespacestringoptionalOptional namespace to organize memories (e.g., 'preferences', 'history')
explicit_savebooleanoptionaldefault: falseMark this memory as explicitly saved by the user
metadataobjectoptionalAdditional metadata to attach to the memory
tagsarrayoptionalTags for categorizing and filtering memories
fetch('https://api.arkios.ai/api/knowledge-base/v1/user/memory/create', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: 'User prefers dark mode and minimal UI design',
namespace: 'preferences',
explicit_save: true,
metadata: {
category: 'ui_preferences',
importance: 'high'
},
tags: ['preferences', 'ui', 'theme']
})
});{
"success": true,
"data": {
"memory_id": "73b407d3-3444-492b-ad45-ec6fc5ee5c53"
},
"message": "Memory created successfully"
}/api/knowledge-base/v1/user/memory/searchSearch through the authenticated user's stored memories. Supports semantic search for natural language queries and keyword search for exact matches.
querystringrequiredThe search query. Cannot be empty.
modestringoptionaldefault: semanticSearch mode: 'semantic' (meaning-based), 'keyword' (exact matches), or 'hybrid' (both)
namespacestringoptionalFilter results by namespace
agent_idstringoptionalFilter memories by specific agent
limitnumberoptionaldefault: 20Maximum number of results (max: 50)
min_scorenumberoptionaldefault: 0.3Minimum relevance score (0.0 - 1.0)
date_fromstringoptionalFilter memories created after this date (ISO 8601)
date_tostringoptionalFilter memories created before this date (ISO 8601)
include_archivedbooleanoptionaldefault: falseInclude archived memories in results
search_scopestringoptionaldefault: allScope of search: 'all', 'user_only', 'agent_only', or 'specific_agent'
fetch('https://api.arkios.ai/api/knowledge-base/v1/user/memory/search', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: 'user interface preferences',
mode: 'semantic',
namespace: 'preferences',
limit: 10,
min_score: 0.5,
search_scope: 'user_only'
})
});{
"success": true,
"data": [
{
"memory_id": "dc7d9e96-05fa-4cb3-846e-b42117e86418",
"content": "User prefers dark mode and minimal UI design",
"score": 0.87,
"chunk_info": {
"chunk_index": 0,
"chunk_count": 1,
"chunk_start": 0,
"chunk_end": 45,
"collection_source": "mem_7638fbae_74e8_4b8c_b9c8_8c74f4c4e90a"
},
"namespace": "preferences",
"agent_id": "user-created",
"created_at": "2025-11-03T18:18:24.459Z",
"importance_score": 0.8,
"access_count": 3,
"metadata": {
"category": "ui_preferences",
"importance": "high",
"tags": ["preferences", "ui", "theme"]
},
"match_type": "semantic",
"collection_source": "mem_7638fbae_74e8_4b8c_b9c8_8c74f4c4e90a",
"retrieval_info": {
"mode": "whole",
"is_partial": false,
"total_chunks": 1,
"returned_chunks": [0],
"content_size_words": 8
},
"highlights": [
"User prefers dark mode and minimal UI design"
]
}
],
"stats": {
"total_results": 1,
"semantic_results": 1,
"keyword_results": 0,
"search_time_ms": 145,
"search_scope": "user_only",
"collections_searched": [
"mem_7638fbae_74e8_4b8c_b9c8_8c74f4c4e90a"
]
},
"cached": false
}| Code | Description |
|---|---|
200 | OK - Request successful |
201 | Created - Memory created successfully |
400 | Bad Request - Invalid input or missing required fields |
401 | Unauthorized - Invalid or missing API key |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Something went wrong on our end |
When users ask questions in natural language, semantic search provides the most relevant results based on meaning.
Group related memories using namespaces (e.g., 'preferences', 'history', 'tasks') for better organization.
Use min_score to filter out low-relevance results. Start with 0.5 for high precision, 0.3 for higher recall.
Include relevant metadata and tags to enable advanced filtering and better context understanding.
Implement exponential backoff when you receive 429 responses to avoid overwhelming the API.
For commonly accessed memories, implement client-side caching to reduce API calls and improve performance.
Get your API key from the dashboard and start storing user memories for your MCP servers and AI assistants.