MemoryOS: A Memory Operating System for Personalized AI Agents
A hierarchically structured memory operating system for personalized AI agents, delivering coherent, context-aware interactions with large gains on the LoCoMo benchmark.
- Source repo
- BAI-LAB/MemoryOS
- Stars
- ★ 1.6k
- Last updated
- 4mo ago V1.2
- FARS reviewed
- Nov 08, 2026
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 38/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changesOpenAI APIClaude Code · Claude API (Partial support)
- Cost
- Free software; you pay for model usage
- Models
- OpenAI · DeepSeek · Qwen per README Compare model cost & benchmarks →
- OS / editors
- VS Code per README
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- Developers building chatbots or AI assistants that need to remember user preferences across sessions can use MemoryOS for personalization.
- Not a fit if
- Simple stateless chat apps that need no long-term memory
- Users unwilling to supply API keys or request a Playground invite code
- Website
- baijia.online/memoryos ↗ set on GitHub
- Maintenance
- Commits in the last 6 monthslast commit 2026-07-07latest release V1.2 (2025-07-18)
- Source review
- 38/100 · Major gaps 2 safety controls not found
What does this agent do, and when should you use it?
MemoryOS is a memory operating system for personalized AI agents, inspired by OS memory management, featuring hierarchical storage and four core modules: Storage, Updating, Retrieval, and Generation. On the LoCoMo benchmark, it improves F1 by 49.11% and BLEU-1 by 46.18% on average. The repository offers a PyPI library, an MCP server, Docker images, and an online Playground, with support for popular LLMs (OpenAI, Deepseek, Qwen) and vector databases like ChromaDB.
MemoryOS stores conversation histories in short-term, mid-term, and long-term memory layers (short_term.py, mid_term.py). The Updater (updater.py) consolidates short-term interactions and promotes relevant information to long-term user profiles based on heat thresholds. On a user query, the Retriever (retriever.py) fetches relevant context from all layers and sends it with the query to an LLM to generate a personalized response. It provides a Python API (Memoryos class) and MCP tools (add_memory, retrieve_memory, get_user_profile).
- Developers building chatbots or AI assistants that need to remember user preferences across sessions can use MemoryOS for personalization.
- Product teams needing context continuity in multi-turn applications, such as customer support or tutoring systems.
- Researchers can reproduce paper results (eval directory) or compare memory management performance on LoCoMo.
- MCP client users (e.g., Cline, Claude Desktop) can integrate MemoryOS-MCP for long-term memory capabilities.
- Users requiring isolated or reproducible environments can deploy via Docker.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pip install memoryos-pro -i https://pypi.org/simplepip install -r requirements.txt
- Config files
config.json- Runtime
- Python 3.10+
How do you install or deploy this agent?
Install via PyPI: pip install memoryos-pro -i https://pypi.org/simple; or clone the GitHub repo: git clone https://github.com/BAI-LAB/MemoryOS.git, then run pip install -r requirements.txt inside memoryos-pypi. Requires Python >=3.10.
How do you use this agent?
Import from memoryos import Memoryos and initialize with user_id, openai_api_key, data_storage_path, and llm_model. Call add_memory(user_input, agent_response) to store interactions, and get_response(query) to get a response. For MCP, edit config.json and run python server_new.py --config config.json.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- dependency security — Pin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
- rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.
What are this agent's strengths and limitations?
- Demonstrates large measurable gains on LoCoMo (F1 +49.11%, BLEU-1 +46.18%).
- Modular architecture allows pluggable storage engines, update strategies, and retrieval algorithms.
- Provides an MCP server for easy integration into existing AI applications.
- Supports multiple LLMs and vector databases, offering flexibility.
- Requires an OpenAI API key (or compatible endpoint), incurring usage costs.
- Defaults to OpenAI API; moving to local models involves configuration effort.
- Documentation is still incomplete; some features like Playground require an invitation code.
- Memory capabilities are tailored to long-term personalization; may be overkill for simple stateless agents.
How does this agent compare with similar options?
The author's todo list mentions plans for a cross-model comparison with Mem0, Zep, and OpenAI, but no formal comparison data is currently provided.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| MemoryOS: A Memory Operating System for Personalized AI Agents This agent | 38 · Major gaps | Library / SDKFree + model costs | ★ 1.6k | 4mo ago | Python | OpenAI API |
| Nocturne Memory: Long-Term Memory Server for MCP Agents | 63 · Some gaps | MCP serverFree | ★ 1.4k | 29d ago | Python | — |
| txtai: All-in-One AI Framework | 57 · Major gaps | Library / SDKFree + model costs | ★ 14k | 1d ago | Python | OpenAI API · Claude API |
| Mnemosyne | 71 · Some gaps | CLIFree | ★ 3.7k | 1d ago | Python | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The README describes conversation writes, historical retrieval, profile access, and the need for a model API key. The Flask example also puts the API key in session configuration and persists user memories, but does not explain retention, deletion, access controls, or key protection, so least privilege, data flow, and sensitive-data handling are only partial. The example shows setup and chat after user configuration, but no explicit confirmation for memory writes, external calls, or deletion; no recovery mechanism is documented. There is no dependency pinning, audit, or mitigation evidence. The README gives a paper and team contact, but the publisher is unverified and code authorship and update responsibility are unclear, limiting attribution.
The README outlines layered storage, updating, retrieval, and generation, and offers several entry points, but the sample configuration JSON lacks a comma after llm_model and install paths, package names, and MCP instructions have inconsistencies. Python version and installation commands are given, but dependency versions, external model service availability, and fallback behavior are not sufficiently described. Flask routes return basic error text and status codes, which is partial failure feedback; the evidence does not show broader fault handling.
The README targets personalized AI agents and lists Claude Desktop, Cline, Cursor, several models, and deployment options, with PyPI, MCP, ChromaDB, Docker, and Playground paths. It claims pluggable storage, updating, and retrieval, but configuration boundaries, permission boundaries, and unsupported scenarios are unclear. Memory-add and retrieval tools are described, while automatic update thresholds and trigger conditions appear only piecemeal. Python, API-key, and custom base-URL requirements are visible, but a hard-coded local model path in the Playground example and GPU Docker command narrow the generality of environment guidance.
The README has a table of contents, architecture overview, and project structure, so information organization is good. Installation and basic usage cover several modes, but documentation is described as still being developed and the MCP JSON sample is invalid. Naming varies among MemoryOS, Memoryos, and MemoryOS-MCP. Examples help, but there is no FAQ and some test instructions are incomplete. Data location and the need for a separate path when changing embedding models are noted, though limitations coverage is thin. The repository includes the full Apache-2.0 license, justifying full marks for that criterion. News entries are dated but are not clearly tied to version releases; contribution and contact details exist, while maintenance responsibility and update commitments remain unclear. Unknown publisher identity is not itself a deduction.
The product description combines short-, mid-, and long-term memory for personalized context, and MCP tools and code examples make intended outputs and integration reasonably understandable. The README reports LoCoMo F1 and BLEU-1 gains and claims value from modularity and model support, but these results cannot be independently verified from this static packet, limiting the value score. The system requires external model APIs, credentials, an embedding model, and persistent storage; costs and resource requirements are not quantified.
The paper link, benchmark name, and specific improvement figures provide traceable leads. The README, license, and Flask example support parts of the feature, licensing, and implementation descriptions, but the sampled source is limited and offers no independent result evidence, so cross-source corroboration is weak. Performance numbers are presented as project claims without a clear separation between verified facts and promotional assertions. This assessment uses only the supplied static material and includes no execution or independent testing.
- Not found in source: dependency securityPin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- The Flask example stores the API key in session configuration and persists user memories under ./data; the packet does not explain key protection, retention, or deletion.
- The README's MCP configuration JSON is invalid, and some installation and run instructions are inconsistent; check the relevant module configuration before integration.
- Performance gains are project-reported; this static review did not execute the code or independently verify benchmark results.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
V1.2 Added support for the ChromaDB vector database and fixed the issue with the fixed LLM calls within it.
-
Release notes excerpt
Enhanced MCP and PyPI parallelization, added support for multiple embedding models, and removed *llm\_extract\_keywords* because it was redundant and increased token usage.View on GitHub ↗ -
v1.0 First release on GitHub
FAQ
How much does MemoryOS cost?
Can I use local models?
Where is memory data stored?
data_storage_path, or use ChromaDB as a vector database.How can I get a Playground invitation code?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.