An open standard for discovering the legal context of agentic commerce transactions.
legal-context-protocol is an early-stage project in the AI payments / x402 ecosystem, focused on agentic-commerce, ai-agents, dispute-resolution, legal-context-protocol. It currently has 17 GitHub stars and 3 forks, and sits alongside related tools like internet-court-skill, inflow-cli, sample-agentic-serverless-payments, piprail, sardis, mcp-pay.
An open standard for discovering the legal context of agentic commerce transactions.
AI agents are transacting autonomously. Every major agentic commerce protocol — MPP, ACP, x402, UCP, AP2, Visa TAP, Mastercard Agent Pay — handles payments and authorization. None addresses the legal layer: what were the terms? What is the dispute process? Who has jurisdiction?
LCP fills this gap. A service publishes a single JSON file at a well-known URL:
https://{domain}/.well-known/legal-context.json
One required field. Everything else is optional.
{
"terms": "https://example.com/terms/v3.md"
}
Save as legal-context.json and serve at /.well-known/legal-context.json over HTTPS. That's it.
{
"terms": "https://example.com/terms/v3.md",
"atrHash": "0x7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069"
}
{
"terms": "https://example.com/terms/v3.md",
"atrHash": "0x7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069",
"acceptanceRequired": true
}
When acceptanceRequired is true, the counterparty digitally signs the terms (e.g., via EIP-712) before transacting — cryptographic proof of consent.
See examples/level-4-full.json for a complete configuration with dispute resolution, contact information, and API integration.
spec/legal-context-protocol-v1.mdspec/legal-context.schema.jsonexamples/| Level | Name | What It Adds |
|---|---|---|
| 1 | Informational | Terms are discoverable at a known URL |
| 2 | Provable | An ATR hash proves the terms haven't changed |
| 3 | Signed | Cryptographic proof of explicit consent |
| 4 | Integrated | Dispute resolution, pre-settlement verification, escrow, reputation, and other recourse hooks |
Each level is independently valuable. A service can implement any level without implementing the others. The standard itself (Section 2) is the normative core; the levels are advisory guidance.
Level 3 (signed acceptance) is bilateral: the service publishes terms, and the buyer's principal declares a policy that decides whether those terms are acceptable. A buyer policy encodes minimum trust level, acceptable jurisdictions, acceptable dispute methods, commitment caps, and signing thresholds — and gates the agent's signing key behind human review for commitments above the threshold. See Specification §4 for the policy primitives, evaluation flow, and human-in-the-loop escalation.
LCP integrates with the major agentic commerce and authorization protocols in two tiers: mechanisms that work today against stock, unmodified protocols using existing extension surfaces (Tier A), and mechanisms that require upstream specification changes (Tier B). Specification §8 and Appendix C have the full detail:
Per-chain bindings (Stellar mux_id, Tempo TIP-20 memo, EVM overlay contracts) are deliberately not canonized in the spec — chain operators are invited to publish authoritative profiles in their own documentation.
| Protocol | Integration surface | Tier |
|---|---|---|
| MPP | LCP fields inside the HMAC-covered request.methodDetails body |
A — Available today |
| MPP | Method-specific legalContext receipt field |
A — Available today |
| MPP | First-class legalContext in the WWW-Authenticate: Payment challenge (under the HMAC canonicalization) |
B — Proposed |
| ACP | legalContext in checkout-session metadata (the links type enum is closed) |
A — Available today |
| ACP | Formal legalContext extension registration |
B — Proposed |
| UCP | links array with terms_of_service type (Level 1 discovery only) |
A — Available today |
| UCP | allOf schema extension with reverse-domain naming |
B — Proposed |
| x402 | accepts[].extra and top-level extensions on the challenge (v2) |
A — Available today |
| x402 | legalContext in the extensions map on the SettlementResponse receipt |
A — Available today |
| x402 | Registered canonical legalContext extension identifier + schema |
B — Proposed |
| AP2 | Alongside mandates in transport-layer metadata | A — Available today |
| AP2 | Embedded inside a signed mandate | B — Proposed |
| Visa TAP | Custom HTTP header (e.g. X-LCP-Hash) — advisory, outside the signature chain |
A — Available today |
| Visa TAP | Field inside a signed body object, or a sibling with its own signature quartet | B — Proposed |
| Mastercard Verifiable Intent | Custom Layer 2 constraint type (URN / reverse-domain) | A — Available today |
| Mastercard Verifiable Intent | Registered LCP-aware Layer 2 constraint types | B — Proposed |
| A2A | Task metadata and Agent Card capabilities.extensions[] |
A — Available today |
| A2A | Formal A2A extension registration | B — Proposed |
| MCP | Tools, resources, and prompts on an LCP-aware MCP server | A — Available today |
| MCP | Standardized LCP MCP server schema | B — Proposed |
LCP is co-stewarded by Integra Ledger and the American Arbitration Association-International Centre for Dispute Resolution (AAA-ICDR) as Founding Maintainers.
See GOVERNANCE.md for the full governance framework.
We welcome contributions. See CONTRIBUTING.md for guidelines.
All contributors must sign a Contributor License Agreement before contributions can be accepted.
To report a suspected security issue in the specification, schema, or examples, see SECURITY.md.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
A wallet for your agents to onboard and pay. Agentic MPP / x402 payments from your machine - CLI + MCP server.
An open-source, serverless reference implementation for agentic commerce: pay-per-use generative AI, physical goods, and digital goods, where embedded wallets and autonomous AI agents settle USDC stablecoin micropayments over the x402 protocol using Amazon Bedrock AgentCore payments on AWS
x402 (HTTP 402 Payment Required) SDK + MCP server: let any API charge for itself and any AI agent pay for itself, USDC & stablecoins across EVM, Solana & 8 more chain families, in a couple of lines. Backendless, no fee, self-custodial, paid straight to your wallet. TypeScript, MIT.
The open authority layer + SDKs for AI-agent payments. Thin Python/TS clients, an MCP server, framework adapters (LangChain/CrewAI/Hermes/OpenClaw/…), and @sardis/reference — a pure policy simulator + AP2/TAP/x402 verifiers showing exactly how Sardis decides if an agent may spend. The hosted engine that moves money is private.
Payment awareness layer for MCP (Model Context Protocol)
Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
A local-first AI agent with persistent memory, emotional intelligence, and a peer-to-peer skills economy.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
Self-healing infrastructure for AI agent payments. 90.3% auto-recovery.