MCPcopy
hub / github.com/aiming-lab/SimpleMem

github.com/aiming-lab/SimpleMem @v0.3.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.3.0 ↗
4,424 symbols 16,080 edges 344 files 3,041 documented · 69%
README

simplemem_logo

Efficient Lifelong Memory for LLM Agents — Text & Multimodal

Store, compress, and retrieve long-term memories with semantic lossless compression. Now with multimodal support for text, image, audio & video.

Works with any AI platform that supports MCP (text memory) or Python integration (full multimodal)

Claude Desktop Claude Desktop Cursor Cursor LM Studio LM Studio Cherry Studio Cherry Studio PyPI PyPI Package + Any MCP Client

🇨🇳 中文🇯🇵 日本語🇰🇷 한국어🇪🇸 Español🇫🇷 Français🇩🇪 Deutsch🇧🇷 Português

🇷🇺 Русский🇸🇦 العربية🇮🇹 Italiano🇻🇳 Tiếng Việt🇹🇷 Türkçe

Project Page

arXiv GitHub License PRs Welcome

PyPI Python MCP Server Claude Skills

Discord WeChat

🚀 Quick Start🌟 Overview📦 Installation🔌 MCP Server📝 Citation

🔥 News

  • [05/21/2026] 📦 Unified simplemem package — one import, auto-routing! SimpleMem, Omni-SimpleMem, and EvolveMem now live in a single package. from simplemem import SimpleMem auto-selects the text or multimodal backend from the first method you call, and simplemem.optimize(...) taps EvolveMem's self-evolution loop. Install in one step with pip install -e ..
  • [05/14/2026] 🧬 EvolveMem (v3.0) — Self-Evolving Memory via AutoResearch! The retrieval infrastructure itself now self-evolves through LLM-driven closed-loop diagnosis. On LoCoMo, EvolveMem outperforms the strongest baseline by +25.7% relative; on MemBench, by +18.9% relative. The system discovers entirely new retrieval dimensions not present in the original design. View EvolveMem →
  • [04/02/2026] 🧠 Omni-SimpleMem (v2.0) — Multimodal Memory is Here! SimpleMem now supports text, image, audio & video memory. Achieving new SOTA on LoCoMo (F1=0.613, +47%) and Mem-Gallery (F1=0.810, +51%) over previous best. View Omni-SimpleMem →
  • [02/09/2026] 🚀 Cross-Session Memory — Outperforming Claude-Mem by 64%! View Cross-Session Documentation →
  • [01/20/2026] 📦 SimpleMem is now available on PyPI! Install via pip install simplemem. View Package Usage Guide →
  • [01/14/2026] 🎉 SimpleMem MCP Server is LIVE! Cloud-hosted at mcp.simplemem.cloud. View MCP Documentation →
  • [01/05/2026] SimpleMem paper was released on arXiv!

📑 Table of Contents


🚀 Quick Start

🧠 Understanding the Basic Workflow

At a high level, SimpleMem works as a long-term memory system for LLM-based agents. The workflow consists of three simple steps:

  1. Store information – Dialogues or facts are processed and converted into structured, atomic memories.
  2. Index memory – Stored memories are organized using semantic embeddings and structured metadata.
  3. Retrieve relevant memory – When a query is made, SimpleMem retrieves the most relevant stored information based on meaning rather than keywords.

This design allows LLM agents to maintain context, recall past information efficiently, and avoid repeatedly processing redundant history.

🎓 Basic Usage

SimpleMem ships as a single simplemem package. The default mode="auto" automatically detects which backend to use based on what you call — no manual configuration needed:

from simplemem import SimpleMem

mem = SimpleMem()  # mode="auto" — backend chosen by first call

The first method you call determines the backend:

First call Backend selected Why
add_dialogue() Text (SimpleMem) Dialogue-based API → text mode
add_text() / add_image() / add_audio() / add_video() Omni (Omni-SimpleMem) Multimodal API → omni mode
**📝 Auto → Text** (pure text input)
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"
**🧠 Auto → Omni** (multimodal input)
from simplemem import SimpleMem

mem = SimpleMem()  # auto mode

# add_image() → omni backend auto-selected
mem.add_text(
    "User loves hiking in the Rocky Mountains.",
    tags=["session_id:D1"],
)
mem.add_image("photo.jpg", tags=["session_id:D1"])
mem.add_audio("voice_note.wav", tags=["session_id:D1"])

result = mem.query("What does the user enjoy?", top_k=5)
for item in result.items:
    print(item["summary"])

mem.close()

💡 Tip: Auto mode picks the lightest backend that fits your data. You can still use mode="text" or mode="omni" explicitly if you prefer.


🧬 Advanced: Optimize Retrieval Config

Tune retrieval hyperparameters offline on your own dev set, then deploy the resulting Config for inference. This is a thin wrapper around EvolveMem's self-evolution loop:

import simplemem
from simplemem import SimpleMem, load_config

# mem is a finalized SimpleMem instance with memories already built
dev_questions = [
    ("When is the meeting?", "2pm tomorrow at Starbucks"),
    ("What should Bob prepare?", "market analysis report"),
]
config = simplemem.optimize(mem, dev_questions, max_rounds=3)
config.save("my_config.json")

# Later, deploy with the optimized config
config = load_config("my_config.json")
mem = SimpleMem(config=config)

EvolveMem runs an LLM-driven Evaluate → Diagnose → Propose → Guard cycle over your dev questions, adjusting global retrieval flags (top_k, fusion mode, answer verification, reflection rounds, ...). For the full standalone version with benchmark adapters and per-category overrides, see EvolveMem/.


🚄 Advanced: Parallel Processing

For large-scale dialogue processing, enable parallel mode:

from simplemem import create

mem = create(
    mode="text",
    clear_db=True,
    enable_parallel_processing=True,  # ⚡ Parallel memory building
    max_parallel_workers=8,
    enable_parallel_retrieval=True,   # 🔍 Parallel query execution
    max_retrieval_workers=4
)

💡 Pro Tip: Parallel processing significantly reduces latency for batch operations!


🌟 Overview

SimpleMem is a unified memory stack for LLM agents, built on one principle: store semantically lossless memory at high information density, so an agent recalls more while spending far fewer tokens. The package brings together three works that share this principle but attack different parts of the problem.

📝 SimpleMem: the efficiency core (text)

Most memory systems force a bad trade-off. They either passively accumulate raw interaction history (redundant, token-hungry) or run expensive reasoning loops to filter noise (slow, costly). SimpleMem instead compresses interactions through a three-stage pipeline:

Stage What it does
1. Semantic Structured Compression Distills unstructured interactions into compact memory units (self-contained facts with resolved coreferences and absolute timestamps), each indexed through multiple complementary views for flexible retrieval.
2. Online Semantic Synthesis Merges related context within a session into unified abstract representations, removing redundancy as memory is built rather than at query time.
3. Intent-Aware Retrieval Planning Infers the search intent behind a query to decide what to retrieve and assemble a precise, compact context.

On the LoCoMo benchmark this delivers a 26.4% average F1 gain over prior systems while cutting inference-time token consumption by roughly 30x. Mechanism details (hybrid index layers, compression examples, retrieval planning): SimpleMem text memory →.

🧠 Omni-SimpleMem: multimodal memory (text, image, audio, video)

Omni-SimpleMem extends the compression-first philosophy to four modalities, built on three principles: Selective Ingestion (entropy-driven filtering per modality), Progressive Retrieval (hybrid FAISS + BM25 with pyramid token-budget expansion), and Knowledge Graph Augmentation (multi-hop cross-modal reasoning). Rather than being hand-designed, its architecture was discovered by an autonomous research pipeline that ran around 50 experiments across two benchmarks, diagnosing failure modes, proposing architectural changes, and even repairing data-pipeline bugs with no human in the inner loop. Tellingly, the bug fixes and architectural changes each contributed more than all hyperparameter tuning combined, taking the system from a naive baseline to state-of-the-art on both LoCoMo and Mem-Gallery. Full docs: Omni-SimpleMem →.

🧬 EvolveMem: self-evolving retrieval

EvolveMem closes a blind spot shared by almost every memory system: the stored content evolves, but the retrieval machinery (scoring functions, fusion strategies, answer-generation policies) stays frozen after deployment. EvolveMem runs a closed-loop AutoResearch process (Evaluate → Diagnose → Propose → Guard → Repeat) in which an LLM diagnoses per-question failures and proposes configuration changes, guarded by automatic rollback on regression and exploration incentives during stagnation. It discovers new retrieval dimensions (query decomposition, entity-swap, answer verification) not in the original design, improves LoCoMo by 25.7% relative over the strongest baseline, an

Core symbols most depended-on inside this repo

get
called by 1853
simplemem/multimodal/storage/mau_store.py
get
called by 278
OmniSimpleMem/omni_memory/storage/mau_store.py
exists
called by 119
simplemem/multimodal/storage/cold_storage.py
add
called by 89
simplemem/multimodal/storage/mau_store.py
list_active
called by 78
EvolveMem/evolvemem/store.py
list_active
called by 78
simplemem/evolver/store.py
add
called by 69
cross/storage_lancedb.py
exists
called by 62
OmniSimpleMem/omni_memory/storage/cold_storage.py

Shape

Method 3,143
Function 636
Class 575
Route 70

Languages

Python100%
TypeScript1%

Modules by API surface

simplemem/evolver/manager.py182 symbols
EvolveMem/evolvemem/manager.py182 symbols
simplemem/evolver/store.py82 symbols
EvolveMem/evolvemem/store.py82 symbols
cross/storage_lancedb.py50 symbols
cross/storage_sqlite.py47 symbols
simplemem/multimodal/evaluation/benchmarks.py45 symbols
cross/tests/test_types.py45 symbols
OmniSimpleMem/omni_memory/evaluation/benchmarks.py45 symbols
cross/collectors.py42 symbols
simplemem/multimodal/orchestrator.py40 symbols
simplemem/integrations/server/http_server.py40 symbols

Dependencies from manifests, versioned

Jinja23.1.6 · 1×
MarkupSafe3.0.3 · 1×
Pillow9.0.0 · 1×
PyJWT2.8.0 · 1×
PySocks1.7.1 · 1×
PyYAML6.0.3 · 1×
SQLAlchemy2.0.44 · 1×
absl-py2.3.1 · 1×
accelerate1.10.1 · 1×
aiohappyeyeballs2.6.1 · 1×
aiohttp3.13.2 · 1×
aiosignal1.4.0 · 1×

For agents

$ claude mcp add SimpleMem \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact