Skip to content
LongmemOSPublic

About

Universal Auditable Memory Protocol (UAMP) v0.1 — Open, model-agnostic HTTP/JSON spec for deterministic, SHA-256 verifiable long-term AI agent memory.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LongMemOS Unified Agent Memory Protocol (UAMP) — v0.2 Public Specification & SDKs

![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg OpenAPI 3.1 Zero External Dependencies

Public protocol contract, zero-dependency Python & TypeScript SDKs, and Standard Model Context Protocol (MCP) adapter metadata for LongMemOS UAMP v0.2.

Technical Report: LongMemOS: Zero-LLM-Write Deterministic Long-Term Memory for Enterprise AI Agents (Zenodo DOI: 10.5281/zenodo.24623205)

72-Hour Black-Box Blind Eval Walkthrough (10-Question Self-Contained Fixture): English Guide | 日本語ガイド | 简体中文实操指南


Repository Contents

Path Description
uamp-spec/openapi.yaml Canonical OpenAPI 3.1.0 Data Plane specification (/v2/health, /v2/memories/ingest, /v2/memories/recall, /v2/memories/verify, /v2/memories/scopes) with RFC 7807 ProblemDetails.
openapi.yaml Root mirror of uamp-spec/openapi.yaml (preserved for v0.1 raw-URL compatibility).
sdks/python/ Zero-dependency synchronous (UampClient) & async (AsyncUampClient) Python 3.9+ SDK with BoundedRetryQueue.
sdks/typescript/ Zero-dependency ESM/CommonJS TypeScript SDK (@longmemos/uamp-client) for Node 20+ using native fetch and node:crypto.
lmos-mcp/ Model Context Protocol (MCP JSON-RPC 2.0) tool schemas (manifest.json), configuration examples (mcp-config.example.json), and usage docs for stdio & sse transports.
docs/EVAL_72H_GUIDE.md End-to-end 72-hour black-box blind evaluation walkthrough (日本語ガイド / 简体中文指南) demonstrating Stage-S/A/J physical key isolation and SHA-256 verification.
examples/eval_10q_walkthrough.py Zero-dependency Python walkthrough runner paired with the synthetic Project Horizon 10-question protocol fixture examples/fixtures/uamp_walkthrough_10q.json (supports --fixture <path>; see the guide's 3-destination data boundary & confidential-fixture NDA air-gapped notice before using internal data).

Key Protocol Guarantees (UAMP v0.2)

  • Write-Single / Read-Merge Scope URI Authorization: Hierarchical tenant isolation (org:<id>/dept:<dept>/...) pre-filtered prior to retrieval ranking, paired with classification ceilings (public, internal, confidential, restricted).
  • Strong Read-After-Write Consistency: X-LMOS-Consistency: strong WAL commit barrier ensures ingested turns are immediately queryable on /v2/memories/recall.
  • Atomic Deduplication (Idempotency-Key): Deterministic SHA-256 or client-supplied UUIDv7 keys prevent duplicate writes across proxy/agent retries and detect conflicting payload reuse (HTTP 409 IDEMPOTENCY_PAYLOAD_CONFLICT).
  • Live Cryptographic Verification: /v2/memories/verify recomputes live SHA-256 digests over immutable UTF-8 text or byte spans without external model inference.
  • Zero Embedded Inference Models: The UAMP data plane runs strictly offline with deterministic retrieval and microsecond-scale startup.

Quickstart

Python SDK

cd sdks/python
python3 -m unittest discover -s tests -v
from uamp_client import UampClient, IngestRequest, RecallRequest, BoundedRetryQueue

client = UampClient(
    base_url="http://127.0.0.1:8787",
    token="<TOKEN>",
    runtime="custom",
    consistency="strong",
    retry_queue=BoundedRetryQueue(max_size=1000),
)

receipt = client.ingest(
    IngestRequest(
        write_scope="org:acme/dept:engineering",
        raw_payload="Maintenance window scheduled Sunday 02:00 UTC.",
        classification="internal",
    )
)
res = client.recall(
    RecallRequest(
        query="maintenance window",
        read_scopes=["org:acme/dept:engineering"],
        top_k=5,
    )
)
print(receipt.event_id, len(res.items))

TypeScript / Node.js SDK

cd sdks/typescript
node --test test/client.test.mjs
import { UampClient, BoundedRetryQueue } from "@longmemos/uamp-client";

const client = new UampClient({
  baseUrl: "http://127.0.0.1:8787",
  token: "<TOKEN>",
  runtime: "custom",
  consistency: "strong",
  retryQueue: new BoundedRetryQueue({ maxSize: 1000 }),
});

const receipt = await client.ingest({
  write_scope: "org:acme/dept:engineering",
  raw_payload: "Maintenance window scheduled Sunday 02:00 UTC.",
  classification: "internal",
});
console.log(receipt.event_id, receipt.logical_seq);

MCP Adapter (lmos-mcp)

See lmos-mcp/README.md and lmos-mcp/mcp-config.example.json to register memory_recall, memory_ingest, memory_verify_evidence, and memory_list_scopes over stdio or HTTP/SSE.


Reference Benchmarks & Evaluation

Proprietary Commercial Software & Verification Boundary

  • Closed-Source Core: LongMemOS Core (mb-server) is proprietary commercial software. Only the UAMP protocol/thin SDKs (uamp-spec) and the first-party public audit kit (longmemos-benchmarks) are published publicly. We do not publish core source code, reproducible builds, bare downloadable binaries, or proprietary runtime internals (including internal retrieval pagination, candidate-budget windows, and context-packing parameters).
  • Write vs. Read Scope: Our zero-LLM / zero-learned-embedding / zero-network claim applies strictly to the deterministic write and local indexing path. Downstream Reader LLM inference, optional asynchronous consolidation, and host infrastructure are separate from the deterministic write path.
  • Independent Verification Path: LongmemOS/longmemos-benchmarks is a verifiable first-party public audit kit (not a third-party audit), and the linked Zenodo DOI (10.5281/zenodo.24623205) is a technical preprint (not peer-reviewed). Third-party evaluators, benchmark maintainers, or enterprise teams wishing to independently measure end-to-end token usage, latency, memory footprint, and blind-set recall may request access to our 72-hour isolated black-box gateway (eval@longmemos.com, via uamp-spec v0.2.0) or schedule an NDA air-gapped live evaluation.

License

Apache License 2.0 (LICENSE).

About

Universal Auditable Memory Protocol (UAMP) v0.1 — Open, model-agnostic HTTP/JSON spec for deterministic, SHA-256 verifiable long-term AI agent memory.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages