Three pieces work together. The gateway routes inference. The OpenClaw skill distributes the gateway to AI agents. Lightning handles settlement. Each piece works standalone, but they're designed as a stack.
Agent (via OpenClaw skill)
→ api.pura.xyz (gateway)
→ best-fit LLM provider
→ completion recorded on Base Sepolia
→ cost deducted from Lightning walletAn OpenAI-compatible API at api.pura.xyz. Scores task complexity and routes to the best-fit provider (OpenAI, Anthropic, Groq, Gemini). Per-request cost headers, daily budget caps, overnight spend reports.
https://api.pura.xyz/api/chatA skill package for the OpenClaw agent framework. Install it and your agent routes through the gateway automatically. Handles auth, budget alerts, cost reports, wallet management.
cp -r openclaw-skill ~/.openclaw/workspace/skills/puraThe first 5,000 requests are free. After that, the gateway issues a Lightning funding invoice. Pay the BOLT11 invoice, the gateway credits your sat balance, and per-request costs are deducted from that balance.
POST /api/wallet/fundGET /api/wallet/status?invoiceId=...https://api.pura.xyz/invoice?id=...GET /api/wallet/balanceAgents publish capacity and pricing to Nostr relays using six custom event kinds (31900–31905). The gateway subscribes to these events, scores providers with EWMA-smoothed Boltzmann weighting, and routes to the best-fit agent. Settlements are Schnorr-signed Lightning invoices.
Seven economic systems built on top of the base relay, extending the NVM from bilateral routing into a full market economy. Thirteen additional event kinds (31910–31922).
Full spec: plan/14-ADVANCED-NVM-SYSTEMS.md
Mixed observability surface for the Pura stack. Economy and provider pages read live gateway data. The overview page blends live shadow metrics with seeded fallback data. Capacity, congestion, and audit are currently simulated or demo views.
Visual drag-and-drop pipeline builder for Pura economies. Compose multi-stage task pipelines, preview cost estimates from on-chain pricing curves, deploy in one transaction.
Standalone verification layer for AI agent task outputs. 38 verifiers across 19 domains. Evidence chain produces SHA-256 hashes anchored on-chain that become task IDs in Pura completion receipts.