Get started in three steps
Step 1: Get your API key
- Click “Create API Key”
- Give your key a descriptive name
- Copy and securely store your key Go to ApiKey Management Page
Step 2: Save your first memory
Store raw data into your memory space for processing and retrievalAdd memories
POST /api/v1/memorise
Add memories
POST /api/v1/memorise
Copy
import httpx
import asyncio
from datetime import datetime, timedelta, timezone
async def save_memories():
headers = {
"Authorization": "Bearer <your_api_key>",
"Content-Type": "application/json"
}
# Build conversation sequence to trigger boundary detection
messages = [
{
"group_id": "group_demo_123",
"group_name": "Demo Group",
"message_id": "msg_001",
"create_time": "2025-01-15T10:00:00Z",
"sender": "user_demo_001",
"sender_name": "Demo User",
"content": "I like black Americano, no sugar, the stronger the better!",
"refer_list": []
},
{
"group_id": "group_demo_123",
"group_name": "Demo Group",
"message_id": "msg_002",
"create_time": "2025-01-16T10:01:00Z",
"sender": "user_demo_001",
"sender_name": "Demo User",
"content": "Today I want to discuss the project progress.",
"refer_list": []
}
]
timeout_seconds = 20
async with httpx.AsyncClient() as client:
for i, msg in enumerate(messages, 1):
response = await client.post(
"https://api.evermind.ai/api/v1/memories",
json=msg,
headers=headers,
timeout=timeout_seconds
)
result = response.json()
print(f"Result: {result}")
asyncio.run(save_memories())
Step 3: Get your memory
Get Memories
GET /api/v1/memories
Get Memories
GET /api/v1/memories
Copy
import httpx
import asyncio
async def fetch_memories():
params = {
"user_id": "user_demo_001",
"memory_type": "episodic_memory",
"limit": 20,
"offset": 0
}
headers = {
"Authorization": "Bearer <your_api_key>",
"Content-Type": "application/json"
}
async with httpx.AsyncClient() as client:
response = await client.get(
"https://api.evermind.ai/api/v1/memories",
params=params,
headers=headers
)
result = response.json()
memories = result.get("result", {}).get("memories", [])
print(f"Fetched {len(memories)} memories")
asyncio.run(fetch_memories())
Search Memories
GET /api/v1/memories/search
Search Memories
GET /api/v1/memories/search
Copy
import httpx
import asyncio
async def search_memories():
search_data = {
"user_id": "user_demo_001",
"query": "coffee preference",
"retrieve_method": "hybrid", # Options: keyword, vector, hybrid, rrf, agentic
"top_k": 10,
"memory_types": ["episodic_memory"]
}
headers = {
"Authorization": "Bearer <your_api_key>",
"Content-Type": "application/json"
}
async with httpx.AsyncClient() as client:
response = await client.request(
"GET",
"https://api.evermind.ai/api/v1/memories/search",
json=search_data,
headers=headers,
timeout=20
)
result = response.json()
total = result.get("result", {}).get("total_count", 0)
print(f"Found {total} memories")
asyncio.run(search_memories())
Need help? Join our community.