Cursor Agent Commerce Protocol — x402 Payment & Live Data Integration for Cursor Background Agents
$0.05 / access
SKILL.md Protocol
cursor · cursor-background-agent
cursor-agent-commerce-skill is a 5-phase SKILL.md behavioral protocol that teaches Cursor background agents how to autonomously discover, evaluate, purchase, and use live data assets via x402 micropayments on Base L2. From wallet setup to per-session budget tracking — the complete commerce stack for agents running inside the Cursor IDE.
Built for cursor named clients: cursor and cursor-background-agent are already probing x402 endpoints. This protocol gives those agents the full behavior specification — not just API docs, but a structured decision protocol covering every phase of the commerce flow.
Protocol Overview (5 Phases)
Phase 1 — x402 Discovery
Detect HTTP 402 responses from ClawMerchants endpoints. Parse the X-Payment-Required header to extract price, asset ID, provider wallet, and chain. Evaluate whether the asset is worth purchasing based on task context.
Phase 2 — Base Wallet Setup
Initialize a Base L2 wallet for per-session budget allocation. Configure USDC balance checks, gas buffer reserves, and spend limits before executing any payments. Fail fast if budget is insufficient.
Phase 3 — Live Data Feed Integration
Execute USDC payments on Base L2 (chain ID 8453), attach X-PAYMENT: <base64 proof> to retry requests, receive JSON data, and cache responses for the remainder of the session to minimize per-query costs.
Phase 4 — SKILL.md Protocol Loading
Identify SKILL.md protocol assets in the catalog. Purchase and load behavioral protocols at task-start using the same x402 flow. Apply loaded protocols to active task context for structured decision-making.
Phase 5 — Session Budget Management
Track cumulative spend across all asset purchases per session. Enforce configurable budget caps ($0.10–$1.00 per session). Log payment receipts. Report spend summary at session end.
Compatible Clients
- cursor — Cursor IDE background agents using x402-enabled data workflows
- cursor-background-agent — Autonomous background agents in Cursor with persistent session context
- claude-code — Claude Code agents running Cursor-adjacent workflows
Agent Use Cases
- Autonomous data purchasing in Cursor agents — agents research DeFi yields, token anomalies, or GitHub trends mid-task by purchasing live feeds on-demand
- Per-session budget tracking — enforce $0.10/session spend limits for agents running in production Cursor deployments; log every USDC spend event
- x402 protocol bootstrapping — load this skill before any x402 commerce task to ensure consistent, production-grade payment behavior across all Cursor agents
- Multi-asset workflows — purchase and combine defi-yields-live + token-anomalies-live in a single session; track total cost against budget
How to Access via x402
- Free preview:
GET https://clawmerchants.com/v1/preview/cursor-agent-commerce-skill — inspect the first phase of the protocol before paying
- Probe:
GET https://clawmerchants.com/v1/data/cursor-agent-commerce-skill → HTTP 402 with USDC payment details
- Pay: Send 0.05 USDC on Base L2 (chain ID 8453) to the provider wallet in the 402 response
- Receive: Resend with
X-PAYMENT: <base64 proof> → HTTP 200 with full 5-phase protocol text
Pricing
$0.05 USDC per access — no subscription, no API key, no account. Load the protocol once per session. Most Cursor background agents load it at task initialization and reuse across the full session, making the effective per-task cost fractions of a cent.
ClawMerchants — Cursor agent commerce protocol — x402 + USDC + Base L2