An open JSON/HTTPS protocol and Node.js reference implementation that lets an agent discover, quote, approve and place orders with a service.
At a Glance
LATCH protocol reference implementation (Node.js client/server/CLI, optional MCP bridge) released under the MIT license.
Engagement
Available On
Alternatives
Listed Nov 2026
About LATCH
LATCH is an open, MIT-licensed protocol by Anton Balanov that defines a small JSON-over-HTTPS contract between an agent and a service. A service publishes a capability card, and the agent reads capabilities, gets exact terms, asks for approval, and commits an order without duplicates on retry. The repository ships a Node.js reference client, server and CLI, plus an independent PHP provider used in a live demo whose orders are simulated.
What It Is
LATCH is an agent-to-service interface contract. A service exposes a card at /.well-known/latch.json and a single POST endpoint supporting five operations: ask (read without consequences), quote (exact offer with a SHA-256 digest, no execution), commit (execute with offer digest, approval and an Idempotency-Key), status (task state and provider-assertion receipt), and cancel. Approval is a local trusted-host or user decision bound to the quoted digest. It does not replace MCP, A2A, OpenAPI, identity or payment systems.
How an Order Moves
The agent discovers the service card, reads parameters such as materials and prices, requests a quote with exact price and delivery window, and the customer approves that specific digest. The commit then carries the idempotency key, so a retry returns the same task.id rather than creating a second order. The demo scenario is a 3D-printing order, with no payment, manufacturing or delivery.
Setup Path
The Node.js 20+ reference is one ESM file with zero runtime dependencies. Providers can scaffold with an init command, or use createLatchServer and listen from the latch-protocol package. Optional pieces include a single-writer file store with caller-scoped authentication and an MCP stdio bridge; plain HTTP is enough for other agents and languages. A CLI can also print a reviewable invitation text for services that do not support LATCH yet, without contacting anyone.
Boundaries to Know
The documentation states that a digest is not human consent, a receipt is not independent physical evidence, and idempotency does not guarantee exactly-once external effects. Default storage is in-memory and unauthenticated; production use needs verified identity, authorization, durable storage and rate limits. The wire version is described as experimental 0.1, with implementation version 0.2.0.
Community Discussions
Be the first to start a conversation about LATCH
Share your experience with LATCH, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
LATCH protocol reference implementation (Node.js client/server/CLI, optional MCP bridge) released under the MIT license.
- MIT license, no CLA required
- Node.js 20+ reference client/server/CLI, one ESM file, zero runtime dependencies
- Optional MCP stdio bridge
- Optional single-writer persistent store
- Independent PHP 8.2 provider simulation
Capabilities
Key Features
- Capability card discovery at /.well-known/latch.json
- Five operations: ask, quote, commit, status, cancel
- SHA-256 offer digest bound to approval
- Idempotency-Key based duplicate-safe commits
- Node.js reference client, server and CLI in one ESM file with zero runtime dependencies
- Independent PHP 8.2 provider
- Optional MCP stdio bridge
- Optional single-writer file store and caller-scoped authentication
- Reviewable invite generator for services without LATCH
- Recorded demo traces and reproducible benchmarks
