> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evermind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Your First Memory in 5 Minutes

> Store, index, and search your first memory with EverOS

Get EverOS working in under 5 minutes. By the end of this guide, you'll store a conversation, wait for indexing, and search for it.

## Prerequisites

```bash theme={null}
pip install everos-cloud
export EVEROS_API_KEY="your_api_key"
```

## Step 1: Store a Conversation

Store a group conversation message containing a user preference.

```python theme={null}
import time
from everos_cloud import EverOS

client = EverOS()
group_mem = client.v1.memories.group

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

# Store a message
response = group_mem.add(
    group_id="demo_001",
    group_meta={"name": "Cookbook Demo"},
    messages=[
        {
            "role": "user",
            "sender_id": "user_alice",
            "sender_name": "Alice",
            "timestamp": now_ms,
            "content": "I prefer working in the morning, usually from 6am to 10am. That's when I'm most productive.",
        }
    ],
)

print(response)
```

**Expected output:**

```json theme={null}
{
  "status": "queued",
  "message": "Message accepted and queued for processing",
  "request_id": "02177034845390800000000000000000000ffff..."
}
```

## Step 2: Wait for Indexing

EverOS processes messages asynchronously. Memory extraction happens when:

* A conversation boundary is detected (topic change, time gap)
* Enough context accumulates for meaningful extraction

<Tip>
  For testing, send a follow-up message with a different topic to trigger boundary detection.
</Tip>

```python theme={null}
import time

# Send a second message to trigger boundary detection
response = group_mem.add(
    group_id="demo_001",
    group_meta={"name": "Cookbook Demo"},
    messages=[
        {
            "role": "user",
            "sender_id": "user_alice",
            "sender_name": "Alice",
            "timestamp": now_ms + 5000,
            "content": "Let's switch topics - what's the weather like today?",
        }
    ],
)

# Wait for indexing
print("Waiting for memory extraction...")
time.sleep(5)
```

## Step 3: Search Your Memory

Now search for the preference you stored.

```python theme={null}
response = client.v1.memories.search(
    filters={"user_id": "user_alice"},
    query="when does alice prefer to work",
    method="hybrid",
    memory_types=["episodic_memory", "profile"],
    top_k=5,
)

data = response.data
episodes = data.episodes if data else []

print(f"Found {len(episodes)} relevant memories:\n")
for ep in episodes:
    print(f"Type: {getattr(ep, 'memory_type', 'N/A')}")
    print(f"Content: {getattr(ep, 'episode', None) or getattr(ep, 'summary', 'N/A')}")
    print(f"Score: {getattr(ep, 'score', 'N/A')}")
    print("-" * 40)
```

**Expected output:**

```
Found 1 relevant memories:

Type: episodic_memory
Content: Alice prefers working in the morning, from 6am to 10am when she is most productive.
Score: 0.85
----------------------------------------
```

## Complete Working Script

Here's the full script you can copy and run:

```python theme={null}
# pip install everos-cloud -U
# export EVEROS_API_KEY="your_api_key"

import time
from everos_cloud import EverOS

client = EverOS()
group_mem = client.v1.memories.group

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

# 1. Storing conversation...
print("1. Storing conversation...")

group_mem.add(
    group_id="demo_001",
    group_meta={"name": "Cookbook Demo"},
    messages=[
        {
            "role": "user",
            "sender_id": "user_bob",
            "sender_name": "Bob",
            "timestamp": now_ms,
            "content": "I love hiking on weekends, especially in the mountains.",
        }
    ],
)

group_mem.add(
    group_id="demo_001",
    group_meta={"name": "Cookbook Demo"},
    messages=[
        {
            "role": "user",
            "sender_id": "user_bob",
            "sender_name": "Bob",
            "timestamp": now_ms + 5000,
            "content": "Anyway, let's talk about something else now.",
        }
    ],
)

# 2. Waiting for indexing...
print("2. Waiting for indexing...")
time.sleep(5)

# 3. Searching memories...
print("3. Searching memories...")

response = client.v1.memories.search(
    filters={"user_id": "user_bob"},
    query="outdoor activities bob enjoys",
    method="hybrid",
    memory_types=["episodic_memory", "profile"],
    top_k=5,
)

data = response.data
episodes = data.episodes if data else []

print(f"\nFound {len(episodes)} memories:")
for ep in episodes:
    print(f"Type: {getattr(ep, 'memory_type', 'N/A')}")
    print(f"Content: {getattr(ep, 'episode', None) or getattr(ep, 'summary', 'N/A')}")
    print(f"Score: {getattr(ep, 'score', 'N/A')}")
    print("-" * 40)
```
