SimpleMem
SimpleMem is a unified memory stack for LLM agents that stores, compresses, and retrieves long-term memories with semantic lossless compression, supporting text, image, audio, and video. It solves the problem of token-hungry, redundant memory systems by compressing interactions into structured, atomic memories and retrieving by intent. It is for developers building LLM agents that need efficient, long-term memory across sessions and modalities.
✨ Key features
- Semantic lossless compression of interactions into atomic memories
- Multimodal support for text, image, audio, and video
- Intent-aware retrieval planning for precise context assembly
- Self-evolving retrieval via EvolveMem AutoResearch loop
- Automatic backend routing between text and multimodal modes
- Parallel processing for large-scale dialogue and retrieval
🎯 Use cases
- Build LLM agents with cross-session memory for personalized conversations
- Store and retrieve multimodal memories (images, audio, video) for rich context
- Reduce token consumption in long-horizon agent tasks
- Tune retrieval hyperparameters on custom dev sets for improved accuracy
- Deploy memory as an MCP server for integration with Claude, Cursor, etc.
📦 Installation
🧰 Requirements: Python 3.10+ and an OpenAI-compatible API key (OpenAI, Qwen, Azure, etc.) configured before use.
git clone https://github.com/aiming-lab/SimpleMem.git
cd SimpleMempip install -r requirements.txtpip install -e . # default: text + multimodal + evolver
pip install -e ".[server]" # + MCP / HTTP server (mcp, fastapi, ...)
pip install -e ".[all]" # everything, including dev toolscp config.py.example config.py🚀 Usage
from simplemem import SimpleMem
mem = SimpleMem() # auto mode
# add_dialogue() → text backend auto-selected
mem.add_dialogue(
"Alice",
"Bob, let's meet at Starbucks tomorrow at 2pm",
"2025-11-15T14:30:00",
)
mem.add_dialogue(
"Bob",
"Sure, I'll bring the market analysis report",
"2025-11-15T14:31:00",
)
mem.finalize()
answer = mem.ask("When and where will Alice and Bob meet?")
# → "16 November 2025 at 2:00 PM at Starbucks"
❓ FAQ
What is the default mode and how does it choose the backend?
The default mode is 'auto', which automatically detects the backend based on the first method called: add_dialogue() selects the text backend, while add_text(), add_image(), add_audio(), or add_video() select the multimodal (omni) backend.
Can I use SimpleMem with non-OpenAI providers like Qwen or Azure?
Yes, SimpleMem works with any OpenAI-compatible API. You need to set the OPENAI_BASE_URL and verify the model name in config.py.
How do I optimize retrieval for my own data?
Use simplemem.optimize(mem, dev_questions, max_rounds=3) to run EvolveMem's self-evolution loop on your dev set, then save and load the resulting config for deployment.
Does SimpleMem support parallel processing?
Yes, you can enable parallel memory building and retrieval by setting enable_parallel_processing and enable_parallel_retrieval to True in the create() function.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.