BAI-LAB/MemoryOS
Tiered memory for AI agents that need context across conversations
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
MemoryOS is an application-level memory layer for conversational agents, not a general-purpose database or an operating-system service. The Python Memoryos class in memoryos.py orchestrates three tiers: recent user–assistant turns in short_term.py, consolidated dialogue in mid_term.py, and longer-lived profile and knowledge records in long_term.py. updater.py manages updates and promotion between tiers; retriever.py looks across them, and prompts.py holds prompts for LLM tasks such as summarization and analysis.
The Python workflow writes exchanges with add_memory and demonstrates retrieval-assisted generation through get_response. MCP exposes write, retrieval, and profile access as separate tools, so a compatible client can retain control of generation. The project separates storage, update policy, and retrieval, and ships a ChromaDB variant; this demonstrates a backend integration, not a stable plugin contract for arbitrary databases.
Key Capabilities & Differentiators
The retrieval path supplies relevant past dialogue, preferences, and knowledge rather than treating the entire transcript as context. The MCP profile tool also exposes traits and interests inferred from earlier exchanges. Configuration includes short-term capacity, mid-term capacity, heat and similarity thresholds, retrieval queue capacity, and long-term knowledge capacity. These are tuning controls for memory behavior, not measured throughput or scale limits.
LLM calls use the OpenAI API interface, so provider compatibility depends on the configured endpoint, not merely on the model name. Named embedding choices include BAAI/bge-m3, Qwen/Qwen3-Embedding-0.6B, and all-MiniLM-L6-v2. The LoCoMo evaluation reports average improvements of 49.11% in F1 and 46.18% in BLEU-1; these are task-specific score gains, not evidence of production latency or superiority across competing systems.
Trade-offs & Limitations
Compared with a plain ChromaDB-backed retrieval pipeline, MemoryOS saves application work by supplying consolidation, cross-tier retrieval, and profiles. The cost is more policy to tune and more failure modes to test. Summarization can lose details, and an inferred preference may become stale or simply be wrong. Measure write and read latency separately: embedding work, update-time LLM calls, and response generation have different cost and latency drivers. Switching embedding models requires a different storage path rather than reuse of the existing memory directory.
Mem0 and Zep are useful comparison candidates, but the standardized cross-system benchmark is still listed as ongoing. For a production rollout, verify tenant isolation, concurrent writes, backup and restore, and whether deletion covers both original dialogue and derived summaries or profiles. User and assistant IDs are configuration inputs, not proof of authorization. Apache-2.0 allows commercial adoption subject to its terms; hosted generation and model dependencies bring separate terms and data-handling considerations.
Hardware & Deployment Guide
The Python path requires Python 3.10 or newer and installs as memoryos-pro. Configure the user and assistant IDs, storage path, generation endpoint and credentials, model, and embedding choice. For MCP, install the dependencies under memoryos-mcp/ and launch python server_new.py --config config.json, then configure the client to invoke it. A local OpenAI-compatible generation endpoint is an option; running the library locally does not make a hosted endpoint offline.
The root Dockerfile uses python:3.10-slim, copies memoryos-pypi/, and installs its requirements and vim; it declares no MemoryOS service entrypoint. The GHCR and local-build examples open a GPU-enabled shell, not a turnkey MCP deployment. For persistent use, mount the data directory and keep credentials out of the image. V1.1 expanded parallelization in the PyPI and MCP paths, added embedding-model choices, and removed llm_extract_keywords to avoid redundant token use. V1.2 is the latest listed release, but its changes are not specified.
memoryos-pro demonstrates turn ingestion with add_memory and retrieval-assisted generation with get_response.addmemory, retrievememory, and getuserprofile separate ingestion, lookup, and profile access.memoryos-chromadb/ provides a ChromaDB integration; use a different data path when switching embedding models.eval/ provides LoCoMo parsing and scoring entrypoints for reproducing the task-specific results.Python agents and MCP-compatible clients that need persistent conversational context and preference recall without building their own consolidation and retrieval policies.
You only need document search, or you need verified multi-tenant controls, auditable deletion, and a ready-to-run production service without additional engineering.
Quick Start & Installation
pip install memoryos-pro -i https://pypi.org/simple
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| MemoryOS ★ | 1.6k | +7 | Python | Apache-2.0 | Tiered memory for AI agents that need context across conversations |
| txtai | 13.8k | +33 | Python | Apache-2.0 | A Python embeddings database for vector, SQL, and graph retrieval in self-hosted |
| LightRAG | 41k | +110 | Python | MIT | Graph-backed RAG for cross-document retrieval and multimodal indexing |
| PageIndex | 40.9k | +92 | Python | MIT | Tree-indexed RAG for evidence retrieval from long PDFs without a vector database |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/BAI-LAB/MemoryOS.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about MemoryOS
Should I integrate the Python package or the MCP server?
memoryos-pro when your Python application owns the conversation loop: add_memory saves a user–assistant exchange, and get_response demonstrates a generation path that uses memory. Use MCP when a compatible client already owns that loop and needs separate tools to write memories, retrieve relevant context, or read an inferred user profile.How should I size CPU, GPU, and VRAM for a deployment?
--gpus=all; that flag is not evidence that every deployment requires a GPU.Can I use MemoryOS commercially and keep user data on premises?
How should I compare MemoryOS with Mem0, Zep, or a vector-store pipeline?
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