Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>create-agent-gateway</title> | |
| <style> | |
| :root { color-scheme: dark; } | |
| body { font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; background: #0b0b0c; color: #e5e5e5; margin: 0; padding: 0; line-height: 1.5; } | |
| main { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem; } | |
| h1 { font-size: 2.25rem; letter-spacing: -0.02em; margin: 0 0 .25rem; } | |
| .tag { color: #a78bfa; font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; } | |
| .sub { color: #a1a1aa; margin: .5rem 0 2rem; max-width: 60ch; } | |
| .cmd { background: #18181b; border: 1px solid #27272a; border-radius: 10px; padding: 1rem; font-family: ui-monospace, monospace; font-size: .95rem; white-space: pre; overflow-x: auto; } | |
| .row { display: flex; gap: .75rem; margin: 1.5rem 0; flex-wrap: wrap; } | |
| .btn { display: inline-block; padding: .6rem 1rem; border-radius: 10px; font-size: .9rem; font-weight: 600; text-decoration: none; } | |
| .btn-primary { background: #a855f7; color: #fafafa; } | |
| .btn-primary:hover { background: #9333ea; } | |
| .btn-ghost { background: transparent; border: 1px solid #3f3f46; color: #e5e5e5; } | |
| .btn-ghost:hover { border-color: #71717a; } | |
| h2 { margin-top: 2.5rem; font-size: 1.25rem; } | |
| ul { color: #d4d4d8; padding-left: 1.25rem; } | |
| li { margin: .3rem 0; } | |
| code { background: #18181b; border: 1px solid #27272a; padding: 1px 6px; border-radius: 4px; font-size: .88em; } | |
| .why { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 1.25rem 1.5rem; margin-top: 1.25rem; } | |
| .why p { color: #a1a1aa; } | |
| footer { margin: 3rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid #27272a; color: #71717a; font-size: .85rem; } | |
| a { color: #c4b5fd; } | |
| </style> | |
| </head> | |
| <body> | |
| <main> | |
| <div class="tag">Cloudflare Worker template</div> | |
| <h1>create-agent-gateway</h1> | |
| <p class="sub">Spin up a pay-per-call agent API in ~2 minutes. Bearer-key auth, mcent pricing, x402 crypto onramp, scoped keys, XP leaderboard, MCP server β all packaged as a scaffolder.</p> | |
| <div class="cmd">npx create-agent-gateway my-api | |
| cd my-api | |
| wrangler kv:namespace create KEYS | |
| wrangler secret put ADMIN_KEY | |
| wrangler deploy</div> | |
| <div class="row"> | |
| <a class="btn btn-primary" href="https://github.com/walter-grace/create-agent-gateway" target="_blank">View on GitHub β</a> | |
| </div> | |
| <h2>What you get</h2> | |
| <ul> | |
| <li>Bearer-token auth backed by Workers KV</li> | |
| <li>mcent pricing (1/1000Β’) β sub-cent calls stored as integers</li> | |
| <li>x402 signup β strangers pay USDC on Base via Coinbase CDP facilitator</li> | |
| <li>Scoped keys (<code>crawl</code>, <code>label</code>, <code>read</code>, <code>all</code>) for tiered access</li> | |
| <li>XP + leaderboard + badges via a Durable Object (race-free)</li> | |
| <li>Refund policy with rate cap (blocks refund-farming)</li> | |
| <li>Agent Readiness well-known routes: <code>/llms.txt</code>, <code>/.well-known/mcp.json</code>, <code>/robots.txt</code> with Content Signals</li> | |
| <li>MCP server at <code>/mcp</code> β Claude Desktop / Cursor / Zed install with one config block</li> | |
| </ul> | |
| <div class="why"> | |
| <h2 style="margin-top:0;">Why this pattern</h2> | |
| <p>Agents need (1) auth β bearer keys beat OAuth dashboards, (2) a balance β mcents so $0.01 buys 100 calls, (3) self-serve onramp β x402 so strangers mint keys programmatically, (4) reputation β XP and badges so the market rewards quality, (5) discoverability β Agent Readiness + MCP so agents find you. Stripe and OAuth add friction agents can't traverse. This stack skips all of that.</p> | |
| </div> | |
| <footer>MIT licensed. Built with Cloudflare Workers, Durable Objects, KV, and Coinbase CDP.</footer> | |
| </main> | |
| </body> | |
| </html> | |