通用记忆协议——代理记忆的共享格式
Universal Memory Protocol – a shared format for agent memory

原始链接: https://universalmemoryprotocol.io/

通用内存协议 (UMP) 旨在解决人工智能体 (AI agent) 内存碎片化的问题,目前这些内存分散在各类工具、厂商和本地文件中,彼此割裂。虽然现有的 MCP (工具) 和 A2A (协调) 等标准已能处理交互,但 UMP 提供了一个标准化的、中立于厂商的内存层。 UMP 将内存视为可移植的、经过签名的、具有双重时间属性的 JSON 记录。它作为应用层协议运行,利用现有的传输方式 (如 MCP、HTTP),并与包括本地文件、SQL 数据库和向量引擎在内的现有存储方案集成。通过使用 UMP,开发者可以将项目笔记、Obsidian 知识库和智能体日志等分散数据统一为一种可互操作的格式。 主要功能包括: * **可移植性:** 数据由用户所有,基于内容寻址,并使用分布式标识符 (DID) 进行签名。 * **兼容性:** 作为现有格式 (例如 `CLAUDE.md`) 的桥梁,无需进行数据库迁移。 * **安全性:** 内置防提示词注入保护和明确的数据保留策略。 * **灵活性:** 将内存协议与底层智能分离,允许不同的引擎在质量上展开竞争,同时保持完全的互操作性。 UMP 使智能体能够跨会话和厂商进行“记忆”,无需在每次切换工具或环境时重新加载上下文。

关于“通用内存协议”(Universal Memory Protocol,简称 UMP)——一种拟议的智能体内存共享格式——的 Hacker News 讨论中,大多数观点持怀疑态度。作者 @edihasaj 旨在通过 UMP 提供一种用户所有、供应商中立的跨工具互操作标准,以解决内存碎片化问题。 批评者将该项目斥为“大模型垃圾(LLM slop)”,认为它缺乏验证其有效性所需的实证数据、基准测试或工程严谨性。许多评论者指出,简单文件系统结构(如 Markdown 文件)或 Anthropic 的模型上下文协议(MCP)等现有的行业支持标准已经能够妥善处理这一问题。 这场辩论还触及了“人工智能生成”项目公告的广泛趋势,参与者对那些缺乏市场采用或明确技术优势的“理念先行”型协议的兴起表示不满。支持者则辩称,早期阶段的实验是快速发展领域中的自然组成部分,并认为即使 UMP 目前存在缺陷,这种标准化智能体内存的努力也确实解决了开发人员面临的痛点。总的来说,共识在于,如果缺乏重要的行业支持或经证实的性能提升,该协议在获得相关性方面将面临严峻挑战。
相关文章

原文

Agents can already call tools (MCP) and talk to each other (A2A). What they can’t do is carry memory across sessions, agents, and vendors. Every harness reinvents memory privately and non-portably. UMP fixes that.

In simple terms: you already have useful memories scattered across agent files, Claude/Codex project notes, Recall exports, Obsidian folders, Postgres, Redis, SQLite, and vector databases. UMP turns those into one portable memory shape and one small operation set, so new agents and new stores can extend the same memory instead of starting over.

Tools - MCP

Model Context Protocol standardized how agents call functions and read resources.

Coordination - A2A

Agent2Agent standardized how agents discover and invoke one another.

Memory - UMP

Universal Memory Protocol standardizes how agents remember - portable knowledge across sessions, agents, and vendors.

Use the MCP server when you want agent memory immediately. Use the TypeScript SDK when you are building a memory-aware app or agent runtime. Use HTTP when the client is Python, Go, Swift, a browser, or anything else that can send JSON.

// MCP host config: Claude Code, Codex, Cursor, or any MCP client.

"args": ["-y", "@universalmemoryprotocol/core", "ump-memory"]

} from "@universalmemoryprotocol/core";

const key = generateKeyPair();

const store = await JsonFileStore.open(".ump/memory.ump.json");

const ump = new UmpServer({

body: { text: "Use pnpm for this repository." },

scope: { owner: key.did, project: "github.com/acme/app", visibility: "private" },

provenance: { actor: key.did, actor_kind: "user", method: "user_correction" },

const memories = await ump.recall({

query: "package manager",

scope: { owner: key.did, project: "github.com/acme/app" },

# Any language: expose JSON over HTTP.

UMP_HTTP=4000 npx -y @universalmemoryprotocol/core ump-memory

base = "http://localhost:4000"

owner = requests.get(f"{base}/.well-known/ump.json").json()["owner"]

requests.post(f"{base}/ump/remember", json={

"body": {"text": "User prefers concise release notes."},

"scope": {"owner": owner, "project": "github.com/acme/app", "visibility": "private"},

"provenance": {"actor": owner, "actor_kind": "user", "method": "user_correction"},

hits = requests.post(f"{base}/ump/recall", json={

"query": "release note preference",

"scope": {"owner": owner, "project": "github.com/acme/app"},

UMP is not a new transport protocol. It is an application-level memory protocol that rides existing transports. The lesson of MCP is *minimal primitives

  • existing rails + great SDKs + neutral governance*.

Rides MCP

The primary binding is an MCP profile (ump.* tools). Any MCP host - Claude Code, Codex - can use UMP today, with zero new transport.

Six operations

capabilities · recall · remember · revise · forget · get (+ optional feedback/subscribe). A conforming client is ~100 lines.

One portable record

Typed, scoped, bi-temporal, signed JSON. Reuses W3C PROV + DID - no new vocabulary.

Adopt incrementally

Four conformance levels. Ship an *.ump.json export (L0) today; wire the full runtime (L3) when ready.

UMP is a protocol surface, not a database bet. @universalmemoryprotocol/core ships practical implementations for local files, SQL databases, Redis, Recall, and vector engines so teams can adopt UMP where they already store memory.

Files first

JsonFileStore writes portable memory.ump.json; MarkdownDirectoryStore writes human-editable *.ump.md records for repos and Obsidian-style vaults.

SQL + cache

PostgresStore, SqliteStore, and RedisStore accept your existing client. No native database driver is bundled into the core package.

Vector databases

VectorStore plus QdrantStore, PineconeStore, and WeaviateStore wrappers let embedding-backed engines keep their own retrieval quality.

Recall engine adapter

Recall is one implementation: a richer memory engine behind the same UMP interface, not a dependency or lock-in.

People already have memory scattered through AGENTS.md, CLAUDE.md, Recall exports, Obsidian notes, and project Markdown. UMP keeps those formats separate, but ships import bridges that turn them into portable UMP drafts with provenance.

Agent files

ump-import reads AGENTS.md (the open standard) and CLAUDE.md as procedural candidate memories, preserving the source path in provenance.

Vaults and folders

Point it at Markdown directories or Obsidian-style vaults to bootstrap a local UMP store without changing your notes.

Bridge, not lock-in

Importers are adoption helpers. UMP remains the common record and runtime interface after the data is translated.

UMP standardizes structure, provenance, access, and trust. It deliberately leaves intelligence - extraction, ranking, decay, consolidation - to the engine underneath, so implementations compete on quality while staying interoperable.

Bi-temporal, supersede-never-delete

Valid-time + transaction-time. A fact that changes is closed and linked to its successor - not overwritten. The credible answer to staleness.

User-owned & signed

The operator - not the model vendor - holds the key. Records are content-addressed and signed with a DID. Portable, verifiable, no lock-in.

Injection-resistant by mandate

Memory is attacker-controllable input. The spec requires a verify, filter, frame rehydration pipeline. Never string-interpolated into the prompt.

Consent in the record

Retention, exportability, and redaction travel with the data and are enforced at every boundary.

联系我们 contact @ memedata.com