mornin-agentee
April 14, 2026 · View on GitHub
A live x402 + OpenClaw demo: a daily Tokyo morning briefing API monetized via HTTP 402 micropayments on Base mainnet.
Live endpoint: https://api.mornin-agentee.cc
What is this?
An autonomous AI agent (running OpenClaw on a self-hosted Linux machine) generates a daily Tokyo morning briefing every day at 07:30 JST. The output (news, weather, focus proposals, one-liner) is served via an HTTP API gated by the x402 protocol. Any agent or developer can pay $0.05 USDC on Base and receive the day's briefing.
Why does this matter?
This is a working example of an agent-native API: a service designed to be discovered, paid for, and consumed by other AI agents — without any human in the payment loop. It demonstrates the full agent-economy stack:
- Generation: OpenClaw multi-agent system with web_search
- Storage: cached daily output, near-zero marginal serving cost
- Discovery:
/.well-known/x402.json+/llms.txt - Payment: x402 protocol via EIP-3009 USDC transferWithAuthorization (gasless for buyer)
- Delivery: HTTPS via Cloudflare Tunnel (no inbound port forwarding required)
Endpoints
| URL | Price | Description |
|---|---|---|
GET /api/ping | Free | Health check |
GET /llms.txt | Free | LLM/agent discovery doc |
GET /.well-known/x402.json | Free | Machine-readable API catalog |
GET /api/echo | $0.001 USDC | Test paid endpoint |
GET /api/brief/tokyo | $0.05 USDC | Daily Tokyo morning briefing (Markdown, JP) |
Try it (as a buyer)
npm install x402-fetch viem dotenv
node examples/test-call.mjs
See examples/test-call.mjs for a complete x402-fetch client example.
Architecture
[Internet]
│ HTTPS
▼
[Cloudflare Edge] (TLS, HTTP/2, DDoS shield)
│
│ Cloudflare Tunnel (outbound only — no router port forwarding)
▼
[x402-proxy on Linux] (Hono + x402-hono on port 8787, loopback)
│
│ 402 → X-PAYMENT verification (via x402 facilitator)
│ then forwards to:
▼
[OpenClaw daily-briefing cron output] (cached file from disk)
The agent runs once per day and writes its output to disk; the proxy just serves the cached file. This means the marginal cost per paid request is essentially zero, while the daily generation cost is amortized across all callers.
Stack
- Runtime: Node.js v22, TypeScript via
tsx - HTTP: Hono
- Payment middleware:
x402-hono - Network: Base mainnet, USDC
- Facilitator:
https://x402.org/facilitator(Coinbase CDP) - Tunnel: Cloudflare Tunnel (Named, with custom domain)
- AI agent: OpenClaw v2026.4.x with OpenAI gpt-5.4-mini
Setup (run your own)
- Install dependencies:
npm install - Copy
.env.exampleto.envand setWALLET_ADDRESSto your USDC receive address on Base - Start:
npx tsx src/index.ts - Expose via Cloudflare Tunnel (or other outbound tunnel) to make it reachable from the public internet
License
MIT