Agent Awareness
The 5 primitives
API
Question it answers
Decision-loop pattern
┌──────────────────────────────────────────────────────────────┐
│ 1. estimate_x402_cost(url) │
│ → { priceRaw, reflection: { willExceedAvailable, ... } } │
│ │
│ 2. if reflection.willExceedAvailable │
│ || reflection.willExceedSpendLimit: │
│ → SKIP (or queue for later, or alert operator) │
│ │
│ 3. else: proxy/fetch(url) │
└──────────────────────────────────────────────────────────────┘Bounding spend with set_spend_limit
set_spend_limitLong-running agents: webhook thresholds
Polling alternative for serverless agents
Reading the loan state machine
State
What it means
Safe to spend?
Where the primitives live
Last updated
