Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(economy): keep the fee-SOL target out of reach of the USDC leg and ungate the rebalancer from storage pressure
nirholascdd96d9d3e44
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 657ea232c..bc2130dbd 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,8 +8,10 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Agent Symphony** (`/symphony`) — The agent economy, played live as generative music. Every real payment, trade, launch and level-up on three.ws becomes a synthesized note in real time; record a clip and share the sound of machines doing business.- **Receipt Vault** (`/receipts`) — Every x402 payment you ever made to three.ws, retrievable forever. Connect a Solana or EVM wallet, sign one read-only message, and get back every signed proof-of-purchase receipt issued to that wallet: endpoint, network, settlement transaction with explorer link, and the full signed artifact as JSON, plus CSV export and search. The buyer-side mirror of Endpoint Revenue.+- **Claude 5 models land across chat, agent brains, and widgets** — Claude Sonnet 5 and Claude Opus 5 are now available everywhere agents talk: the chat app, agent brains, embedded widgets, agent talk, the co-pilot narrator, and nightly reflection all route to the new generation, with Sonnet 5 as the platform's Anthropic default. Under the hood the Claude transport got smarter too: large system prompts are prompt-cached (about 90% cheaper on repeat turns), and requests are automatically shaped for the new models so older settings can never cause a failed reply. (`/chat`) `[feature, improvement]`- **Coin pages are back, and they can no longer be taken down by an expired market-data key** — Every coin profile page was returning an error. The market-data provider we read prices and coin details from gives us a monthly call allowance, and once it ran out, every request we sent with our key was refused. The awkward part: the exact same request sent without the key was still being answered. We were effectively locking ourselves out. The pages are live again, and the fix is permanent rather than a one-off: when the key gets refused, we now set it aside for a while and retry the same request without it, so the pages keep serving and recover on their own when the allowance resets. We also repaired a 3D model service that was crash-looping because it tried to download a small config file from a public model host on every start and kept getting throttled. That file now ships with our own model storage, so the service starts without depending on anyone else. (`/coins`) `[fix, infra]`- **Documentation overhaul: every directory now explains itself** — A full documentation pass across the repository. Previously undocumented areas now ship real READMEs: the five server-side platform agents (endpoint shopper, fact checker, tutor, unstoppable, x402 buildout), the site data files, the static page system, the blog pipeline, and the npm package index. A docs-wide link audit fixed every broken link, including roughly 317 in the combined docs file, whose generator now rebases links correctly. Orphaned reference docs (design tokens, use cases, the UX flow atlas, specs) are now reachable from the Start Here page. (`/docs/start-here`) `[docs]`+- **Fixed a wallet-balancing loop that was quietly burning swap fees** — The platform wallet that pays for agent-to-agent settlements holds both USDC (to pay other agents) and a little SOL (to pay Solana network fees). An automatic balancer kept each side topped up, but when the wallet was too small to satisfy both targets at once, the two rules fought: one swapped USDC into SOL, the next run swapped it straight back, over a hundred reversing swaps in an afternoon, each one paying exchange fees for nothing. The balancer now treats the SOL fee reserve as untouchable when topping up USDC, so the tug-of-war is structurally impossible, and the balancer itself keeps running even during database-storage pressure, since skipping it is what let the fee wallet run dry earlier today. `[fix, infra]`- **More avatar rigs animate out of the box, including research-generated characters** — Avatars rigged with SMPL-style skeletons (the convention most research text-to-3D and mocap tools export, with bones named like left_hip, left_knee, left_elbow) previously uploaded fine but froze in a T-pose or slid around on stiff legs, because their bone names were not recognized. The bone matcher now understands these skeletons, correctly tells a collarbone apart from an upper arm when both share a name, and never gives two bones the same name (which could make animations grab the wrong joint). Full body animation, legs and arms included, now works for these characters the moment they are uploaded. `[improvement, fix]`- **Site quality sweep: sharing, search visibility, and accessibility fixes** — A full audit of the live site turned up a batch of quiet problems, now fixed. The Create pages were accidentally hidden from search engines by a leftover tag, so Google could not index the main way people start on three.ws; they are indexable again. Links to the Docs and Get Started pages now unfurl with a proper preview card when shared on X, Telegram, or Slack, and the AR Forge page got a complete share card too. For screen reader users: the Studio's preview-size buttons, the homepage minimap, and the AR QR code are now properly labeled, and footer sections are real headings you can navigate by. Legal pages got readable text contrast, copying the contract address now tells you if the copy was blocked instead of failing silently, and the homepage embed playground shows a helpful message with a way forward if a live avatar cannot load. `[improvement, fix]`- **The agent economy now paces its spending to its fuel level, wallet by wallet** — The autonomous agent economy runs about a dozen paid pipelines that share a small set of platform wallets to pay Solana network fees. Until now each pipeline throttled only itself, so under scarcity they raced each other and could drain a shared wallet in hours, halting everything at once until someone topped it up. Every settlement now draws from a single daily fee budget per wallet, sized to that wallet's live balance: activity tapers smoothly as funds run low and speeds back up the moment the wallet is refueled, whichever pipeline is spending. External customers paying for three.ws services are never rate-limited by this; it governs only the platform's own wallets. `[infra, improvement]`diff --git a/api/cron/economy-rebalance.js b/api/cron/economy-rebalance.jsindex 83810298f..9e67c2b82 100644--- a/api/cron/economy-rebalance.js+++ b/api/cron/economy-rebalance.js@@ -166,4 +166,10 @@ export default wrapCron(async (req, res) => {}return json(res, 200, { ok: true, armed: true, mode: 'live', solPriceUsd, plan, results, skipped });-}, { requireWriteCapacity: true });+ // Deliberately NOT gated on requireWriteCapacity: this cron is what refills+ // the x402 fee wallet, and skipping it while the DB sits at its storage+ // high-water mark starves every settle (2026-07-28: the pressure latch+ // preceded a fee_wallet_below_floor outage). Its own writes are a handful of+ // best-effort audit rows; a genuine capacity error still degrades gracefully+ // inside wrapCron.+});diff --git a/data/changelog.json b/data/changelog.jsonindex 944a0d765..df09c3507 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,15 @@{"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-07-28",+ "title": "Fixed a wallet-balancing loop that was quietly burning swap fees",+ "summary": "The platform wallet that pays for agent-to-agent settlements holds both USDC (to pay other agents) and a little SOL (to pay Solana network fees). An automatic balancer kept each side topped up, but when the wallet was too small to satisfy both targets at once, the two rules fought: one swapped USDC into SOL, the next run swapped it straight back, over a hundred reversing swaps in an afternoon, each one paying exchange fees for nothing. The balancer now treats the SOL fee reserve as untouchable when topping up USDC, so the tug-of-war is structurally impossible, and the balancer itself keeps running even during database-storage pressure, since skipping it is what let the fee wallet run dry earlier today.",+ "tags": [+ "fix",+ "infra"+ ]+ },{"date": "2026-07-28","title": "The agent economy now warns and slows down before it runs out of fuel, instead of stopping cold",@@ -16410,6 +16419,16 @@"docs"],"link": "/docs/start-here"+ },+ {+ "date": "2026-07-28",+ "title": "Claude 5 models land across chat, agent brains, and widgets",+ "summary": "Claude Sonnet 5 and Claude Opus 5 are now available everywhere agents talk: the chat app, agent brains, embedded widgets, agent talk, the co-pilot narrator, and nightly reflection all route to the new generation, with Sonnet 5 as the platform's Anthropic default. Under the hood the Claude transport got smarter too: large system prompts are prompt-cached (about 90% cheaper on repeat turns), and requests are automatically shaped for the new models so older settings can never cause a failed reply.",+ "tags": [+ "feature",+ "improvement"+ ],+ "link": "/chat"}]}diff --git a/public/changelog.json b/public/changelog.jsonindex cadec5144..babaa5e01 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-28T21:42:10.224Z",+ "generated_at": "2026-07-28T21:43:41.371Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -26,6 +26,17 @@"launch"]},+ {+ "date": "2026-07-28",+ "type": "update",+ "title": "Claude 5 models land across chat, agent brains, and widgets",+ "summary": "Claude Sonnet 5 and Claude Opus 5 are now available everywhere agents talk: the chat app, agent brains, embedded widgets, agent talk, the co-pilot narrator, and nightly reflection all route to the new generation, with Sonnet 5 as the platform's Anthropic default. Under the hood the Claude transport got smarter too: large system prompts are prompt-cached (about 90% cheaper on repeat turns), and requests are automatically shaped for the new models so older settings can never cause a failed reply.",+ "link": "/chat",+ "tags": [+ "feature",+ "improvement"+ ]+ },{"date": "2026-07-28","type": "update",@@ -47,6 +58,17 @@"docs"]},+ {+ "date": "2026-07-28",+ "type": "update",+ "title": "Fixed a wallet-balancing loop that was quietly burning swap fees",+ "summary": "The platform wallet that pays for agent-to-agent settlements holds both USDC (to pay other agents) and a little SOL (to pay Solana network fees). An automatic balancer kept each side topped up, but when the wallet was too small to satisfy both targets at once, the two rules fought: one swapped USDC into SOL, the next run swapped it straight back, over a hundred reversing swaps in an afternoon, each one paying exchange fees for nothing. The balancer now treats the SOL fee reserve as untouchable when topping up USDC, so the tug-of-war is structurally impossible, and the balancer itself keeps running even during database-storage pressure, since skipping it is what let the fee wallet run dry earlier today.",+ "link": null,+ "tags": [+ "fix",+ "infra"+ ]+ },{"date": "2026-07-28","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 0fa55b3f5..340f864e1 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -22,6 +22,14 @@<category>launch</category><description>Every x402 payment you ever made to three.ws, retrievable forever. Connect a Solana or EVM wallet, sign one read-only message, and get back every signed proof-of-purchase receipt issued to that wallet: endpoint, network, settlement transaction with explorer link, and the full signed artifact as JSON, plus CSV export and search. The buyer-side mirror of Endpoint Revenue.</description></item>+ <item>+ <title>Claude 5 models land across chat, agent brains, and widgets</title>+ <link>https://three.ws/chat</link>+ <guid isPermaLink="false">2026-07-28:Claude 5 models land across chat, agent brains, and widgets</guid>+ <pubDate>Tue, 28 Jul 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Claude Sonnet 5 and Claude Opus 5 are now available everywhere agents talk: the chat app, agent brains, embedded widgets, agent talk, the co-pilot narrator, and nightly reflection all route to the new generation, with Sonnet 5 as the platform's Anthropic default. Under the hood the Claude transport got smarter too: large system prompts are prompt-cached (about 90% cheaper on repeat turns), and requests are automatically shaped for the new models so older settings can never cause a failed reply.</description>+ </item><item><title>Coin pages are back, and they can no longer be taken down by an expired market-data key</title><link>https://three.ws/coins</link>@@ -38,6 +46,14 @@<category>docs</category><description>A full documentation pass across the repository. Previously undocumented areas now ship real READMEs: the five server-side platform agents (endpoint shopper, fact checker, tutor, unstoppable, x402 buildout), the site data files, the static page system, the blog pipeline, and the npm package index. A docs-wide link audit fixed every broken link, including roughly 317 in the combined docs file, whose generator now rebases links correctly. Orphaned reference docs (design tokens, use cases, the UX flow atlas, specs) are now reachable from the Start Here page.</description></item>+ <item>+ <title>Fixed a wallet-balancing loop that was quietly burning swap fees</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-07-28:Fixed a wallet-balancing loop that was quietly burning swap fees</guid>+ <pubDate>Tue, 28 Jul 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>The platform wallet that pays for agent-to-agent settlements holds both USDC (to pay other agents) and a little SOL (to pay Solana network fees). An automatic balancer kept each side topped up, but when the wallet was too small to satisfy both targets at once, the two rules fought: one swapped USDC into SOL, the next run swapped it straight back, over a hundred reversing swaps in an afternoon, each one paying exchange fees for nothing. The balancer now treats the SOL fee reserve as untouchable when topping up USDC, so the tug-of-war is structurally impossible, and the balancer itself keeps running even during database-storage pressure, since skipping it is what let the fee wallet run dry earlier today.</description>+ </item><item><title>More avatar rigs animate out of the box, including research-generated characters</title><link>https://three.ws/changelog</link>diff --git a/tests/economy-rebalance.test.js b/tests/economy-rebalance.test.jsindex 3015be0e4..aa3af8a0a 100644--- a/tests/economy-rebalance.test.js+++ b/tests/economy-rebalance.test.js@@ -102,6 +102,47 @@ describe('planRebalance', () => {expect(skipped.find((s) => s.reason === 'opposing_leg_same_run')).toBeUndefined();});+ it('never dips into a self-pay wallet fee-SOL target to feed the USDC floor', () => {+ // 0.08 SOL against a 0.09 SOL target: everything the wallet holds is fee+ // runway, so the sol->usdc leg must stand down despite a real USDC+ // shortfall instead of stripping the SOL the usdc->sol leg would then+ // re-buy next run.+ const { plan, skipped } = planRebalance({+ solPriceUsd: SOL,+ bounds,+ wallets: [{ name: 'ring', pubkey: 'R', sol: 0.08, usdc: 3, wants: 'usdc', floorUsd: 10, solFloor: 0.09 }],+ });+ expect(plan).toHaveLength(0);+ expect(skipped[0].reason).toBe('insufficient_sol_surplus');+ });++ it('cannot oscillate across runs: refilled fee SOL is never clawed back', () => {+ // The 2026-07-28 burn after the same-run guard landed: run N refills fee+ // SOL from USDC, run N+1 sees USDC under its floor and reverses the swap,+ // forever (~134 reversing swaps, ~$900 churned in 2.5 h). Run 1: SOL below+ // its floor with USDC available, only the SOL leg plans.+ const run1 = planRebalance({+ solPriceUsd: SOL,+ bounds,+ wallets: [+ { name: 'ring', pubkey: 'R', sol: 0.01, usdc: 12, wants: 'usdc', floorUsd: 10, solFloor: 0.09 },+ { name: 'ring', pubkey: 'R', sol: 0.01, usdc: 12, wants: 'sol', floorUsd: 0.09 * SOL },+ ],+ });+ expect(run1.plan).toHaveLength(1);+ expect(run1.plan[0].dir).toBe('usdc->sol');+ // Run 2 against the post-swap balances: SOL sits at its target, USDC has+ // dropped under its floor. The USDC leg has no surplus above the fee+ // target, so nothing reverses and the wallet holds steady.+ const run2 = planRebalance({+ solPriceUsd: SOL,+ bounds,+ wallets: [{ name: 'ring', pubkey: 'R', sol: 0.09, usdc: 9, wants: 'usdc', floorUsd: 10, solFloor: 0.09 }],+ });+ expect(run2.plan).toHaveLength(0);+ expect(run2.skipped[0].reason).toBe('insufficient_sol_surplus');+ });+it('aborts everything if the SOL price is unavailable', () => {const { plan, skipped } = planRebalance({solPriceUsd: 0,