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
feat: add embodiment feature for persistent 3D avatars with lip-sync and emotion capabilities
fudjia4fea07749fbf
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex fd037b222..c44e8c840 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -29,6 +29,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Free trending-tokens API for crypto agents** — New free, keyless endpoint GET /api/crypto/trending gives any AI agent a ranked "what's hot right now" list in one call — no account, no key. Tokens are ranked by momentum (a 0–100 score blending windowed trade volume, buy pressure, a volume-spike signal, and short-window price change), fused live across pump.fun, DexScreener's boosted board, and GMGN smart money. Pick a window (5m, 1h, or 24h) and a source (pump.fun only or all), and get back each token's mint, symbol, market cap, volume, price change, score, and link. If an upstream is down it returns whatever ranked data it has with a note instead of failing. (`/docs/crypto-api`) `[feature]`- **Free wallet portfolio API for agents** — New free, keyless endpoint: GET /api/crypto/wallet returns any wallet's native balance, every token it holds, and a rough USD valuation in one call — no account, no API key. It's built for agents that need to size up a wallet before they act: a treasury agent checking its own runway, a copy-trade agent reading a leader's holdings, or a pre-trade check on a counterparty. Solana works with no key at all (it falls back to the public RPC plus Jupiter and pump.fun pricing); tokens that can't be priced are still listed with their balance, never dropped or faked. `[feature]`- **Free whale-activity API for crypto agents** — A new free, keyless endpoint tells an AI agent whether big money is moving before it trades. Call /api/crypto/whales with a token mint to see the large buys of that coin, or without one to see the top whale wallets active across pump.fun right now. Each response carries a plain bullish/bearish/neutral signal derived from net whale flow — the SOL whales bought minus the SOL they sold — with no black-box scoring. No account, no key, no payment. `[feature]`+- **Give your assistant a living 3D body that lip-syncs and emotes in the chat** — Turn any generated avatar into a persistent, named agent body that renders right inside ChatGPT or Claude. It lip-syncs each reply, shows the matching expression and gesture, idles between turns, and comes back as the same body when you return to it — no account needed. Three new free 3D Studio tools drive it: save an avatar as a persona, make it speak a reply, and reload it by id in a later session. A rig with no facial morphs still animates its mouth from the jaw, and a non-humanoid model falls back to a gentle idle instead of a broken pose. `[feature]`- **Hire and pay another agent, transparently — the live agent-to-agent commerce loop** — Your agent can now discover a specialist agent, check its on-chain reputation, pay it in USDC, hand off the task, and get the result back with a full receipt — who it hired, the reputation behind the choice, exactly what it cost, and the on-chain settlement reference. The agent_hire_discover tool ranks candidates by task fit, ERC-8004 reputation and real engagement; agent_hire runs the whole thing end to end and renders an inline provenance receipt card. Hard spend guardrails protect you throughout: a per-call cap, a per-session budget, and a confirmation prompt for anything above a threshold — and a blocked or failed hire is never charged. Discovery no longer comes up empty on a plain-language request, and paid hires now complete against a live agent. `[feature, improvement]`- **Mint a generated 3D avatar as an on-chain Solana NFT — with a live 3D viewer as its media** — You can now turn a generated or owned avatar into real, ownable on-chain property. The new mint_3d_asset tool mints your rigged GLB as a Solana NFT whose media is a live, interactive 3D viewer — not a flat picture — with the model, a rendered thumbnail, and its full provenance (who made it, the prompt, the model, its lineage) travelling with it. Creator royalties are enforced on every resale, capped at 10%. A companion get_3d_asset_onchain tool resolves any mint back to its current holder, live viewer, provenance, and royalty terms. Minting defaults to devnet for safe testing; mainnet is an explicit opt-in. It's idempotent, so a retried mint never creates a duplicate. `[feature, sdk]`- **New: three.ws Crypto Data API docs** — One page now documents the whole free, keyless Crypto Data API for AI agents — live at /crypto. It lays out all nine reads an agent needs mid-trade (token snapshot, security/rug signals, holders & concentration, live pump.fun launches, bonding-curve status, whale activity, symbol availability, wallet portfolio, trending) with a copy-paste quickstart in curl, JavaScript and Python, a real request/response example for each, and a live 'Try it' console right in the browser. Every endpoint is free with no key and no account. The page probes production in real time and marks each endpoint Live or Coming soon, so it stays honest as the API rolls out — and points you to the paid uniques (Pump Launcher, Vanity, Forge) when your agent is ready to act on the data. (`/crypto`) `[feature, docs]`diff --git a/STRUCTURE.md b/STRUCTURE.mdindex cff3aa691..cc40b83e6 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -30,6 +30,7 @@ bottom.| Free 3D API + docs | [api/3d/index.js](api/3d/index.js) `→ /api/3d`, [api/3d/openapi.js](api/3d/openapi.js) `→ /api/3d/openapi.json`, docs [public/3d.html](public/3d.html) `→ /3d` (alias `/docs/3d-api`) | Live · docs surface | Front door + OpenAPI 3.1 for the free, keyless 3D API. Catalog assembler [api/_lib/3d-catalog/index.js](api/_lib/3d-catalog/index.js) merges `api/_lib/3d-catalog/*.js` descriptors (currently `generate`, `inspect`) via a static import barrel (production source of truth) plus an additive dev-time directory glob; new descriptor = drop the file AND add its barrel import line; skips malformed, never throws; OpenAPI built from the same catalog via [api/_lib/3d-catalog/openapi.js](api/_lib/3d-catalog/openapi.js). Index does HTML/JSON content negotiation and advertises the paid ladder (Forge Pro, Rigged Avatars). Docs page: hero, live endpoint table, runnable quickstart with a live "Run inspect" console, embedded `<model-viewer>` GLB preview, and the free→paid ladder. Free endpoints: [api/3d/generate.js](api/3d/generate.js) (prompt 12), [api/3d/inspect.js](api/3d/inspect.js) (prompt 13). GPT Store Actions surface: [api/3d/studio.js](api/3d/studio.js) `→ /api/3d/studio` — a store-compliant twin of `generate` that strips the x402/upgrade block, drops internal ids, and runs the [api/_mcp-studio/safety.js](api/_mcp-studio/safety.js) age-13+ content gate before any GPU work; backs the "three.ws 3D Studio" custom GPT ([prompts/store-submissions/_generated/openai-actions.yaml](prompts/store-submissions/_generated/openai-actions.yaml) + [openai-gpt-config.md](prompts/store-submissions/_generated/openai-gpt-config.md), store-submission prompt 12). Spec: [prompts/x402-overhaul/](prompts/x402-overhaul) || Unified service catalog (one source, two storefronts) | [api/_lib/service-catalog/index.js](api/_lib/service-catalog/index.js), descriptors [api/_lib/service-catalog/services/](api/_lib/service-catalog/services/index.js) | Live | The canonical written-once record of every service (paid x402 + free crypto/3D bundles + OKX.AI rows). `toBazaarDiscovery()` generates every static `/api/x402/*` entry in the [api/wk.js](api/wk.js) discovery doc (replacing ~1,400 lines of hand-mirrored blocks); `toOkxCatalog()` reproduces the OKX `catalogIndex()` payload exactly, with an `include:'all'` projection ready for listing expansion. New paid service = drop `services/<slug>.js` + add its barrel import row. No-drift guards: [tests/service-catalog.test.js](tests/service-catalog.test.js). Spec: [specs/SERVICE_CATALOG.md](specs/SERVICE_CATALOG.md) || Conversational refinement + remix economy | Iterate: [api/_mcp-studio/tools.js](api/_mcp-studio/tools.js) `refine_model` (free, on `/api/mcp-studio`) + [mcp-server/src/tools/refine-model.js](mcp-server/src/tools/refine-model.js) (paid stdio, $0.25); shared lineage core [mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js). Remix (paid track): feed [api/remix-feed.js](api/remix-feed.js) `→ /api/remix-feed` (free browse/publish/lineage), settlement [api/x402/remix-asset.js](api/x402/remix-asset.js) `→ /api/x402/remix-asset` + core [api/_lib/remix-settlement.js](api/_lib/remix-settlement.js) + split math [api/_lib/remix-royalty.js](api/_lib/remix-royalty.js). Docs [docs/remix.md](docs/remix.md), [docs/mcp-studio.md](docs/mcp-studio.md). | Live | Talk to a model to iterate it ("make it metallic") — real anchored re-generation with a revertable/branchable version lineage rendered as a viewer version strip; free on both the OpenAI 3D Studio and the paid MCP server. Creators publish a finished model as remixable (provenance + license + royalty on the existing `forge_creations` rows — no parallel store); another agent pays $0.25 USDC to remix it and a creator-set royalty (≤20%, capped) routes on-chain to the original creator via the audited `transferSolanaUSDC` rail. Split/caps/payout unit-tested ([tests/remix-settlement.test.js](tests/remix-settlement.test.js), [tests/remix-royalty.test.js](tests/remix-royalty.test.js), [tests/refine-lineage.test.js](tests/refine-lineage.test.js)). Free track stays crypto-free. Prompt 09. |+| Embodiment — a living agent body in the chat | Hosted embed [pages/embodiment/embed.html](pages/embodiment/embed.html) `→ /embodiment/embed` (Vite input + vercel route, `frame-ancestors *`); engine [apps-sdk/embodiment/embodiment-stage.js](apps-sdk/embodiment/embodiment-stage.js) (`EmbodimentStage`) + [overlay.js](apps-sdk/embodiment/overlay.js); persona tools (free) [api/_mcp-studio/persona-tools.js](api/_mcp-studio/persona-tools.js) → `/api/mcp-studio` (`create_agent_persona`, `get_agent_persona`, `persona_say`) and (paid) [api/_mcp3d/tools/studio.js](api/_mcp3d/tools/studio.js); shared inline-body artifact [api/_lib/embodiment-artifact.js](api/_lib/embodiment-artifact.js); identity store [api/_lib/persona-store.js](api/_lib/persona-store.js) (Postgres `agent_personas` + fs fallback + durable R2 GLB); reload route [api/mcp3d/persona.js](api/mcp3d/persona.js) `→ /api/mcp3d/persona`. Emotion/rig/lip-sync cores under [src/embodiment/](src/embodiment) + [src/voice/](src/voice). | Live | A generated avatar becomes a persistent, named body that renders inline in ChatGPT/Claude: it lip-syncs each reply, blends the matching expression + gesture, idles between turns, and reloads by `persona_id` in a fresh session (the id is the capability — no sign-in). Rides the universal canonicalize/retarget clip library; a rig without face morphs animates the jaw, a non-humanoid GLB falls back to a gentle idle (`decideRigMode`/`supportsCanonicalClips`) — never a bind-pose T-pose. Zero crypto/token surface. Tests: [tests/persona-store.test.js](tests/persona-store.test.js), [tests/api/persona-resolve-route.test.js](tests/api/persona-resolve-route.test.js), [tests/mcp-studio.test.js](tests/mcp-studio.test.js), [tests/embodiment-rig-mode.test.js](tests/embodiment-rig-mode.test.js). Evidence: [prompts/store-submissions/_generated/embodiment/](prompts/store-submissions/_generated/embodiment/). Store-submission prompt 07. || Sperax partnership + SperaxOS plugin | [pages/sperax.html](pages/sperax.html) `→ /sperax`, plugin [public/sperax/](public/sperax/README.md), manifest `→ /.well-known/sperax-plugin.json`, tools [api/chat-plugin/[tool].js](api/chat-plugin/%5Btool%5D.js) `→ /api/chat-plugin/*`, panel `→ /sperax/iframe/` | In-repo · Live | Partnership landing for the SperaxOS integration: three.ws ships as a standalone `plugin.delivery` plugin that gives a SperaxOS agent an embodied 3D avatar (speak/gesture/emote/render_agent), bound to an ERC-8004 identity, settling over Base x402. Launch offer: free AI credits for three.ws users on [chat.sperax.io](https://chat.sperax.io) — page explains what it is and how to claim. Blog: [/blog/three-ws-speraxusd-integration](blog/three-ws-speraxusd-integration.html) || Live Agents wall (mission control) | [pages/agents-live.html](pages/agents-live.html) + [src/agents-live.js](src/agents-live.js) `→ /agents-live` | In-repo · roster [api/agents/public.js](api/agents/public.js) (`sort=live`), per-agent SSE [api/agent-screen-stream.js](api/agent-screen-stream.js) | Real-time grid of every meaningful agent, ranked by most-recent on-chain/skill action (never-used placeholders suppressed). Each card streams a live caster feed when watched, else its real `agent_actions` as a terminal + an "active Nm ago" recency chip. Layers: showrunner spotlight ([src/showrunner.js](src/showrunner.js)), reputation arena ([src/agents-live-arena.js](src/agents-live-arena.js)), platform ticker ([src/theater-feed.js](src/theater-feed.js)) || X/Twitter automation toolkit | [nirholas/XActions](https://github.com/nirholas/XActions) (external repo, also on npm as `xactions`) | External | Formerly vendored in-repo; removed 2026-07-03 — install from npm or use the upstream repo |diff --git a/data/changelog.json b/data/changelog.jsonindex e50ea4131..843380607 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,14 @@{"$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-07",+ "title": "Give your assistant a living 3D body that lip-syncs and emotes in the chat",+ "summary": "Turn any generated avatar into a persistent, named agent body that renders right inside ChatGPT or Claude. It lip-syncs each reply, shows the matching expression and gesture, idles between turns, and comes back as the same body when you return to it — no account needed. Three new free 3D Studio tools drive it: save an avatar as a persona, make it speak a reply, and reload it by id in a later session. A rig with no facial morphs still animates its mouth from the jaw, and a non-humanoid model falls back to a gentle idle instead of a broken pose.",+ "tags": [+ "feature"+ ]+ },{"date": "2026-07-07","title": "Conversational 3D refinement + a remixable-asset economy with creator royalties",diff --git a/docs/mcp-studio.md b/docs/mcp-studio.mdindex 2e2336b15..29b9a69c6 100644--- a/docs/mcp-studio.md+++ b/docs/mcp-studio.md@@ -103,6 +103,62 @@ The same `refine_model` capability is available on the paid stdio MCP server(`3d-agent-local`, $0.25 USDC per call) via the shared lineage core, so iterationbehaves identically on both tracks.+## Embodiment — a living agent body++Three additional free tools turn a generated avatar into a **persistent, living+agent body** that renders inline in the chat: it lip-syncs each reply, shows the+matching expression and gesture, idles between turns, and returns as the same body+across sessions. A persona is a name and a 3D body — nothing about tokens, wallets,+or payments.++| Tool | Title | Input | Returns |+|---|---|---|---|+| `create_agent_persona` | Save a rigged model as a living, persistent agent body | `glb_url`, `name`, `voice?`, `source_prompt?` | `persona_id` + inline living body (idle) |+| `get_agent_persona` | Reload a persona by id (continuity across sessions) | `persona_id` | the same body + turn count |+| `persona_say` | Speak a reply — lip-sync + emotion + gesture | `persona_id`, `text`, `emotion?` | the body performing the reply |++Annotations: `create_agent_persona` and `persona_say` are writes+(`readOnlyHint:false`); `get_agent_persona` is a pure read (`readOnlyHint:true`).++**How it renders.** Each persona tool returns an inline `text/html` resource that+frames the hosted embodiment page — `https://three.ws/embodiment/embed` — with the+persona id and the turn's speak/emotion payload as query params. That page mounts+`EmbodimentStage` (Three.js), which rides the platform's universal+canonicalize/retarget pipeline so the baked idle + gesture clip library drives any+humanoid rig. Emotion is detected from the reply text (or set explicitly via+`emotion`) and blended onto the face **and** an upper-body gesture; lip-sync is+best-first — an Audio2Face viseme track synced to TTS audio when present, else a+deterministic text-timed mouth envelope.++**Graceful states, never a frozen pose.** A rig with no facial morphs still+animates its mouth from the jaw (or head) bone. A model that can't be+skeleton-driven — no skin, or a non-humanoid prop — is detected up front+(`decideRigMode` / `AnimationManager.supportsCanonicalClips()`) and falls back to a+gentle alive-idle with a designed note, never a bind-pose T-pose.++**Continuity.** The persona is persisted (durable GLB copy + a small identity+record) and addressed by an unguessable `persona_id` — that id is the whole+capability, so a fresh session reloads the exact same body with no sign-in. When+the embed is opened with only an id (no inline `glb`), it resolves the durable body+via `GET /api/mcp3d/persona?id=persona_…`, which returns the public projection+(name, GLB, turn count) — never storage keys or owner ids.++```json+{+ "persona_id": "persona_9f3aK2…",+ "name": "Nova",+ "glb_url": "https://three.ws/…/nova.glb",+ "emotion": "joy",+ "intensity": 0.7,+ "gesture": "av-celebrating",+ "turn_count": 3,+ "status": "spoken"+}+```++The same three tools ship on the paid stdio MCP server (`3d-agent-local`) so+embodiment behaves identically on both tracks; both drive the one hosted embed.+## Funding & limitsGeneration is **operator-funded**: the platform's server-side keys cover providerdiff --git a/public/changelog.json b/public/changelog.jsonindex b15f89425..54a33d344 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-07T12:00:01.202Z",+ "generated_at": "2026-07-07T12:18:42.073Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -244,6 +244,16 @@"feature"]},+ {+ "date": "2026-07-07",+ "type": "update",+ "title": "Give your assistant a living 3D body that lip-syncs and emotes in the chat",+ "summary": "Turn any generated avatar into a persistent, named agent body that renders right inside ChatGPT or Claude. It lip-syncs each reply, shows the matching expression and gesture, idles between turns, and comes back as the same body when you return to it — no account needed. Three new free 3D Studio tools drive it: save an avatar as a persona, make it speak a reply, and reload it by id in a later session. A rig with no facial morphs still animates its mouth from the jaw, and a non-humanoid model falls back to a gentle idle instead of a broken pose.",+ "link": null,+ "tags": [+ "feature"+ ]+ },{"date": "2026-07-07","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 24b5bbf74..765409ba1 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -190,6 +190,14 @@<category>feature</category><description>A new free, keyless endpoint tells an AI agent whether big money is moving before it trades. Call /api/crypto/whales with a token mint to see the large buys of that coin, or without one to see the top whale wallets active across pump.fun right now. Each response carries a plain bullish/bearish/neutral signal derived from net whale flow — the SOL whales bought minus the SOL they sold — with no black-box scoring. No account, no key, no payment.</description></item>+ <item>+ <title>Give your assistant a living 3D body that lip-syncs and emotes in the chat</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-07-07:Give your assistant a living 3D body that lip-syncs and emotes in the chat</guid>+ <pubDate>Tue, 07 Jul 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Turn any generated avatar into a persistent, named agent body that renders right inside ChatGPT or Claude. It lip-syncs each reply, shows the matching expression and gesture, idles between turns, and comes back as the same body when you return to it — no account needed. Three new free 3D Studio tools drive it: save an avatar as a persona, make it speak a reply, and reload it by id in a later session. A rig with no facial morphs still animates its mouth from the jaw, and a non-humanoid model falls back to a gentle idle instead of a broken pose.</description>+ </item><item><title>Hire and pay another agent, transparently — the live agent-to-agent commerce loop</title><link>https://three.ws/changelog</link>diff --git a/public/features.json b/public/features.jsonindex 606e838ad..8c60c3550 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-07T12:00:01.189Z",+ "generated_at": "2026-07-07T12:18:42.059Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/tests/mcp-studio.test.js b/tests/mcp-studio.test.jsindex 13b66c776..862ef35c2 100644--- a/tests/mcp-studio.test.js+++ b/tests/mcp-studio.test.js@@ -245,6 +245,52 @@ describe('mcp-studio dispatch', () => {expect(sc.activeIndex).toBe(2);});+ it('refine_model rejects a malformed parent_lineage and falls back to a fresh lineage', async () => {+ globalThis.fetch = vi.fn(async () => ({+ ok: true,+ status: 200,+ json: async () => ({ status: 'done', glb_url: 'https://three.ws/cdn/creations/vX.glb', job_id: 'JX' }),+ }));+ // A structurally broken lineage: two roots, non-contiguous indices — must NOT+ // be trusted/extended. The handler seeds fresh from glb_url instead.+ const broken = [+ { index: 0, parentIndex: null, glbUrl: 'https://three.ws/a.glb' },+ { index: 5, parentIndex: null, glbUrl: 'https://three.ws/b.glb' },+ ];+ const r = await dispatch(+ { jsonrpc: '2.0', id: 12, method: 'tools/call', params: { name: 'refine_model', arguments: { glb_url: 'https://three.ws/cdn/creations/origin.glb', instruction: 'make it red', parent_lineage: broken } } },+ auth,+ mkReq(),+ );+ const sc = r.result.structuredContent;+ // Fresh lineage rooted at glb_url → exactly 2 clean versions, single root.+ expect(sc.lineage).toHaveLength(2);+ expect(sc.lineage[0].label).toBe('Original');+ expect(sc.lineage[0].glbUrl).toBe('https://three.ws/cdn/creations/origin.glb');+ expect(sc.activeIndex).toBe(1);+ });++ it('refine_model honors a valid parent_index to branch off an earlier version', async () => {+ globalThis.fetch = vi.fn(async () => ({+ ok: true,+ status: 200,+ json: async () => ({ status: 'done', glb_url: 'https://three.ws/cdn/creations/branch.glb', job_id: 'JB' }),+ }));+ const lineage = [+ { index: 0, parentIndex: null, glbUrl: 'https://three.ws/o.glb', prompt: 'a robot', refKind: 'origin', label: 'Original' },+ { index: 1, parentIndex: 0, glbUrl: 'https://three.ws/v1.glb', prompt: 'a robot, gold', instruction: 'gold', refKind: 'text', label: 'gold' },+ ];+ const r = await dispatch(+ { jsonrpc: '2.0', id: 13, method: 'tools/call', params: { name: 'refine_model', arguments: { glb_url: 'https://three.ws/v1.glb', instruction: 'silver instead', parent_prompt: 'a robot', parent_lineage: lineage, parent_index: 0 } } },+ auth,+ mkReq(),+ );+ const sc = r.result.structuredContent;+ expect(sc.lineage).toHaveLength(3);+ // New version branches off the ORIGINAL (index 0), not the leaf (index 1).+ expect(sc.lineage[2].parentIndex).toBe(0);+ });+it('refine_model requires both glb_url and instruction', async () => {const spy = vi.fn();globalThis.fetch = spy;