Releases: glatinone/agent-memory-protocol
Release list
AMP v0.1.0
First tagged release of the Agent Memory Protocol: the v0.1.0 specification,
the FastAPI reference server, the conformance suite, and the client SDKs,
released together.
Documentation: https://glatinone.github.io/agent-memory-protocol/
What's in it
Protocol specification (spec/v0.1.0/)
- The
MemoryCellJSON schema: content, identity, lifecycle, scoring, access
policy, and provenance. - A lifecycle state machine (
active->stale->archived->deleted)
with an exponential decay formula driving the automatic transitions. - RFC-AMP-001 covering the security model and threat considerations.
Reference server (server/, Python/FastAPI)
- Full memory CRUD plus semantic search, ranked by a blend of vector
similarity (70%) and each cell's current decay score (30%). - Per-cell access control (
readable_by/writable_bywith wildcards), and
uniform403responses on deleted cells to prevent oracle probing. - Two storage backends. ChromaDB is the default and needs no infrastructure;
AMP_STORAGE_BACKEND=postgreskeeps cells in PostgreSQL withpgvector
instead, for deployments that already run one. Both are held to one behaviour
suite, including that they rank identical data in identical order. - A chosen embedding provider.
AMP_EMBEDDING_PROVIDER=defaultuses the local
model;openai-compatiblepoints at any service speaking the OpenAI
/embeddingsAPI. A misconfiguration stops the server rather than falling back
silently, because a silent fallback produces vectors nobody can search
consistently. - The advertised capabilities are enforced, not claimed.
GET /specreports
the cell size limit, the storage backend, the embedding width, the retention
window, the page ceiling and the scoring-edit budget, and a test ties each one
to the behaviour it promises. - The 30-day deletion retention window is enforced. The spec makes retention
the server's job; a purge inside the window is refused, and names the date the
cell becomes purgeable. Erasing deleted cells once that window passes is opt-in
(AMP_PURGE_RETENTION=1), because the spec sets a minimum retention rather than
a deadline. - Optional API-key authentication. The spec carries identity in
X-AMP-Agent-IDand defines no credential, so the header is trusted by default.
SetAMP_API_KEYS_FILEand it must be proven withX-AMP-API-Key; the file
holdssha256:digests rather than keys, and a wrong key, a missing key and an
unknown agent id all answer the same401. - Pagination on the listing endpoints and on search, applied to the cells the
caller may read, withhas_morerather than a count the server does not compute. - Rate-limited scoring edits (RFC-AMP-001 §5): 5 per cell per hour by default,
429withRetry-Afterbeyond that, because a caller looping onscoringcan
hold a cell active past its relevance window. - The decay engine runs on a background schedule by default. The interval is
configurable (AMP_LIFECYCLE_INTERVAL_SECONDS, default 3600), and an
admin-token-gatedPOST /amp/v1/lifecycle/runtriggers a pass on demand for
cron or ops use. - Bundled MCP server (
amp-mcp) so the server can be used as MCP tools.
Conformance suite (conformance/)
- 39 vectors an implementation can run against its own server:
amp-conformance --base-url https://your-server.example.com. - It imports nothing from the reference server and carries the normative JSON
Schema, so it judges an implementation rather than comparing it to this one. - One category measures a server against its own advertised numbers, so it
holds for any implementation, not just this one.
Machine-readable contract
spec/v0.1.0/openapi.jsonis generated from the server and committed, so an API
change shows up as a reviewable diff. Two tests keep it honest, one on the
server and one in the SDK.
Client SDKs
- Python (
sdk/amp_client/): sync and async clients, plus a LangChainAMPMemory
integration. - Node (
sdk/node/): zero dependencies, using the built-infetch. - Both take the optional API key and can page the listing and search endpoints.
Examples under examples/: a quickstart, an MCP claude-desktop config,
and a multi-agent demo where one agent is blocked by cell-level access policy.
248 server tests, 34 Python SDK tests, 24 Node tests and 39 conformance vectors.
CI runs lint, format and type gates across every package, Python 3.11 and 3.12,
Node 18, 20 and 22, the storage contract suite against a real PostgreSQL service
container, and the conformance suite against a live server.
What's not here yet
Stated plainly rather than left for you to discover:
- The SDKs are not published. Install from this repo (
pip install -e sdk, or
copysdk/node); the PyPI and npm packages are not out yet. - No hosted service. Self-hosting via
docker compose up -dis the only
path today. - Python and Node only. No Go or Rust clients.
- Authentication is opt-in, and it is keys only. With
AMP_API_KEYS_FILE
unset the memory endpoints trust theX-AMP-Agent-IDheader, which is the
binding the spec describes and is suitable for local development and
single-tenant deployments, not for the open internet. Keys are a single shared
secret per agent: no scopes, no expiry, no rotation, no OAuth or JWT. - Postgres support is verified in CI, not on your machine. The machine this
was developed on has no PostgreSQL, so the adapter's proof is the CI service
container. Runpytest tests/test_adapter_contract.pywith
AMP_TEST_POSTGRES_DSNset to check it against yours. - The MCP binding's identity is shared by default. One MCP server acts as one
agent (AMP_MCP_AGENT_ID); unset, every MCP client pointed at the same store is
the same agent, so per-agentreadable_byis only meaningful once you set it -
and run one server per agent. - Some state is per process. The scoring-edit budget lives in the server
process, so two processes over one database keep two budgets. The retention
purge is likewise an in-process scheduled pass. POST /lifecycle/runis all or nothing. It runs one decay pass over every
cell; there is no partial run and no per-owner scope.- Two questions RFC-AMP-001 §8 defers to v0.2: negation in the
readable_by/
writable_byglob patterns, and a per-cell pluggable decay function.
Install
git clone https://github.com/glatinone/agent-memory-protocol.git
cd agent-memory-protocol/server
docker compose up -dThen see the getting started guide.
Feedback on the schema and the spec is very welcome in the issues.