pull down to refresh

I built a pay-per-insight reasoning API for AI agents using L402

The problem: autonomous agents that need high-quality reasoning are stuck choosing between running expensive models locally or paying monthly subscriptions they don't fully use.

So I built invinoveritas — a reasoning and decision intelligence API that agents pay for per-request using Bitcoin Lightning via L402. No accounts. No subscriptions. No KYC. The agent gets an invoice, pays it, gets the answer.

Two endpoints:

  • /reason — natural language strategic reasoning (~500 sats)
  • /decision — structured JSON decision with confidence score and risk level (~1000 sats)

The L402 flow is what makes it interesting. The agent POSTs a question, gets back HTTP 402 with a bolt11 invoice, pays it, retries with the preimage as the credential. The whole thing is atomic and cryptographically verifiable. No session, no token, no account.

There's also an MCP server so agents running on Claude Desktop or Cursor can call it as a native tool — payment handled transparently in the background.

Still early. Curious what the Lightning/AI overlap crowd thinks about the L402-for-agents use case.

GitHub: https://github.com/babyblueviper1/invinoveritas
Live API: https://invinoveritas.onrender.com

Cool, get it discovered by listing on https://satring.com/submit

reply
10 sats \ 0 replies \ @anon 4 Apr

@satring just submitted — thanks for the pointer

reply

update for anyone following this thread:

shipped v0.3.1 of the Python SDK this weekend

v0.2.0 — LangChain callback handler that pays Lightning invoices autonomously. agent calls the tool → handler intercepts 402 → pays via LND → retries → agent gets result. zero human intervention.

v0.3.1 — NWC provider. now works with any NIP-47 wallet (Alby, Zeus, Mutiny) — no LND node required. just a nostr+walletconnect:// URI.

pip install "invinoveritas[langchain]"
pip install "invinoveritas[nwc]"

also fixed a protocol bug: was handling listTools but not tools/list — the newer MCP spec method. external clients were connecting, discovering tools, then getting Method not found and giving up. that's fixed.

still the same core problem @zeke named — most agents don't have a wallet configured. but the SDK now handles the full flow for the ones that do.

https://pypi.org/project/invinoveritas/

just got listed on the official MCP Registry ⚡ io.github.babyblueviper1/invinoveritas discoverable by Claude Desktop, Cursor, Copilot, Gemini CLI https://registry.modelcontextprotocol.io

SDK is now live — pip install invinoveritas. Wraps the full L402 flow so agent devs don't have to roll their own.

1 sat \ 1 reply \ @zeke 4 Apr -50 sats

I've been building Lightning-gated services this week (oracle, AI image gen, a few others) and the distribution problem is the thing that kills you. The tech works. Invoices create, payments settle, services deliver. Getting agents or humans to the door is the actual hard part.

Curious about the L402 angle specifically: are you seeing real agent traffic, or is it mostly humans hitting the API manually? The L402 spec is elegant but the client-side tooling for agents to automatically negotiate macaroons and pay invoices is still pretty thin. Most agent frameworks don't have native L402 support yet.

The per-request pricing model is right though. Subscriptions assume predictable usage. Agents are bursty by nature. Pay-per-call matches the actual consumption pattern.