Skip to main content

Prerequisites

Before getting your API key, configure your Memory Space Scenario Mode. It influences how memories are extracted and consolidated. Learn more in the Space Scenario Mode guide.
1

Install the SDK

pip install everos
2

Set your API key

from everos import EverOS

client = EverOS(api_key="your_api_key")
memories = client.v1.memories
Never commit API keys to version control. Use environment variables in production.
3

Add memories

Store conversation messages into your Memory Space for processing and retrieval.
import time

now_ms = int(time.time() * 1000)

response = memories.add(
    user_id="user_demo_001",
    session_id="session_gs_001",
    messages=[
        {
            "role": "user",
            "timestamp": now_ms,
            "content": "I like black Americano, no sugar, the stronger the better!",
        },
        {
            "role": "user",
            "timestamp": now_ms + 86_400_000,  # 1 day later
            "content": "Today I want to discuss the project progress.",
        },
    ],
)
print(f"status={response.data.status}  task_id={response.data.task_id}")

# Flush to trigger immediate memory extraction
memories.flush(user_id="user_demo_001", session_id="session_gs_001")
4

Retrieve memories

Fetch a user’s stored memories directly by user ID.
response = memories.get(
    filters={"user_id": "user_demo_001"},
    memory_type="episodic_memory",
)

episodes = response.data.episodes if response.data else []
print(f"Fetched {len(episodes) if episodes else 0} memories")
5

Search memories

Find relevant memories using vector, keyword, or hybrid retrieval.
response = memories.search(
    filters={"user_id": "user_demo_001"},
    query="coffee preference",
    method="vector",
    top_k=5,
)

episodes = response.data.episodes if response.data else []
print(f"Found {len(episodes)} memories")

What’s Next?

Core Concepts

Understand the memory lifecycle, memory types, and how EverOS processes your data.

API Reference

Explore the full API with detailed parameter docs, request/response examples, and error codes.

Dashboard & Logs

Monitor your quota usage, track API calls, and debug requests in the console.
Need help? Join our community.