This directory contains interactive demos showcasing the core functionality of EverMemOS.
demo/
├── chat_with_memory.py # 🎯 Main: Interactive chat with memory
├── extract_memory.py # 🎯 Main: Memory extraction (HTTP API)
├── simple_demo.py # 🎯 Main: Quick start example
│
├── utils/ # Utility module
│ ├── __init__.py
│ ├── memory_utils.py # Shared utility functions
│ └── simple_memory_manager.py # Simple memory manager (HTTP API wrapper)
│
├── ui/ # UI module
│ ├── __init__.py
│ └── i18n_texts.py # Internationalization texts
│
├── chat/ # Chat system components
│ ├── __init__.py
│ ├── orchestrator.py # Chat application orchestrator
│ ├── session.py # Session management
│ ├── ui.py # User interface
│ └── selectors.py # Language/scenario/group selectors
│
├── tools/ # Auxiliary tools
│ ├── clear_all_data.py # Clear all memory data
│ ├── resync_memcells.py # Resync memory cells
│ └── test_retrieval_comprehensive.py # Retrieval testing tool
│
├── chat_history/ # 📁 Output: Chat logs (auto-generated)
│
├── README.md # 📖 Documentation (English)
Notes:
- All memory data is stored in databases (MongoDB, Elasticsearch, Milvus), no local
memcell_outputs/directory extract_memory.pydirectly calls HTTP API without complex configuration classes- Chat conversation history is saved in
chat_history/directory
The simplest way to experience EverMemOS! Just 67 lines of code demonstrating the complete memory workflow.
What it demonstrates:
- 💾 Store: Save conversation messages via HTTP API
- ⏳ Index: Wait for data to be indexed (MongoDB, Elasticsearch, Milvus)
- 🔍 Search: Retrieve relevant memories with natural language queries
Code example:
from demo.utils import SimpleMemoryManager
# Create memory manager
memory = SimpleMemoryManager()
# Store conversations
await memory.store("I love playing soccer, often go to the field on weekends")
await memory.store("Soccer is a great sport! Which team do you like?", sender="Assistant")
await memory.store("I love Barcelona the most, Messi is my idol")
# Wait for indexing
await memory.wait_for_index(seconds=10)
# Search memories
await memory.search("What sports does the user like?")
await memory.search("What is the user's favorite team?")How to run:
# Terminal 1: Start the API server
uv run python src/run.py
# Terminal 2: Run the simple demo
uv run python src/bootstrap.py demo/simple_demo.pyWhy this demo?
- ✅ Minimal code - understand core concepts in seconds
- ✅ Complete workflow - storage → indexing → retrieval
- ✅ Friendly output - explanations for every step
- ✅ Real HTTP API - uses the same API as production
Dependencies: utils/simple_memory_manager.py (HTTP API wrapper)
Batch process conversation data and extract memories via HTTP API.
Workflow:
- Clears all existing memories (ensures clean starting state)
- Loads conversation files from
data/directory (e.g.,data/assistant_chat_zh.json) - Sends each message to the API server (
/api/v1/memories) - Server-side automatically extracts MemCells, generates episodes and profiles
- All data is stored in databases (MongoDB, Elasticsearch, Milvus)
Prerequisites: API server must be running (uv run python src/run.py )
Dependencies: HTTP API, clear_all_data tool
Command-line interface for conversing with memory-enabled AI agents.
Features:
- Interactive language selection (Chinese/English) and scenario selection (Assistant/Group Chat)
- Automatically load conversation groups from MongoDB
- Flexible retrieval mode selection (RRF/Embedding/BM25/Agentic)
- Real-time display of retrieved memories
- Auto-save conversation history
Prerequisites: Must run extract_memory.py first to extract memory data
Dependencies: chat/ module, HTTP API
utils/simple_memory_manager.py- Simplified HTTP API wrapper for simple_demoutils/memory_utils.py- MongoDB connection and common utility functions
ui/i18n_texts.py- Bilingual interface text resources (Chinese/English)
chat/- Chat system implementation (orchestrator, session management, interface, selectors)tools/- Auxiliary tools (data cleanup, retrieval testing, etc.)
MEMORY_LANGUAGE controls the prompt language during memory extraction. Must match your data file language and be set before starting the API server.
| Data File | Setting |
|---|---|
*_en.json |
MEMORY_LANGUAGE=en |
*_zh.json |
MEMORY_LANGUAGE=zh |
Note: Setting
MEMORY_LANGUAGEinextract_memory.pydoes NOT work - the server reads this at startup. If languages mismatch, you'll get mixed Chinese/English memories. To switch languages, restart the API server after changing the setting.
The fastest way to experience EverMemOS! Just 2 terminals:
# Terminal 1: Start the API server (required)
uv run python src/run.py
# Terminal 2: Run the simple demo
uv run python src/bootstrap.py demo/simple_demo.pyWhat happens:
- 📝 Stores 4 conversation messages
- ⏳ Waits 10 seconds for indexing (MongoDB → Elasticsearch → Milvus)
- 🔍 Searches memories with 3 different queries
- 📊 Shows results with relevance scores and explanations
Note: The API server (src/run.py ) must be running in a separate terminal for the demo to work.
Run the extraction script to extract memories from conversation data:
# Start API server (if not already running)
uv run python src/run.py
# In another terminal, run the extraction script
uv run python src/bootstrap.py demo/extract_memory.pyThe script will:
- Clear all existing memory data
- Load
data/assistant_chat_zh.jsonconversation file - Send each message to the API server for memory extraction
- Store all memories in databases (MongoDB, Elasticsearch, Milvus)
💡 Tip:
extract_memory.pyis straightforward and directly calls the HTTP API. You can modify thedata_fileandprofile_scenevariables in the script to use different data files.
Run the chat script to start conversing with AI:
# Ensure API server is still running
# In another terminal, run the chat program
uv run python src/bootstrap.py demo/chat_with_memory.pyInteractive Selection:
- Language: Choose
[1] 中文or[2] English - Scenario: Choose
[1] Assistant Modeor[2] Group Chat Mode - Group: Select from available groups loaded from MongoDB
- Retrieval Mode: Choose RRF (recommended), Embedding, BM25, or Agentic
Chat Features:
- 💬 Natural language conversation with memory-based context
- 🔍 Automatic retrieval of relevant memories (displays retrieval results)
- 📝 Conversation history auto-saved to
chat_history/directory - 🧠 Special commands for detailed information (
help,clear,reload,exit)
The system uses sample conversation files from the data/ directory:
| Scenario | Language | Filename |
|---|---|---|
| Assistant Chat | Chinese | data/assistant_chat_zh.json |
| Assistant Chat | English | data/assistant_chat_en.json |
| Group Chat | Chinese | data/group_chat_zh.json |
| Group Chat | English | data/group_chat_en.json |
All data files follow the GroupChatFormat specification. See data documentation for details.
Using Custom Data:
Edit extract_memory.py and modify the data_file and profile_scene variables to point to your data file.
During chat sessions, the following commands are supported:
- Normal Input: Type questions directly, AI will answer based on memories
help- Show help informationclear- Clear current conversation historyreload- Reload memories and profilesexit- Save conversation history and exitCtrl+C- Interrupt and save
Create a .env file in the project root (refer to env.template):
# LLM Configuration
LLM_MODEL=your_model
LLM_API_KEY=your_api_key
LLM_BASE_URL=your_base_url
# Embedding Model Configuration
EMB_BASE_URL=http://localhost:11000/v1/embeddings
EMB_MODEL=Qwen3-Embedding-4B
# MongoDB Configuration
MONGODB_URI=mongodb://admin:memsys123@localhost:27017Project Context: AI product work group documenting the complete development journey of "Smart Sales Assistant"
Key Contents:
- MVP development phase: RAG-based Q&A system
- Advanced feature iteration: Emotion recognition, memory system
- Team collaboration practices: Complete workflow from requirements to delivery
Available in: English and Chinese versions
Good for exploring: Team collaboration patterns, project management, technical solution evolution
Conversation Context: Personal health & lifestyle assistant documenting nearly 2 months of continuous interaction
Key Contents:
- Travel planning: Food recommendations, itinerary suggestions
- Health management: Weight monitoring, dietary guidance
- Exercise recovery: Training advice, post-injury rehabilitation
Available in: English and Chinese versions
Good for exploring: Personalized services, long-term memory accumulation, contextual understanding
Group Chat AI Scenario Examples:
- What did Alex/Betty/... do in the emotion recognition project?
- Based on the emotion recognition project, what work capabilities does Alex/Betty/... demonstrate?
- What are the deliverable results of the emotion recognition project?
- How is the memory system project progressing?
Assistant AI Scenario Examples:
- Please recommend sports suitable for me.
- Please recommend food I might like.
- How is my health condition?
- 📋 Group Chat Format Specification - Data file format
- 🔌 API Documentation - API reference
- 📦 Data Documentation - Sample data details
- 🏠 Project Home - Project overview and architecture
- 📘 Batch Memorization Guide - Advanced usage
A: The MEMORY_LANGUAGE on the API server doesn't match your data file. Set it in .env to match your data (en or zh), then restart the server and re-run extraction.
A: Ensure the API server is running first: uv run python src/run.py
A: Edit the script and modify these variables:
data_file: Point to your JSON data fileprofile_scene: Set to"assistant"or"group_chat"base_url: API server address (defaulthttp://localhost:1995)
A: All memory data is stored via HTTP API to databases:
- MongoDB: Stores MemCells, episodes, profiles
- Elasticsearch: Keyword indexing (BM25)
- Milvus: Vector indexing (semantic retrieval)
- Local files: Only
chat_history/directory saves conversation logs
A: Two scenarios are supported:
- Assistant mode (assistant): One-on-one conversations, extract personalized profiles
- Group chat mode (group_chat): Multi-participant conversations, extract group memories and member profiles
A: JSON format following the GroupChatFormat specification. The project provides 4 sample files for reference.
A:
- MongoDB: Use MongoDB Compass or command-line queries
- Retrieval test: Run
demo/tools/test_retrieval_comprehensive.py - Clear data: Run
demo/tools/clear_all_data.py
- 🏠 See the main README for project setup and architecture
- 💬 Open an issue on GitHub
- 📧 Contact project maintainers
Happy exploring! 🧠✨