← Back to Leaderboard
MBAI-LAB

BAI-LAB/MemoryOS

Tiered memory for AI agents that need context across conversations

Engineering Health (Methodology)
B · 60/100
Maintenance Activity
● Updated 4mo ago
Latest Release
V1.2
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance12/35
Fork Adoption17/25
Release Cadence11/20
License Clarity20/20
DockerSelf-HostedMCPAPI
Total Stars
★ 1,632
24h Growth
+2
7d Growth
+7
Forks
176

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

BAI-LAB/MemoryOS Star History (2025-06-06 - 2026-12-03) ALL-TIME STAR HISTORY (2025-06 – 2026-12) +1.6k in 545d · avg +3/day 1.7k 862 0 2025-06-06: ★ 12025-07-12: ★ 4312025-08-16: ★ 5822025-09-20: ★ 6882025-10-25: ★ 7762025-11-29: ★ 8662026-01-03: ★ 9382026-02-07: ★ 1,0462026-03-14: ★ 1,2312026-04-18: ★ 1,3052026-05-23: ★ 1,3742026-06-27: ★ 1,4622026-08-01: ★ 1,5182026-09-05: ★ 1,5552026-10-10: ★ 1,5872026-11-12: ★ 1,6142026-12-03: ★ 1,632 ★ 1.6k 2025-06 2026-03 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & 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.

Memory tiers: Recent turns, consolidated dialogue, and durable profile or knowledge records have distinct roles.
Python interface: memoryos-pro demonstrates turn ingestion with add_memory and retrieval-assisted generation with get_response.
MCP tools: addmemory, retrievememory, and getuserprofile separate ingestion, lookup, and profile access.
Model configuration: Generation uses an OpenAI-compatible endpoint; embedding choices include BGE-M3, Qwen3-Embedding-0.6B, and all-MiniLM-L6-v2.
Storage variants: memoryos-chromadb/ provides a ChromaDB integration; use a different data path when switching embedding models.
Evaluation: eval/ provides LoCoMo parsing and scoring entrypoints for reproducing the task-specific results.
Best For

Python agents and MCP-compatible clients that need persistent conversational context and preference recall without building their own consolidation and retrieval policies.

Skip If

You only need document search, or you need verified multi-tenant controls, auditable deletion, and a ready-to-run production service without additional engineering.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedMCPAPI
pip install memoryos-pro -i https://pypi.org/simple

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
MemoryOS ★1.6k+7PythonApache-2.0Tiered memory for AI agents that need context across conversations
txtai13.8k+33PythonApache-2.0A Python embeddings database for vector, SQL, and graph retrieval in self-hosted
LightRAG41k+110PythonMITGraph-backed RAG for cross-document retrieval and multimodal indexing
PageIndex40.9k+92PythonMITTree-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.

Raw .md ↗
curl -sL https://repoforai.com/repo/BAI-LAB/MemoryOS.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

BAI-LAB/MemoryOS Star History on RepoForAI

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?

Use 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?

There is no verified minimum VRAM figure. With a hosted LLM, generation runs outside your host, but embedding work still needs to be sized for the selected model and request concurrency. If you also serve the LLM locally, include its inference footprint in your budget. The Docker examples pass --gpus=all; that flag is not evidence that every deployment requires a GPU.

Can I use MemoryOS commercially and keep user data on premises?

Yes. Apache-2.0 permits commercial use and self-hosting, subject to its conditions, including applicable notice obligations when redistributing. Verify the terms of the models and API providers you choose separately. Self-hosting MemoryOS does not by itself keep data local: trace which dialogue or profile data is sent to the configured generation endpoint.

How should I compare MemoryOS with Mem0, Zep, or a vector-store pipeline?

Choose MemoryOS if you want a ready-made policy for consolidating conversations, retrieving context across memory tiers, and maintaining inferred profiles. Choose a plain vector-store pipeline if you want to own retention, promotion, and profile logic. For Mem0 or Zep, run a workload-specific comparison covering retrieval quality, write and read latency, model usage, and deletion behavior; the standardized cross-system comparison is listed as ongoing.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining BAI-LAB/MemoryOS? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature BAI-LAB/MemoryOS on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

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

Saved in your browser · Export Markdown RFC tables or jump into /vs compare