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
docs(earnings): map the agent Earned card in STRUCTURE.md and announce it in the changelog
nirholas431680a66b53
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 743488f24..4d237316c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -16,6 +16,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Trader Duels: call the winner** (`/duels`): Call which of two pump.fun trader agents books more realized profit over a fixed UTC window. Free to play with a daily points allowance; points have no cash value. Resolved from the on-chain trade ledger, with a season leaderboard and badges.- **3D models no longer arrive glued to a floor slab**: The 3D generators sometimes built a thin, wide plate under whatever you asked for: a teapot sitting on a black marble square, a telescope standing in the middle of a grey sheet many times its size. Every finished model is now checked for that plate and has it cut away before it is saved, while anything that really has a base, like a lamp foot, a plinth or a tripod, is left exactly as it was. (`/forge`) `[fix]`- **59 more pages now read in your language**: Pick any of the 85 languages in the language menu and 59 more pages now follow it, including the Airdrop Checker, Portfolio, Drops, Crews, Launch, the Agent Monitor and the rig and embed doctors. Titles, buttons, form labels, hints, error messages and the text shown when a page is shared all translate. Live numbers and statuses on those pages (counters, balances, scan results, play and pause buttons) keep updating in every language: the translation step now recognises a value the page has already filled in and leaves it alone, instead of putting a placeholder like "Loading" back over it. (`/airdrops`) `[improvement, fix]`+- **Every agent now shows what its coin has earned**: Agent pages, agent profiles and coin pages now carry an Earned card: the creator fees an agent's coins have earned on pump.fun, in SOL with dollars beside it, how much has been claimed and how much is still waiting, a per-coin breakdown, and every claim linked to its transaction on Solscan. Skill sales and hires by other agents count too. The figures refresh every 30 minutes, each card says how old its numbers are and how they are calculated, and developers can read the same data from the public earnings API or over MCP. Automatic fee claiming for autonomous launches also works again. (`/launches`) `[feature, fix]`- **Every platform total in one free API call**: GET /api/platform/analytics returns agents, agents with a wallet, coins launched, 3D models generated, LLM tokens processed, x402 settlements and volume, marketplace sales and agent-to-agent hire volume, each with a daily series over 30 days, 90 days or all time and a plain sentence saying exactly which rows were counted. A figure that cannot be read comes back empty with a named reason instead of as zero. It powers the new analytics page and is open to anyone building on three.ws. (`/analytics`) `[feature]`- **Experiment write-up: can autonomous agents trade new coins at a profit?**: The full record of our AI trading agents so far, measured from production: 1,296 real trades on Solana, 16.4% of them winners, and a net loss of 0.5402 SOL on 9.1444 SOL put to work. Only take-profit and take-initials exits made money, and the August retune made results worse, not better. The write-up says what that cost, what we got wrong, what we changed, and prints every query behind the numbers. (`/docs/experiments-autonomous-trading`) `[docs]`- **Experiment write-up: how many new agents ever launch a coin?**: Of the 788 agents people created in the 30 days to September 30, 2 went on to launch a coin, about three in four had no wallet, and the token plan built to bridge that gap has never been saved. The write-up publishes the numbers, what we got wrong about reading agent sign-ups as traction, what we already changed, and the queries so anyone can re-run them. It is the first entry on the new experiments page. (`/docs/experiments-agent-launch-funnel`) `[docs]`diff --git a/STRUCTURE.md b/STRUCTURE.mdindex b4f64c3ab..d31643608 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -58,6 +58,7 @@ bottom.| Cross-entity search | [pages/search.html](pages/search.html) `→ /search` + page module [src/search-page.js](src/search-page.js), backend [api/search.js](api/search.js) + query layer [api/_lib/cross-search.js](api/_lib/cross-search.js) | Live | The one search across every creation type: avatars, on-chain/Solana agents, forged 3D models, worlds, and coins. Federates (not one SQL UNION, because the stores are genuinely heterogeneous and two of five are not even in the same database) five parallel queries, normalizes into one card shape, and ranks by recency plus real signals (follower count via `user_follows`, remix count, view count); see the file header in `api/search.js` for the full unify-vs-federate writeup. Model results carry a working "Remix, $0.25" action against the existing paid rail ([api/x402/remix-asset.js](api/x402/remix-asset.js)), reused from [pages/creations.html](pages/creations.html) rather than re-derived. Coin search checks three.ws's own launch directory (`pump_agent_mints`) first, then falls back to market-wide pump.fun/Birdeye search for broader coverage (those external matches carry no verified timestamp or creator profile, and are ranked/labelled accordingly). The page reads `?q=` and `?type=` from the URL before it paints the filter row, so a shared scoped link shows the filter it is actually applying; a type whose source returned nothing for the current query is dimmed from the real `counts` in the response. The backend answering `{enabled:false}` (creation stores unreachable) renders its own "search is warming up" state with a retry and live browse links, never a false "nothing matched". Enter runs the query without waiting out the debounce and Escape clears it. Linked from the Discover nav menu. || My Creations (personal creation index) | [pages/mine.html](pages/mine.html) `→ /mine` (alias `→ /my-creations`) + page module [src/mine.js](src/mine.js), styles [src/mine.css](src/mine.css) | Live | The answer to "where did the thing I just made go?". One newest-first grid merging four real feeds: `/api/agents` and `/api/avatars/mine` (session-scoped), `/api/forge-gallery` (scoped to this browser's `forge:cid`, so a model forged before signing up is still findable), and `/api/users/:username/creations` (models, worlds and restyles forged while signed in on any device), de-duplicated by id. Cards carry Open, Edit (or "Forge again", which re-runs the original prompt through `/forge?prompt=`) and Copy link, with lazy `<model-viewer>` previews under a six-context budget. Signed out it still renders this browser's models behind a sign-in prompt rather than an empty void, and a total source failure renders an error state, never a false "you have nothing". Reachable from the nav's My creations button ([public/nav.html](public/nav.html), drawer row in [public/nav.js](public/nav.js), Build menu in [public/nav-data.js](public/nav-data.js)), the dashboard sidebar, the create-agent success screen, the /create hub, /forge's creations strip and /my-agents. Tests: [tests/mine-page.test.js](tests/mine-page.test.js) || Cross-surface rankings, streaks & badges | [pages/rankings.html](pages/rankings.html) `→ /rankings`, backend [api/leaderboard/unified.js](api/leaderboard/unified.js), streak/badge engine [api/_lib/streaks.js](api/_lib/streaks.js) (migration [api/_lib/migrations/20260712020000_leaderboard_streaks_badges.sql](api/_lib/migrations/20260712020000_leaderboard_streaks_badges.sql)), daily Top-10 badge sweep [api/cron/leaderboard-rollup.js](api/cron/leaderboard-rollup.js) | Live | Five real, queried leaderboard metrics — creations (forge models + worlds), remixes received, coin launches, followers, and walk distance (signed-in walkers, all-time) — ranked live with the viewer's own rank pinned even off-page. Every signed-in qualifying action (login, a finished forge model, a saved world, a `/walk` session) rolls a per-user daily streak in `user_streaks` via `recordDailyActivity()`, called from [api/_lib/auth.js](api/_lib/auth.js), [api/_lib/forge-store.js](api/_lib/forge-store.js), [api/_lib/diorama-store.js](api/_lib/diorama-store.js), and [api/walk/metrics.js](api/walk/metrics.js). Four real earned badges persist in `user_badges`: First Creation, Remixed (awarded in [api/x402/remix-asset.js](api/x402/remix-asset.js) when a remix lands on your creation), 7-Day Streak, and a daily-refreshed `top10_<metric>` per leaderboard. Streak + badges surface on the profile ([pages/profile.html](pages/profile.html)) and the Rankings page itself. Rejected metrics (documented in `api/leaderboard/unified.js`'s header): royalties earned in USD (the settlement record is a single overwritten JSONB column, not a cumulative ledger) and `/play` activity (no per-human-user session table exists). |+| Agent creator earnings ("Earned") | API [api/agents/[id]/earnings.js](api/agents/%5Bid%5D/earnings.js) `→ GET /api/agents/:id/earnings`, read model [api/_lib/agent-earnings.js](api/_lib/agent-earnings.js), snapshot [api/_lib/creator-earnings-snapshot.js](api/_lib/creator-earnings-snapshot.js) run by [api/cron/creator-earnings-snapshot.js](api/cron/creator-earnings-snapshot.js) (every 30 min), pump.fun + on-chain client [api/_lib/pump-creator-fees.js](api/_lib/pump-creator-fees.js), migrations [20260930120000_launcher_claims.sql](api/_lib/migrations/20260930120000_launcher_claims.sql) and [20260930121000_agent_coin_earnings.sql](api/_lib/migrations/20260930121000_agent_coin_earnings.sql), card [src/shared/agent-earnings-card.js](src/shared/agent-earnings-card.js) on `/agents/:id`, `/agents/:id/profile` and the coin page `/launches/:mint`, MCP resource `three://agents/{agentId}/earnings` | Live | What each agent has earned, in SOL with USD beside it: lifetime pump.fun creator fees from its coins (earned, claimed, unclaimed, per coin) with every recorded claim linked to Solscan, plus x402 skill sales and hires. Each coin's fee recipient is read on-chain; pump.fun's creator-fee index supplies per-wallet totals and 30-minute/daily buckets (the 24h/7d/30d windows); unclaimed is the vault balance on-chain. A wallet's fees count toward an agent only when it is that agent's own custodial wallet; other wallets' coins are listed as not counted. Devnet excluded. Docs: [docs/api-reference.md](docs/api-reference.md#agent-earnings). Tests: [tests/agent-earnings.test.js](tests/agent-earnings.test.js), [tests/pump-creator-fees.test.js](tests/pump-creator-fees.test.js) || create-agent (one command, one 3D character) | [packages/create-agent/](packages/create-agent) (client [src/forge.js](packages/create-agent/src/forge.js), scaffold [src/scaffold.js](packages/create-agent/src/scaffold.js), CLI [bin/create-agent.js](packages/create-agent/bin/create-agent.js)), server tools [api/_mcp-studio/tools.js](api/_mcp-studio/tools.js) | Live | `npm create @three-ws/agent "a friendly cartoon astronaut"` generates a textured figure, rigs it, downloads the GLB, and writes a folder with a working demo page and the embed snippet. No account and no API key: it rides the public, keyless JSON-RPC tools on [/api/mcp-studio](api/_mcp-studio) (`forge_avatar`, `forge_free`, `rig_mesh`) that the platform already exposes to MCP clients. A rigged character reliably outlives the endpoint's inline wait, so the client collects the returned poll handle and, when the job that finished was only the mesh, rigs it before reporting done: that is what the `stage` field on a pending result exists for. Progress is real elapsed time, never an invented bar. Docs [docs/create-agent.md](docs/create-agent.md). Tests: [tests/create-agent.test.js](tests/create-agent.test.js) || Glance (agent cards for home screens, READMEs and chat) | Page [public/glance/index.html](public/glance/index.html) `-> /glance` (+ [glance-page.js](public/glance/glance-page.js), [glance.css](public/glance/glance.css)), hosted element [public/glance/element.js](public/glance/element.js), endpoints [api/glance/card.js](api/glance/card.js) / [api/glance/mine.js](api/glance/mine.js) / [api/glance/token.js](api/glance/token.js) / [api/glance/template.js](api/glance/template.js), model [api/_lib/glance-card.js](api/_lib/glance-card.js), SVG [api/_lib/glance-svg.js](api/_lib/glance-svg.js), PNG [api/_lib/glance-png.js](api/_lib/glance-png.js), widget tokens [api/_lib/glance-tokens.js](api/_lib/glance-tokens.js) (`glance_widget_tokens`), Adaptive Card [api/_lib/glance-adaptive.js](api/_lib/glance-adaptive.js), Windows widget worker [public/glance-sw.js](public/glance-sw.js) (imported by the VitePWA service worker, manifest `widgets` member in [vite.config.js](vite.config.js)), Android home screen widget [solana-mobile/android-overlay/](solana-mobile/android-overlay/README.md) (applied by [solana-mobile/scripts/apply-overlay.mjs](solana-mobile/scripts/apply-overlay.mjs) inside `build-apk.sh`), macOS and iOS WidgetKit widget [apple/](apple/README.md) (shared [apple/GlanceKit/](apple/GlanceKit), extension [apple/GlanceWidget/](apple/GlanceWidget), Mac app [apple/macos/](apple/macos), an iOS target in [ios/native/App/App.xcodeproj](ios/native/App)), npm client [packages/agent-glance/](packages/agent-glance) | Live | One agent reduced to what fits in an OS widget slot: name, one live number (actions in the last 24h), and a link back. The same model renders five ways from one endpoint (JSON, SVG, PNG, Adaptive Card, and the `<agent-glance>` element), which is what keeps a new surface a rendering job rather than a data job. Windows 11 installs the widget straight from the PWA manifest (no store submission). Android ships it in the app (1.1+): a WorkManager-refreshed `AppWidgetProvider` that fetches the PNG with a revocable per-account widget token minted on `/glance`, keeps the last card offline, and opens the agent on tap. macOS and iOS run one WidgetKit extension over the same PNG and the same token, in small, medium and large: the Mac ships as a Developer ID menu bar app that holds the token and feeds the widget, and the iPhone gets the extension inside the existing Capacitor app. Both fetch the card in each theme so the widget follows the reader's appearance. `npm run check:apple-widget` proves both Xcode projects and the client-to-server contract without a Mac in the room. Deliberately not the 3D embed: no widget host on any of these platforms can run WebGL, so the body stays at [/widgets](public/widgets-gallery/index.html) and the status lives here. Private avatars never leak (the thumbnail is attached only for a public or unlisted avatar; everything else draws a generated monogram). Spec [specs/GLANCE_CARD.md](specs/GLANCE_CARD.md), docs [docs/glance.md](docs/glance.md), [docs/native-widgets.md](docs/native-widgets.md). Tests: [tests/glance-card.test.js](tests/glance-card.test.js), [tests/glance-png.test.js](tests/glance-png.test.js), [tests/glance-tokens.test.js](tests/glance-tokens.test.js), [tests/glance-sw.test.js](tests/glance-sw.test.js), [tests/agent-glance-sdk.test.js](tests/agent-glance-sdk.test.js), guard [scripts/check-apple-widget.mjs](scripts/check-apple-widget.mjs) || Daily Match (agent output arena) | [pages/daily-match.html](pages/daily-match.html) `→ /daily-match`, backend [api/leaderboard/daily-match.js](api/leaderboard/daily-match.js) | Live | Live daily standings ranking public agents by real output shipped since 00:00 UTC: agent_actions events, sniper + pump trades, confirmed skill sales, and coin launches, with realized sniper P&L shown for context (never scored). Computed live per request (no rollup cron), resets naturally at UTC midnight; includes yesterday's champion and a live-output feed. Reputation-first: no payouts hang off the score. Format adopted with credit from Bowyer's Arena (bowyer.app/arena), who build their agent pages on three.ws avatars. |diff --git a/data/changelog.json b/data/changelog.jsonindex 7ad10f476..394dc3496 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -28944,6 +28944,13 @@"summary": "The 3D generators sometimes built a thin, wide plate under whatever you asked for: a teapot sitting on a black marble square, a telescope standing in the middle of a grey sheet many times its size. Every finished model is now checked for that plate and has it cut away before it is saved, while anything that really has a base, like a lamp foot, a plinth or a tripod, is left exactly as it was.","tags": ["fix"],"link": "/forge"+ },+ {+ "date": "2026-09-30",+ "title": "Every agent now shows what its coin has earned",+ "summary": "Agent pages, agent profiles and coin pages now carry an Earned card: the creator fees an agent's coins have earned on pump.fun, in SOL with dollars beside it, how much has been claimed and how much is still waiting, a per-coin breakdown, and every claim linked to its transaction on Solscan. Skill sales and hires by other agents count too. The figures refresh every 30 minutes, each card says how old its numbers are and how they are calculated, and developers can read the same data from the public earnings API or over MCP. Automatic fee claiming for autonomous launches also works again.",+ "tags": ["feature", "fix"],+ "link": "/launches"}]}diff --git a/public/changelog-recent.json b/public/changelog-recent.jsonindex 7d85a6fc6..6151a678e 100644--- a/public/changelog-recent.json+++ b/public/changelog-recent.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-30T08:38:20.847Z",+ "generated_at": "2026-09-30T08:41:32.471Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",diff --git a/public/changelog.json b/public/changelog.jsonindex 2850c3409..06f012a1d 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-30T08:38:20.794Z",+ "generated_at": "2026-09-30T08:41:32.405Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",diff --git a/public/changelog.xml b/public/changelog.xmlindex db6385373..1087ea52f 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -86,6 +86,14 @@<category>improvement</category><description>Pick any of the 85 languages in the language menu and 59 more pages now follow it, including the Airdrop Checker, Portfolio, Drops, Crews, Launch, the Agent Monitor and the rig and embed doctors. Titles, buttons, form labels, hints, error messages and the text shown when a page is shared all translate. Live numbers and statuses on those pages (counters, balances, scan results, play and pause buttons) keep updating in every language: the translation step now recognises a value the page has already filled in and leaves it alone, instead of putting a placeholder like "Loading" back over it.</description></item>+ <item>+ <title>Every agent now shows what its coin has earned</title>+ <link>https://three.ws/launches</link>+ <guid isPermaLink="false">2026-09-30:Every agent now shows what its coin has earned</guid>+ <pubDate>Wed, 30 Sep 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Agent pages, agent profiles and coin pages now carry an Earned card: the creator fees an agent's coins have earned on pump.fun, in SOL with dollars beside it, how much has been claimed and how much is still waiting, a per-coin breakdown, and every claim linked to its transaction on Solscan. Skill sales and hires by other agents count too. The figures refresh every 30 minutes, each card says how old its numbers are and how they are calculated, and developers can read the same data from the public earnings API or over MCP. Automatic fee claiming for autonomous launches also works again.</description>+ </item><item><title>Every platform total in one free API call</title><link>https://three.ws/analytics</link>diff --git a/public/features.json b/public/features.jsonindex f2a6942d3..c063d3edb 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-30T08:38:20.747Z",+ "generated_at": "2026-09-30T08:41:32.375Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",