MemTensor/MemOS

Self-evolving memory OS for LLM & AI Agents: ultra-persistent memory, hybrid-retrieval, and cross-task skill reuse, with 35.24% token savings and DeepSeek Harness support.

MemOS 2.0 – A Memory Operating System for LLMs & AI Agents

What it is – MemOS (Memory OS) is a service that gives large‑language‑model agents a persistent, searchable, and editable memory store. It treats memories as a graph of nodes (text, images, tool traces, personas, etc.) that can be queried with natural‑language or vector search, and it can run either as a fully managed cloud API or as a self‑hosted service on‑premise.

Why it matters – Current LLM deployments treat context as a short‑term window; MemOS adds a long‑term “brain” that lets agents recall past interactions, evolve skills, and share or isolate knowledge across users, projects, or multiple agents. Benchmarks cited in the repo (LoCoMo 88.83, LongMemEval 89.20, OmniMemEval leader) suggest it outperforms existing commercial memory products.


Core Features (as described in the README)

Feature What it does
Unified Memory API One set of HTTP endpoints to add, retrieve, edit, and delete memories; the data model is a graph rather than a black‑box vector store.
Multi‑modal support Stores text, images, tool‑trace logs, and persona data together, enabling joint retrieval and reasoning.
Memory cubes Logical “knowledge bases” that can be composed, isolated, or shared across users/agents.
Asynchronous ingestion (MemScheduler) Handles high‑concurrency writes with millisecond‑level latency.
Feedback‑driven correction Memories can be refined via natural‑language feedback (e.g., “replace this fact”).
Hybrid retrieval Combines full‑text search (FTS5) with vector similarity for fast, accurate look‑ups.
Local‑first SQLite storage The on‑device plugin stores everything locally, no cloud required.
Cloud service Hosted version (no infra needed) reachable via an API key.
Agent plugins Ready‑made plugins for OpenClaw, Hermes, and DeepSeek Harness (both cloud and local variants).
Dashboard / Viewer Web UI to inspect and edit the memory graph.

Typical Use‑Cases

  • Personal assistants that remember user preferences (“I like strawberry”) across sessions.
  • Customer‑support bots that can retrieve prior tickets or account history.
  • Multi‑agent systems where agents share a common knowledge base or keep separate private cubes.
  • Skill‑evolution pipelines that store L1 traces, L2 policies, and L3 world‑model updates for continual learning.

Quick‑Start Options

Mode How to start Infrastructure
Cloud API Sign up → get an mpg‑… API key → call /add/message and /search/memory endpoints. None (hosted by MemOS).
Self‑host (Docker) git clone … && cd MemOS && cp docker/.env.example .env && docker compose up Neo4j + Qdrant containers (graph + vector DB).
Self‑host (uvicorn) Same repo, run uvicorn memos.api.server_api:app … after starting Neo4j & Qdrant yourself. Neo4j + Qdrant services.
Local Plugin npm install @memtensor/memos-local-plugin (or run the provided install.sh script) inside an existing OpenClaw, Hermes, or DeepSeek Harness environment. Only Node.js; memory stored in local SQLite.
Cloud Plugin openclaw plugins install @memtensor/memos-cloud-openclaw-plugin@latest (or the DSH equivalent). Uses MemOS Cloud; no local DB needed.

Example Code (Python, Cloud API)

import requests
API_KEY = "mpg-..."
BASE = "https://memos.memtensor.cn/api/openmem/v1"
HEADERS = {"Authorization": f"Token {API_KEY}", "Content-Type": "application/json"}
# Add a memory
requests.post(f"{BASE}/add/message", headers=HEADERS, json={
    "user_id": "alice",
    "conversation_id": "conv_001",
    "messages": [{"role": "user", "content": "I like strawberry"}],
})
# Query it back
resp = requests.post(f"{BASE}/search/memory", headers=HEADERS, json={
    "query": "What do I like?",
    "user_id": "alice",
})
print(resp.json())

Community & Resources


License

Apache 2.0 (see LICENSE in the repo).


Bottom line – MemOS provides a production‑ready, plug‑and‑play memory layer for LLM‑based agents, with both cloud‑managed and fully local deployment paths, and it already ships integrations for several popular open‑source agents.

Related

  • Project
  • Project
  • Project
  • Project
  • Project