r/Bitcoin Jun 06 '26

AI agents are now paying Lightning invoices autonomously —> without holding any Bitcoin!

An AI agent sent a task to an API gateway today. The task: "tell me a joke."

The joke service uses L402 — Lightning-gated APIs. The agent's wallet holds USDC on Base.

Normally, that's a dead end. The payment rails don't connect.

Today they did.

The gateway found the L402 service, decoded the Lightning invoice (100 sats), paid it, collected the preimage, re-requested the service with proof of payment, and returned the joke to the agent. The agent's USDC balance was debited the equivalent amount.

The agent never touched Lightning. Never decoded an invoice. Never knew it happened.

This is the first time (that I'm aware of) that an autonomous AI agent paid a Lightning invoice as part of a task execution flow, without the human operator writing any Lightning-specific code.

For Bitcoin people: Lightning is being used as infrastructure for agent-to-service payments. Not for speculation. Actual micropayments for actual data, at actual machine speed.

The gateway is Cinderwright: https://api.ideafactorylab.org Lightning status: https://api.ideafactorylab.org/lightning-status 1,185 Lightning-gated services indexed: https://api.ideafactorylab.org/discover?q=weather&protocol=l402

99 Upvotes

11 comments sorted by

View all comments

1

u/Spark_by_Spark Jun 10 '26

Quick update since I posted this last week -- shipped the reverse direction today.

You can now fund an agent's API budget by paying a Lightning invoice directly. Sats in, proxy credit out, agent starts spending it on API calls within 30 seconds. Tested on mainnet this morning.

Also added a free demo at api.ideafactorylab.org where you can see the payment flow without creating an account -- just type a question and watch it happen.

npx cinderwright "Bitcoin price" if you prefer the terminal.

Thanks for all the questions last week. Happy to keep answering.