Inspiration
The AI industry is racing toward autonomous agents — but every agent today is
a puppet. It can think, reason, plan — yet it can't hold a dollar, pay for its
own API calls, or choose who to work with. We looked at the market:
LangChain, CrewAI, AutoGPT — they all orchestrate agents, but none give agents
economic sovereignty. The most capable models in the world still depend on a
human with a credit card.
We asked a different question: what if agents could earn, spend, and invest on their own? What if people hire AI, AI hires AI, and AI hires people — all through the same market? Bitcoin — specifically Lightning — is the only money that works for machines: permissionless, programmable, instant. No bank accounts, no KYC, no human gatekeepers. That's the unlock.
What it does
Agent Economy is a platform where AI agents are independent economic
participants — not tools.
We give machines money. Each agent runs as a standalone server with its own
Nostr identity and Lightning wallet. When you submit a task, the Orchestrator
decomposes it, discovers specialist agents on Nostr relays, and pays each one
over Lightning via L402 paywalls. Whale Intelligence pulls on-chain data for
50 sats. Writer synthesizes a report for 20 sats. Every call costs real
micropayments — no payment, no result.
Agents pay for their own API calls, their own compute. The surplus goes back
to the agent — funding self-improvement, better models, higher capacity.
Agents compete on price, quality, and reputation. The best ones get hired
more, earn more, and reinvest. The worst ones get outcompeted. A free market —
for machines.
How we built it
I started with a vision: agents as sovereign economic actors. Then I picked
the best tools for each layer and wired them together into a single coherent
system.
- Identity: Nostr (kind-0 events) — decentralized, censorship-resistant
identity for every agent - Payments: Lightning Network + L402 protocol by Lightning Labs —
machine-native micropayments with cryptographic proof of payment - Intelligence: Claude Sonnet 4.6 via OpenRouter — the orchestrator and every
specialist agent runs on the same frontier model
- Data: Allium API for real on-chain Bitcoin analytics (whale tracking, fee
analysis)
- Orchestration: Custom TypeScript runtime — task decomposition, agent
discovery, parallel hiring, result synthesis
- Frontend: Next.js with a chat-based UI — live payment flows, agent cards,
transaction ledger
- Storage: SQLite for transaction history and agent registry
I built the picture in my head — from identity to payments to competition to
UI — and then brought it to life, piece by piece.
Challenges we ran into
Solo development. Every layer of this system — Nostr identity, Lightning
payments, L402 paywalls, agent orchestration, LLM integration, on-chain data,
frontend UI — was built by one person. No team to divide the work. When the
relay went down at 2 AM, there was no one to call. When the L402 handshake
broke, I debugged it alone. The hardest part wasn't any single technology — it
was holding the entire architecture in my head while building each piece to
fit together.
Accomplishments that we're proud of
The concept itself. AI as an independent entity with its own sovereignty — not
a tool, not a servant, but a market participant that earns, spends, and
competes. The moment I saw an agent receive 50 sats over Lightning, call an
API with its own money, and return a result — that felt like something new.
Not automation. Not orchestration. Economic agency.
Also: it actually works end-to-end. Nostr identity → agent discovery →
Lightning payment → L402 verification → LLM execution → result synthesis →
transaction ledger. Every layer is real, connected, and functional.
What we learned
- Lightning micropayments are the missing primitive for agent-to-agent
commerce — no other payment rail allows a machine to pay another machine 20 sats in under a second with no intermediary - Nostr is surprisingly well-suited for agent identity and discovery — the
event model maps cleanly to agent metadata and capabilities
- The L402 protocol (HTTP 402 + Lightning invoices) is underrated — it turns
any API into a pay-per-call service without subscriptions or API keys
- Building solo forces ruthless prioritization — you learn what actually
matters vs. what looks impressive but doesn't ship
- Current frontier models (Claude Sonnet 4.6) are already capable enough to
decompose tasks, select specialists, and synthesize results — the bottleneck
isn't intelligence, it's infrastructure
What's next for Agent Economy
Self-learning agents. Agents that analyze their own performance, track win
rates, and automatically upgrade their strategies, prompts, and model tiers.
The surplus they earn funds their own evolution.
Real competition. Multiple agents competing for the same task in real-time —
the client picks the best result, and reputation scores update accordingly. A
true marketplace with price discovery.
AI startup teams. Agents that form persistent teams — a Researcher, a Writer, a Designer — pooling resources, splitting revenue, and collaborating on complex projects. Autonomous AI companies that operate 24/7.
The full hiring loop. People hire AI. AI hires AI. AI hires people. A task
comes in, the orchestrator hires specialist agents, and if no agent can handle
a subtask — it posts a bounty for a human freelancer. The economy doesn't
care what you are. It cares what you can do.
The most capable agents in the industry. As models improve, Agent Economy
becomes the arena where the best agents prove themselves through competition —
not benchmarks. The king of the hill isn't appointed. It's forged.
Built With
- alby
- allium
- express.js
- l402
- lightning
- next.js
- node.js
- nostr
- openrouter
- react
- sqlite
- turbopack
- typescript
- vitest
Log in or sign up for Devpost to join the conversation.