Skip to main content
Build an AI assistant that remembers user preferences, past conversations, and context, and carries that memory across sessions. This guide integrates EverOS into a personal assistant loop: recall relevant memory, generate a grounded reply, then persist the turn.

Architecture

The assistant runs the same loop every turn:
  1. Recall: search the user’s memory for context relevant to the message
  2. Generate: call your LLM with that context
  3. Persist: store the user and assistant messages back into EverOS
Extraction and consolidation happen in the background. You never manage them.

Setup

Store conversation turns

Store each turn into a session. Each message’s sender_id is who it’s attributed to: the user’s id for their messages, "assistant" for replies. Writes are asynchronous by default; extraction runs in the background.

Retrieve relevant context

Before generating, search the user’s memory. Episodes are narrative summaries of past conversations and are available within seconds of extraction. The profile (consolidated preferences and traits) builds up over time in the background; request it with include_profile=True and use it when present.
Two layers of context, and why you want bothEpisodes are consolidated memory, so they only appear once extraction has run.unprocessed_messages is the current session’s raw buffer, returned when you pin one session with filters={"session_id": ...}. It covers the window where something was just said but hasn’t been extracted yet.Reading both means a brand-new user still gets continuity from their very first turn, instead of the assistant drawing a blank until the first episode lands.Searching by user_id alone returns episodes only.

Complete assistant loop

By default extraction runs on its own schedule. If you want a memory available for recall right now, for example at the end of a session, call client.flush(session_id) to force extraction of what’s ready.

Best practices

Limit retrieved memories so you don’t overwhelm the LLM context window.
Use episodes for what happened in past conversations (available within seconds). Use the profile for stable, consolidated preferences and traits. It’s built in the background over many interactions, so treat it as optional context that gets richer over time.

Next steps

Retrieval methods

Vector, hybrid, and agentic retrieval in depth.

Python integration

Production patterns: error handling, retries, clean client setup.