by Xiaomi

OS-Memory pricing, limits and verdict

Turns phone records into a searchable memory graph for agents.

Best for
AI engineer building assistants
Not for
Non-technical user wanting a ready app
  • Memory
  • Developer

Should you use OS-Memory?

AI engineers building personal or on-device assistants get traceable memory across apps, for free under Apache 2.0. It needs Python 3.10, your own model services and a one-shot build, reads text only and has no native Windows support, so check privacy before feeding it real data.

Links records from many apps into one traceable event, such as a whole trip.

Xiaomi's access to phone data formats and its benchmark give it standing, but a Python library over SQLite is easy for others to copy.

Also for

  • Research engineer
  • Teams building on-device or personal assistants
  • Researchers evaluating phone-memory systems

Main trade-off

A build needs outside model services, so privacy depends on which you choose.

OS-Memory pricing

Free and open source under the Apache 2.0 licence. The cost is the language model and embedding services you point it at, which Xiaomi does not supply; build uses both, and search uses only the embedding service.

Install OS-Memory

pip install "hyperos-mem[mcp] @ git+https://github.com/XiaoMi/os-memory.git"

Before you start

  • Python 3.10 or newer and git, on Linux or macOS (Windows through WSL)
  • An OpenAI-compatible chat endpoint that supports function calling and JSON Schema structured output, for build
  • An OpenAI-compatible embeddings endpoint, with the same model and dimension for build and search
  • Absolute paths for the database file and any JSONL file passed to the MCP server

How to invoke it

Use it as a Python library through the HyperMemory class, or register the hypermem.mcp_server module with an MCP client, which then calls the add, build, search, read and status tools by name.

Works with

  • Claude Desktop
  • Cursor
  • Claude Code
  • any MCP client
  • Python agents through the library

Required runtime

  • Python 3.10+
  • git
  • A POSIX system: Linux, macOS or WSL
  • OpenAI-compatible LLM and embedding endpoints

Where it runs

  • Desktop
  • CLI
  • API

Data it can reach

  • records you submit (screen, SMS, notifications, calendar, location, recordings, chats, notes)
  • a local SQLite database file per user

The permissions this connector asks for, as its own documentation states them.

What OS-Memory can do

5 actions an agent can call. Open one for its parameters and an example.

addWrites records into the user's local database; it makes no network request and rolls back everything in the call if one record is invalid.

Example call

{"records": [{"type": "sms", "timestamp": "2026-05-03T09:06:00+08:00", "data": {"from_app": "SMS", "content": "Order E2026050301 is paid, G15 car 5 seat 08F.", "sender": "12306"}}], "user": "U01"}

Parameters

ParameterTypeNeededDescription
recordsarrayOptionalArray of records, each with type, timestamp and data. Pass either records or jsonl_path, not both.
jsonl_pathstringOptionalAbsolute path of a JSONL file with one record per line, suited to large batches.
userstringOptionalUser ID the records belong to; one database holds one user.

Returns

FieldTypeDescription
recordsnumberHow many records were written.
observationsnumberHow many observations they produced; can be higher than the record count.
buildBuilds the memory graph in the background and returns at once; follow it with status.

Example call

{}

Returns

FieldTypeDescription
statusstring"running" while the build proceeds.
observationsnumberHow many observations the build will process.
searchSemantic retrieval over the built graph in Chinese or English.

Example call

{"query": "Have I booked the train to Hangzhou?", "top_k": 5, "as_text": true}

Parameters

ParameterTypeNeededDescription
querystringRequiredA natural-language question; must not be empty.
top_knumberdefault 20OptionalMaximum number of events returned.
as_textbooleandefault trueOptionalWhether to also produce the context text for a prompt.

Returns

FieldTypeDescription
eventsarrayEvents with id, score, title, summary, time span and supporting facts.
readBrowses the graph by filters without calling a model; it returns events only after a build.

Example call

{"start": "2026-05-03", "end": "2026-05-08", "entity": "12306", "limit": 10}

Parameters

ParameterTypeNeededDescription
event_idstringOptionalRead one event by ID, ignoring the other filters.
startstringOptionalKeep events starting no earlier than this date or time.
endstringOptionalKeep events starting no later than this; a plain date includes the whole day.
entitystringOptionalKeep events whose entities contain this text, case-insensitive.
anchorstringOptionalKeep events with an identifier exactly equal to this, such as an order number.
limitnumberdefault 20OptionalMaximum number of events returned.
include_factsbooleandefault trueOptionalInclude extracted facts.
include_observationsbooleandefault falseOptionalInclude the parsed observations.
include_rawbooleandefault falseOptionalInclude the raw records submitted.
include_long_memoriesbooleandefault falseOptionalInclude long-term memories drawn across events.

Returns

FieldTypeDescription
eventsarrayMatching events; filters given together are intersected.
statusRead-only report on the database and on the latest background build.

Example call

{}

Returns

FieldTypeDescription
is_builtbooleanWhether the graph has been built.
countsobjectRaw record and observation counts; null when the file does not exist.
buildobjectState of the latest build in this server process: running, done or failed.

What OS-Memory is for

OS-Memory is Xiaomi's open-source personal memory system for agents, released as version 1.0.0 on 25 November 2026. It turns phone records such as SMS, screen content and calendar entries into a searchable event graph, and runs as a Python library or an MCP server with five tools.

  • Five-layer memory graph

    Raw records feed observations, facts, events and long-term memories, each layer built from the one below.

  • Fast and slow build paths

    A model-free path groups observations into events, and a slower language-model path writes summaries, facts and long-term memories.

  • Traceable answers

    Every fact traces back to the raw records the user submitted.

  • One local database per user

    Data lives in a SQLite file created with owner-only permissions.

Show all 6 features
  • Library and MCP server

    Use the HyperMemory class in Python, or add the server to Claude Desktop, Cursor or Claude Code.

  • PMM-Bench toolkit

    An evaluation kit for phone memory, with five question types, ships in the repository.

What people use it for

  • Long-term memory for a personal assistant

    Retrieve the user's events and facts before answering and put them into the agent's context.

  • Link one trip across apps

    Group a ticket search, a payment SMS and a travel reminder into a single event through the order number.

  • Build a user profile

    Induce long-term preferences from repeated events, such as ordering the same food at weekends.

  • Audit what the agent remembers

    Browse by time, entity or order number and trace every item back to the raw record submitted.

Strengths and limits

Strengths

  • Apache 2.0 licensed, with install and MCP setup for Claude Desktop, Cursor and Claude Code written out in the README.
  • Its data stays in a local SQLite file, and add, read and count make no network request.
  • Every fact can be traced to the raw record behind it, which helps when you must audit what an agent remembers.

Limits

  • Build sends observation text to the language model and embedding service you configure, so a local database does not mean fully local processing.
  • Nothing but text goes in: pictures, sound and video need a conversion step upstream before they can be remembered.
  • Construction is a one-time batch: once a build starts you cannot add records, and a new batch needs a new database.
  • File-backed databases cannot be opened on Windows directly, because the write lock relies on POSIX fcntl.

OS-Memory alternatives

The nearest AI agent skills on Hokai for the same job.

SkillWorks withConnects byChecked
OS-Memory This pageClaude · CursorMCP26 Nov
GlenShared memory for AI agent teams: what one agent learns, every agent keeps.Claude · Codex · CursorMCP26 Oct

OS-Memory facts

Protocol
MCP
Latency class
Batch
Open source
Yes

What changed

  • Release OS-Memory v1.0.0 initial release source

Questions about OS-Memory

How much does OS-Memory cost?

The software is free under the Apache 2.0 licence. You pay for the language model and embedding services you connect, because a build calls both and search calls the embedding service. Xiaomi does not provide those services.

Is OS-Memory open source?

Yes. The repository is under Apache 2.0, and the NOTICE file lists third-party components. The evaluation baselines it compares against are fetched from their own repositories and keep their own licences.

Which agents and clients can use it?

Claude Desktop, Cursor and Claude Code each have a setup recipe in the README, and the Python library serves your own agents. The server uses the permissions of the user who starts it, so connect only clients you trust.

Does my data leave the device?

Adding, reading and counting records make no network request. A build sends observation text to your embedding service and event text to your language model, and a search sends the query to the embedding service. Use self-hosted models if all processing must stay local.

Can it read screenshots or voice recordings?

Not directly. Only text goes in, so pictures, sound and video need image description, OCR or transcription first. The README has a section on that preprocessing.

About OS-Memory

OS-Memory is a personal memory system from Xiaomi, published on GitHub on 25 November 2026 as version 1.0.0. It takes the fragments a phone records, such as screen content, SMS, notifications, calendar entries, locations, recordings and assistant chats, and turns them into a searchable graph of events, facts and long-term memories. It is a skill, not a standalone tool, because an agent calls it to remember things about its user; it has no app of its own. The Python package is called hyperos-mem and is imported as hypermem.

Read the full background

How it works: you write records into a SQLite file, one file per user, then run a single build. Xiaomi describes a fast path that groups observations into events by identifiers such as order numbers, entities and embedding similarity with no language model, and a slow path where a language model reviews event boundaries, writes titles and summaries, extracts facts and induces longer-term memories. After the build, search runs semantic retrieval and read browses by time, entity or order number. You can use it as a Python library or as an MCP server for Claude Desktop, Cursor and Claude Code.

It suits teams building personal assistants or on-device agents who need to answer questions like which train tickets a person booked recently, linking a search, a payment text and a reminder into one trip. Xiaomi also ships PMM-Bench, a benchmark for phone memory with five question types, and an evaluation toolkit that compares it with baselines such as Mem0.

Who should look elsewhere: it reads text only, so images, audio and video must be turned into text first. A build needs an OpenAI-compatible language model and embedding service and cannot add records once started. Windows is not supported directly, so use WSL. If your data is chat history rather than phone records, a general memory layer such as Mem0 may fit better; the OS-Memory evaluation toolkit lists it as a baseline.

Sources and guides