aiming-lab/SimpleMem
A compression-first memory layer for long-term text and multimodal agent recall
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
SimpleMem is an application-level memory layer, not a general-purpose vector database. In v0.3.0, from simplemem import SimpleMem exposes two backends behind one entry point: in auto mode add_dialogue() selects text, while add_text() and the media ingestion methods select Omni. The text pipeline turns dialogue into self-contained facts with resolved references and absolute timestamps, consolidates related fragments, then plans retrieval around query intent. The text example calls finalize() after ingestion and ask() for recall.
The MCP service persists LanceDB data and users.db. Omni uses a separate retrieval design, combining FAISS and BM25 with progressive token-budget expansion and a knowledge graph for cross-modal hops. EvolveMem is exposed through simplemem.optimize(...), an offline evaluation and tuning path that produces a loadable Config rather than changing production retrieval automatically. The Python dependency list includes accelerate and huggingface-hub; the server extra adds MCP and FastAPI.
Key Capabilities & Differentiators
Text retrieval combines semantic search, keyword matching, and metadata filtering. Memory construction and retrieval each have parallel settings with separate worker limits. The Python Omni API accepts text, images, audio, and video and applies modality-specific filtering before indexing. EvolveMem uses development questions with reference answers to evaluate settings such as top_k, fusion, answer verification, and reflection rounds, with rollback when proposed settings regress on the evaluation.
The text-only MCP surface supports token authentication, per-user tables, and Streamable HTTP using MCP 2025-03-26 and JSON-RPC 2.0. The Python setup accepts OpenAI-compatible endpoints; the supplied examples pair gpt-4.1-mini with Qwen/Qwen3-Embedding-0.6B. On LoCoMo, the project reports a 26.4% average F1 gain over prior systems and roughly 30-fold lower inference-time token consumption for text memory. Those results do not establish equivalent savings for ingestion, multimodal workloads, or production latency.
Trade-offs & Limitations
Compared with indexing raw transcripts directly in LanceDB or FAISS, SimpleMem takes on fact extraction, consolidation, and query planning, so agents can retrieve compact context rather than whole dialogue chunks. This moves work into LLM-driven memory construction and makes recall sensitive to extraction errors, especially unresolved references and wrong timestamps. Semantic compression is not verbatim preservation. Keep source records separately when provenance, replay, or auditability matters.
MCP reduces client integration work for text, but Omni still requires Python and adds modality processing and indexes to size. Hosted inference shifts model compute off the service host while introducing provider charges, network dependency, and data-boundary considerations. EvolveMem adds offline evaluation cost and can tune to an unrepresentative development set; validate on held-out conversations before promotion. Per-user tables and token authentication are useful controls, but do not by themselves establish tenant-isolation guarantees or operational readiness.
Hardware & Deployment Guide
Use Python 3.10+ with pip install simplemem or pip install -e . for source development; pip install -e ".[server]" adds MCP/HTTP dependencies. Set OPENAI_API_KEY, OPENAI_BASE_URL, and model names in config.py for the Python setup. The release sequence moved from text-only v0.1.0 to multimodal v0.2.0 and a unified package with auto-routing in v0.3.0. That package unification does not extend the MCP service to multimodal ingestion.
For self-hosted text MCP, populate .env and run docker compose --env-file .env up -d. The supplied Compose file publishes port 8000 and mounts the named volume simplemem_data at /app/MCP/data. Plan backups around that volume, not the ./data bind mount described in the quick start. Replace the default JWT_SECRET_KEY and ENCRYPTION_KEY before exposure. Compose defaults to OpenRouter; the host Ollama option uses http://host.docker.internal:11434/v1 for the LLM. Local service hosting alone does not establish offline operation: verify the paths for embedding and any other model calls too.
Long-running assistants that need compact recall from conversation history, with text clients using MCP and multimodal applications integrating through Python.
You mainly need a general-purpose vector database, verbatim transcript recovery without a separate archive, or full multimodal ingestion through MCP.
Quick Start & Installation
# 📥 Clone repository git clone https://github.com/aiming-lab/SimpleMem.git cd SimpleMem # 📦 Install dependencies (pinned versions) pip install -r requirements.txt # — OR — install as an editable package pip install -e . # default: text + multimodal + evolver pip install -e ".[server]" # + MCP / HTTP server (mcp, fastapi, ...) pip install -e ".[all]" # everything, including dev tools # ⚙️ Configure API settings cp config.py.example config.py # Edit config.py with your API key and preferences
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| SimpleMem ★ | 3.9k | +3 | Python | MIT | A compression-first memory layer for long-term text and multimodal agent recall |
| crawl4ai | 88.5k | +408 | Python | Apache-2.0 | Async browser crawler that turns web pages into Markdown and JSON for RAG |
| mempalace | 60.8k | +120 | Python | MIT | Local-first RAG memory for retrieving verbatim project and conversation history |
| LightRAG | 41k | +110 | Python | MIT | Graph-backed RAG for cross-document retrieval and multimodal indexing |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/aiming-lab/SimpleMem.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about SimpleMem
Which integration should I use, and does plain text always select the text backend?
Does self-hosting require a GPU, and how should I size the host?
Can we use it commercially and keep memory data inside our network?
When is a direct vector-store integration the better choice?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy