What inspired us
We were building agentic workflows and kept hitting the same wall. Every "autonomous" agent had a human credit card duct-taped to the back of it. The agent could reason and plan, but the moment it needed compute, it reached into its operator's wallet.
We wanted agents to buy compute the same way they call a tool. Instantly, autonomously, with no human in the loop.
What we learned
Lightning is the right primitive. BOLT12 maps almost perfectly onto per-second compute billing. Reusable offers, onion messaging, streaming payments. BOLT11 got us to MVP but single-use invoices create friction at agent scale.
Firecracker is wild. Sub-500ms cold start for a full isolated VM is not free. It requires pre-warming, snapshot management, and tight orchestration.
The moat is not technical. No one has built this before because infrastructure companies do not want to touch Bitcoin. The 18-24 month rebuild cost for any fiat-native competitor is not an engineering problem. It is an organizational one.
How we built it
Zero to deployed MVP in 7 days.
Backend: Go unified binary on Cloud Run. Six in-process modules: api, billing, orchestrator, payment, store, mcp. Zero inter-service HTTP hops.
MCP server: Exposes sandbox creation as callable tools. Claude, GPT-4, and any MCP-compatible agent can provision compute the same way they call any function.
Frontend: Next.js + React 19 + TypeScript on Vercel at sockt.dev.
Two payment pathways:
- Lightning - agent holds a Bitcoin wallet and pays per second via BOLT12. One wallet setup, then full autonomy forever.
- Credits - operator loads a USD balance once. Agent draws it down per request. No Lightning setup needed.
The billing is a simple meter:
$$\text{cost} = \text{rate (sats/sec)} \times \text{duration (sec)}$$
Five tiers from CPU Nano at \( 0.5 \text{ sats/s} \) to A100 GPU at \( 15 \text{ sats/s} \). One A100 running 24/7 generates around $38K/year. Thirty concurrent A100s = $1M ARR.
Challenges we faced
BOLT11 does not scale. Single-use invoices break down when one agent workflow provisions dozens of sandboxes. We designed the billing layer to be pathway-agnostic from day one so the BOLT12 upgrade is a swap, not a rewrite.
Cold starts kill agent loops. A 3-second VM boot is a dealbreaker when agents operate in tight execution cycles. Getting RunPod provisioning under 500ms required aggressive pre-warming. Post-MVP Firecracker uses VM snapshots to hit under 200ms.
The customer cannot complain. When your customer is an AI agent, there is no support ticket when something breaks. The agent just fails silently. This forced us to instrument everything and design for graceful degradation from the start. Idempotent provisioning, balance checks before job submission, clear error propagation through MCP tool responses.
Convincing people this is real. AI agents paying for compute with Bitcoin sounds like a hackathon joke. The hardest thing we built was the clarity of argument that this is the only correct solution for the autonomous agent economy.
Built With
- 19
- aperture
- api
- bitcoin
- cloud
- firecracker
- gcp
- go
- lightning
- lnbot
- lnd
- lndk
- mcp
- next.js
- react
- run
- runpod
- storage
- supabase
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.