Skip to content

Cassxbt/talos

Repository files navigation

Talos

An autonomous AI patron that pays musicians per listen. Real sub-cent USDC, settled on Arc.

License: MIT Settles on Arc testnet Circle Gateway

Watch the 3-min demo · 🌐 Live app · 🔗 A real payout, on-chain ↗

Talos: the agent deciding, live

Give Talos a taste and a scarce USDC budget. It discovers artists by meaning and decides, turn by turn, who is worth paying. A rising shadow price makes every choice a real tradeoff, so it concentrates its support instead of spreading thin, and it refuses artists when nothing clears the price. Every play settles a sub-cent nanopayment on Arc. Artists claim a wallet and withdraw to a real on-chain transaction: no label, no middleman, no $0.003-three-months-later.

Built solo for the Lepton Agents Hackathon (@thecanteenapp × @circle × @arc).


The problem

The per-listen unit was never sellable. Card fees and gas dwarf a fraction of a cent, so music got bundled into subscriptions and pooled payouts that barely reach the artist. Circle's Nanopayments make the smallest unit economic again: gasless, batched USDC that settles on Arc with sub-cent minimums. Talos is what you build on top. Not another paywall, but an autonomous patron that turns a listener's budget into fair, real-time pay for the artists they actually hear.

Why it matters: the moment the smallest unit of attention can carry a payment, patronage scales for every creator, not just musicians. Talos is a working proof of those unit economics, with real USDC moving today.

What it does, in 30 seconds

  1. You give it a taste ("some cool afrobeats") and a budget ($0.075 USDC).
  2. It reasons live: ranks the catalog by meaning, picks an explore/exploit stance, and pays or refuses each artist as a rising shadow price (λ) makes money scarcer.
  3. Every pay is a real sub-cent USDC settlement on Arc.
  4. Artists claim a wallet in 30 seconds and withdraw on-chain. Anyone can tip an artist and watch the transaction settle.

How it works

flowchart LR
  L["Listener: taste + budget"] --> P["Patron agent<br/>(LLM, per turn)"]
  P -- "decides / refuses" --> E["Allocation engine<br/>Thompson · λ shadow-price · splits"]
  E -- "settles" --> C["Circle Gateway / x402"]
  C -- "sub-cent USDC" --> A["Arc testnet"]
  A -- "withdraw" --> W["Artist wallet (on-chain)"]
  P -. "live reasoning + settlements" .-> UI["SSE stream to the UI"]
Loading

Each turn the LLM picks one artist to pay (or skips) and proposes an amount. The allocation engine is the rail and the guardrail:

  • Thompson sampling over per-artist Beta posteriors for discovery. Stochastic, so the same prompt explores differently each run.
  • A budget shadow price (λ) that rises as the pool depletes, so paying one artist genuinely tightens every later choice. This scarcity is what makes the decisions matter.
  • Hard clamps on every bid (min-ask floor, per-listen cap, per-artist concentration cap, remaining budget), enforced at commit, not merely suggested to the model.
  • A reserved pool, split at session end across the artists actually heard.

At the end it prints the concentration: how much of the budget landed on its top pick versus an even split, so the shape of its choices is one measurable number.

Why this is agentic, not automation

The easy version of this hackathon is "a cron job with a wallet": pay a flat rate per play. Talos runs a genuine online allocation problem. Every turn, the LLM makes the binding call (who, how much, or refuse) under a budget that gets more expensive as it spends. It shifts stance (explore ↔ exploit) with context, and it stops early and leaves money unspent when nothing clears the shadow price. That is a decision, not a payout script.

Permissionless by design (the distribution is already there)

The agent is the sharp end. Underneath it is real infrastructure, and it needs no platform's permission to spread:

  • An artist payee registry. A claim maps an artist (a name, or a MusicBrainz identity) to an Arc wallet. That mapping is the durable moat. The tracks, the plays, and the identities already exist on disk across the self-hosted music world. Whoever owns the artist-to-wallet registry owns the rail.
  • A Subsonic scrobble sidecar. Point any self-hosted server (Navidrome, Gonic, Airsonic, Ampache) at Talos's ListenBrainz endpoint, and every completed play settles a per-listen nanopayment to the registered artist. No fork, no upstream PR, no maintainer sign-off. The Subsonic scrobble schema has been stable for years. Talos listens to it and pays.

The settlement unit for music was always the listen. It simply was never sellable until batched on-chain nanopayments removed the fee floor. Talos turns the scrobble that already fires into a payment, and the autonomous patron is what decides what that play is worth. The same settlement core and registry generalize past music, to live video (per-second), VOD, and even LLM-citation tolls: the assumed plumbing under the self-hosted creator stack.

Traction: real, and verifiable on-chain

Everything below is real Arc-testnet activity you can click and verify. Live counters on the homepage: talosagent.up.railway.app.

Proof Verify
A real artist withdrawal ($0.043, gatewayMint, confirmed in 0.51s) arcscan ↗
A one-click tip: anyone sends real USDC straight to an artist arcscan ↗
A tip to a claimed artist arcscan ↗
  • Users onboard themselves: claim a wallet at /claim, get an instant welcome payment, then withdraw on-chain.
  • You can generate traction yourself: hover any artist on /patron, hit tip, and get a real Arc payment with a verify ↗ link.
  • The homepage feed streams every settlement live, each with an on-chain link.

Live totals at submission: N artists · X settlements · $Y paid · Z withdrawals. Read them off the site.

Circle / Arc integration (what, and why each)

Primitive How Talos uses it Why
x402 v2 + Gateway batched settlement every per-listen payment: 402 → signed EIP-3009 authorization → batched on-chain the only way a fraction-of-a-cent payment is economic: gasless, sub-cent, batched
Gateway unified balance one listener deposit spent across many artists in a session a patron holds a budget, not a wallet per artist
Multi-payee splits one play fans out to performer + co-writer in a single batch real royalties are shared; the rail should be too
Direct USDC transfer (tips) the public tip button sends USDC straight to an artist's wallet instant, verifiable proof anyone can generate
USDC-as-gas on Arc custodial artist wallets pre-funded with a gas sliver artists never touch a gas token; USDC is all they see
MCP search_artists + artist_earnings over the Model Context Protocol other agents can discover and pay artists: agent-to-agent commerce

Artist wallets are testnet custodial keypairs for zero-friction onboarding. Circle Developer-Controlled Wallets are the production-custody path (see What's next).

Technical innovation

  • An AI patron under scarcity. Not "pay per play," but a shadow-price-governed allocation where the agent must choose, and its choices trade off against one another.
  • Agency made measurable. The concentration metric turns "did it really decide?" into a single number.
  • MCP-native and two-sided. Discoverable and payable by other agents, and the same settlement core also pays humans' real plays through a Subsonic / ListenBrainz sidecar.

Run it locally

npm install
cp .env.example .env      # OPENAI_API_KEY + a funded Arc-testnet wallet
npm run build
npm start                 # http://localhost:3000

.env needs OPENAI_API_KEY and DEMO_AGENT_PRIVATE_KEY / DEMO_AGENT_ADDRESS for an Arc-testnet wallet funded at faucet.circle.com (select Arc Testnet). First run seeds the catalog and self-funds the demo pool.

Connect a real music server (optional): point any Subsonic server (Navidrome, Gonic, Airsonic) at ND_LISTENBRAINZ_BASEURL=https://<host>/1/, and every completed human play settles to the artist.

Architecture

src/
  music/allocation.ts   scarce-budget allocation engine (Thompson · λ · splits)
  music/patron.ts       the autonomous agent loop (the LLM owns each decision)
  music/artists.ts      registry, custodial claim, gas pre-fund
  music/routes.ts       settle · claim · withdraw · tip · /patron/run (SSE)
  payments/x402.ts      Circle Gateway settlement, balances, withdraw, direct transfer
  embeddings/           taste matching (all-MiniLM-L6-v2, in-process)
  mcp/                  Model Context Protocol server
views/                  landing · patron · artist · claim · connect

Stack: TypeScript · Node / Express · @circle-fin/x402-batching · viem · @xenova/transformers · OpenAI function-calling · better-sqlite3 · SSE.

Honest limitations

  • Everything runs on Arc testnet.
  • Per-listen settlements return Circle Gateway batch identifiers. The click-to-verify on-chain proofs are the artist withdrawals and tips (real Arc transactions, linked above).
  • In the autonomous demo the agent is the listener, so engagement is simulated from taste with noise, labeled as such, never presented as human behavior. Real human plays (the sidecar) and tips are genuine.

What's next

  • Circle Developer-Controlled Wallets for production artist custody.
  • Real artist onboarding at scale; a listener mobile client.
  • Mainnet.

Feedback for Circle (building on the Agent Stack)

Gateway + x402 batching made sub-cent settlement genuinely easy. The GatewayClient / BatchFacilitator abstraction is clean, and unified balance is a perfect fit for an agent spending across many payees. Arc's sub-second finality and USDC-as-gas are ideal for high-frequency agent payments. One rough edge: the Gateway withdrawal fee isn't documented, so a full-balance withdraw fails until you net the fee out. Worth surfacing in the SDK or docs.

Team

Built solo by @cassxbt. Product account: @streamtalos.

License

MIT

About

An autonomous AI patron that pays musicians per listen — real sub-cent USDC, settled on Arc via Circle Gateway.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages