by Xiaomi
Turns phone records into a searchable memory graph for agents.
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.
Main trade-off
A build needs outside model services, so privacy depends on which you choose.
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.
pip install "hyperos-mem[mcp] @ git+https://github.com/XiaoMi/os-memory.git"
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.
The permissions this connector asks for, as its own documentation states them.
5 actions an agent can call. Open one for its parameters and an example.
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
| Parameter | Type | Needed | Description |
|---|---|---|---|
| records | array | Optional | Array of records, each with type, timestamp and data. Pass either records or jsonl_path, not both. |
| jsonl_path | string | Optional | Absolute path of a JSONL file with one record per line, suited to large batches. |
| user | string | Optional | User ID the records belong to; one database holds one user. |
Returns
| Field | Type | Description |
|---|---|---|
| records | number | How many records were written. |
| observations | number | How many observations they produced; can be higher than the record count. |
Example call
{}Returns
| Field | Type | Description |
|---|---|---|
| status | string | "running" while the build proceeds. |
| observations | number | How many observations the build will process. |
Example call
{"query": "Have I booked the train to Hangzhou?", "top_k": 5, "as_text": true}Parameters
| Parameter | Type | Needed | Description |
|---|---|---|---|
| query | string | Required | A natural-language question; must not be empty. |
| top_k | numberdefault 20 | Optional | Maximum number of events returned. |
| as_text | booleandefault true | Optional | Whether to also produce the context text for a prompt. |
Returns
| Field | Type | Description |
|---|---|---|
| events | array | Events with id, score, title, summary, time span and supporting facts. |
Example call
{"start": "2026-05-03", "end": "2026-05-08", "entity": "12306", "limit": 10}Parameters
| Parameter | Type | Needed | Description |
|---|---|---|---|
| event_id | string | Optional | Read one event by ID, ignoring the other filters. |
| start | string | Optional | Keep events starting no earlier than this date or time. |
| end | string | Optional | Keep events starting no later than this; a plain date includes the whole day. |
| entity | string | Optional | Keep events whose entities contain this text, case-insensitive. |
| anchor | string | Optional | Keep events with an identifier exactly equal to this, such as an order number. |
| limit | numberdefault 20 | Optional | Maximum number of events returned. |
| include_facts | booleandefault true | Optional | Include extracted facts. |
| include_observations | booleandefault false | Optional | Include the parsed observations. |
| include_raw | booleandefault false | Optional | Include the raw records submitted. |
| include_long_memories | booleandefault false | Optional | Include long-term memories drawn across events. |
Returns
| Field | Type | Description |
|---|---|---|
| events | array | Matching events; filters given together are intersected. |
Example call
{}Returns
| Field | Type | Description |
|---|---|---|
| is_built | boolean | Whether the graph has been built. |
| counts | object | Raw record and observation counts; null when the file does not exist. |
| build | object | State of the latest build in this server process: running, done or failed. |
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.
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.
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.
The nearest AI agent skills on Hokai for the same job.
| Skill | Works with | Connects by | Checked |
|---|---|---|---|
| OS-Memory This page | Claude · Cursor | MCP | 26 Nov |
| Claude · Codex · Cursor | MCP | 26 Oct |
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.
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.
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.
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.
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.
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.
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.
Protocol, authentication, permissions and the call contracts on this page are read from Xiaomi's own documentation. The verdict is Hokai's reading of them, not the maintainer's claim.