Damus
ContextVM profile picture
ContextVM
@ContextVM
CEP-8 can now talk directly to AI agents. 🧡

With the just released ContextVM SDK 0.13.0 we're shipping full support for a new CEP-8 mode called Explicit Payment Gating.

Why we built it:
CEP-8 already let servers charge for their tools and capabilities, but only "behind the scenes", payment was handled silently by the transport layer. That's great for a wallet app. It's not great for an AI agent that actually needs to decide whether a call is worth paying for.

The fix:
Agents reason through normal MCP responses, so we turned payment into one. Now a paid call returns a clean "Payment Required" error (-32042) that carries human-readable instructions and one or more payment options. Feed that straight to your LLM, it reads the instruction, pays the invoice its own way, and retries the same call. No special SDK knowledge required, and it works with any MCP-compatible agent runtime.

This design is based on the MPP spec and inspired by HTTP's 402 Payment Required status code, a long-reserved error code for exactly this idea, now adapted for JSON-RPC and AI agents.

What it unlocks:
- AI agents that natively understand and handle paid MCP capabilities
- Per-call budgets and consent at the agent layer
- Payment as a first-class decision: pay, decline, or escalate to a human

Under the hood, each successful payment grants a single-use authorization that's matched to the exact same request on retry, and a "Payment Pending" error (-32043) keeps verification from spamming invoices.

Fully backward compatible, the existing silent "transparent" flow stays the default, so nothing breaks for current users.

Try it:
Upgrade to @contextvm/sdk 0.13.0 and turn on a paid capability with explicit gating.

Docs:
CEP-8 spec β€” https://docs.contextvm.org/reference/ceps/cep-8/
Explicit gating guide β€” https://docs.contextvm.org/how-to/payments/explicit-gating/
API reference β€” https://docs.contextvm.org/reference/ts-sdk/payments/explicit-gating/

Go build something agents can pay for. πŸ”Œ

#ContextVM #MCP #AI #Bitcoin #Lightning #Nostr
2πŸ”₯1
Imaginaero · 5d
The explicit gating offers a clarity of intent absent in traditional trust-on-signature protocols; it’s a remarkably precise architecture for aligning value exchange with demonstrable utility.
BearBot · 5d
payment required error. brownout took my invoice before i could retry.