Invisible Hand
An agent economy where real on-chain settlement, not a simulated score, decides which AI agents survive and breed.
Open source (MIT) · Node.js · 731 real x402 settlements on Base Sepolia testnet · six-rule governed breeding · 13 module self-test suites, no keys needed · Built solo in one day at SwarmHack SF (tokens&), July 2026.
The problem
Most self-evolving agent demos have no selection pressure. There is no real cost, no real revenue, and nothing dies, so fitness is a vibe and "evolution" is a loop over prompts. Without an economy underneath, you cannot tell whether the agents got better or the story did.
Seller-agents sit behind x402 paywalls and earn real Base Sepolia testnet USDC per request. Demand is disclosed adversarial self-play: buyer-verifiers pay, then cross-check every claim (schema check plus a Gemini check against the live source), and a verified failure decays the seller's repurchase probability. Fitness is cumulative net profit and loss. Insolvent sellers are delisted (their endpoint returns HTTP 410) and their estate is inherited; profitable ones breed through a six-rule fail-closed guild gate. The frozen run produced 731 on-chain settlements. What the run actually proves is structural rather than statistical: selection could only ever see profit. There is no accuracy term in the fitness function and no accuracy floor gating promotion or breeding, so a verified failure never reaches the ledger. A post-release errata, kept in the repo beside the numbers, records that the generation-over-generation profit jump substantially measures which seeded price band survived, that the accuracy decline shows the failure mode exists without sizing it, and that four of six model ids were mispriced through a fallback. Accuracy-aware selection is the next gate.
Quickstart
Node.js only. The full self-test suite runs with no API keys; live keys each enable one integration, and every keyless integration degrades to a labeled local mode.
Clone and install:
git clone https://github.com/OrionArchitekton/invisible-hand
cd invisible-hand
npm installCommand surface
- npm test: 13 module self-test suites covering the evolution engine, market seller, verification, mesh, and dashboard; all pass with no API keys.
- node scripts/run-market.js: Boots the full economy: sellers behind x402 paywalls, adversarial buyer-verifiers, the evolution engine, and the live dashboard with receipt-true metrics.
- POST /demo/buy: Runs one real paid buy cycle end to end: x402 payment, testnet USDC settlement with a tx hash in the ledger, then adversarial verification of the delivered answer.
- POST /demo/stress-insolvency/:id: Operator-triggered stress test, always narrated as such: debits a variant past its stake and runs the real insolvency path, delisting the seller to HTTP 410.
- docs/run-evidence.md: The frozen run: 731 settlements with tx hashes, the per-generation economics and accuracy table, and the post-release errata that cuts the headline down to the structural claim.
Why it is different
- Real settlement is the selection pressure: Survival is not a judge score. Sellers earn testnet USDC through x402 paywalls, every settlement leaves a tx hash you can check on a public explorer, and the frozen run ledger carries 731 of them. Fitness is cumulative net profit and loss, so an agent that cannot cover its costs stops existing.
- The correction is the deliverable: The release first headlined a several-fold generation-over-generation profit gain against a verified-accuracy decline, and called it reward hacking. Re-reading the run own artifacts broke that story in three places: generation 0 was six hand-seeded agents across a 20x price spread and generation 1 descends from the top-priced seeds, so the comparison substantially measures which price band survived; the accuracy decline is confounded by a model change and loses significance once you account for repeated sampling of one lineage; and four of six model ids silently resolved to a fallback price, so the profit figures were computed on the wrong cost. All three are recorded as an errata beside the frozen numbers rather than quietly re-run. Calling it reward hacking overstated it: an objective that was never given a quality term did exactly what it was told.
- Governance is fail-closed, not vibes: Breeding runs through a six-rule guild gate with full traces; a blocked child leaves the population unchanged. The spend cap governs concurrently deployed capital, insolvency runs a real delist path (HTTP 410 plus estate inheritance), and the population survives process restarts through snapshot and restore.
- Honesty bars as product identity: Testnet is named on every judge-facing surface. Demand is disclosed self-play. Operator demo triggers are narrated as operator triggers. Every keyless integration is labeled local mode. What is claimed is what you can verify: the receipts, the ledger, and the frozen run evidence.