Beijing University's MemoryOS Gives AI Agents 48% Better Long-Term Memory
A hierarchical memory system inspired by OS memory management gives LLM agents persistent, personalized recall across long conversations.
ProTakeaways
- MemoryOS, an EMNLP 2025 Oral, brings OS-style hierarchical memory to LLM agents.
- Three tiers (short, mid, long-term) with FIFO promotion and heat-scored segment paging.
- Reports 49.11% F1 and 46.18% BLEU-1 gains on the LoCoMo long-conversation benchmark.
- Ships as PyPI package, ChromaDB variant, Docker image, and an MCP server.
- Provider-agnostic: works with OpenAI, Anthropic, Deepseek-R1, Qwen3, vLLM, Llama-Factory.
- Apache 2.0, 1.5k GitHub stars, integrates with Claude Desktop, Cursor, and Cline.
Long conversations remain where most LLM agents break down. Once the context window fills, coherence unravels, personal facts get lost, and the assistant that seemed helpful yesterday feels amnesiac today. MemoryOS, an EMNLP 2025 Oral paper from BaiJia AI at Beijing University of Posts and Telecommunications, treats this as a memory management problem and borrows its playbook directly from operating systems.
The project has crossed 1.5k stars on GitHub, ships as a pip package, an MCP server, and a Docker image, and reports large gains on the standard long-conversation benchmark. Here is what it actually does and where it fits.
Memory, paged like an OS
Drawing on memory management principles from operating systems, MemoryOS designs a hierarchical storage architecture with four modules (Storage, Updating, Retrieval, Generation) across three tiers: short-term, mid-term, and long-term personal memory. If you have written a cache eviction policy, the mental model will feel familiar.
The promotion rules between tiers are where the design gets specific. Short-term to mid-term updates follow a dialogue-chain-based FIFO principle, while mid-term to long-term updates use a segmented page organization strategy. Mid-term memory tracks a heat score per segment based on visit count and recency. Both the User KB and Assistant Traits maintain a fixed-size FIFO queue of 100 entries, and a segment's heat score resets to zero when its interaction is consumed. Frequently referenced facts get promoted to long-term persona memory, while stale threads decay out.