Memory OS of AI Agent

Jiazheng Kang, Mingming Ji, Zhe Zhao, Ting Bai

arXiv:2506.06326 · 2026-07-27 공개 · arXiv · PDF

llm long-term-memory personalization memory-management locomo-benchmark contextual-coherence memory-os hierarchical-storage

Abstract

Large Language Models (LLMs) face a crucial challenge from fixed context windows and inadequate memory management, leading to a severe shortage of long-term memory capabilities and limited personalization in the interactive experience with AI agents. To overcome this challenge, we innovatively propose a Memory Operating System, i.e., MemoryOS, to achieve comprehensive and efficient memory management for AI agents. Inspired by the memory management principles in operating systems, MemoryOS designs a hierarchical storage architecture and consists of four key modules: Memory Storage, Updating, Retrieval, and Generation. Specifically, the architecture comprises three levels of storage units: short-term memory, mid-term memory, and long-term personal memory. Key operations within MemoryOS include dynamic updates between storage units: 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. Our pioneering MemoryOS enables hierarchical memory integration and dynamic updating. Extensive experiments on the LoCoMo benchmark show an average improvement of 49.11% on F1 and 46.18% on BLEU-1 over the baselines on GPT-4o-mini, showing contextual coherence and personalized memory retention in long conversations. The implementation code is open-sourced at https://github.com/BAI-LAB/MemoryOS.

한국어 요약

한 줄 요약

MemoryOS는 AI 에이전트의 장기 기억 관리를 위한 OS 기반 메모리 시스템으로, 계층적 저장소와 동적 업데이트를 통해 대화 일관성과 개인화를 향상시킨다.

핵심 기여도

핵심 아이디어

기존 대형 언어 모델(LLM)은 고정된 컨텍스트 윈도우로 인해 장기 기억 관리가 어렵고, 대화 일관성과 개인화에 한계가 있다. MemoryOS는 운영체제의 메모리 관리 원칙을 차용하여, 대화 히스토리를 OS 스타일의 세그먼트-페이징 방식으로 저장하고, 열기반의 정보 우선순위를 적용해 동적 업데이트를 가능하게 한다. 특히, 단기에서 중기 메모리로는 대화 체인 기반의 FIFO 원칙을, 중기에서 장기 메모리는 세그먼트 페이징 전략을 사용한다. 이는 기존 메모리 메커니즘이 단일 차원에 머무르는 것과 달리, MemoryOS는 저장 구조, 업데이트 전략, 검색 메커니즘을 통합한 시스템적 접근을 제시한다.

기술적 접근법

주요 결과

의의 및 한계

MemoryOS는 AI 에이전트의 메모리 관리를 운영체제 원칙에 기반한 체계적인 프레임워크로 전환시켰으며, 장기 대화 일관성과 개인화를 동시에 달성할 수 있는 기반을 제공한다. 특히, 사용자 인격 모듈(Long-term Persona Module)을 통해 사용자 선호도의 진화를 반영한 응답 생성이 가능하다는 점에서 실용적 가치가 크다. 그러나, 열기반 메모리 제거 알고리즘의 정확도나, 대규모 대화 데이터에 대한 확장성에 대한 한계는 추가 연구가 필요하다.

실용적 활용

MemoryOS는 고객 서비스, 개인 비서, 가상 캐릭터 등 장기 대화가 필요한 산업에 적용 가능하다. 특히, 사용자 인격을 유지하면서도 대화 히스토리를 유연하게 관리해야 하는 상황에서 유용하며, AI 에이전트의 인간 유사한 대화 능력을 향상시키는 데 기여할 수 있다.