Inspiration

Large language models have demonstrated remarkable reasoning capabilities, but they fundamentally remain stateless systems. Every conversation effectively begins from scratch, limiting their ability to develop long-term understanding, personalization, and autonomy.

We were inspired by a simple question:

What if an AI agent could continuously remember, learn, reflect, forget, and proactively assist users over months or even years of interaction?

This idea led us to develop MemOS-Q, a self-evolving Memory Operating System that transforms traditional LLMs into persistent, agentic AI systems. Rather than building another chatbot with memory, we wanted to explore how memory itself could become a first-class operating system abstraction for autonomous AI agents.


What it does

MemOS-Q is a persistent-memory agentic AI system that enables AI assistants to continuously accumulate experiences, learn user preferences, manage long-term goals, and proactively assist users across sessions.

Key capabilities include:

  • Persistent cross-session memory
  • Agentic planning and reasoning
  • Autonomous reflection and self-improvement
  • Long-term user preference learning
  • Explainable memory retrieval
  • Memory evolution and forgetting
  • Persistent task management
  • Proactive daily briefings
  • Telegram-based notifications
  • Multimodal memory ingestion
  • Production observability and telemetry

Unlike traditional AI assistants that lose context after every interaction, MemOS-Q continuously evolves its understanding of users over time.


How we built it

MemOS-Q was developed as a full-stack, cloud-native agentic AI platform.

The system consists of:

  • Next.js frontend for conversational interaction
  • FastAPI backend for orchestration and APIs
  • MemoryOS engine for persistent memory management
  • Agentic orchestration layer implementing planning, execution, and reflection
  • Qwen/Qwen-Agent for reasoning and multimodal understanding
  • PostgreSQL for durable memory and audit storage
  • Pinecone for vector retrieval
  • Redis + Celery for asynchronous agent execution
  • MinIO for object storage
  • Telegram agents for proactive notifications
  • Prometheus, Grafana, OpenTelemetry, and Langfuse for observability

The core agent loop follows an iterative self-improving workflow:

Observe
   ↓
Reason
   ↓
Plan
   ↓
Act
   ↓
Reflect
   ↓
Remember
   ↺

The agent continuously extracts durable memories, updates user profiles, resolves conflicts, consolidates knowledge, and improves future interactions through reflection.

The entire platform was deployed using Docker containers on Alibaba Cloud ECS infrastructure with production-grade monitoring and telemetry.


Challenges we ran into

One of our biggest challenges was that the project architecture evolved significantly throughout development.

We encountered challenges including:

  • Transitioning from simple in-memory storage to persistent cloud-backed memory
  • Migrating between embedding models and vector representations
  • Designing effective memory retrieval, ranking, and forgetting strategies
  • Implementing autonomous reflection and memory maintenance pipelines
  • Building multimodal memory extraction workflows
  • Transforming a reactive chatbot into a proactive agentic system

Deploying MemOS-Q in production introduced additional engineering challenges:

  • Managing distributed containerized services
  • Synchronizing frontend and backend configurations across environments
  • Resolving cloud networking and authentication issues
  • Debugging vector database consistency problems
  • Coordinating asynchronous agent workflows
  • Implementing end-to-end observability and tracing

Perhaps the most difficult challenge was balancing memory retention and forgetting. Storing everything degraded retrieval quality, while forgetting too aggressively reduced personalization effectiveness, requiring multiple iterations of scoring, summarization, consolidation, and decay strategies.


Accomplishments that we're proud of

We are particularly proud that MemOS-Q evolved from a simple persistent memory prototype into a fully agentic, self-evolving AI platform.

Some accomplishments include:

  • Building a complete persistent memory operating system
  • Implementing autonomous planning, reflection, and learning loops
  • Developing explainable memory retrieval mechanisms
  • Creating proactive task management and notification systems
  • Supporting multimodal memory ingestion
  • Deploying a production-ready cloud-native architecture
  • Integrating full observability through Prometheus, Grafana, OpenTelemetry, and Langfuse
  • Designing a scalable memory evolution and forgetting framework

Most importantly, we successfully demonstrated that persistent memory can serve as a foundational operating system abstraction for agentic AI.


What we learned

Building MemOS-Q taught us that persistent memory systems are fundamentally different from traditional LLM applications.

Some of our key learnings were:

  • Memory retrieval quality matters more than memory quantity
  • Forgetting is just as important as remembering
  • Agentic systems require orchestration, not just prompting
  • Reflection mechanisms significantly improve long-term performance
  • Production AI systems require extensive observability and telemetry
  • Long-term personalization introduces challenges such as preference drift and conflict resolution

Most importantly, we learned that building agentic AI requires designing entire ecosystems of interacting components rather than focusing solely on individual model calls.


What's next for MemOS-Q

Our long-term vision is to evolve MemOS-Q into a fully autonomous lifelong AI operating system.

Future directions include:

  • Multi-agent collaboration and shared memory spaces
  • Reinforcement learning from memory trajectories
  • Hierarchical memory architectures
  • Dynamic memory graph construction
  • Autonomous long-term goal planning
  • Self-improving reflection strategies
  • Enhanced multimodal memory understanding
  • Cross-device and cross-platform memory synchronization
  • Federated and privacy-preserving memory architectures
  • Fully autonomous personal AI assistants capable of long-term collaboration with humans

We believe that persistent memory will become a foundational component of the next generation of agentic AI systems, and MemOS-Q represents an important step toward that future.

Built With

Share this project:

Updates