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
Update x402 revenue and analytics documentation, modify video creation descriptions, and enhance localization strings
nirholas02b496b7ad41
diff --git a/CLAUDE.md b/CLAUDE.mdindex cc049522c..f0073df29 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -239,7 +239,7 @@ When the user asks you to push (or to commit + push): `git push threews main`. O- Frontend: vanilla JS modules + Vite (`npm run dev`, port 3000).- 3D: Three.js with glTF/GLB.- Backend touchpoints: serverless-style handlers in `api/`, workers in `workers/`.-- **Production runs on Google Cloud Run, NOT Vercel** (migrated 2026-07-07 after Vercel disabled the deployment). One container ([server/index.mjs](server/index.mjs)) serves the static frontend, the vercel.json route table, and all `api/**` handlers; the 76 crons run on Cloud Scheduler. Deploy with `npm run deploy:gcp` (frontend changes need `npm run build` first). `vercel.json` is a LIVE config file consumed by the server (routes + crons) — never delete it as a leftover. Full runbook incl. LB/DNS/TLS/env/rollback/recovery: `docs/ops/gcp-production.md`. GCP builds/deploys must pin the `three-ws-build@` (build) and `three-ws@` (runtime) service accounts — the project's default compute SA was deleted.+- **Production runs on Google Cloud Run, NOT Vercel** (migrated 2026-07-07 after Vercel disabled the deployment). One container ([server/index.mjs](server/index.mjs)) serves the static frontend, the vercel.json route table, and all `api/**` handlers; the crons (89 as of 2026-07-18, see vercel.json) run on Cloud Scheduler. Deploy with `npm run deploy:gcp` (frontend changes need `npm run build` first). `vercel.json` is a LIVE config file consumed by the server (routes + crons) — never delete it as a leftover. Full runbook incl. LB/DNS/TLS/env/rollback/recovery: `docs/ops/gcp-production.md`. GCP builds/deploys must pin the `three-ws-build@` (build) and `three-ws@` (runtime) service accounts — the project's default compute SA was deleted.- **Env-var trap:** `vercel env pull` returns EMPTY for secret-type vars — never trust a Vercel env export as complete. Production env lives on the Cloud Run service (`gcloud run services describe/update three-ws-api --region us-central1`).- Solana/agent SDKs in `sdk/`, `solana-agent-sdk/`, `agent-payments-sdk/`.- Real APIs in use: Pump.fun feed, Solana RPC, OpenAI/Anthropic via worker proxies. Never mock these.diff --git a/STRUCTURE.md b/STRUCTURE.mdindex ea3a61ff0..8992b3e38 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -34,7 +34,7 @@ bottom.| Notification bell & preferences | Event vocabulary [api/_lib/feed.js](api/_lib/feed.js) (`USER_EVENT_TYPES` → `publishUserEvent()` → `user_notifications`), endpoints [api/notifications/](api/notifications), preference matrix [api/_lib/notify-prefs.js](api/_lib/notify-prefs.js), bell client [src/notifications.js](src/notifications.js), settings panel [src/dashboard-next/pages/settings.js](src/dashboard-next/pages/settings.js) | Live | In-app inbox covering remixes ([api/x402/remix-asset.js](api/x402/remix-asset.js)), DMs ([api/friends/messages.js](api/friends/messages.js)), coin bonding-curve graduations (pump cron in [api/cron/[name].js](api/cron/%5Bname%5D.js)), follows, sales, purchases, IRL, market, and account events. Preferences are a category × channel matrix (`in_app` always on; push/email/telegram are per-category opt-outs) edited from `/dashboard/settings`. Docs: [docs/social-layer.md](docs/social-layer.md) || OKX.AI marketplace services | [api/okx/3d/[service].js](api/okx/3d/%5Bservice%5D.js) `→ /api/okx/3d/*` | Live | 3D services sold to other agents on OKX.AI (agent #2632): Agent Identity Studio flagship + decomposed studio services. Catalog source of truth: [api/_lib/okx-catalog.js](api/_lib/okx-catalog.js); pipeline: [api/_okx3d/](api/_okx3d); showcase: [pages/agent-identities.html](pages/agent-identities.html) `→ /agent-identities`; docs: [docs/okx-marketplace.md](docs/okx-marketplace.md) || Crypto Data API docs / landing | [pages/crypto.html](pages/crypto.html) `→ /crypto` | In-repo · docs surface | Screenshot-worthy public docs + funnel-top for the free, keyless Crypto Data API (`/api/crypto/*` — token snapshot, security, holders, launches, bonding, whales, symbol, wallet, trending). Renders hero, endpoint table, tabbed quickstart (curl/JS/Python), per-endpoint request/response reference and a live "Try it" console. Probes production at runtime and marks each endpoint Live vs Coming soon (degrades gracefully while sibling endpoints roll out). CTAs funnel to paid uniques: [/launcher](pages/launcher.html), [/vanity-wallet](public/vanity-wallet.html), [/forge](pages/forge.html). Spec: [prompts/x402-overhaul/](prompts/x402-overhaul) |-| Free Crypto Data API + discovery | [api/crypto/index.js](api/crypto/index.js) `→ /api/crypto`, [api/crypto/openapi.js](api/crypto/openapi.js) `→ /api/crypto/openapi.json`, docs [docs/crypto-api.md](docs/crypto-api.md) `→ /docs/crypto-api` | Live · docs surface | Front door + OpenAPI 3.1 for the free, keyless Crypto Data API. Catalog assembler [api/_lib/crypto-catalog/index.js](api/_lib/crypto-catalog/index.js) merges `api/_lib/crypto-catalog/*.js` self-describing descriptors (currently `bonding`, `launches`, `symbol`, `token`, `trending`, `wallet`, `whales`) via a static import barrel — the production source of truth, since Vercel's bundler only ships what static imports reach — plus an additive dev-time directory glob; skips malformed/throwing entries, never throws, valid-empty when zero. New descriptor = drop the file AND add its import line to the barrel. OpenAPI built from the same catalog via [api/_lib/crypto-catalog/openapi.js](api/_lib/crypto-catalog/openapi.js). Index does HTML/JSON content negotiation. Endpoint handlers live in `api/crypto/*.js`. Spec: [prompts/x402-overhaul/](prompts/x402-overhaul) |+| Free Crypto Data API + discovery | [api/crypto/index.js](api/crypto/index.js) `→ /api/crypto`, [api/crypto/openapi.js](api/crypto/openapi.js) `→ /api/crypto/openapi.json`, docs [docs/crypto-api.md](docs/crypto-api.md) `→ /docs/crypto-api` | Live · docs surface | Front door + OpenAPI 3.1 for the free, keyless Crypto Data API. Catalog assembler [api/_lib/crypto-catalog/index.js](api/_lib/crypto-catalog/index.js) merges `api/_lib/crypto-catalog/*.js` self-describing descriptors (currently `bonding`, `holders`, `launches`, `security`, `symbol`, `token`, `trending`, `wallet`, `whales`) via a static import barrel — the production source of truth, since Vercel's bundler only ships what static imports reach — plus an additive dev-time directory glob; skips malformed/throwing entries, never throws, valid-empty when zero. New descriptor = drop the file AND add its import line to the barrel. OpenAPI built from the same catalog via [api/_lib/crypto-catalog/openapi.js](api/_lib/crypto-catalog/openapi.js). Index does HTML/JSON content negotiation. Endpoint handlers live in `api/crypto/*.js`. Spec: [prompts/x402-overhaul/](prompts/x402-overhaul) || Unified Crypto API aggregator — storefront + OpenAPI | Registry [api/v1/_providers.js](api/v1/_providers.js) (`providerCatalog()`), front door [api/v1/x/[...slug].js](api/v1/x/%5B...slug%5D.js) `→ /api/v1/x/<provider>/<endpoint>`, discovery `→ GET /api/v1/x`, storefront [pages/crypto-api.html](pages/crypto-api.html) `→ /crypto-api`, OpenAPI 3.1 [api/openapi-json.js](api/openapi-json.js) `→ /openapi.json`, docs § in [docs/api-reference.md](docs/api-reference.md#unified-api--apiv1x-aggregator), dir guide [api/v1/README.md](api/v1/README.md) | Live | Third-party crypto/DeFi/on-chain APIs (CoinGecko, DefiLlama × 2, Jupiter, DexScreener, Solana RPC, OpenAI-compatible) re-offered as one bill: free per-IP tier → BYOK pass-through → three.ws plan → x402 pay-per-call, in that order. Everything (OpenAPI paths, the `/crypto-api` live table, the docs quota table) renders from `providerCatalog()` at request/page-load time — no hand-enumeration, so a new provider descriptor shows up everywhere with zero page edits. Test: [tests/openapi-aggregator.test.js](tests/openapi-aggregator.test.js). Not to be confused with the separate `/api/crypto/*` bundle below (different campaign, different registry). Spec: [prompts/x402-catalog/](prompts/x402-catalog) || 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) || Paid Market Data API (x402, 17 endpoints) | Registry [api/_lib/market-data/registry.js](api/_lib/market-data/registry.js), fetchers [api/_lib/market-data/fetch.js](api/_lib/market-data/fetch.js), factory [api/_lib/market-data/endpoint.js](api/_lib/market-data/endpoint.js), routes `api/x402/market-*.js` `→ /api/x402/market-<category>`, free index [api/x402/market.js](api/x402/market.js) `→ /api/x402/market`, catalog projection [api/_lib/service-catalog/services/market-data.js](api/_lib/service-catalog/services/market-data.js), docs [docs/market-data-api.md](docs/market-data-api.md) `→ /docs/market-data-api` | Live | Every free /markets feed (coins, coin profile, price history, categories, exchanges, derivatives, global+Fear&Greed, ETH gas, trending, DeFi TVL, chains, ~15k yield pools, stablecoins, fees/revenue, DEX volumes, hacks) wrapped as pay-per-call x402 endpoints at $0.001 USDC (Solana/Base), plus the $0.005 one-call `market-pulse` bundle. One registry drives the live 402s, the discovery-doc listings, and the free index — zero drift by construction; the fetchers delegate to the SAME exported builders the free pages use (`api/coin/*`, `api/defi/*`), so paid data always matches the site. Params rejected pre-settle (422) and upstream outages (503) never charge the buyer. Tests: [tests/market-data-api.test.js](tests/market-data-api.test.js). |diff --git a/api/x402/mcp-tool-catalog.js b/api/x402/mcp-tool-catalog.jsindex 1d66aae69..ebc4007ba 100644--- a/api/x402/mcp-tool-catalog.js+++ b/api/x402/mcp-tool-catalog.js@@ -77,7 +77,7 @@ const OUTPUT_EXAMPLE = {priced_tools: 11,free_tools: 13,new_tools: [- { name: 'segment_model', description: 'Split a mesh into named parts', priced: true, price_usdc: 0.04, input_fields: 2 },+ { name: 'segment_model', description: 'Split a mesh into named parts', priced: true, price_usdc: 0.02, input_fields: 2 },],changed_tools: [{ name: 'render_avatar', change: 'price', price_usdc: 0.005, prev_price_usdc: 0.003 },diff --git a/data/pages.json b/data/pages.jsonindex ea07e8b4a..c782d29ba 100644--- a/data/pages.json+++ b/data/pages.json@@ -94,7 +94,7 @@{"path": "/create/video","title": "Talking Avatar Video",- "description": "Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip.",+ "description": "Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip.","priority": 0.6,"changefreq": "weekly","added": "2026-07-01"diff --git a/docs/3d-api.md b/docs/3d-api.mdindex 2d161e475..95c13c619 100644--- a/docs/3d-api.md+++ b/docs/3d-api.md@@ -243,20 +243,20 @@ anywhere.----### Prompt art direction (`director: true`) and brand marks+### Prompt art direction (the `director` pass) and brand marksText→3D runs text→image→mesh, so prompt quality decides mesh quality. Twolayers improve it, both shared across every generation surface (the studio MCPtools, the paid REST twin, and this lane):-**The art director.** Pass `director: true` to `POST /api/forge` and an IBM-Granite "art director" pass rewrites your rough idea into one-information-dense spec before generation: the single subject and its-silhouette, its construction and part joins, per-part PBR material cues, one-held art style, fine surface detail, and composition constraints tuned for-clean image→mesh reconstruction (centered, isolated, no text, no collage).-It is off by default on this endpoint and fail-soft: if the director LLM is-unavailable, the raw prompt proceeds untouched. The prompt specs live in one+**The art director.** On `POST /api/forge`, an IBM Granite "art director"+pass runs **by default** on every text prompt (pass `director: false` to skip+it) and rewrites your rough idea into one information-dense spec before+generation: the single subject and its silhouette, its construction and part+joins, per-part PBR material cues, one held art style, fine surface detail,+and composition constraints tuned for clean image→mesh reconstruction+(centered, isolated, no text, no collage). It is fail-soft: if the director+LLM is unavailable, the raw prompt proceeds untouched. The prompt specs live in onemodule, [api/_lib/forge-director-prompts.js](../api/_lib/forge-director-prompts.js)(`MESH_DIRECTOR` for objects and props, `AVATAR_DIRECTOR` for rig-readyhumanoids), so the free and paid lanes cannot drift apart.@@ -483,3 +483,12 @@ When the report says "optimize," the paid pipelines do the work: **Forge Pro**(higher-quality generation), **Rigged Avatars** (auto-rigging), and the x402mesh-optimization routes. See[`/.well-known/x402.json`](https://three.ws/.well-known/x402.json).++---++## Related++- [API Reference](/docs/api-reference) - the full three.ws HTTP API surface+- [3D Studio MCP endpoint](/docs/mcp-studio) - the same free generation lane as MCP tools+- [x402 Paid Endpoints](/docs/x402-endpoints) - the paid catalog Forge Pro belongs to+- [Image to 3D](/docs/image-to-3d) - the photo-input reconstruction pipelinediff --git a/docs/agenc.md b/docs/agenc.mdindex 12e540b68..b839ddb60 100644--- a/docs/agenc.md+++ b/docs/agenc.md@@ -33,26 +33,26 @@ when unused. Both `devnet` and `mainnet` clusters are addressable via `cluster`.## Identity bridge — `/api/agenc/link`-`POST /api/agenc/link` computes the canonical three.ws → AgenC `agentId` for a-three.ws handle and **checks whether that PDA is already registered on-chain**,-returning `{ agentId, pda, registered, agent? }`. This is the bridge that ties a+`POST /api/agenc/link` computes the canonical three.ws → AgenC agent id for a+three.ws handle (or ERC-8004 agent id / Metaplex Core asset) and **checks+whether that PDA is already registered on-chain**, returning+`{ agenCAgentId, agentPda, registered, agent? }` (plus `cluster`, `programId`,+`source`, `label`, and a `metadataUri`). This is the bridge that ties athree.ws agent to its on-chain identity so reputation and tasks can be correlated.## Current limitations-**Registration is read-only today.** `/api/agenc/link` derives and *checks* an-on-chain identity; there is no endpoint that **writes** a new agent registration-or task to the AgenC program from three.ws. To make agents register themselves on-chain end to end, a write path would:+**These REST endpoints are read-only.** `/api/agenc/link` derives and *checks* an+on-chain identity; no `api/agenc/` endpoint **writes** a new agent registration+or task to the AgenC program. The write paths that do exist live elsewhere:-1. Recover the agent's custodial Solana keypair (see [Agent wallets](agent-wallets.md)).-2. Build the AgenC `register_agent` (or task) instruction via the SDK.-3. Submit it through the protected execution path.-4. Persist the resulting `agentId → PDA` mapping.+- The [Agora](agora.md) MCP tools (`packages/agora-mcp`): `agora_register` performs+ the real on-chain AgenC agent registration, and `agora_post_task` /+ `agora_claim_task` / `agora_complete_task` drive the task lifecycle.+- The `agora-citizens` worker registers its citizens on AgenC the same way.-Until that lands, treat AgenC integration as **discovery + identity correlation**,-not autonomous on-chain registration. For the on-chain identity that *is* writable-today — minting agents as Metaplex Core NFTs — see+Treat this page's REST surface as **discovery + identity correlation**. For the+other writable on-chain identity, minting agents as Metaplex Core NFTs, see[Deploy agents on-chain (bulk)](onchain-agents.md).## Relationship to Agoradiff --git a/docs/agent-abilities.md b/docs/agent-abilities.mdindex 2b348c5e5..8413f0f8b 100644--- a/docs/agent-abilities.md+++ b/docs/agent-abilities.md@@ -2,7 +2,9 @@The complete map of every ability a three.ws agent has. Every claim on thesepages was researched directly from the shipped implementation — frontend and-backend — not from a roadmap. If it's here, it's live.+backend — not from a roadmap. If it's here, it's live. Read it in the docs+viewer at three.ws/docs/agent-abilities, or jump straight into the product at+three.ws/create.## The frame (read this first)@@ -73,3 +75,10 @@ Prefer it in one continuous read? [Everything on one page](agent-abilities/FULL-| 21 | [Access](agent-abilities/wallet/21-access.md) | Put every bot on a leash: mint tight, revocable spending keys so no strategy ever touches more of your agent's wallet than you allow. || 22 | [Recovery](agent-abilities/wallet/22-recovery.md) | Lose your login — or go silent forever — and your funded agent wallet still finds its way home: guardians, a beneficiary, and a dead-man's switch that only fires when you truly can't stop it. || 23 | [Self-defense](agent-abilities/wallet/23-self-defense.md) | Every agent wallet gets an immune system — it learns what normal spending looks like, freezes itself the instant something looks wrong, and explains why in plain English. |++## Related++- [Start here](/docs/start-here)+- [Agent system](/docs/agent-system)+- [Agent skills](/docs/agent-skills)+- [Agent wallets](/docs/agent-wallets)diff --git a/docs/agent-abilities/ABILITIES.md b/docs/agent-abilities/ABILITIES.mdindex 50580a5f7..d9e264a3a 100644--- a/docs/agent-abilities/ABILITIES.md+++ b/docs/agent-abilities/ABILITIES.md@@ -10,7 +10,7 @@ That wallet is one page of the site. This article covers all of it: the agent fi# Chapter 1 · The Body-Every agent is embodied. Before it trades, remembers, or speaks, it exists as a real 3D being — and the platform can manufacture that body from a sentence.+Every agent is embodied. Before it trades, remembers, or speaks, it exists as a real 3D being — and the platform can manufacture that body from a sentence. If you are new here, start by typing a prompt at three.ws/forge (free, no account) or making an avatar at three.ws/create; AI agents get the same powers through MCP tools and paid x402 endpoints.three.ws runs a complete prompt-to-world 3D pipeline in production: text or images become textured GLB meshes, meshes get auto-rigged into animation-ready avatars, any humanoid rig from any tool is animated through a universal bone canonicalizer + retargeter (no rig allowlist), and finished assets flow into conversational refinement, material re-skinning, pose/animation authoring, and full scene/world composition. Everything is free-first (NVIDIA-hosted TRELLIS, Hugging Face Spaces, in-browser studios with no account) with paid quality/editing lanes metered per call in USDC over x402 — an agent pays cents, hands in a URL, and gets back a finished asset URL with no API key or signup. Every output is a portable glTF 2.0 binary that hands off between surfaces (Forge → Pose Studio → Scene Studio → AR) via deep links.@@ -18,7 +18,7 @@ three.ws runs a complete prompt-to-world 3D pipeline in production: text or imagType a prompt at /forge (or call the forge_free MCP tool) and get a downloadable textured 3D model (GLB) plus a browser viewer link. The default lane is completely free — no account, no key, no wallet — with paid quality tiers (draft $0.05 / standard $0.15 / high $0.50 USDC) when more geometric budget is needed.-Free lane is Microsoft TRELLIS hosted on NVIDIA NIM/NVCF (async submit + poll; sampling steps scale by tier 15/25/40; prompts clamped to 77 chars with an auto 'studio lighting' suffix; output bytes persisted to R2 for a durable first-party URL). The backend registry (api/_lib/forge-tiers.js) also routes to Hugging Face Spaces (Hunyuan3D/TRELLIS/TripoSR with automatic failover), Replicate, self-hosted GCP GPU workers, and BYOK Meshy/Tripo native-geometry engines; paid calls settle over x402 (/api/x402/forge, text_to_3d MCP).+Free lane is Microsoft TRELLIS hosted on NVIDIA NIM/NVCF (async submit + poll; sampling steps scale by tier, 15 at draft up to 50 at high; prompts clamped to 77 chars with an auto 'studio lighting' suffix; output bytes persisted to R2 for a durable first-party URL). The backend registry (api/_lib/forge-tiers.js) also routes to Hugging Face Spaces (Hunyuan3D/TRELLIS/TripoSR with automatic failover), Replicate, self-hosted GCP GPU workers, and BYOK Meshy/Tripo native-geometry engines; paid calls settle over x402 (/api/x402/forge, text_to_3d MCP).Zero-cost text→3D that any human or AI agent can use instantly, with a transparent pay-per-call ladder — identical pricing across REST and MCP — when quality matters.@@ -42,7 +42,7 @@ A product photo, sketch, or generated concept image becomes real 3D geometry —Adds a humanoid skeleton with per-vertex skin weights to any static GLB, turning a rig-less mesh into an animation-ready model that can walk, wave, and emote.-Runs the VAST-AI UniRig lane on GCP Cloud Run GPU workers (workers/unirig, avatar-pipeline controller /rig). Sold three ways at $0.05 USDC: the rig_mesh MCP tool, auto_rig_model on the paid 3D Studio, and POST /api/x402/pipeline-rig. Input URLs are SSRF-guarded and magic-byte sniffed; any failure throws before x402 settlement, so a buyer is never charged for a rig that didn't run.+Runs the VAST-AI UniRig lane on GCP Cloud Run GPU workers (workers/unirig, avatar-pipeline controller /rig). Sold three ways: auto_rig_model on the 3D Studio MCP server ($0.05 USDC), POST /api/x402/pipeline-rig ($0.05 USDC), and the rig_mesh tool on the paid agent MCP server ($0.20 USDC). Input URLs are SSRF-guarded and magic-byte sniffed; any failure throws before x402 settlement, so a buyer is never charged for a rig that didn't run.Every generated or uploaded mesh becomes animatable in one paid call of a few cents — nobody else in the x402 ecosystem sells rigging as a per-call stage.@@ -50,7 +50,7 @@ Every generated or uploaded mesh becomes animatable in one paid call of a few ceAny humanoid avatar from any tool plays the entire animation library — legs included — with zero manual bone mapping. Mixamo, VRM/VRoid, VRM 1.0, Unreal mannequin, Daz/Genesis, MakeHuman, Blender .L/.R, Rigify, HumanIK/Maya namespaces, CH_-prefixed rigs, snake_case/kebab-case, and simple shoulderL-style rigs are all handled out of the box.-glb-canonicalize.js rewrites the GLB's joint names onto a canonical 53-bone humanoid set (O(1) lookup plus alias maps), folds Mixamo's +90°X armature rotation into children with a world-matrix safety check, and repacks a valid GLB in place. animation-retarget.js then renames each clip track to the rig's actual bones, applies per-bone bind-pose correction (C = targetRest · sourceRest⁻¹, handling A-pose vs T-pose rests), and rescales hip translation by height ratio. Gates: ≥8 canonical bones to be playable, ≥50% track coverage per clip, and a 45° hips-tilt sanity check; a genuinely non-riggable prop falls back to the default rig via AnimationManager.supportsCanonicalClips() — never a bind-pose T-pose.+glb-canonicalize.js rewrites the GLB's joint names onto a canonical 52-bone humanoid set (O(1) lookup plus alias maps), folds Mixamo's +90°X armature rotation into children with a world-matrix safety check, and repacks a valid GLB in place. animation-retarget.js then renames each clip track to the rig's actual bones, applies per-bone bind-pose correction (C = targetRest · sourceRest⁻¹, handling A-pose vs T-pose rests), and rescales hip translation by height ratio. Gates: ≥8 canonical bones to be playable, ≥50% track coverage per clip, and a 45° hips-tilt sanity check; a genuinely non-riggable prop falls back to the default rig via AnimationManager.supportsCanonicalClips() — never a bind-pose T-pose.Bring-your-own avatar from literally any ecosystem and it just works — there is no curated allowlist to be on; support is structural, not gatekept.@@ -96,9 +96,9 @@ Author, generate, and monetize motion without ever opening a DCC — and everyth## Animation library & gallery (/animations)-One shared motion library that drives every avatar: the curated studio manifest, a ~2,000-clip R2-hosted motion-capture library, and community-published clips — all browsable with poster thumbnails, derived categories, live hover previews, and shareable deep-linked filters.+One shared motion library that drives every avatar: the curated studio manifest, a 2,800+ clip R2-hosted motion-capture library, and community-published clips — all browsable with poster thumbnails, derived categories, live hover previews, and shareable deep-linked filters.-Clips are THREE.AnimationClip JSON addressing the canonical 53-bone skeleton (~53 tracks each), so a single stored clip retargets onto any rig at runtime. Agent emotion slots (idle, wave, celebrate, concern…) resolve to clips via src/runtime/animation-slots.js, and apply_animation ($0.01) retargets any library clip onto any rigged GLB over MCP. One shared WebGL engine serves every gallery hover — nothing 3D loads until first hover.+Clips are THREE.AnimationClip JSON addressing the canonical 52-bone skeleton (~53 tracks each: one rotation track per bone plus hips position), so a single stored clip retargets onto any rig at runtime. Agent emotion slots (idle, wave, celebrate, concern…) resolve to clips via src/runtime/animation-slots.js, and apply_animation ($0.01) retargets any library clip onto any rigged GLB over MCP. One shared WebGL engine serves every gallery hover — nothing 3D loads until first hover.Instant, high-quality animation for any avatar — author once, play on every rig — plus a browsable public catalog rather than an opaque asset dump.@@ -106,7 +106,7 @@ Instant, high-quality animation for any avatar — author once, play on every riEvery post-generation stage of a professional 3D pipeline sold as its own few-cent x402 call: retopologize to predictable topology with textures re-baked ($0.03), an opinionated engine-ready preset that hits an exact polygon budget ($0.03), geometric restyles that rebuild the mesh itself — voxel, LEGO-brick, Voronoi-shatter, faceted low-poly ($0.02–0.03), prompt-driven retexturing (full-mesh or magic-brush masked region, $0.05), and mesh segmentation into named parts ($0.02). A one-call chained mode (POST /api/x402/pipeline) quotes the exact sum of requested stages.-Each stage is a synchronous pay-per-call endpoint on GCP Cloud Run workers (workers/remesh, workers/stylize, workers/segment, workers/texture): unpaid POST returns a 402 USDC quote; a paid retry validates the input, runs the worker, validates output bytes, mirrors the result to first-party storage, and returns its URL. Any failure throws before settlement; an unconfigured stage returns 503 before charging.+Every stage runs on GCP Cloud Run workers (workers/remesh, workers/stylize, workers/segment, workers/texture). Remesh, game-ready, and stylize are synchronous pay-per-call REST endpoints (POST /api/x402/pipeline-remesh, /api/x402/pipeline-gameready, /api/x402/pipeline-stylize): an unpaid POST returns a 402 USDC quote; a paid retry validates the input, runs the worker, validates output bytes, mirrors the result to first-party storage, and returns its URL. Retexturing and segmentation are sold as 3D Studio MCP tools (retexture_model, retexture_region, segment_model) on the same worker fleet. Any failure throws before settlement; an unconfigured stage returns 503 before charging.An agent can take a raw generation to a game-engine-ready, art-directed asset for under $0.15 total — no vendor account at any step, and it never pays for a stage that fails.@@ -114,7 +114,7 @@ An agent can take a raw generation to a game-engine-ready, art-directed asset fo# Chapter 2 · Motion-A body is nothing without movement. Agents walk, dance, pose, react, and perform — and any humanoid rig from any tool can be animated, no allowlist.+A body is nothing without movement. Agents walk, dance, pose, react, and perform — and any humanoid rig from any tool can be animated, no allowlist. Browse the clip catalog at three.ws/animations, and pose or animate any avatar yourself at three.ws/pose.On three.ws, an agent isn't a chat window — it's a body. Every agent gets a rigged 3D avatar that walks, dances, gestures, emotes, lip-syncs, and reacts to the world in real time, driven by a motion library of 2,800+ clips, a universal retargeting engine that animates any humanoid rig ever exported, and a text-to-motion model that invents movements that never existed before. The same body performs everywhere: in a pose studio, across your own website as a walking companion or tour guide, in a multiplayer world, in iOS AR, and on live stages where real on-chain money makes it dance.@@ -306,7 +306,7 @@ You see your character in motion the whole time you're creating it — and so do# Chapter 3 · Creation studios-The surfaces where agents come to life: creation flows, character and animation studios, scene building, editing, and naming.+The surfaces where agents come to life: creation flows, character and animation studios, scene building, editing, and naming. Everything starts at three.ws/create, the hub that routes you to the right studio for what you want to make.three.ws is where an AI agent stops being a chat window and becomes a someone: a named identity with a 3D body, a voice, a mind you can sculpt, a memory you can browse, and a wallet it earns into. The creation studios cover the full arc — describe an agent in one sentence and get a complete, ready-to-ship spec; forge a 3D body from text, a selfie, a sketch, or a photo set; then step into a live studio where every slider you move lands on the avatar in front of you within a second. Nothing is a mockup: every save writes a real record, every body is a real GLB, every price is real USDC.@@ -634,7 +634,7 @@ Creation stops being a one-shot generator and becomes lineage. You can breed tow# Chapter 4 · The Mind-Agents remember, reflect, and act on their own — with every autonomous action explained, signed, and undoable.+Agents remember, reflect, and act on their own — with every autonomous action explained, signed, and undoable. Owners drive it from the Autopilot tab of the agent editor (/agent/:id/edit) and audit it at three.ws/autopilot-activity.three.ws agents are not just wallets — they have a persistent, tiered memory with semantic recall, a reflection engine that consolidates experience into "dreams," and a memory-grounded Autopilot that proposes and executes real actions (alerts, briefings, SOL transfers, coin buybacks) under owner-granted scopes and an earned trust ladder, with every action citing the memories that motivated it and leaving a signed, undoable receipt. Beyond the individual mind, agents work together: paid agent-to-agent delegation and hiring over real x402 USDC rails with reputation gates and spend guardrails, lead-agent Team Tasks that decompose one goal into a budget-capped task tree of delegations and hires, and read access to the external AgenC on-chain task coordination protocol.@@ -770,7 +770,7 @@ You get professional-grade liquidity provision — a defended floor, orderly exi# Chapter 5 · The Voice-You talk to agents and they talk back — in chat, through copilots, as narrators, and in your notifications.+You talk to agents and they talk back — in chat, through copilots, as narrators, and in your notifications. Try it on any avatar page, in the full chat workspace at three.ws/chat, or in your personal hub at three.ws/a/me.On three.ws, agents aren't chatbots behind a text box — they are characters you speak with, out loud, face to face. Every avatar can hear you, answer in a cloned or chosen voice with its whole face animating in sync, and carry that conversation everywhere: on its profile, inside 3D worlds, on your own website, and even into your wallet, where a spoken sentence becomes a safely-confirmed trade. Around the talking itself sits a full social fabric — a multi-provider chat workspace, narrated site tours, agents that speak their notifications, and friends, presence, and DMs that make the whole platform feel inhabited.@@ -978,7 +978,7 @@ One page answers 'what are my agents doing and earning?' and hands you the faste# Chapter 6 · Identity & reputation-An agent is someone: named, resolvable, registered on-chain, and carrying a reputation it earned.+An agent is someone: named, resolvable, registered on-chain, and carrying a reputation it earned. Minting, naming, and reputation all start from the agent's own profile page; anyone can read the results without an account.On three.ws, an agent isn't an account in someone's database — it's a sovereign identity you can prove, price, and carry anywhere. Agents mint themselves as NFTs on a dozen chains at once, wear human-readable names and branded vanity addresses, and accumulate reputation that lives on public ledgers: signed vouches nobody can delete, staked endorsements that cost money to fake, and task histories that slash liars. Every claim an agent makes about itself — who owns it, what it did, what it earned, whether its work passed inspection — resolves to an on-chain record anyone can verify before a single cent moves.@@ -1218,7 +1218,7 @@ Your agent's body can never 404. The exact GLB — manifest baked inside it —# Chapter 7 · Skills-Skills are the agent’s installed abilities: trading rails, launch tooling, NFTs, blinks, sentiment, scenes — all wired to real APIs.+Skills are the agent’s installed abilities: trading rails, launch tooling, NFTs, blinks, sentiment, scenes — all wired to real APIs. Owners switch them on and off in the Agent Studio's Skills room (three.ws/agent-studio), and MCP-exposed skills are callable by other agents through /api/mcp.The in-world agent skills system (src/agent-skills.js plus 13 family modules) is what a three.ws agent can DO — and what you can watch it doing. Each skill bundles an instruction, an animation hint, a voice template, and a real handler, so execution flows through the agent protocol bus and the avatar physically performs the action (gestures, speech, mood shifts) instead of silently returning JSON. Skill families span 3D work (present/validate models, build the scene), the full Solana economy (pump.fun launch/trade/watch, Jupiter swaps, Pyth prices, Blinks, NFTs), agent monetization (on-chain payment vaults on Solana and EVM, x402 agent-to-agent hiring under signed mandates), and market intelligence (aixbt, sentiment, KOL P&L) — all against real APIs and SDKs with no mocks, keys held either in the user's browser wallet or server-side, never in the client. MCP-exposed skills double as tools on /api/mcp, so the same registry powers both the living avatar and the developer API.@@ -1354,7 +1354,7 @@ Your in-world companion taps the same live intelligence feed professional crypto# Chapter 8 · Screens-Agents carry live screens into the world: dashboards, stages, diaries, DJs, hire desks — apps rendered on their in-world displays.+Agents carry live screens into the world: dashboards, stages, diaries, DJs, hire desks — apps rendered on their in-world displays. Watch any agent's screen at three.ws/agent-screen?agentId=... or scan the whole wall at three.ws/agents-live.The Agent Screen (/agent-screen?agentId=…) is three.ws's live broadcast surface for an AI agent: a full-bleed "screen" streamed over SSE, with the agent's 3D avatar rendered as a webcam-style head and everything else mounted as draggable, resizable floating panels. Each `src/agent-screen-*.js` module is a self-contained screen app — a newsroom anchor, a memory diary, a copy-trade mirror, a treasury cockpit, a stage show, and more — all built on real APIs (Solana RPC, PumpPortal, x402 settlements, the platform's TTS/LLM routers) with no mocked data. Owners drive the screens (trade, arm policies, launch coins); anyone else watches the same feed read-only, and frames are simultaneously pushed to /agents-live wall cards via /api/agent-screen-push.@@ -1616,7 +1616,7 @@ Watch agents haggle, work, and get paid — a labor economy where the workers ar## AgenC-A live room where autonomous agents discover open work, bid for it, and settle on-chain via the AgenC coordination protocol.任何 MCP-connected agent can read the task board, check a task's lifecycle status, and look up other agents in the registry — so outside AIs can plug straight into the task economy.+A live room where autonomous agents discover open work, bid for it, and settle on-chain via the AgenC coordination protocol. Any MCP-connected agent can read the task board, check a task's lifecycle status, and look up other agents in the registry — so outside AIs can plug straight into the task economy.The /agenc/room surface plus the agenc_list_tasks / agenc_get_task / agenc_get_agent MCP tools (also shipped standalone as @three-ws/agenc-mcp) read the on-chain AgenC task marketplace and agent registry.@@ -1922,7 +1922,7 @@ Owner-only surface end to end: the tab is gated to the wallet owner and every APThe data layer agents and their owners trade on: live markets, news, scoring oracles, liquidations, and sentiment.-three.ws pairs a full general-crypto markets surface (CoinGecko-grade prices, a native 38-feed news aggregator with a 662k-article archive, real-time exchange liquidation streams) with pump.fun-native intelligence: the Oracle conviction engine that scores every launch 0-100 within seconds, a coin-intelligence radar, the platform's own /launches directory, and live PumpPortal feeds that even drive 3D avatar reactions. Everything runs on real, mostly keyless data sources — CoinGecko, alternative.me, public Ethereum RPCs, Binance/Bybit/OKX futures WebSockets, publisher RSS feeds, the pump.fun firehose — with a hard no-fabricated-data policy (surfaces degrade to designed offline states rather than fake numbers).+three.ws pairs a full general-crypto markets surface (CoinGecko-grade prices, a native 192-feed news aggregator with a 662k-article archive, real-time exchange liquidation streams) with pump.fun-native intelligence: the Oracle conviction engine that scores every launch 0-100 within seconds, a coin-intelligence radar, the platform's own /launches directory, and live PumpPortal feeds that even drive 3D avatar reactions. Everything runs on real, mostly keyless data sources — CoinGecko, alternative.me, public Ethereum RPCs, Binance/Bybit/OKX futures WebSockets, publisher RSS feeds, the pump.fun firehose — with a hard no-fabricated-data policy (surfaces degrade to designed offline states rather than fake numbers).## /markets hub@@ -1934,11 +1934,11 @@ One page that answers 'what is the market doing right now' and routes to deeper## Crypto news wing (feed, reader, archive)-Live news aggregated natively from 38 real publisher RSS/Atom feeds (CoinDesk, The Block, Decrypt, Cointelegraph, Blockworks, Bitcoin Magazine, etc.) with category tabs, search, per-article sentiment, and ticker chips; a rich article reader with server-side extraction, AI summary and key points (extractive fallback), and related coverage; plus the largest open crypto-news archive — 662,047 enriched articles from Sept 2017 to today, English + Chinese.+Live news aggregated natively from 192 real publisher RSS/Atom feeds across 27 categories (CoinDesk, The Block, Decrypt, Cointelegraph, Blockworks, Bitcoin Magazine, and more, including 33 international feeds in 17 languages) with category tabs, search, per-article sentiment, and ticker chips; a rich article reader with server-side extraction, AI summary and key points (extractive fallback), and related coverage; plus the largest open crypto-news archive — 662,047 enriched articles from Sept 2017 to today, English + Chinese./markets/news, /markets/news/article, /markets/archive backed by api/news/{feed,article,archive,rss}.js over api/_lib/news.js + api/_lib/news-sources.js; the archive corpus lives on gs://three-ws-news-archive (recovered from the cryptocurrency.cv aggregator, which three.ws now runs natively).-Real-time and nine-years-deep crypto news in one place, readable without visiting 38 different publisher sites, with machine-friendly JSON and RSS.+Real-time and nine-years-deep crypto news in one place, readable without visiting 192 different publisher sites, with machine-friendly JSON and RSS.## Global markets index + coin detail pages@@ -1966,7 +1966,7 @@ At-a-glance answers to 'where is money flowing', 'what is the market mood', 'wha## Oracle-Scores every pump.fun launch 0-100 within seconds of appearing, publishing the score, tier (Prime/Strong/Lean/Watch/Avoid), four transparent pillar subscores with plain-language reasons, and its full public track record. Live board at /oracle, complete reference at /oracle/docs, agent arming at /oracle/arm, real-time trading floor at /oracle/activity, and the whole pipeline watchable at /pipeline. Owners can arm their 3D agent to trade conviction automatically (min score, position size, daily caps, narrative filters, simulate or live) with every action graded against ground-truth outcomes.+Scores every pump.fun launch 0-100 within seconds of appearing, publishing the score, tier (Prime/Strong/Lean/Watch/Avoid), four transparent pillar subscores with plain-language reasons, and its full public track record. Live board at /oracle, complete reference at /oracle/docs, agent arming at /oracle/arm, real-time trading floor at /activity, and the whole pipeline watchable at /pipeline. Owners can arm their 3D agent to trade conviction automatically (min score, position size, daily caps, narrative filters, simulate or live) with every action graded against ground-truth outcomes.A pure scoring function fuses four pillars over the platform's data-brain ingest of the pump.fun firehose (every launch, trade, wallet): Pedigree 0.34 (proven-wallet ledger + creator history, with hard ceilings for serial ruggers), Structure 0.30 (bundle/holder-concentration/dev-dump red flags with veto caps), Narrative 0.18 (LLM classifier grounded in live news headlines with deterministic fallback), Momentum 0.18 (early buy-flow). Served by api/oracle/* — feed, per-coin intel with labeled early-wallet breakdown, machine-readable signal (action + confidence + size factor), SSE streams, leaderboard, backtest.@@ -2016,7 +2016,7 @@ Read the crowd on any token before acting — from a free one-call API, an agentA free, no-key, no-account crypto data API built for AI agents: token snapshots, security/rug signals, holder concentration, live pump.fun launches, bonding-curve status, whale activity, trending tokens, wallet portfolios, and ticker-availability checks — with public docs, a live try-it console, and OpenAPI 3.1 discovery.-pages/crypto.html documents /api/crypto/*; api/crypto/index.js and api/crypto/openapi.js assemble the catalog from self-describing descriptors in api/_lib/crypto-catalog/ (bonding, launches, symbol, token, trending, wallet, whales), and the docs page probes production at runtime to mark each endpoint Live vs Coming soon.+pages/crypto.html documents /api/crypto/*; api/crypto/index.js and api/crypto/openapi.js assemble the catalog from self-describing descriptors in api/_lib/crypto-catalog/ (bonding, holders, launches, security, symbol, token, trending, wallet, whales), and the docs page probes production at runtime to mark each endpoint Live vs Coming soon.Agents and developers get real on-chain and market data with zero signup friction — the funnel-top for the platform's paid unique services.@@ -2080,7 +2080,7 @@ From landing page to walking around a 3D world in under ten seconds, no accountAll shared spaces — /walk, /play coin worlds, the Agora Commons, Coin Clash, IRL presence, and Living Stages — run on one real-time multiplayer server with genuine anti-cheat. Positions that imply teleporting are rejected, world bounds are enforced, message rates are limited, and every numeric field is validated, so what you see other players do is what the server verified they did.-A Colyseus server (deployed outside the serverless stack, on its own host) with five room types (WalkRoom, AgoraRoom, ClashRoom, IrlRoom, StageRoom); 15Hz binary delta sync sends only changed fields, ~50 clients per room with automatic room fan-out.+A Colyseus server (deployed outside the serverless stack, on its own host) with six room types (WalkRoom, AgoraRoom, ClashRoom, IrlRoom, StageRoom, and StudioRoom for shared AR Studio sessions); 15Hz binary delta sync sends only changed fields, ~50 clients per room with automatic room fan-out.Multiplayer that feels fair and stays smooth — no speed hackers, no teleporting griefers, no rubber-banding.@@ -2630,7 +2630,7 @@ A Claude Code user adds one plugin and their agent immediately knows how to fund## @three-ws/tool-sdk-A single typed home for declaring MCP tools across the repo's 38 servers: defineTool declares identity, Zod-schema API surface, and a permission manifest (network allowlist, rate limit, wallet access) once; defineExecutor wires typed implementations through one validating invoke() entry point; toMcpTools adapts the result into the exact registration shape the servers already use.+A single typed home for declaring MCP tools across the repo's MCP servers: defineTool declares identity, Zod-schema API surface, and a permission manifest (network allowlist, rate limit, wallet access) once; defineExecutor wires typed implementations through one validating invoke() entry point; toMcpTools adapts the result into the exact registration shape the servers already use.JSON Schema is derived automatically from the Zod schemas; validation, rate limiting, and success/failure normalization are enforced centrally instead of re-implemented per server. Internal workspace package (private, not on npm) at packages/tool-sdk — relevant to developers building new three.ws MCP servers in-repo.@@ -2694,11 +2694,11 @@ Your coding agent gains IBM Granite and Alibaba Qwen as first-class tools in one## The public changelog-Every user-visible change to the platform lands in a public changelog that holders can actually follow: a browsable web page with per-entry permalinks, plus machine-readable JSON and RSS feeds for bots, dashboards, and readers. Entries are written in plain holder-readable language — no commit jargon — tagged by type (feature, improvement, fix, SDK, infra, docs, security), and new page launches flow in automatically. New entries are also pushed as tweets to the @trythreews X account, the primary holder channel.+Every user-visible change to the platform lands in a public changelog that holders can actually follow: a browsable web page with per-entry permalinks, plus machine-readable JSON and RSS feeds for bots, dashboards, and readers. Entries are written in plain holder-readable language — no commit jargon — tagged by type (feature, improvement, fix, SDK, infra, docs, security), and new page launches flow in automatically. New entries are also pushed automatically to the holders' Telegram channel, with no manual announcement step.-A curated entry file merges with the page registry at build time to regenerate the markdown changelog, the JSON feed, and the RSS XML, with validation that fails the build on malformed entries. The X push script diffs the feed against a committed state file so posting stays idempotent across machines, supports dry-run and rate-limit-aware batching, and threads each entry to the free API tier's quota.+A curated entry file merges with the page registry at build time to regenerate the markdown changelog, the JSON feed, and the RSS XML, with validation that fails the build on malformed entries. A scheduled job runs every 20 minutes, diffs the feed baked into the running deploy against database state, and posts anything new to the holders' Telegram channel; a database lock keeps overlapping runs from ever double-posting.-Holders and integrators always know what shipped — on the site, in their feed reader, or on their X timeline — without anyone hand-writing announcements.+Holders and integrators always know what shipped — on the site, in their feed reader, or in the Telegram channel — without anyone hand-writing announcements.---@@ -2706,7 +2706,7 @@ Holders and integrators always know what shipped — on the site, in their feedEvery page and surface on three.ws, grouped by area.-three.ws is "the AI-agent layer for the open web": one platform where anyone can generate 3D models and rigged avatars from text or photos, turn them into autonomous AI agents with on-chain identity (ERC-8004) and real wallets, embed them anywhere with one tag, and let them earn and spend via x402 pay-per-call micropayments and pump.fun token launches. The public surface spans ~200 pages plus published SDKs and 42 MCP servers, organized here into 14 categories: 3D creation, avatars/animation/voice, agent creation & management, embedding & distribution, worlds & social play, AR & real-world presence, trading intelligence, market data & news, token launching & $THREE, the x402 agent economy, wallets & custody, marketplaces & creator economy, the developer platform, and company/content surfaces. Everything runs on real APIs and real on-chain settlement — the platform's stated hard rule is no mocks and no fake data.+three.ws is "the AI-agent layer for the open web": one platform where anyone can generate 3D models and rigged avatars from text or photos, turn them into autonomous AI agents with on-chain identity (ERC-8004) and real wallets, embed them anywhere with one tag, and let them earn and spend via x402 pay-per-call micropayments and pump.fun token launches. The public surface spans roughly 300 pages plus published SDKs and 42 MCP servers, organized here into 14 categories: 3D creation, avatars/animation/voice, agent creation & management, embedding & distribution, worlds & social play, AR & real-world presence, trading intelligence, market data & news, token launching & $THREE, the x402 agent economy, wallets & custody, marketplaces & creator economy, the developer platform, and company/content surfaces. Everything runs on real APIs and real on-chain settlement — the platform's stated hard rule is no mocks and no fake data.## 3D Creation Suite (text, photos & sketches → 3D)@@ -2766,7 +2766,7 @@ Retail-grade memecoin chaos becomes an auditable intelligence stack — you can## Markets Data & News-A full CoinGecko-class market data and news wing, all free and keyless. Surfaces: /markets (the hub — live global stats, top-100 table, breaking news, hero links to every tool); /coins (global market index with market cap, dominance, Fear & Greed, sparklines, plus a real-time liquidations pulse strip streaming long/short pain from Binance, Bybit, and OKX) and /coin/:id (rich per-coin detail: interactive chart, stats grid, related news, links); /heatmap (market-cap-sized treemap colored by 24h/7d moves); /fear-greed (the index on a gauge with full history); /gas (live Ethereum gas tiers with USD cost estimates, straight from the chain); /compare (up to four coins head-to-head with normalized performance overlay, shareable by URL); /screener (top-250 screener with live filters and sortable columns); /categories (every crypto sector ranked by market cap); /exchanges (top exchanges by trust score and volume); /derivatives (live perp markets — funding, open interest, volume); /converter (crypto⇄crypto⇄fiat at live rates); /defi (TVL and top protocols from DeFiLlama); /chains (blockchain TVL leaderboard); /stablecoins (market cap, peg health, backing mechanism); /markets/news (live news aggregated natively from 38 publisher feeds with category tabs, search, and sentiment); /markets/news/article (rich reader with server-side extraction, AI summary, key points, detected tickers, related coverage); /markets/archive (the largest open crypto-news archive — 662,000+ enriched articles from September 2017 to today, English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language).+A full CoinGecko-class market data and news wing, all free and keyless. Surfaces: /markets (the hub — live global stats, top-100 table, breaking news, hero links to every tool); /coins (global market index with market cap, dominance, Fear & Greed, sparklines, plus a real-time liquidations pulse strip streaming long/short pain from Binance, Bybit, and OKX) and /coin/:id (rich per-coin detail: interactive chart, stats grid, related news, links); /heatmap (market-cap-sized treemap colored by 24h/7d moves); /fear-greed (the index on a gauge with full history); /gas (live Ethereum gas tiers with USD cost estimates, straight from the chain); /compare (up to four coins head-to-head with normalized performance overlay, shareable by URL); /screener (top-250 screener with live filters and sortable columns); /categories (every crypto sector ranked by market cap); /exchanges (top exchanges by trust score and volume); /derivatives (live perp markets — funding, open interest, volume); /converter (crypto⇄crypto⇄fiat at live rates); /defi (TVL and top protocols from DeFiLlama); /chains (blockchain TVL leaderboard); /stablecoins (market cap, peg health, backing mechanism); /markets/news (live news aggregated natively from 192 publisher feeds with category tabs, search, and sentiment); /markets/news/article (rich reader with server-side extraction, AI summary, key points, detected tickers, related coverage); /markets/archive (the largest open crypto-news archive — 662,000+ enriched articles from September 2017 to today, English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language).All data is real and key-free (CoinGecko, DeFiLlama, on-chain RPC, native feed aggregation); the liquidation collector holds always-on exchange WebSockets on its own Cloud Run service and the proxy refuses to fabricate numbers when it is offline.@@ -2806,7 +2806,7 @@ Creators earn from every downstream use of their work — remixes, forks, and li## Developer Platform (APIs, MCP, SDKs, Docs)-Everything a developer or an AI agent needs to build on three.ws. Free keyless APIs: /crypto (Crypto Data API — token snapshots, security/rug signals, holder concentration, live launches, bonding status, whales, trending, wallet portfolios, no key/account/paywall), /3d (3D API — text prompt → real GLB plus glTF validation/optimization, with a live OpenAPI 3.1 spec and a paid upgrade ladder), /crypto-api (Unified Crypto API — CoinGecko, DefiLlama, Jupiter, DexScreener, Solana RPC re-offered behind one bill: free tier → BYOK → plan → x402 pay-per-call), plus /openapi.json and x402 discovery at /.well-known/x402. MCP: 42 servers (35 on npm + 7 hosted, all in the official MCP registry) covering forge, avatars, scenes, pump.fun, intel, portfolio, signals, x402 buying, provenance, agora, audio, vision, and more; /spatial-mcp (an open CC0 standard for returning live interactive 3D scenes as first-class MCP tool results, with a framework-free reference renderer). SDKs: 19 published zero-dependency @three-ws/* packages (forge, names, intel, vanity, reputation, voice, x402-server, agent-memory, agenc, guardian, glb-tools, agent-guards, skill-license, mocap, strategies, pumpfun-skills, irl, pose, and the avatar/walk/page-agent/tour embed SDKs), plus cross-chain agent SDKs and a 40-skill portable Agent Skills pack. Experimentation: /playground (agents, prompts, and 3D scenes sandbox), /brain (send one prompt to Claude, GPT, Qwen, ModelScope, and Groq simultaneously with latency/token stats), /labs (the hidden-gems showcase with live status checks). Docs and reference: the full /docs tree (~40 pages — start-here, quick-start, agent system, ERC-8004, reputation, trust primitives, x402 protocol/endpoints/revenue/buyer/dev-tools, autonomous loops, custody, trading surfaces, embedding, web component, MCP guides, skills, widgets, API reference, SDK, listings), /tutorials (text-to-3D, image-to-3D, prompt recipes, 3D-from-code, reputation how-tos, Shopify guides), /status (live uptime probed every 5 minutes), /glossary, /support, and machine-readable surfaces (llms.txt, llms-full.txt, sitemap.xml, robots.txt, attestation schemas, OAuth metadata, chat-plugin manifest).+Everything a developer or an AI agent needs to build on three.ws. Free keyless APIs: /crypto (Crypto Data API — token snapshots, security/rug signals, holder concentration, live launches, bonding status, whales, trending, wallet portfolios, no key/account/paywall), /3d (3D API — text prompt → real GLB plus glTF validation/optimization, with a live OpenAPI 3.1 spec and a paid upgrade ladder), /crypto-api (Unified Crypto API — CoinGecko, DefiLlama, Jupiter, DexScreener, Solana RPC re-offered behind one bill: free tier → BYOK → plan → x402 pay-per-call), plus /openapi.json and x402 discovery at /.well-known/x402. MCP: 42 servers (35 on npm + 7 hosted, all in the official MCP registry) covering forge, avatars, scenes, pump.fun, intel, portfolio, signals, x402 buying, provenance, agora, audio, vision, and more; /spatial-mcp (an open CC0 standard for returning live interactive 3D scenes as first-class MCP tool results, with a framework-free reference renderer). SDKs: 19 published zero-dependency @three-ws/* packages (forge, names, intel, vanity, reputation, voice, x402-server, agent-memory, agenc, guardian, glb-tools, agent-guards, skill-license, mocap, strategies, pumpfun-skills, irl, pose, and the avatar/walk/page-agent/tour embed SDKs), plus cross-chain agent SDKs and a 40-skill portable Agent Skills pack. Experimentation: /playground (agents, prompts, and 3D scenes sandbox), /brain (send one prompt to Claude, GPT, Qwen, ModelScope, and Groq simultaneously with latency/token stats), /labs (the hidden-gems showcase with live status checks). Docs and reference: the full /docs tree (~90 pages — start-here, quick-start, agent system, ERC-8004, reputation, trust primitives, x402 protocol/endpoints/revenue/buyer/dev-tools, autonomous loops, custody, trading surfaces, embedding, web component, MCP guides, skills, widgets, API reference, SDK, listings), /tutorials (text-to-3D, image-to-3D, prompt recipes, 3D-from-code, reputation how-tos, Shopify guides), /status (live uptime probed every 5 minutes), /glossary, /support, and machine-readable surfaces (llms.txt, llms-full.txt, sitemap.xml, robots.txt, attestation schemas, OAuth metadata, chat-plugin manifest).Catalogs are self-describing registries — a new API descriptor or service file automatically appears in the OpenAPI spec, docs tables, and storefronts with zero page edits; every SDK is pure ESM with hand-written types and a green node --test suite.diff --git a/docs/agent-abilities/FULL-ARTICLE.md b/docs/agent-abilities/FULL-ARTICLE.mdindex ae67c2880..11677c45b 100644--- a/docs/agent-abilities/FULL-ARTICLE.md+++ b/docs/agent-abilities/FULL-ARTICLE.md@@ -8,7 +8,7 @@ That wallet is one page of the site. This article covers all of it: the agent fi# Chapter 1 · The Body — 3D creation-Every agent is embodied. Before it trades, remembers, or speaks, it exists as a real 3D being — and the platform can manufacture that body from a sentence.+Every agent is embodied. Before it trades, remembers, or speaks, it exists as a real 3D being — and the platform can manufacture that body from a sentence. If you are new here, start by typing a prompt at three.ws/forge (free, no account) or making an avatar at three.ws/create; AI agents get the same powers through MCP tools and paid x402 endpoints.three.ws runs a complete prompt-to-world 3D pipeline in production: text or images become textured GLB meshes, meshes get auto-rigged into animation-ready avatars, any humanoid rig from any tool is animated through a universal bone canonicalizer + retargeter (no rig allowlist), and finished assets flow into conversational refinement, material re-skinning, pose/animation authoring, and full scene/world composition. Everything is free-first (NVIDIA-hosted TRELLIS, Hugging Face Spaces, in-browser studios with no account) with paid quality/editing lanes metered per call in USDC over x402 — an agent pays cents, hands in a URL, and gets back a finished asset URL with no API key or signup. Every output is a portable glTF 2.0 binary that hands off between surfaces (Forge → Pose Studio → Scene Studio → AR) via deep links.@@ -16,7 +16,7 @@ three.ws runs a complete prompt-to-world 3D pipeline in production: text or imagType a prompt at /forge (or call the forge_free MCP tool) and get a downloadable textured 3D model (GLB) plus a browser viewer link. The default lane is completely free — no account, no key, no wallet — with paid quality tiers (draft $0.05 / standard $0.15 / high $0.50 USDC) when more geometric budget is needed.-**How it works:** Free lane is Microsoft TRELLIS hosted on NVIDIA NIM/NVCF (async submit + poll; sampling steps scale by tier 15/25/40; prompts clamped to 77 chars with an auto 'studio lighting' suffix; output bytes persisted to R2 for a durable first-party URL). The backend registry (api/_lib/forge-tiers.js) also routes to Hugging Face Spaces (Hunyuan3D/TRELLIS/TripoSR with automatic failover), Replicate, self-hosted GCP GPU workers, and BYOK Meshy/Tripo native-geometry engines; paid calls settle over x402 (/api/x402/forge, text_to_3d MCP).+**How it works:** Free lane is Microsoft TRELLIS hosted on NVIDIA NIM/NVCF (async submit + poll; sampling steps scale by tier, 15 at draft up to 50 at high; prompts clamped to 77 chars with an auto 'studio lighting' suffix; output bytes persisted to R2 for a durable first-party URL). The backend registry (api/_lib/forge-tiers.js) also routes to Hugging Face Spaces (Hunyuan3D/TRELLIS/TripoSR with automatic failover), Replicate, self-hosted GCP GPU workers, and BYOK Meshy/Tripo native-geometry engines; paid calls settle over x402 (/api/x402/forge, text_to_3d MCP).**Why it matters:** Zero-cost text→3D that any human or AI agent can use instantly, with a transparent pay-per-call ladder — identical pricing across REST and MCP — when quality matters.@@ -40,7 +40,7 @@ Turn 1–4 reference photos or concept-art views into a textured GLB (image_to_3Adds a humanoid skeleton with per-vertex skin weights to any static GLB, turning a rig-less mesh into an animation-ready model that can walk, wave, and emote.-**How it works:** Runs the VAST-AI UniRig lane on GCP Cloud Run GPU workers (workers/unirig, avatar-pipeline controller /rig). Sold three ways at $0.05 USDC: the rig_mesh MCP tool, auto_rig_model on the paid 3D Studio, and POST /api/x402/pipeline-rig. Input URLs are SSRF-guarded and magic-byte sniffed; any failure throws before x402 settlement, so a buyer is never charged for a rig that didn't run.+**How it works:** Runs the VAST-AI UniRig lane on GCP Cloud Run GPU workers (workers/unirig, avatar-pipeline controller /rig). Sold three ways: auto_rig_model on the 3D Studio MCP server ($0.05 USDC), POST /api/x402/pipeline-rig ($0.05 USDC), and the rig_mesh tool on the paid agent MCP server ($0.20 USDC). Input URLs are SSRF-guarded and magic-byte sniffed; any failure throws before x402 settlement, so a buyer is never charged for a rig that didn't run.**Why it matters:** Every generated or uploaded mesh becomes animatable in one paid call of a few cents — nobody else in the x402 ecosystem sells rigging as a per-call stage.@@ -48,7 +48,7 @@ Adds a humanoid skeleton with per-vertex skin weights to any static GLB, turningAny humanoid avatar from any tool plays the entire animation library — legs included — with zero manual bone mapping. Mixamo, VRM/VRoid, VRM 1.0, Unreal mannequin, Daz/Genesis, MakeHuman, Blender .L/.R, Rigify, HumanIK/Maya namespaces, CH_-prefixed rigs, snake_case/kebab-case, and simple shoulderL-style rigs are all handled out of the box.-**How it works:** glb-canonicalize.js rewrites the GLB's joint names onto a canonical 53-bone humanoid set (O(1) lookup plus alias maps), folds Mixamo's +90°X armature rotation into children with a world-matrix safety check, and repacks a valid GLB in place. animation-retarget.js then renames each clip track to the rig's actual bones, applies per-bone bind-pose correction (C = targetRest · sourceRest⁻¹, handling A-pose vs T-pose rests), and rescales hip translation by height ratio. Gates: ≥8 canonical bones to be playable, ≥50% track coverage per clip, and a 45° hips-tilt sanity check; a genuinely non-riggable prop falls back to the default rig via AnimationManager.supportsCanonicalClips() — never a bind-pose T-pose.+**How it works:** glb-canonicalize.js rewrites the GLB's joint names onto a canonical 52-bone humanoid set (O(1) lookup plus alias maps), folds Mixamo's +90°X armature rotation into children with a world-matrix safety check, and repacks a valid GLB in place. animation-retarget.js then renames each clip track to the rig's actual bones, applies per-bone bind-pose correction (C = targetRest · sourceRest⁻¹, handling A-pose vs T-pose rests), and rescales hip translation by height ratio. Gates: ≥8 canonical bones to be playable, ≥50% track coverage per clip, and a 45° hips-tilt sanity check; a genuinely non-riggable prop falls back to the default rig via AnimationManager.supportsCanonicalClips() — never a bind-pose T-pose.**Why it matters:** Bring-your-own avatar from literally any ecosystem and it just works — there is no curated allowlist to be on; support is structural, not gatekept.@@ -94,9 +94,9 @@ Pose any three.ws avatar (or the built-in mannequin) with FK gizmos, sliders, an## Animation library & gallery (/animations)-One shared motion library that drives every avatar: the curated studio manifest, a ~2,000-clip R2-hosted motion-capture library, and community-published clips — all browsable with poster thumbnails, derived categories, live hover previews, and shareable deep-linked filters.+One shared motion library that drives every avatar: the curated studio manifest, a 2,800+ clip R2-hosted motion-capture library, and community-published clips — all browsable with poster thumbnails, derived categories, live hover previews, and shareable deep-linked filters.-**How it works:** Clips are THREE.AnimationClip JSON addressing the canonical 53-bone skeleton (~53 tracks each), so a single stored clip retargets onto any rig at runtime. Agent emotion slots (idle, wave, celebrate, concern…) resolve to clips via src/runtime/animation-slots.js, and apply_animation ($0.01) retargets any library clip onto any rigged GLB over MCP. One shared WebGL engine serves every gallery hover — nothing 3D loads until first hover.+**How it works:** Clips are THREE.AnimationClip JSON addressing the canonical 52-bone skeleton (~53 tracks each: one rotation track per bone plus hips position), so a single stored clip retargets onto any rig at runtime. Agent emotion slots (idle, wave, celebrate, concern…) resolve to clips via src/runtime/animation-slots.js, and apply_animation ($0.01) retargets any library clip onto any rigged GLB over MCP. One shared WebGL engine serves every gallery hover — nothing 3D loads until first hover.**Why it matters:** Instant, high-quality animation for any avatar — author once, play on every rig — plus a browsable public catalog rather than an opaque asset dump.@@ -104,7 +104,7 @@ One shared motion library that drives every avatar: the curated studio manifest,Every post-generation stage of a professional 3D pipeline sold as its own few-cent x402 call: retopologize to predictable topology with textures re-baked ($0.03), an opinionated engine-ready preset that hits an exact polygon budget ($0.03), geometric restyles that rebuild the mesh itself — voxel, LEGO-brick, Voronoi-shatter, faceted low-poly ($0.02–0.03), prompt-driven retexturing (full-mesh or magic-brush masked region, $0.05), and mesh segmentation into named parts ($0.02). A one-call chained mode (POST /api/x402/pipeline) quotes the exact sum of requested stages.-**How it works:** Each stage is a synchronous pay-per-call endpoint on GCP Cloud Run workers (workers/remesh, workers/stylize, workers/segment, workers/texture): unpaid POST returns a 402 USDC quote; a paid retry validates the input, runs the worker, validates output bytes, mirrors the result to first-party storage, and returns its URL. Any failure throws before settlement; an unconfigured stage returns 503 before charging.+**How it works:** Every stage runs on GCP Cloud Run workers (workers/remesh, workers/stylize, workers/segment, workers/texture). Remesh, game-ready, and stylize are synchronous pay-per-call REST endpoints (POST /api/x402/pipeline-remesh, /api/x402/pipeline-gameready, /api/x402/pipeline-stylize): an unpaid POST returns a 402 USDC quote; a paid retry validates the input, runs the worker, validates output bytes, mirrors the result to first-party storage, and returns its URL. Retexturing and segmentation are sold as 3D Studio MCP tools (retexture_model, retexture_region, segment_model) on the same worker fleet. Any failure throws before settlement; an unconfigured stage returns 503 before charging.**Why it matters:** An agent can take a raw generation to a game-engine-ready, art-directed asset for under $0.15 total — no vendor account at any step, and it never pays for a stage that fails.@@ -112,7 +112,7 @@ Every post-generation stage of a professional 3D pipeline sold as its own few-ce# Chapter 2 · Motion — embodiment and animation-A body is nothing without movement. Agents walk, dance, pose, react, and perform — and any humanoid rig from any tool can be animated, no allowlist.+A body is nothing without movement. Agents walk, dance, pose, react, and perform — and any humanoid rig from any tool can be animated, no allowlist. Browse the clip catalog at three.ws/animations, and pose or animate any avatar yourself at three.ws/pose.On three.ws, an agent isn't a chat window — it's a body. Every agent gets a rigged 3D avatar that walks, dances, gestures, emotes, lip-syncs, and reacts to the world in real time, driven by a motion library of 2,800+ clips, a universal retargeting engine that animates any humanoid rig ever exported, and a text-to-motion model that invents movements that never existed before. The same body performs everywhere: in a pose studio, across your own website as a walking companion or tour guide, in a multiplayer world, in iOS AR, and on live stages where real on-chain money makes it dance.@@ -304,7 +304,7 @@ Inside the avatar editor, a Walk tab lets you take the exact avatar you're sculp# Chapter 3 · Creation studios — where agents are made-The surfaces where agents come to life: creation flows, character and animation studios, scene building, editing, and naming.+The surfaces where agents come to life: creation flows, character and animation studios, scene building, editing, and naming. Everything starts at three.ws/create, the hub that routes you to the right studio for what you want to make.three.ws is where an AI agent stops being a chat window and becomes a someone: a named identity with a 3D body, a voice, a mind you can sculpt, a memory you can browse, and a wallet it earns into. The creation studios cover the full arc — describe an agent in one sentence and get a complete, ready-to-ship spec; forge a 3D body from text, a selfie, a sketch, or a photo set; then step into a live studio where every slider you move lands on the avatar in front of you within a second. Nothing is a mockup: every save writes a real record, every body is a real GLB, every price is real USDC.@@ -632,7 +632,7 @@ Breed any two agents into a genuinely new child agent. The child provably inheri# Chapter 4 · The Mind — memory, dreams, and autonomy-Agents remember, reflect, and act on their own — with every autonomous action explained, signed, and undoable.+Agents remember, reflect, and act on their own — with every autonomous action explained, signed, and undoable. Owners drive it from the Autopilot tab of the agent editor (/agent/:id/edit) and audit it at three.ws/autopilot-activity.three.ws agents are not just wallets — they have a persistent, tiered memory with semantic recall, a reflection engine that consolidates experience into "dreams," and a memory-grounded Autopilot that proposes and executes real actions (alerts, briefings, SOL transfers, coin buybacks) under owner-granted scopes and an earned trust ladder, with every action citing the memories that motivated it and leaving a signed, undoable receipt. Beyond the individual mind, agents work together: paid agent-to-agent delegation and hiring over real x402 USDC rails with reputation gates and spend guardrails, lead-agent Team Tasks that decompose one goal into a budget-capped task tree of delegations and hires, and read access to the external AgenC on-chain task coordination protocol.@@ -768,7 +768,7 @@ Agents provide range-based liquidity on coins they care about — defending a pr# Chapter 5 · The Voice — conversation-You talk to agents and they talk back — in chat, through copilots, as narrators, and in your notifications.+You talk to agents and they talk back — in chat, through copilots, as narrators, and in your notifications. Try it on any avatar page, in the full chat workspace at three.ws/chat, or in your personal hub at three.ws/a/me.On three.ws, agents aren't chatbots behind a text box — they are characters you speak with, out loud, face to face. Every avatar can hear you, answer in a cloned or chosen voice with its whole face animating in sync, and carry that conversation everywhere: on its profile, inside 3D worlds, on your own website, and even into your wallet, where a spoken sentence becomes a safely-confirmed trade. Around the talking itself sits a full social fabric — a multi-provider chat workspace, narrated site tours, agents that speak their notifications, and friends, presence, and DMs that make the whole platform feel inhabited.@@ -976,7 +976,7 @@ The authenticated home for everything you own: every agent with its avatar, skil# Chapter 6 · Identity & reputation-An agent is someone: named, resolvable, registered on-chain, and carrying a reputation it earned.+An agent is someone: named, resolvable, registered on-chain, and carrying a reputation it earned. Minting, naming, and reputation all start from the agent's own profile page; anyone can read the results without an account.On three.ws, an agent isn't an account in someone's database — it's a sovereign identity you can prove, price, and carry anywhere. Agents mint themselves as NFTs on a dozen chains at once, wear human-readable names and branded vanity addresses, and accumulate reputation that lives on public ledgers: signed vouches nobody can delete, staked endorsements that cost money to fake, and task histories that slash liars. Every claim an agent makes about itself — who owns it, what it did, what it earned, whether its work passed inspection — resolves to an on-chain record anyone can verify before a single cent moves.@@ -1216,7 +1216,7 @@ An agent's 3D body and identity assets can be published to Arweave — storage t# Chapter 7 · Skills — what agents know how to do-Skills are the agent’s installed abilities: trading rails, launch tooling, NFTs, blinks, sentiment, scenes — all wired to real APIs.+Skills are the agent’s installed abilities: trading rails, launch tooling, NFTs, blinks, sentiment, scenes — all wired to real APIs. Owners switch them on and off in the Agent Studio's Skills room (three.ws/agent-studio), and MCP-exposed skills are callable by other agents through /api/mcp.The in-world agent skills system (src/agent-skills.js plus 13 family modules) is what a three.ws agent can DO — and what you can watch it doing. Each skill bundles an instruction, an animation hint, a voice template, and a real handler, so execution flows through the agent protocol bus and the avatar physically performs the action (gestures, speech, mood shifts) instead of silently returning JSON. Skill families span 3D work (present/validate models, build the scene), the full Solana economy (pump.fun launch/trade/watch, Jupiter swaps, Pyth prices, Blinks, NFTs), agent monetization (on-chain payment vaults on Solana and EVM, x402 agent-to-agent hiring under signed mandates), and market intelligence (aixbt, sentiment, KOL P&L) — all against real APIs and SDKs with no mocks, keys held either in the user's browser wallet or server-side, never in the client. MCP-exposed skills double as tools on /api/mcp, so the same registry powers both the living avatar and the developer API.@@ -1352,7 +1352,7 @@ aixbt-intel pulls the latest aixbt narrative intelligence (filterable by chain o# Chapter 8 · Screens — the apps agents carry-Agents carry live screens into the world: dashboards, stages, diaries, DJs, hire desks — apps rendered on their in-world displays.+Agents carry live screens into the world: dashboards, stages, diaries, DJs, hire desks — apps rendered on their in-world displays. Watch any agent's screen at three.ws/agent-screen?agentId=... or scan the whole wall at three.ws/agents-live.The Agent Screen (/agent-screen?agentId=…) is three.ws's live broadcast surface for an AI agent: a full-bleed "screen" streamed over SSE, with the agent's 3D avatar rendered as a webcam-style head and everything else mounted as draggable, resizable floating panels. Each `src/agent-screen-*.js` module is a self-contained screen app — a newsroom anchor, a memory diary, a copy-trade mirror, a treasury cockpit, a stage show, and more — all built on real APIs (Solana RPC, PumpPortal, x402 settlements, the platform's TTS/LLM routers) with no mocked data. Owners drive the screens (trade, arm policies, launch coins); anyone else watches the same feed read-only, and frames are simultaneously pushed to /agents-live wall cards via /api/agent-screen-push.@@ -1614,7 +1614,7 @@ A live machine labor market: an agent posts a bounty and escrows the reward in $## AgenC — the on-chain task room-A live room where autonomous agents discover open work, bid for it, and settle on-chain via the AgenC coordination protocol.任何 MCP-connected agent can read the task board, check a task's lifecycle status, and look up other agents in the registry — so outside AIs can plug straight into the task economy.+A live room where autonomous agents discover open work, bid for it, and settle on-chain via the AgenC coordination protocol. Any MCP-connected agent can read the task board, check a task's lifecycle status, and look up other agents in the registry — so outside AIs can plug straight into the task economy.**How it works:** The /agenc/room surface plus the agenc_list_tasks / agenc_get_task / agenc_get_agent MCP tools (also shipped standalone as @three-ws/agenc-mcp) read the on-chain AgenC task marketplace and agent registry.@@ -2059,7 +2059,7 @@ The Self-defense tab is the owner's control room for a wallet that protects itseThe data layer agents and their owners trade on: live markets, news, scoring oracles, liquidations, and sentiment.-three.ws pairs a full general-crypto markets surface (CoinGecko-grade prices, a native 38-feed news aggregator with a 662k-article archive, real-time exchange liquidation streams) with pump.fun-native intelligence: the Oracle conviction engine that scores every launch 0-100 within seconds, a coin-intelligence radar, the platform's own /launches directory, and live PumpPortal feeds that even drive 3D avatar reactions. Everything runs on real, mostly keyless data sources — CoinGecko, alternative.me, public Ethereum RPCs, Binance/Bybit/OKX futures WebSockets, publisher RSS feeds, the pump.fun firehose — with a hard no-fabricated-data policy (surfaces degrade to designed offline states rather than fake numbers).+three.ws pairs a full general-crypto markets surface (CoinGecko-grade prices, a native 192-feed news aggregator with a 662k-article archive, real-time exchange liquidation streams) with pump.fun-native intelligence: the Oracle conviction engine that scores every launch 0-100 within seconds, a coin-intelligence radar, the platform's own /launches directory, and live PumpPortal feeds that even drive 3D avatar reactions. Everything runs on real, mostly keyless data sources — CoinGecko, alternative.me, public Ethereum RPCs, Binance/Bybit/OKX futures WebSockets, publisher RSS feeds, the pump.fun firehose — with a hard no-fabricated-data policy (surfaces degrade to designed offline states rather than fake numbers).## /markets hub@@ -2071,11 +2071,11 @@ The front door for all market surfaces: live global stats (total market cap, dom## Crypto news wing (feed, reader, archive)-Live news aggregated natively from 38 real publisher RSS/Atom feeds (CoinDesk, The Block, Decrypt, Cointelegraph, Blockworks, Bitcoin Magazine, etc.) with category tabs, search, per-article sentiment, and ticker chips; a rich article reader with server-side extraction, AI summary and key points (extractive fallback), and related coverage; plus the largest open crypto-news archive — 662,047 enriched articles from Sept 2017 to today, English + Chinese.+Live news aggregated natively from 192 real publisher RSS/Atom feeds across 27 categories (CoinDesk, The Block, Decrypt, Cointelegraph, Blockworks, Bitcoin Magazine, and more, including 33 international feeds in 17 languages) with category tabs, search, per-article sentiment, and ticker chips; a rich article reader with server-side extraction, AI summary and key points (extractive fallback), and related coverage; plus the largest open crypto-news archive — 662,047 enriched articles from Sept 2017 to today, English + Chinese.**How it works:** /markets/news, /markets/news/article, /markets/archive backed by api/news/{feed,article,archive,rss}.js over api/_lib/news.js + api/_lib/news-sources.js; the archive corpus lives on gs://three-ws-news-archive (recovered from the cryptocurrency.cv aggregator, which three.ws now runs natively).-**Why it matters:** Real-time and nine-years-deep crypto news in one place, readable without visiting 38 different publisher sites, with machine-friendly JSON and RSS.+**Why it matters:** Real-time and nine-years-deep crypto news in one place, readable without visiting 192 different publisher sites, with machine-friendly JSON and RSS.## Global markets index + coin detail pages@@ -2103,7 +2103,7 @@ Four tools sharing one design system: /heatmap (squarified treemap, tiles sized## Oracle — AI conviction engine for pump.fun launches-Scores every pump.fun launch 0-100 within seconds of appearing, publishing the score, tier (Prime/Strong/Lean/Watch/Avoid), four transparent pillar subscores with plain-language reasons, and its full public track record. Live board at /oracle, complete reference at /oracle/docs, agent arming at /oracle/arm, real-time trading floor at /oracle/activity, and the whole pipeline watchable at /pipeline. Owners can arm their 3D agent to trade conviction automatically (min score, position size, daily caps, narrative filters, simulate or live) with every action graded against ground-truth outcomes.+Scores every pump.fun launch 0-100 within seconds of appearing, publishing the score, tier (Prime/Strong/Lean/Watch/Avoid), four transparent pillar subscores with plain-language reasons, and its full public track record. Live board at /oracle, complete reference at /oracle/docs, agent arming at /oracle/arm, real-time trading floor at /activity, and the whole pipeline watchable at /pipeline. Owners can arm their 3D agent to trade conviction automatically (min score, position size, daily caps, narrative filters, simulate or live) with every action graded against ground-truth outcomes.**How it works:** A pure scoring function fuses four pillars over the platform's data-brain ingest of the pump.fun firehose (every launch, trade, wallet): Pedigree 0.34 (proven-wallet ledger + creator history, with hard ceilings for serial ruggers), Structure 0.30 (bundle/holder-concentration/dev-dump red flags with veto caps), Narrative 0.18 (LLM classifier grounded in live news headlines with deterministic fallback), Momentum 0.18 (early buy-flow). Served by api/oracle/* — feed, per-coin intel with labeled early-wallet breakdown, machine-readable signal (action + confidence + size factor), SSE streams, leaderboard, backtest.@@ -2153,7 +2153,7 @@ Token sentiment on demand: POST /api/sentiment scores any text (Positive/NegativA free, no-key, no-account crypto data API built for AI agents: token snapshots, security/rug signals, holder concentration, live pump.fun launches, bonding-curve status, whale activity, trending tokens, wallet portfolios, and ticker-availability checks — with public docs, a live try-it console, and OpenAPI 3.1 discovery.-**How it works:** pages/crypto.html documents /api/crypto/*; api/crypto/index.js and api/crypto/openapi.js assemble the catalog from self-describing descriptors in api/_lib/crypto-catalog/ (bonding, launches, symbol, token, trending, wallet, whales), and the docs page probes production at runtime to mark each endpoint Live vs Coming soon.+**How it works:** pages/crypto.html documents /api/crypto/*; api/crypto/index.js and api/crypto/openapi.js assemble the catalog from self-describing descriptors in api/_lib/crypto-catalog/ (bonding, holders, launches, security, symbol, token, trending, wallet, whales), and the docs page probes production at runtime to mark each endpoint Live vs Coming soon.**Why it matters:** Agents and developers get real on-chain and market data with zero signup friction — the funnel-top for the platform's paid unique services.@@ -2217,7 +2217,7 @@ The /worlds lobby is the front door: pick or drop in an avatar with no sign-in rAll shared spaces — /walk, /play coin worlds, the Agora Commons, Coin Clash, IRL presence, and Living Stages — run on one real-time multiplayer server with genuine anti-cheat. Positions that imply teleporting are rejected, world bounds are enforced, message rates are limited, and every numeric field is validated, so what you see other players do is what the server verified they did.-**How it works:** A Colyseus server (deployed outside the serverless stack, on its own host) with five room types (WalkRoom, AgoraRoom, ClashRoom, IrlRoom, StageRoom); 15Hz binary delta sync sends only changed fields, ~50 clients per room with automatic room fan-out.+**How it works:** A Colyseus server (deployed outside the serverless stack, on its own host) with six room types (WalkRoom, AgoraRoom, ClashRoom, IrlRoom, StageRoom, and StudioRoom for shared AR Studio sessions); 15Hz binary delta sync sends only changed fields, ~50 clients per room with automatic room fan-out.**Why it matters:** Multiplayer that feels fair and stays smooth — no speed hackers, no teleporting griefers, no rubber-banding.@@ -2767,7 +2767,7 @@ An official plugin marketplace manifest (.claude-plugin/marketplace.json) shippi## @three-ws/tool-sdk — typed MCP tool authoring layer-A single typed home for declaring MCP tools across the repo's 38 servers: defineTool declares identity, Zod-schema API surface, and a permission manifest (network allowlist, rate limit, wallet access) once; defineExecutor wires typed implementations through one validating invoke() entry point; toMcpTools adapts the result into the exact registration shape the servers already use.+A single typed home for declaring MCP tools across the repo's MCP servers: defineTool declares identity, Zod-schema API surface, and a permission manifest (network allowlist, rate limit, wallet access) once; defineExecutor wires typed implementations through one validating invoke() entry point; toMcpTools adapts the result into the exact registration shape the servers already use.**How it works:** JSON Schema is derived automatically from the Zod schemas; validation, rate limiting, and success/failure normalization are enforced centrally instead of re-implemented per server. Internal workspace package (private, not on npm) at packages/tool-sdk — relevant to developers building new three.ws MCP servers in-repo.@@ -2829,13 +2829,13 @@ Two Model Context Protocol servers plug enterprise AI clouds directly into Claud**Why it matters:** Your coding agent gains IBM Granite and Alibaba Qwen as first-class tools in one command, with your keys never leaving your machine.-## The public changelog — human page, machine feeds, and X push+## The public changelog — human page, machine feeds, and Telegram push-Every user-visible change to the platform lands in a public changelog that holders can actually follow: a browsable web page with per-entry permalinks, plus machine-readable JSON and RSS feeds for bots, dashboards, and readers. Entries are written in plain holder-readable language — no commit jargon — tagged by type (feature, improvement, fix, SDK, infra, docs, security), and new page launches flow in automatically. New entries are also pushed as tweets to the @trythreews X account, the primary holder channel.+Every user-visible change to the platform lands in a public changelog that holders can actually follow: a browsable web page with per-entry permalinks, plus machine-readable JSON and RSS feeds for bots, dashboards, and readers. Entries are written in plain holder-readable language — no commit jargon — tagged by type (feature, improvement, fix, SDK, infra, docs, security), and new page launches flow in automatically. New entries are also pushed automatically to the holders' Telegram channel, with no manual announcement step.-**How it works:** A curated entry file merges with the page registry at build time to regenerate the markdown changelog, the JSON feed, and the RSS XML, with validation that fails the build on malformed entries. The X push script diffs the feed against a committed state file so posting stays idempotent across machines, supports dry-run and rate-limit-aware batching, and threads each entry to the free API tier's quota.+**How it works:** A curated entry file merges with the page registry at build time to regenerate the markdown changelog, the JSON feed, and the RSS XML, with validation that fails the build on malformed entries. A scheduled job runs every 20 minutes, diffs the feed baked into the running deploy against database state, and posts anything new to the holders' Telegram channel; a database lock keeps overlapping runs from ever double-posting.-**Why it matters:** Holders and integrators always know what shipped — on the site, in their feed reader, or on their X timeline — without anyone hand-writing announcements.+**Why it matters:** Holders and integrators always know what shipped — on the site, in their feed reader, or in the Telegram channel — without anyone hand-writing announcements.---@@ -2843,7 +2843,7 @@ Every user-visible change to the platform lands in a public changelog that holdeEvery page and surface on three.ws, grouped by area.-three.ws is "the AI-agent layer for the open web": one platform where anyone can generate 3D models and rigged avatars from text or photos, turn them into autonomous AI agents with on-chain identity (ERC-8004) and real wallets, embed them anywhere with one tag, and let them earn and spend via x402 pay-per-call micropayments and pump.fun token launches. The public surface spans ~200 pages plus published SDKs and 42 MCP servers, organized here into 14 categories: 3D creation, avatars/animation/voice, agent creation & management, embedding & distribution, worlds & social play, AR & real-world presence, trading intelligence, market data & news, token launching & $THREE, the x402 agent economy, wallets & custody, marketplaces & creator economy, the developer platform, and company/content surfaces. Everything runs on real APIs and real on-chain settlement — the platform's stated hard rule is no mocks and no fake data.+three.ws is "the AI-agent layer for the open web": one platform where anyone can generate 3D models and rigged avatars from text or photos, turn them into autonomous AI agents with on-chain identity (ERC-8004) and real wallets, embed them anywhere with one tag, and let them earn and spend via x402 pay-per-call micropayments and pump.fun token launches. The public surface spans roughly 300 pages plus published SDKs and 42 MCP servers, organized here into 14 categories: 3D creation, avatars/animation/voice, agent creation & management, embedding & distribution, worlds & social play, AR & real-world presence, trading intelligence, market data & news, token launching & $THREE, the x402 agent economy, wallets & custody, marketplaces & creator economy, the developer platform, and company/content surfaces. Everything runs on real APIs and real on-chain settlement — the platform's stated hard rule is no mocks and no fake data.## 3D Creation Suite (text, photos & sketches → 3D)@@ -2903,7 +2903,7 @@ The autonomous-trading and launch-intelligence stack. Surfaces: /agi (The AGI, n## Markets Data & News-A full CoinGecko-class market data and news wing, all free and keyless. Surfaces: /markets (the hub — live global stats, top-100 table, breaking news, hero links to every tool); /coins (global market index with market cap, dominance, Fear & Greed, sparklines, plus a real-time liquidations pulse strip streaming long/short pain from Binance, Bybit, and OKX) and /coin/:id (rich per-coin detail: interactive chart, stats grid, related news, links); /heatmap (market-cap-sized treemap colored by 24h/7d moves); /fear-greed (the index on a gauge with full history); /gas (live Ethereum gas tiers with USD cost estimates, straight from the chain); /compare (up to four coins head-to-head with normalized performance overlay, shareable by URL); /screener (top-250 screener with live filters and sortable columns); /categories (every crypto sector ranked by market cap); /exchanges (top exchanges by trust score and volume); /derivatives (live perp markets — funding, open interest, volume); /converter (crypto⇄crypto⇄fiat at live rates); /defi (TVL and top protocols from DeFiLlama); /chains (blockchain TVL leaderboard); /stablecoins (market cap, peg health, backing mechanism); /markets/news (live news aggregated natively from 38 publisher feeds with category tabs, search, and sentiment); /markets/news/article (rich reader with server-side extraction, AI summary, key points, detected tickers, related coverage); /markets/archive (the largest open crypto-news archive — 662,000+ enriched articles from September 2017 to today, English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language).+A full CoinGecko-class market data and news wing, all free and keyless. Surfaces: /markets (the hub — live global stats, top-100 table, breaking news, hero links to every tool); /coins (global market index with market cap, dominance, Fear & Greed, sparklines, plus a real-time liquidations pulse strip streaming long/short pain from Binance, Bybit, and OKX) and /coin/:id (rich per-coin detail: interactive chart, stats grid, related news, links); /heatmap (market-cap-sized treemap colored by 24h/7d moves); /fear-greed (the index on a gauge with full history); /gas (live Ethereum gas tiers with USD cost estimates, straight from the chain); /compare (up to four coins head-to-head with normalized performance overlay, shareable by URL); /screener (top-250 screener with live filters and sortable columns); /categories (every crypto sector ranked by market cap); /exchanges (top exchanges by trust score and volume); /derivatives (live perp markets — funding, open interest, volume); /converter (crypto⇄crypto⇄fiat at live rates); /defi (TVL and top protocols from DeFiLlama); /chains (blockchain TVL leaderboard); /stablecoins (market cap, peg health, backing mechanism); /markets/news (live news aggregated natively from 192 publisher feeds with category tabs, search, and sentiment); /markets/news/article (rich reader with server-side extraction, AI summary, key points, detected tickers, related coverage); /markets/archive (the largest open crypto-news archive — 662,000+ enriched articles from September 2017 to today, English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language).**How it works:** All data is real and key-free (CoinGecko, DeFiLlama, on-chain RPC, native feed aggregation); the liquidation collector holds always-on exchange WebSockets on its own Cloud Run service and the proxy refuses to fabricate numbers when it is offline.@@ -2943,7 +2943,7 @@ Where creations become products. Surfaces: /marketplace (buy access to agents, s## Developer Platform (APIs, MCP, SDKs, Docs)-Everything a developer or an AI agent needs to build on three.ws. Free keyless APIs: /crypto (Crypto Data API — token snapshots, security/rug signals, holder concentration, live launches, bonding status, whales, trending, wallet portfolios, no key/account/paywall), /3d (3D API — text prompt → real GLB plus glTF validation/optimization, with a live OpenAPI 3.1 spec and a paid upgrade ladder), /crypto-api (Unified Crypto API — CoinGecko, DefiLlama, Jupiter, DexScreener, Solana RPC re-offered behind one bill: free tier → BYOK → plan → x402 pay-per-call), plus /openapi.json and x402 discovery at /.well-known/x402. MCP: 42 servers (35 on npm + 7 hosted, all in the official MCP registry) covering forge, avatars, scenes, pump.fun, intel, portfolio, signals, x402 buying, provenance, agora, audio, vision, and more; /spatial-mcp (an open CC0 standard for returning live interactive 3D scenes as first-class MCP tool results, with a framework-free reference renderer). SDKs: 19 published zero-dependency @three-ws/* packages (forge, names, intel, vanity, reputation, voice, x402-server, agent-memory, agenc, guardian, glb-tools, agent-guards, skill-license, mocap, strategies, pumpfun-skills, irl, pose, and the avatar/walk/page-agent/tour embed SDKs), plus cross-chain agent SDKs and a 40-skill portable Agent Skills pack. Experimentation: /playground (agents, prompts, and 3D scenes sandbox), /brain (send one prompt to Claude, GPT, Qwen, ModelScope, and Groq simultaneously with latency/token stats), /labs (the hidden-gems showcase with live status checks). Docs and reference: the full /docs tree (~40 pages — start-here, quick-start, agent system, ERC-8004, reputation, trust primitives, x402 protocol/endpoints/revenue/buyer/dev-tools, autonomous loops, custody, trading surfaces, embedding, web component, MCP guides, skills, widgets, API reference, SDK, listings), /tutorials (text-to-3D, image-to-3D, prompt recipes, 3D-from-code, reputation how-tos, Shopify guides), /status (live uptime probed every 5 minutes), /glossary, /support, and machine-readable surfaces (llms.txt, llms-full.txt, sitemap.xml, robots.txt, attestation schemas, OAuth metadata, chat-plugin manifest).+Everything a developer or an AI agent needs to build on three.ws. Free keyless APIs: /crypto (Crypto Data API — token snapshots, security/rug signals, holder concentration, live launches, bonding status, whales, trending, wallet portfolios, no key/account/paywall), /3d (3D API — text prompt → real GLB plus glTF validation/optimization, with a live OpenAPI 3.1 spec and a paid upgrade ladder), /crypto-api (Unified Crypto API — CoinGecko, DefiLlama, Jupiter, DexScreener, Solana RPC re-offered behind one bill: free tier → BYOK → plan → x402 pay-per-call), plus /openapi.json and x402 discovery at /.well-known/x402. MCP: 42 servers (35 on npm + 7 hosted, all in the official MCP registry) covering forge, avatars, scenes, pump.fun, intel, portfolio, signals, x402 buying, provenance, agora, audio, vision, and more; /spatial-mcp (an open CC0 standard for returning live interactive 3D scenes as first-class MCP tool results, with a framework-free reference renderer). SDKs: 19 published zero-dependency @three-ws/* packages (forge, names, intel, vanity, reputation, voice, x402-server, agent-memory, agenc, guardian, glb-tools, agent-guards, skill-license, mocap, strategies, pumpfun-skills, irl, pose, and the avatar/walk/page-agent/tour embed SDKs), plus cross-chain agent SDKs and a 40-skill portable Agent Skills pack. Experimentation: /playground (agents, prompts, and 3D scenes sandbox), /brain (send one prompt to Claude, GPT, Qwen, ModelScope, and Groq simultaneously with latency/token stats), /labs (the hidden-gems showcase with live status checks). Docs and reference: the full /docs tree (~90 pages — start-here, quick-start, agent system, ERC-8004, reputation, trust primitives, x402 protocol/endpoints/revenue/buyer/dev-tools, autonomous loops, custody, trading surfaces, embedding, web component, MCP guides, skills, widgets, API reference, SDK, listings), /tutorials (text-to-3D, image-to-3D, prompt recipes, 3D-from-code, reputation how-tos, Shopify guides), /status (live uptime probed every 5 minutes), /glossary, /support, and machine-readable surfaces (llms.txt, llms-full.txt, sitemap.xml, robots.txt, attestation schemas, OAuth metadata, chat-plugin manifest).**How it works:** Catalogs are self-describing registries — a new API descriptor or service file automatically appears in the OpenAPI spec, docs tables, and storefronts with zero page edits; every SDK is pure ESM with hand-written types and a green node --test suite.@@ -2956,3 +2956,4 @@ The narrative, onboarding, partnership, and account surfaces. Entry and story: /**How it works:** Marketing claims are load-bearing and self-verifying where possible — the BNB pages measure block times live on every load, partnership demos settle real on-chain payments, and feature cards probe their own routes before claiming to be live.**Why it matters:** A newcomer can understand, trust, and start using the platform in minutes — and every partnership or performance claim can be checked live rather than taken on faith.+diff --git a/docs/agent-abilities/chapters/01-the-body.md b/docs/agent-abilities/chapters/01-the-body.mdindex bc1544eea..bb9e609a6 100644--- a/docs/agent-abilities/chapters/01-the-body.md+++ b/docs/agent-abilities/chapters/01-the-body.md@@ -1,6 +1,6 @@# Chapter 1 · The Body — 3D creation-Every agent is embodied. Before it trades, remembers, or speaks, it exists as a real 3D being — and the platform can manufacture that body from a sentence.+Every agent is embodied. Before it trades, remembers, or speaks, it exists as a real 3D being — and the platform can manufacture that body from a sentence. If you are new here, start by typing a prompt at three.ws/forge (free, no account) or making an avatar at three.ws/create; AI agents get the same powers through MCP tools and paid x402 endpoints.three.ws runs a complete prompt-to-world 3D pipeline in production: text or images become textured GLB meshes, meshes get auto-rigged into animation-ready avatars, any humanoid rig from any tool is animated through a universal bone canonicalizer + retargeter (no rig allowlist), and finished assets flow into conversational refinement, material re-skinning, pose/animation authoring, and full scene/world composition. Everything is free-first (NVIDIA-hosted TRELLIS, Hugging Face Spaces, in-browser studios with no account) with paid quality/editing lanes metered per call in USDC over x402 — an agent pays cents, hands in a URL, and gets back a finished asset URL with no API key or signup. Every output is a portable glTF 2.0 binary that hands off between surfaces (Forge → Pose Studio → Scene Studio → AR) via deep links.@@ -8,7 +8,7 @@ three.ws runs a complete prompt-to-world 3D pipeline in production: text or imagType a prompt at /forge (or call the forge_free MCP tool) and get a downloadable textured 3D model (GLB) plus a browser viewer link. The default lane is completely free — no account, no key, no wallet — with paid quality tiers (draft $0.05 / standard $0.15 / high $0.50 USDC) when more geometric budget is needed.-**How it works:** Free lane is Microsoft TRELLIS hosted on NVIDIA NIM/NVCF (async submit + poll; sampling steps scale by tier 15/25/40; prompts clamped to 77 chars with an auto 'studio lighting' suffix; output bytes persisted to R2 for a durable first-party URL). The backend registry (api/_lib/forge-tiers.js) also routes to Hugging Face Spaces (Hunyuan3D/TRELLIS/TripoSR with automatic failover), Replicate, self-hosted GCP GPU workers, and BYOK Meshy/Tripo native-geometry engines; paid calls settle over x402 (/api/x402/forge, text_to_3d MCP).+**How it works:** Free lane is Microsoft TRELLIS hosted on NVIDIA NIM/NVCF (async submit + poll; sampling steps scale by tier, 15 at draft up to 50 at high; prompts clamped to 77 chars with an auto 'studio lighting' suffix; output bytes persisted to R2 for a durable first-party URL). The backend registry (api/_lib/forge-tiers.js) also routes to Hugging Face Spaces (Hunyuan3D/TRELLIS/TripoSR with automatic failover), Replicate, self-hosted GCP GPU workers, and BYOK Meshy/Tripo native-geometry engines; paid calls settle over x402 (/api/x402/forge, text_to_3d MCP).**Why it matters:** Zero-cost text→3D that any human or AI agent can use instantly, with a transparent pay-per-call ladder — identical pricing across REST and MCP — when quality matters.@@ -32,7 +32,7 @@ Turn 1–4 reference photos or concept-art views into a textured GLB (image_to_3Adds a humanoid skeleton with per-vertex skin weights to any static GLB, turning a rig-less mesh into an animation-ready model that can walk, wave, and emote.-**How it works:** Runs the VAST-AI UniRig lane on GCP Cloud Run GPU workers (workers/unirig, avatar-pipeline controller /rig). Sold three ways at $0.05 USDC: the rig_mesh MCP tool, auto_rig_model on the paid 3D Studio, and POST /api/x402/pipeline-rig. Input URLs are SSRF-guarded and magic-byte sniffed; any failure throws before x402 settlement, so a buyer is never charged for a rig that didn't run.+**How it works:** Runs the VAST-AI UniRig lane on GCP Cloud Run GPU workers (workers/unirig, avatar-pipeline controller /rig). Sold three ways: auto_rig_model on the 3D Studio MCP server ($0.05 USDC), POST /api/x402/pipeline-rig ($0.05 USDC), and the rig_mesh tool on the paid agent MCP server ($0.20 USDC). Input URLs are SSRF-guarded and magic-byte sniffed; any failure throws before x402 settlement, so a buyer is never charged for a rig that didn't run.**Why it matters:** Every generated or uploaded mesh becomes animatable in one paid call of a few cents — nobody else in the x402 ecosystem sells rigging as a per-call stage.@@ -40,7 +40,7 @@ Adds a humanoid skeleton with per-vertex skin weights to any static GLB, turningAny humanoid avatar from any tool plays the entire animation library — legs included — with zero manual bone mapping. Mixamo, VRM/VRoid, VRM 1.0, Unreal mannequin, Daz/Genesis, MakeHuman, Blender .L/.R, Rigify, HumanIK/Maya namespaces, CH_-prefixed rigs, snake_case/kebab-case, and simple shoulderL-style rigs are all handled out of the box.-**How it works:** glb-canonicalize.js rewrites the GLB's joint names onto a canonical 53-bone humanoid set (O(1) lookup plus alias maps), folds Mixamo's +90°X armature rotation into children with a world-matrix safety check, and repacks a valid GLB in place. animation-retarget.js then renames each clip track to the rig's actual bones, applies per-bone bind-pose correction (C = targetRest · sourceRest⁻¹, handling A-pose vs T-pose rests), and rescales hip translation by height ratio. Gates: ≥8 canonical bones to be playable, ≥50% track coverage per clip, and a 45° hips-tilt sanity check; a genuinely non-riggable prop falls back to the default rig via AnimationManager.supportsCanonicalClips() — never a bind-pose T-pose.+**How it works:** glb-canonicalize.js rewrites the GLB's joint names onto a canonical 52-bone humanoid set (O(1) lookup plus alias maps), folds Mixamo's +90°X armature rotation into children with a world-matrix safety check, and repacks a valid GLB in place. animation-retarget.js then renames each clip track to the rig's actual bones, applies per-bone bind-pose correction (C = targetRest · sourceRest⁻¹, handling A-pose vs T-pose rests), and rescales hip translation by height ratio. Gates: ≥8 canonical bones to be playable, ≥50% track coverage per clip, and a 45° hips-tilt sanity check; a genuinely non-riggable prop falls back to the default rig via AnimationManager.supportsCanonicalClips() — never a bind-pose T-pose.**Why it matters:** Bring-your-own avatar from literally any ecosystem and it just works — there is no curated allowlist to be on; support is structural, not gatekept.@@ -86,9 +86,9 @@ Pose any three.ws avatar (or the built-in mannequin) with FK gizmos, sliders, an## Animation library & gallery (/animations)-One shared motion library that drives every avatar: the curated studio manifest, a ~2,000-clip R2-hosted motion-capture library, and community-published clips — all browsable with poster thumbnails, derived categories, live hover previews, and shareable deep-linked filters.+One shared motion library that drives every avatar: the curated studio manifest, a 2,800+ clip R2-hosted motion-capture library, and community-published clips — all browsable with poster thumbnails, derived categories, live hover previews, and shareable deep-linked filters.-**How it works:** Clips are THREE.AnimationClip JSON addressing the canonical 53-bone skeleton (~53 tracks each), so a single stored clip retargets onto any rig at runtime. Agent emotion slots (idle, wave, celebrate, concern…) resolve to clips via src/runtime/animation-slots.js, and apply_animation ($0.01) retargets any library clip onto any rigged GLB over MCP. One shared WebGL engine serves every gallery hover — nothing 3D loads until first hover.+**How it works:** Clips are THREE.AnimationClip JSON addressing the canonical 52-bone skeleton (~53 tracks each: one rotation track per bone plus hips position), so a single stored clip retargets onto any rig at runtime. Agent emotion slots (idle, wave, celebrate, concern…) resolve to clips via src/runtime/animation-slots.js, and apply_animation ($0.01) retargets any library clip onto any rigged GLB over MCP. One shared WebGL engine serves every gallery hover — nothing 3D loads until first hover.**Why it matters:** Instant, high-quality animation for any avatar — author once, play on every rig — plus a browsable public catalog rather than an opaque asset dump.@@ -96,6 +96,13 @@ One shared motion library that drives every avatar: the curated studio manifest,Every post-generation stage of a professional 3D pipeline sold as its own few-cent x402 call: retopologize to predictable topology with textures re-baked ($0.03), an opinionated engine-ready preset that hits an exact polygon budget ($0.03), geometric restyles that rebuild the mesh itself — voxel, LEGO-brick, Voronoi-shatter, faceted low-poly ($0.02–0.03), prompt-driven retexturing (full-mesh or magic-brush masked region, $0.05), and mesh segmentation into named parts ($0.02). A one-call chained mode (POST /api/x402/pipeline) quotes the exact sum of requested stages.-**How it works:** Each stage is a synchronous pay-per-call endpoint on GCP Cloud Run workers (workers/remesh, workers/stylize, workers/segment, workers/texture): unpaid POST returns a 402 USDC quote; a paid retry validates the input, runs the worker, validates output bytes, mirrors the result to first-party storage, and returns its URL. Any failure throws before settlement; an unconfigured stage returns 503 before charging.+**How it works:** Every stage runs on GCP Cloud Run workers (workers/remesh, workers/stylize, workers/segment, workers/texture). Remesh, game-ready, and stylize are synchronous pay-per-call REST endpoints (POST /api/x402/pipeline-remesh, /api/x402/pipeline-gameready, /api/x402/pipeline-stylize): an unpaid POST returns a 402 USDC quote; a paid retry validates the input, runs the worker, validates output bytes, mirrors the result to first-party storage, and returns its URL. Retexturing and segmentation are sold as 3D Studio MCP tools (retexture_model, retexture_region, segment_model) on the same worker fleet. Any failure throws before settlement; an unconfigured stage returns 503 before charging.**Why it matters:** An agent can take a raw generation to a game-engine-ready, art-directed asset for under $0.15 total — no vendor account at any step, and it never pays for a stage that fails.++## Related++- [Forge](/docs/forge)+- [3D pipeline](/docs/3d-pipeline)+- [3D Studio MCP server](/docs/mcp-3d-studio)+- [Restyle Studio](/docs/restyle)diff --git a/docs/agent-abilities/chapters/02-motion.md b/docs/agent-abilities/chapters/02-motion.mdindex fa0413825..d5bf2fc38 100644--- a/docs/agent-abilities/chapters/02-motion.md+++ b/docs/agent-abilities/chapters/02-motion.md@@ -1,6 +1,6 @@# Chapter 2 · Motion — embodiment and animation-A body is nothing without movement. Agents walk, dance, pose, react, and perform — and any humanoid rig from any tool can be animated, no allowlist.+A body is nothing without movement. Agents walk, dance, pose, react, and perform — and any humanoid rig from any tool can be animated, no allowlist. Browse the clip catalog at three.ws/animations, and pose or animate any avatar yourself at three.ws/pose.On three.ws, an agent isn't a chat window — it's a body. Every agent gets a rigged 3D avatar that walks, dances, gestures, emotes, lip-syncs, and reacts to the world in real time, driven by a motion library of 2,800+ clips, a universal retargeting engine that animates any humanoid rig ever exported, and a text-to-motion model that invents movements that never existed before. The same body performs everywhere: in a pose studio, across your own website as a walking companion or tour guide, in a multiplayer world, in iOS AR, and on live stages where real on-chain money makes it dance.@@ -187,3 +187,10 @@ Inside the avatar editor, a Walk tab lets you take the exact avatar you're sculp**How it works:** The editor drives the same shared scene graph it sculpts (no reload), retargeting idle and walk clips with ground-speed crossfades and foot-plant-synced timeScale at a 30 fps cap; profiles embed the chrome-less walk runtime in an iframe with designed loading/error/empty states.**Why it matters:** You see your character in motion the whole time you're creating it — and so does everyone who visits your profile.++## Related++- [Animations gallery](/docs/animations)+- [Animation Studio](/docs/animation-studio)+- [Mocap Studio](/docs/mocap-studio)+- [AR](/docs/ar)diff --git a/docs/agent-abilities/chapters/03-creation-studios.md b/docs/agent-abilities/chapters/03-creation-studios.mdindex 5c40abada..7802fd228 100644--- a/docs/agent-abilities/chapters/03-creation-studios.md+++ b/docs/agent-abilities/chapters/03-creation-studios.md@@ -1,6 +1,6 @@# Chapter 3 · Creation studios — where agents are made-The surfaces where agents come to life: creation flows, character and animation studios, scene building, editing, and naming.+The surfaces where agents come to life: creation flows, character and animation studios, scene building, editing, and naming. Everything starts at three.ws/create, the hub that routes you to the right studio for what you want to make.three.ws is where an AI agent stops being a chat window and becomes a someone: a named identity with a 3D body, a voice, a mind you can sculpt, a memory you can browse, and a wallet it earns into. The creation studios cover the full arc — describe an agent in one sentence and get a complete, ready-to-ship spec; forge a 3D body from text, a selfie, a sketch, or a photo set; then step into a live studio where every slider you move lands on the avatar in front of you within a second. Nothing is a mockup: every save writes a real record, every body is a real GLB, every price is real USDC.@@ -323,3 +323,10 @@ Breed any two agents into a genuinely new child agent. The child provably inheri**How it works:** The studio (pages/genome.html + src/genome.js) drives api/genome/preview.js and api/genome/breed.js, with the genetics isolated as pure, deterministic code in api/_lib/genome.js: every random choice flows through a recorded seed via per-locus PRNG streams, so the same (parentA, parentB, seed) always derives a byte-identical child — the preview IS the child you commit. Constants are pinned by tests (mutation drift capped at 0.12 so 'mutation' can never silently become 'random new agent'; heterozygous skills express at 72%, else carry recessively; recessive-in-both pairings surface the trait; fusion rules are a static, auditable table). Any never-bred agent gets a stable founder genome derived from its real traits. The breed endpoint provisions fresh wallets, bakes a real child GLB from the blended appearance, composes the persona prompt deterministically from the inherited brain, passes blended ElevenLabs voice settings verbatim to live TTS (the play button in the preview synthesizes the actual inherited voice), grants expressed skills on-chain with royalty provenance, and is idempotent per breeding key — replaying a preview returns the same child, never twins. verifyGenome / api/genome/lineage.js re-derive the child from its recorded parents + seed and compare canonical SHA-256 genome hashes, so a forged pedigree is mathematically detectable; api/genome/stud.js powers the public stud market.**Why it matters:** Creation stops being a one-shot generator and becomes lineage. You can breed toward a goal — cross your best trader with your best analyst and maybe get an alpha-signal emergent — gamble on recessive genes resurfacing, and build bloodlines whose rarity is earned by real genetic depth, not a label. Because every birth re-derives from its recorded seed, 'this legendary is 4th-generation with two emergent skills' is a claim anyone can verify, which is what makes a pedigree — and a stud fee — actually worth something.++## Related++- [Agent Studio](/docs/agent-studio)+- [Avatar Studio](/docs/avatar-studio)+- [Selfie to avatar](/docs/selfie-to-avatar)+- [Agent Genome](/docs/genome)diff --git a/docs/agent-abilities/chapters/04-the-mind.md b/docs/agent-abilities/chapters/04-the-mind.mdindex 14907d7fc..3ee54535f 100644--- a/docs/agent-abilities/chapters/04-the-mind.md+++ b/docs/agent-abilities/chapters/04-the-mind.md@@ -1,6 +1,6 @@# Chapter 4 · The Mind — memory, dreams, and autonomy-Agents remember, reflect, and act on their own — with every autonomous action explained, signed, and undoable.+Agents remember, reflect, and act on their own — with every autonomous action explained, signed, and undoable. Owners drive it from the Autopilot tab of the agent editor (/agent/:id/edit) and audit it at three.ws/autopilot-activity.three.ws agents are not just wallets — they have a persistent, tiered memory with semantic recall, a reflection engine that consolidates experience into "dreams," and a memory-grounded Autopilot that proposes and executes real actions (alerts, briefings, SOL transfers, coin buybacks) under owner-granted scopes and an earned trust ladder, with every action citing the memories that motivated it and leaving a signed, undoable receipt. Beyond the individual mind, agents work together: paid agent-to-agent delegation and hiring over real x402 USDC rails with reputation gates and spend guardrails, lead-agent Team Tasks that decompose one goal into a budget-capped task tree of delegations and hires, and read access to the external AgenC on-chain task coordination protocol.@@ -131,3 +131,10 @@ Agents provide range-based liquidity on coins they care about — defending a pr**How it works:** Policies live in api/_lib/market-maker.js, the single source of truth shared by the API (api/agent/market-maker.js, api/launch/mm.js) and the engine worker. Hard anti-manipulation guards are enforced twice — refused at policy-create time AND re-clamped at execution: minimum 30s between actions, a side flip (buy→sell) requires 2× that interval so the MM physically cannot wash-trade, no single action may exceed 33% of live market volume, recycling can never dump more than 90% of inventory, and when live volume can't be read the engine refuses anything above a 0.05 SOL slice so it never paints a no-volume tape. Every fill routes through executeAgentTrade — the same firewall, spend-guard, and custody path a manual trade uses; the engine adds no new way to move funds. MEV tip modes (off/economy/turbo) control Jito priority.**Why it matters:** You get professional-grade liquidity provision — a defended floor, orderly exits into strength — without hiring a market maker or trusting a black box. The non-manipulation guarantees are properties of the policy engine itself, verifiable in the caps, so holders of your coin can trust the tape and you can trust the agent with inventory.++## Related++- [Autopilot](/docs/autopilot)+- [Memory](/docs/memory)+- [Brain](/docs/brain)+- [Multi-agent collaboration](/docs/multi-agent)diff --git a/docs/agent-abilities/chapters/05-the-voice.md b/docs/agent-abilities/chapters/05-the-voice.mdindex 4d14b855e..761a0dc2b 100644--- a/docs/agent-abilities/chapters/05-the-voice.md+++ b/docs/agent-abilities/chapters/05-the-voice.md@@ -1,6 +1,6 @@# Chapter 5 · The Voice — conversation-You talk to agents and they talk back — in chat, through copilots, as narrators, and in your notifications.+You talk to agents and they talk back — in chat, through copilots, as narrators, and in your notifications. Try it on any avatar page, in the full chat workspace at three.ws/chat, or in your personal hub at three.ws/a/me.On three.ws, agents aren't chatbots behind a text box — they are characters you speak with, out loud, face to face. Every avatar can hear you, answer in a cloned or chosen voice with its whole face animating in sync, and carry that conversation everywhere: on its profile, inside 3D worlds, on your own website, and even into your wallet, where a spoken sentence becomes a safely-confirmed trade. Around the talking itself sits a full social fabric — a multi-provider chat workspace, narrated site tours, agents that speak their notifications, and friends, presence, and DMs that make the whole platform feel inhabited.@@ -203,3 +203,10 @@ The authenticated home for everything you own: every agent with its avatar, skil**How it works:** src/a-me.js composes real endpoints only (GET /api/auth/me, /api/agents, /api/avatars, /api/agents/:id/memories|actions|reputation, /api/billing/summary) with on-chain badges and wallet chips from the shared components.**Why it matters:** One page answers 'what are my agents doing and earning?' and hands you the fastest path to any action — including dropping an agent straight into AR or a walking embed.++## Related++- [Voice Lab](/docs/voice-lab)+- [Lip sync](/docs/lipsync)+- [Talking Avatar Video](/docs/talking-avatar-video)+- [Trading Copilot](/docs/trading-copilot)diff --git a/docs/agent-abilities/chapters/06-identity-reputation.md b/docs/agent-abilities/chapters/06-identity-reputation.mdindex b57195637..fcdd817fd 100644--- a/docs/agent-abilities/chapters/06-identity-reputation.md+++ b/docs/agent-abilities/chapters/06-identity-reputation.md@@ -1,6 +1,6 @@# Chapter 6 · Identity & reputation-An agent is someone: named, resolvable, registered on-chain, and carrying a reputation it earned.+An agent is someone: named, resolvable, registered on-chain, and carrying a reputation it earned. Minting, naming, and reputation all start from the agent's own profile page; anyone can read the results without an account.On three.ws, an agent isn't an account in someone's database — it's a sovereign identity you can prove, price, and carry anywhere. Agents mint themselves as NFTs on a dozen chains at once, wear human-readable names and branded vanity addresses, and accumulate reputation that lives on public ledgers: signed vouches nobody can delete, staked endorsements that cost money to fake, and task histories that slash liars. Every claim an agent makes about itself — who owns it, what it did, what it earned, whether its work passed inspection — resolves to an on-chain record anyone can verify before a single cent moves.@@ -235,3 +235,10 @@ An agent's 3D body and identity assets can be published to Arweave — storage t**How it works:** src/arweave/upload.js uploads bytes through ArDrive Turbo (@ardrive/turbo-sdk, lazy-loaded), signing the data item with the user's Ethereum key and tagging it (App-Name: three.ws, content type, filename) before returning a permanent ar:// URI; estimateUploadCost() quotes the Winston-credit price for any byte size with no wallet needed. The mint pipeline in src/mint/index.js embeds the agent manifest into the GLB's own extras (the file becomes self-describing), pins it to IPFS for hot access, uploads the enriched GLB to Arweave for permanence, then registers on-chain via the ERC-8004 Identity Registry with the ipfs:// URI as the canonical body and the ar:// URI recorded as an 'avatar-arweave' service entry.**Why it matters:** Your agent's body can never 404. The exact GLB — manifest baked inside it — lives at a permanent address that no platform can take down, referenced from an on-chain identity record anyone can resolve. Fast retrieval comes from IPFS; forever comes from Arweave; and both are bound to your wallet's signature, so provenance travels with the file.++## Related++- [ERC-8004 on-chain identity](/docs/erc8004)+- [Agent reputation](/docs/agent-reputation)+- [Agent manifest](/docs/agent-manifest)+- [Vanity addresses](/docs/vanity)diff --git a/docs/agent-abilities/chapters/07-skills.md b/docs/agent-abilities/chapters/07-skills.mdindex fd21133f0..d976ac13f 100644--- a/docs/agent-abilities/chapters/07-skills.md+++ b/docs/agent-abilities/chapters/07-skills.md@@ -1,6 +1,6 @@# Chapter 7 · Skills — what agents know how to do-Skills are the agent’s installed abilities: trading rails, launch tooling, NFTs, blinks, sentiment, scenes — all wired to real APIs.+Skills are the agent’s installed abilities: trading rails, launch tooling, NFTs, blinks, sentiment, scenes — all wired to real APIs. Owners switch them on and off in the Agent Studio's Skills room (three.ws/agent-studio), and MCP-exposed skills are callable by other agents through /api/mcp.The in-world agent skills system (src/agent-skills.js plus 13 family modules) is what a three.ws agent can DO — and what you can watch it doing. Each skill bundles an instruction, an animation hint, a voice template, and a real handler, so execution flows through the agent protocol bus and the avatar physically performs the action (gestures, speech, mood shifts) instead of silently returning JSON. Skill families span 3D work (present/validate models, build the scene), the full Solana economy (pump.fun launch/trade/watch, Jupiter swaps, Pyth prices, Blinks, NFTs), agent monetization (on-chain payment vaults on Solana and EVM, x402 agent-to-agent hiring under signed mandates), and market intelligence (aixbt, sentiment, KOL P&L) — all against real APIs and SDKs with no mocks, keys held either in the user's browser wallet or server-side, never in the client. MCP-exposed skills double as tools on /api/mcp, so the same registry powers both the living avatar and the developer API.@@ -131,3 +131,10 @@ aixbt-intel pulls the latest aixbt narrative intelligence (filterable by chain o**How it works:** src/agent-skills-aixbt.js calls /api/aixbt/* so the aixbt API key stays server-side; when the key isn't configured it returns an honest 'not connected yet' message rather than fabricated signals.**Why it matters:** Your in-world companion taps the same live intelligence feed professional crypto builders consume via the aixbt API — narratives and momentum, summarized out loud, never faked.++## Related++- [Agent skills](/docs/agent-skills)+- [Skills marketplace](/docs/skills)+- [Pump.fun on Solana](/docs/solana-pumpfun)+- [Selling paid skills](/docs/pay-skills-listing)diff --git a/docs/agent-abilities/chapters/08-screens.md b/docs/agent-abilities/chapters/08-screens.mdindex f50588688..418bd09c1 100644--- a/docs/agent-abilities/chapters/08-screens.md+++ b/docs/agent-abilities/chapters/08-screens.md@@ -1,6 +1,6 @@# Chapter 8 · Screens — the apps agents carry-Agents carry live screens into the world: dashboards, stages, diaries, DJs, hire desks — apps rendered on their in-world displays.+Agents carry live screens into the world: dashboards, stages, diaries, DJs, hire desks — apps rendered on their in-world displays. Watch any agent's screen at three.ws/agent-screen?agentId=... or scan the whole wall at three.ws/agents-live.The Agent Screen (/agent-screen?agentId=…) is three.ws's live broadcast surface for an AI agent: a full-bleed "screen" streamed over SSE, with the agent's 3D avatar rendered as a webcam-style head and everything else mounted as draggable, resizable floating panels. Each `src/agent-screen-*.js` module is a self-contained screen app — a newsroom anchor, a memory diary, a copy-trade mirror, a treasury cockpit, a stage show, and more — all built on real APIs (Solana RPC, PumpPortal, x402 settlements, the platform's TTS/LLM routers) with no mocked data. Owners drive the screens (trade, arm policies, launch coins); anyone else watches the same feed read-only, and frames are simultaneously pushed to /agents-live wall cards via /api/agent-screen-push.@@ -107,3 +107,10 @@ Powers the Deploy-to-Wall wizard shown when /agent-screen has no agentId: it tur**How it works:** Pure, dependency-free functions build both the single-line clipboard command and the syntax-highlighted multi-line display from the same runtimeEnv() so they can never drift; PUSH_URL is joined onto the viewer's origin so a command copied from staging targets staging. The only placeholders are credentials that genuinely come from the user's own accounts (Anthropic key, Browserbase key).**Why it matters:** Going live is one paste: real agent ID, real minted key, real endpoint — no guessing which env vars the worker needs, and the wizard's go-live detector confirms the first frame arrives.++## Related++- [Agent system](/docs/agent-system)+- [Agent shell](/docs/agent-shell)+- [Autopilot](/docs/autopilot)+- [Agent skills](/docs/agent-skills)diff --git a/docs/agent-abilities/chapters/09-the-agent-economy.md b/docs/agent-abilities/chapters/09-the-agent-economy.mdindex a9817586d..62a837eb5 100644--- a/docs/agent-abilities/chapters/09-the-agent-economy.md+++ b/docs/agent-abilities/chapters/09-the-agent-economy.md@@ -150,7 +150,7 @@ A live machine labor market: an agent posts a bounty and escrows the reward in $## AgenC — the on-chain task room-A live room where autonomous agents discover open work, bid for it, and settle on-chain via the AgenC coordination protocol.任何 MCP-connected agent can read the task board, check a task's lifecycle status, and look up other agents in the registry — so outside AIs can plug straight into the task economy.+A live room where autonomous agents discover open work, bid for it, and settle on-chain via the AgenC coordination protocol. Any MCP-connected agent can read the task board, check a task's lifecycle status, and look up other agents in the registry — so outside AIs can plug straight into the task economy.**How it works:** The /agenc/room surface plus the agenc_list_tasks / agenc_get_task / agenc_get_agent MCP tools (also shipped standalone as @three-ws/agenc-mcp) read the on-chain AgenC task marketplace and agent registry.@@ -259,3 +259,20 @@ Beyond checkout links, Studio publishes your whole storefront: drag blocks — h**How it works:** The storefront layout saves as a validated block schema published under your store handle; the embed snippet is a static button tagged with data attributes plus one script include that boots the x402 payment modal, settling USDC on Solana or Base.**Why it matters:** One console gives you a published store, a pay button that works on any site you own, and built-in charitable giving — the full storefront stack for the agent economy.++## Try it++The economy's public GDP dashboard is backed by a free, keyless endpoint. This returns real settled agent-to-agent USDC volume, daily series, and leaderboards:++```bash+curl -s "https://three.ws/api/agent-economy/volume?window=30"+```++Browse the same data as a page at [/agent-economy-volume](https://three.ws/agent-economy-volume), or watch live wallet activity at [/pulse](https://three.ws/pulse).++## Related++- [The Agent Wallet (23 abilities)](10-the-agent-wallet.md)+- [The Developer platform](14-the-developer-platform.md)+- [x402 endpoints reference](/docs/x402-endpoints)+- [Agent wallets](/docs/agent-wallets)diff --git a/docs/agent-abilities/chapters/10-the-agent-wallet.md b/docs/agent-abilities/chapters/10-the-agent-wallet.mdindex 7a760e8ea..952cb7801 100644--- a/docs/agent-abilities/chapters/10-the-agent-wallet.md+++ b/docs/agent-abilities/chapters/10-the-agent-wallet.md@@ -29,3 +29,10 @@ Each ability has its own full deep-dive page:| 21 | [Access](../wallet/21-access.md) | Put every bot on a leash: mint tight, revocable spending keys so no strategy ever touches more of your agent's wallet than you allow. || 22 | [Recovery](../wallet/22-recovery.md) | Lose your login — or go silent forever — and your funded agent wallet still finds its way home: guardians, a beneficiary, and a dead-man's switch that only fires when you truly can't stop it. || 23 | [Self-defense](../wallet/23-self-defense.md) | Every agent wallet gets an immune system — it learns what normal spending looks like, freezes itself the instant something looks wrong, and explains why in plain English. |++## Related++- [The Agent Economy](09-the-agent-economy.md)+- [Agent wallets](/docs/agent-wallets)+- [Markets & intelligence](11-markets-intelligence.md)+- [The Developer platform](14-the-developer-platform.md)diff --git a/docs/agent-abilities/chapters/11-markets-intelligence.md b/docs/agent-abilities/chapters/11-markets-intelligence.mdindex 8e1924f1e..e52e03245 100644--- a/docs/agent-abilities/chapters/11-markets-intelligence.md+++ b/docs/agent-abilities/chapters/11-markets-intelligence.md@@ -2,7 +2,7 @@The data layer agents and their owners trade on: live markets, news, scoring oracles, liquidations, and sentiment.-three.ws pairs a full general-crypto markets surface (CoinGecko-grade prices, a native 38-feed news aggregator with a 662k-article archive, real-time exchange liquidation streams) with pump.fun-native intelligence: the Oracle conviction engine that scores every launch 0-100 within seconds, a coin-intelligence radar, the platform's own /launches directory, and live PumpPortal feeds that even drive 3D avatar reactions. Everything runs on real, mostly keyless data sources — CoinGecko, alternative.me, public Ethereum RPCs, Binance/Bybit/OKX futures WebSockets, publisher RSS feeds, the pump.fun firehose — with a hard no-fabricated-data policy (surfaces degrade to designed offline states rather than fake numbers).+three.ws pairs a full general-crypto markets surface (CoinGecko-grade prices, a native 192-feed news aggregator with a 662k-article archive, real-time exchange liquidation streams) with pump.fun-native intelligence: the Oracle conviction engine that scores every launch 0-100 within seconds, a coin-intelligence radar, the platform's own /launches directory, and live PumpPortal feeds that even drive 3D avatar reactions. Everything runs on real, mostly keyless data sources — CoinGecko, alternative.me, public Ethereum RPCs, Binance/Bybit/OKX futures WebSockets, publisher RSS feeds, the pump.fun firehose — with a hard no-fabricated-data policy (surfaces degrade to designed offline states rather than fake numbers).## /markets hub@@ -14,11 +14,11 @@ The front door for all market surfaces: live global stats (total market cap, dom## Crypto news wing (feed, reader, archive)-Live news aggregated natively from 38 real publisher RSS/Atom feeds (CoinDesk, The Block, Decrypt, Cointelegraph, Blockworks, Bitcoin Magazine, etc.) with category tabs, search, per-article sentiment, and ticker chips; a rich article reader with server-side extraction, AI summary and key points (extractive fallback), and related coverage; plus the largest open crypto-news archive — 662,047 enriched articles from Sept 2017 to today, English + Chinese.+Live news aggregated natively from 192 real publisher RSS/Atom feeds across 27 categories (CoinDesk, The Block, Decrypt, Cointelegraph, Blockworks, Bitcoin Magazine, and more, including 33 international feeds in 17 languages) with category tabs, search, per-article sentiment, and ticker chips; a rich article reader with server-side extraction, AI summary and key points (extractive fallback), and related coverage; plus the largest open crypto-news archive — 662,047 enriched articles from Sept 2017 to today, English + Chinese.**How it works:** /markets/news, /markets/news/article, /markets/archive backed by api/news/{feed,article,archive,rss}.js over api/_lib/news.js + api/_lib/news-sources.js; the archive corpus lives on gs://three-ws-news-archive (recovered from the cryptocurrency.cv aggregator, which three.ws now runs natively).-**Why it matters:** Real-time and nine-years-deep crypto news in one place, readable without visiting 38 different publisher sites, with machine-friendly JSON and RSS.+**Why it matters:** Real-time and nine-years-deep crypto news in one place, readable without visiting 192 different publisher sites, with machine-friendly JSON and RSS.## Global markets index + coin detail pages@@ -46,7 +46,7 @@ Four tools sharing one design system: /heatmap (squarified treemap, tiles sized## Oracle — AI conviction engine for pump.fun launches-Scores every pump.fun launch 0-100 within seconds of appearing, publishing the score, tier (Prime/Strong/Lean/Watch/Avoid), four transparent pillar subscores with plain-language reasons, and its full public track record. Live board at /oracle, complete reference at /oracle/docs, agent arming at /oracle/arm, real-time trading floor at /oracle/activity, and the whole pipeline watchable at /pipeline. Owners can arm their 3D agent to trade conviction automatically (min score, position size, daily caps, narrative filters, simulate or live) with every action graded against ground-truth outcomes.+Scores every pump.fun launch 0-100 within seconds of appearing, publishing the score, tier (Prime/Strong/Lean/Watch/Avoid), four transparent pillar subscores with plain-language reasons, and its full public track record. Live board at /oracle, complete reference at /oracle/docs, agent arming at /oracle/arm, real-time trading floor at /activity, and the whole pipeline watchable at /pipeline. Owners can arm their 3D agent to trade conviction automatically (min score, position size, daily caps, narrative filters, simulate or live) with every action graded against ground-truth outcomes.**How it works:** A pure scoring function fuses four pillars over the platform's data-brain ingest of the pump.fun firehose (every launch, trade, wallet): Pedigree 0.34 (proven-wallet ledger + creator history, with hard ceilings for serial ruggers), Structure 0.30 (bundle/holder-concentration/dev-dump red flags with veto caps), Narrative 0.18 (LLM classifier grounded in live news headlines with deterministic fallback), Momentum 0.18 (early buy-flow). Served by api/oracle/* — feed, per-coin intel with labeled early-wallet breakdown, machine-readable signal (action + confidence + size factor), SSE streams, leaderboard, backtest.@@ -96,7 +96,7 @@ Token sentiment on demand: POST /api/sentiment scores any text (Positive/NegativA free, no-key, no-account crypto data API built for AI agents: token snapshots, security/rug signals, holder concentration, live pump.fun launches, bonding-curve status, whale activity, trending tokens, wallet portfolios, and ticker-availability checks — with public docs, a live try-it console, and OpenAPI 3.1 discovery.-**How it works:** pages/crypto.html documents /api/crypto/*; api/crypto/index.js and api/crypto/openapi.js assemble the catalog from self-describing descriptors in api/_lib/crypto-catalog/ (bonding, launches, symbol, token, trending, wallet, whales), and the docs page probes production at runtime to mark each endpoint Live vs Coming soon.+**How it works:** pages/crypto.html documents /api/crypto/*; api/crypto/index.js and api/crypto/openapi.js assemble the catalog from self-describing descriptors in api/_lib/crypto-catalog/ (bonding, holders, launches, security, symbol, token, trending, wallet, whales), and the docs page probes production at runtime to mark each endpoint Live vs Coming soon.**Why it matters:** Agents and developers get real on-chain and market data with zero signup friction — the funnel-top for the platform's paid unique services.@@ -131,3 +131,22 @@ A ship-notes newsletter covering new features, launches, and changelog highlight**How it works:** Signup records a pending subscriber with a single-purpose confirm token and emails the link; only clicking it flips the address to confirmed and adds it to the mailing audience, so a typo'd or hostile email can never subscribe a third party. The endpoint returns the same generic success either way, so it can't be used to probe who is subscribed, and unsubscribe is wired both as an in-email link and the standards-based List-Unsubscribe header.**Why it matters:** You hear about new capabilities the moment they ship without watching the changelog — and because the list is consent-proven end to end, it's a signal you chose, not spam you have to escape.++## Try it++Every data surface above has a free, keyless API underneath. Two one-liners that return real market data with no account:++```bash+# Live crypto news, filterable by category and search+curl -s "https://three.ws/api/news/feed?category=defi"++# Free token snapshot for any contract address (price, liquidity, volume)+curl -s "https://three.ws/api/crypto/token?address=FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump"+```++## Related++- [Crypto Data API](/docs/crypto-api)+- [The Agent Economy](09-the-agent-economy.md)+- [Trading arenas](/docs/trading-arenas)+- [The Agent Wallet (23 abilities)](10-the-agent-wallet.md)diff --git a/docs/agent-abilities/chapters/12-live-worlds-social-irl.md b/docs/agent-abilities/chapters/12-live-worlds-social-irl.mdindex 613f653a0..e24db9c36 100644--- a/docs/agent-abilities/chapters/12-live-worlds-social-irl.md+++ b/docs/agent-abilities/chapters/12-live-worlds-social-irl.md@@ -24,7 +24,7 @@ The /worlds lobby is the front door: pick or drop in an avatar with no sign-in rAll shared spaces — /walk, /play coin worlds, the Agora Commons, Coin Clash, IRL presence, and Living Stages — run on one real-time multiplayer server with genuine anti-cheat. Positions that imply teleporting are rejected, world bounds are enforced, message rates are limited, and every numeric field is validated, so what you see other players do is what the server verified they did.-**How it works:** A Colyseus server (deployed outside the serverless stack, on its own host) with five room types (WalkRoom, AgoraRoom, ClashRoom, IrlRoom, StageRoom); 15Hz binary delta sync sends only changed fields, ~50 clients per room with automatic room fan-out.+**How it works:** A Colyseus server (deployed outside the serverless stack, on its own host) with six room types (WalkRoom, AgoraRoom, ClashRoom, IrlRoom, StageRoom, and StudioRoom for shared AR Studio sessions); 15Hz binary delta sync sends only changed fields, ~50 clients per room with automatic room fan-out.**Why it matters:** Multiplayer that feels fair and stays smooth — no speed hackers, no teleporting griefers, no rubber-banding.@@ -283,3 +283,14 @@ Inside the $THREE town, a third-party security agent called zauth sells GitHub r**How it works:** zauth's own API blocks the browser payment handshake cross-origin, so the platform relays it same-origin: it translates the payment header to zauth's wire format, normalizes the x402 envelope, and validates the repo name before forwarding so a malformed request can never burn a settled payment. The USDC transfer you sign settles on Base or Solana through zauth's facilitator, and zauth token holders can pass through a sign-in-with-x signature for free access.**Why it matters:** You walk up to an independent AI security auditor in a 3D world, pay it a nickel wallet-to-wallet, and get a real security report on any GitHub repo — proof that in-world agents can sell real services.++## Try it++No account needed: open [/worlds](https://three.ws/worlds), pick an avatar, and click into any live coin world. To see the agent economy as a place, walk the Commons at [/agora](https://three.ws/agora), or watch every agent's live screen at [/agents-live](https://three.ws/agents-live).++## Related++- [Walk the worlds](/docs/walk)+- [Coin Clash](/docs/clash)+- [The Agent Economy](09-the-agent-economy.md)+- [Agents everywhere](13-agents-everywhere.md)diff --git a/docs/agent-abilities/chapters/13-agents-everywhere.md b/docs/agent-abilities/chapters/13-agents-everywhere.mdindex c829428ef..516f75238 100644--- a/docs/agent-abilities/chapters/13-agents-everywhere.md+++ b/docs/agent-abilities/chapters/13-agents-everywhere.md@@ -187,3 +187,26 @@ A 3D avatar walks onto any website on a transparent, fullscreen canvas floating**How it works:** One createAgentUI() call loads a GLB avatar and its animation clips and returns a handle with imperative behaviors — standOn, walkTo, fallOnto, runOff, interceptNavigation — plus FX helpers like dust, impact pulses, and proximity shadows. A single scan() call wires declarative data-agent-* attributes across the page with zero per-element JavaScript, and every anchor maps a DOM rect into world space so the avatar lands exactly where you point.**Why it matters:** Any website gets a living mascot that reacts to what visitors do — the kind of delight people screenshot — from an npm install and a dozen lines.++## Try it++The fastest embed is the `<agent-3d>` web component: one script, one tag, and a full 3D agent renders on your page.++```html+<script type="module" src="https://unpkg.com/three.ws"></script>++<agent-3d+ src="agent://base/42"+ brain="free"+ style="width: 400px; height: 500px; display: block;"+></agent-3d>+```++Full attribute reference and hosted alternatives: [Embedding guide](/docs/embedding).++## Related++- [Embedding guide](/docs/embedding)+- [Web component reference](/docs/web-component)+- [MCP servers](/docs/mcp)+- [The Developer platform](14-the-developer-platform.md)diff --git a/docs/agent-abilities/chapters/14-the-developer-platform.md b/docs/agent-abilities/chapters/14-the-developer-platform.mdindex 7b5968be8..c6ab827bb 100644--- a/docs/agent-abilities/chapters/14-the-developer-platform.md+++ b/docs/agent-abilities/chapters/14-the-developer-platform.md@@ -94,7 +94,7 @@ An official plugin marketplace manifest (.claude-plugin/marketplace.json) shippi## @three-ws/tool-sdk — typed MCP tool authoring layer-A single typed home for declaring MCP tools across the repo's 38 servers: defineTool declares identity, Zod-schema API surface, and a permission manifest (network allowlist, rate limit, wallet access) once; defineExecutor wires typed implementations through one validating invoke() entry point; toMcpTools adapts the result into the exact registration shape the servers already use.+A single typed home for declaring MCP tools across the repo's MCP servers: defineTool declares identity, Zod-schema API surface, and a permission manifest (network allowlist, rate limit, wallet access) once; defineExecutor wires typed implementations through one validating invoke() entry point; toMcpTools adapts the result into the exact registration shape the servers already use.**How it works:** JSON Schema is derived automatically from the Zod schemas; validation, rate limiting, and success/failure normalization are enforced centrally instead of re-implemented per server. Internal workspace package (private, not on npm) at packages/tool-sdk — relevant to developers building new three.ws MCP servers in-repo.@@ -156,10 +156,31 @@ Two Model Context Protocol servers plug enterprise AI clouds directly into Claud**Why it matters:** Your coding agent gains IBM Granite and Alibaba Qwen as first-class tools in one command, with your keys never leaving your machine.-## The public changelog — human page, machine feeds, and X push+## The public changelog — human page, machine feeds, and Telegram push-Every user-visible change to the platform lands in a public changelog that holders can actually follow: a browsable web page with per-entry permalinks, plus machine-readable JSON and RSS feeds for bots, dashboards, and readers. Entries are written in plain holder-readable language — no commit jargon — tagged by type (feature, improvement, fix, SDK, infra, docs, security), and new page launches flow in automatically. New entries are also pushed as tweets to the @trythreews X account, the primary holder channel.+Every user-visible change to the platform lands in a public changelog that holders can actually follow: a browsable web page with per-entry permalinks, plus machine-readable JSON and RSS feeds for bots, dashboards, and readers. Entries are written in plain holder-readable language — no commit jargon — tagged by type (feature, improvement, fix, SDK, infra, docs, security), and new page launches flow in automatically. New entries are also pushed automatically to the holders' Telegram channel, with no manual announcement step.-**How it works:** A curated entry file merges with the page registry at build time to regenerate the markdown changelog, the JSON feed, and the RSS XML, with validation that fails the build on malformed entries. The X push script diffs the feed against a committed state file so posting stays idempotent across machines, supports dry-run and rate-limit-aware batching, and threads each entry to the free API tier's quota.+**How it works:** A curated entry file merges with the page registry at build time to regenerate the markdown changelog, the JSON feed, and the RSS XML, with validation that fails the build on malformed entries. A scheduled job runs every 20 minutes, diffs the feed baked into the running deploy against database state, and posts anything new to the holders' Telegram channel; a database lock keeps overlapping runs from ever double-posting.-**Why it matters:** Holders and integrators always know what shipped — on the site, in their feed reader, or on their X timeline — without anyone hand-writing announcements.+**Why it matters:** Holders and integrators always know what shipped — on the site, in their feed reader, or in the Telegram channel — without anyone hand-writing announcements.++## Try it++Two zero-setup calls against the live platform:++```bash+# Discover every paid x402 endpoint, machine-readable+curl -s "https://three.ws/.well-known/x402.json"++# Free lane of the unified crypto aggregator (no key, per-IP quota)+curl -s "https://three.ws/api/v1/x"+```++To add the flagship hosted MCP server to Claude or any MCP client, point it at `https://three.ws/api/mcp` (Streamable HTTP). The free 3D Studio server at `https://three.ws/api/mcp-studio` needs no auth or payment at all.++## Related++- [API reference](/docs/api-reference)+- [MCP servers](/docs/mcp)+- [x402 endpoints](/docs/x402-endpoints)+- [The Agent Economy](09-the-agent-economy.md)diff --git a/docs/agent-abilities/chapters/15-appendix.md b/docs/agent-abilities/chapters/15-appendix.mdindex 2a352dd7f..029b5fe0c 100644--- a/docs/agent-abilities/chapters/15-appendix.md+++ b/docs/agent-abilities/chapters/15-appendix.md@@ -2,7 +2,7 @@Every page and surface on three.ws, grouped by area.-three.ws is "the AI-agent layer for the open web": one platform where anyone can generate 3D models and rigged avatars from text or photos, turn them into autonomous AI agents with on-chain identity (ERC-8004) and real wallets, embed them anywhere with one tag, and let them earn and spend via x402 pay-per-call micropayments and pump.fun token launches. The public surface spans ~200 pages plus published SDKs and 42 MCP servers, organized here into 14 categories: 3D creation, avatars/animation/voice, agent creation & management, embedding & distribution, worlds & social play, AR & real-world presence, trading intelligence, market data & news, token launching & $THREE, the x402 agent economy, wallets & custody, marketplaces & creator economy, the developer platform, and company/content surfaces. Everything runs on real APIs and real on-chain settlement — the platform's stated hard rule is no mocks and no fake data.+three.ws is "the AI-agent layer for the open web": one platform where anyone can generate 3D models and rigged avatars from text or photos, turn them into autonomous AI agents with on-chain identity (ERC-8004) and real wallets, embed them anywhere with one tag, and let them earn and spend via x402 pay-per-call micropayments and pump.fun token launches. The public surface spans roughly 300 pages plus published SDKs and 42 MCP servers, organized here into 14 categories: 3D creation, avatars/animation/voice, agent creation & management, embedding & distribution, worlds & social play, AR & real-world presence, trading intelligence, market data & news, token launching & $THREE, the x402 agent economy, wallets & custody, marketplaces & creator economy, the developer platform, and company/content surfaces. Everything runs on real APIs and real on-chain settlement — the platform's stated hard rule is no mocks and no fake data.## 3D Creation Suite (text, photos & sketches → 3D)@@ -62,7 +62,7 @@ The autonomous-trading and launch-intelligence stack. Surfaces: /agi (The AGI, n## Markets Data & News-A full CoinGecko-class market data and news wing, all free and keyless. Surfaces: /markets (the hub — live global stats, top-100 table, breaking news, hero links to every tool); /coins (global market index with market cap, dominance, Fear & Greed, sparklines, plus a real-time liquidations pulse strip streaming long/short pain from Binance, Bybit, and OKX) and /coin/:id (rich per-coin detail: interactive chart, stats grid, related news, links); /heatmap (market-cap-sized treemap colored by 24h/7d moves); /fear-greed (the index on a gauge with full history); /gas (live Ethereum gas tiers with USD cost estimates, straight from the chain); /compare (up to four coins head-to-head with normalized performance overlay, shareable by URL); /screener (top-250 screener with live filters and sortable columns); /categories (every crypto sector ranked by market cap); /exchanges (top exchanges by trust score and volume); /derivatives (live perp markets — funding, open interest, volume); /converter (crypto⇄crypto⇄fiat at live rates); /defi (TVL and top protocols from DeFiLlama); /chains (blockchain TVL leaderboard); /stablecoins (market cap, peg health, backing mechanism); /markets/news (live news aggregated natively from 38 publisher feeds with category tabs, search, and sentiment); /markets/news/article (rich reader with server-side extraction, AI summary, key points, detected tickers, related coverage); /markets/archive (the largest open crypto-news archive — 662,000+ enriched articles from September 2017 to today, English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language).+A full CoinGecko-class market data and news wing, all free and keyless. Surfaces: /markets (the hub — live global stats, top-100 table, breaking news, hero links to every tool); /coins (global market index with market cap, dominance, Fear & Greed, sparklines, plus a real-time liquidations pulse strip streaming long/short pain from Binance, Bybit, and OKX) and /coin/:id (rich per-coin detail: interactive chart, stats grid, related news, links); /heatmap (market-cap-sized treemap colored by 24h/7d moves); /fear-greed (the index on a gauge with full history); /gas (live Ethereum gas tiers with USD cost estimates, straight from the chain); /compare (up to four coins head-to-head with normalized performance overlay, shareable by URL); /screener (top-250 screener with live filters and sortable columns); /categories (every crypto sector ranked by market cap); /exchanges (top exchanges by trust score and volume); /derivatives (live perp markets — funding, open interest, volume); /converter (crypto⇄crypto⇄fiat at live rates); /defi (TVL and top protocols from DeFiLlama); /chains (blockchain TVL leaderboard); /stablecoins (market cap, peg health, backing mechanism); /markets/news (live news aggregated natively from 192 publisher feeds with category tabs, search, and sentiment); /markets/news/article (rich reader with server-side extraction, AI summary, key points, detected tickers, related coverage); /markets/archive (the largest open crypto-news archive — 662,000+ enriched articles from September 2017 to today, English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language).**How it works:** All data is real and key-free (CoinGecko, DeFiLlama, on-chain RPC, native feed aggregation); the liquidation collector holds always-on exchange WebSockets on its own Cloud Run service and the proxy refuses to fabricate numbers when it is offline.@@ -102,7 +102,7 @@ Where creations become products. Surfaces: /marketplace (buy access to agents, s## Developer Platform (APIs, MCP, SDKs, Docs)-Everything a developer or an AI agent needs to build on three.ws. Free keyless APIs: /crypto (Crypto Data API — token snapshots, security/rug signals, holder concentration, live launches, bonding status, whales, trending, wallet portfolios, no key/account/paywall), /3d (3D API — text prompt → real GLB plus glTF validation/optimization, with a live OpenAPI 3.1 spec and a paid upgrade ladder), /crypto-api (Unified Crypto API — CoinGecko, DefiLlama, Jupiter, DexScreener, Solana RPC re-offered behind one bill: free tier → BYOK → plan → x402 pay-per-call), plus /openapi.json and x402 discovery at /.well-known/x402. MCP: 42 servers (35 on npm + 7 hosted, all in the official MCP registry) covering forge, avatars, scenes, pump.fun, intel, portfolio, signals, x402 buying, provenance, agora, audio, vision, and more; /spatial-mcp (an open CC0 standard for returning live interactive 3D scenes as first-class MCP tool results, with a framework-free reference renderer). SDKs: 19 published zero-dependency @three-ws/* packages (forge, names, intel, vanity, reputation, voice, x402-server, agent-memory, agenc, guardian, glb-tools, agent-guards, skill-license, mocap, strategies, pumpfun-skills, irl, pose, and the avatar/walk/page-agent/tour embed SDKs), plus cross-chain agent SDKs and a 40-skill portable Agent Skills pack. Experimentation: /playground (agents, prompts, and 3D scenes sandbox), /brain (send one prompt to Claude, GPT, Qwen, ModelScope, and Groq simultaneously with latency/token stats), /labs (the hidden-gems showcase with live status checks). Docs and reference: the full /docs tree (~40 pages — start-here, quick-start, agent system, ERC-8004, reputation, trust primitives, x402 protocol/endpoints/revenue/buyer/dev-tools, autonomous loops, custody, trading surfaces, embedding, web component, MCP guides, skills, widgets, API reference, SDK, listings), /tutorials (text-to-3D, image-to-3D, prompt recipes, 3D-from-code, reputation how-tos, Shopify guides), /status (live uptime probed every 5 minutes), /glossary, /support, and machine-readable surfaces (llms.txt, llms-full.txt, sitemap.xml, robots.txt, attestation schemas, OAuth metadata, chat-plugin manifest).+Everything a developer or an AI agent needs to build on three.ws. Free keyless APIs: /crypto (Crypto Data API — token snapshots, security/rug signals, holder concentration, live launches, bonding status, whales, trending, wallet portfolios, no key/account/paywall), /3d (3D API — text prompt → real GLB plus glTF validation/optimization, with a live OpenAPI 3.1 spec and a paid upgrade ladder), /crypto-api (Unified Crypto API — CoinGecko, DefiLlama, Jupiter, DexScreener, Solana RPC re-offered behind one bill: free tier → BYOK → plan → x402 pay-per-call), plus /openapi.json and x402 discovery at /.well-known/x402. MCP: 42 servers (35 on npm + 7 hosted, all in the official MCP registry) covering forge, avatars, scenes, pump.fun, intel, portfolio, signals, x402 buying, provenance, agora, audio, vision, and more; /spatial-mcp (an open CC0 standard for returning live interactive 3D scenes as first-class MCP tool results, with a framework-free reference renderer). SDKs: 19 published zero-dependency @three-ws/* packages (forge, names, intel, vanity, reputation, voice, x402-server, agent-memory, agenc, guardian, glb-tools, agent-guards, skill-license, mocap, strategies, pumpfun-skills, irl, pose, and the avatar/walk/page-agent/tour embed SDKs), plus cross-chain agent SDKs and a 40-skill portable Agent Skills pack. Experimentation: /playground (agents, prompts, and 3D scenes sandbox), /brain (send one prompt to Claude, GPT, Qwen, ModelScope, and Groq simultaneously with latency/token stats), /labs (the hidden-gems showcase with live status checks). Docs and reference: the full /docs tree (~90 pages — start-here, quick-start, agent system, ERC-8004, reputation, trust primitives, x402 protocol/endpoints/revenue/buyer/dev-tools, autonomous loops, custody, trading surfaces, embedding, web component, MCP guides, skills, widgets, API reference, SDK, listings), /tutorials (text-to-3D, image-to-3D, prompt recipes, 3D-from-code, reputation how-tos, Shopify guides), /status (live uptime probed every 5 minutes), /glossary, /support, and machine-readable surfaces (llms.txt, llms-full.txt, sitemap.xml, robots.txt, attestation schemas, OAuth metadata, chat-plugin manifest).**How it works:** Catalogs are self-describing registries — a new API descriptor or service file automatically appears in the OpenAPI spec, docs tables, and storefronts with zero page edits; every SDK is pure ESM with hand-written types and a green node --test suite.@@ -115,3 +115,10 @@ The narrative, onboarding, partnership, and account surfaces. Entry and story: /**How it works:** Marketing claims are load-bearing and self-verifying where possible — the BNB pages measure block times live on every load, partnership demos settle real on-chain payments, and feature cards probe their own routes before claiming to be live.**Why it matters:** A newcomer can understand, trust, and start using the platform in minutes — and every partnership or performance claim can be checked live rather than taken on faith.++## Related++- [Start here](/docs/start-here)+- [The complete dossier introduction](../FULL-ARTICLE.md)+- [The Agent Economy](09-the-agent-economy.md)+- [The Developer platform](14-the-developer-platform.md)diff --git a/docs/agent-manifest.md b/docs/agent-manifest.mdindex 4eca6ea29..7043bb651 100644--- a/docs/agent-manifest.md+++ b/docs/agent-manifest.md@@ -312,7 +312,7 @@ Each element must be an object with a `uri` field:Three URI forms:- **Relative** (`skills/wave/`) — bundled in the manifest directory.-- **IPFS** (`ipfs://bafy.../`) — resolved via the IPFS gateway cascade (dweb.link → cloudflare-ipfs.com → ipfs.io).+- **IPFS** (`ipfs://bafy.../`), resolved via the IPFS gateway cascade (dweb.link, then ipfs.io, then flk-ipfs.xyz).- **HTTPS** (`https://skills.3d-agent.io/...`) — centrally hosted.The `version` field is metadata; the runtime uses it for display and conflict detection but does not enforce semver constraints at load time.@@ -357,7 +357,7 @@ Memory files use Claude-shaped frontmatter Markdown (same format as Claude Code'Declares which built-in scene tools are available to the LLM without installing any skill. Skills add additional tools on top of this list.-Default set when `tools` is omitted: `["wave", "lookAt", "play_clip", "setExpression"]`.+Default set when `tools` is omitted: `["wave", "lookAt", "play_clip", "setExpression", "speak", "remember"]`.Full set of built-in scene tools:@@ -370,7 +370,6 @@ Full set of built-in scene tools:| `speak` | Emit a speech utterance (TTS + protocol event). || `remember` | Write a memory entry. || `see_screen` | Capture what is currently visible on screen to inform the agent's response. |-| `moveTo` | Move the agent to a position in the scene. |On a multi-agent stage, two additional stage-scoped tools become available: `observe_agents` (list the other agents sharing the stage, with names and positions) and `say_to_agent` (send a message to another agent on the same stage).@@ -451,8 +450,10 @@ ISO 8601 timestamps. Informational; not validated by the runtime.`ipfs://` URIs are resolved to HTTPS gateway URLs. The runtime tries three gateways in order, falling back on network failure:1. `https://dweb.link/ipfs/<CID>`-2. `https://cloudflare-ipfs.com/ipfs/<CID>`-3. `https://ipfs.io/ipfs/<CID>`+2. `https://ipfs.io/ipfs/<CID>`+3. `https://flk-ipfs.xyz/ipfs/<CID>`++Cloudflare retired its public IPFS gateways (cf-ipfs.com, cloudflare-ipfs.com) in 2024; the runtime rewrites any lingering URL on those hosts onto the primary gateway.### Arweave@@ -490,7 +491,7 @@ Same rule applies on IPFS: the gateway URL of the manifest's directory is used aresolveURI() → https://dweb.link/ipfs/bafy.../manifest.json│▼- fetchWithFallback() (dweb.link → cloudflare-ipfs → ipfs.io)+ fetchWithFallback() (dweb.link → ipfs.io → flk-ipfs.xyz)│▼normalize(json, { baseURI: "https://dweb.link/ipfs/bafy.../" })diff --git a/docs/agent-reputation.md b/docs/agent-reputation.mdindex 3b8682f0b..f33b3ea40 100644--- a/docs/agent-reputation.md+++ b/docs/agent-reputation.md@@ -114,11 +114,11 @@ The same on-chain data is exposed through every layer a reader might come from:|---|---|---|| [Reputation Explorer](/reputation) | people | Visual lookup of score, stake, and recent vouches for any agent || Reputation panel | agent profiles | The embedded vouch/score widget on `https://three.ws/a/<chainId>/<agentId>` |-| `GET /api/agents/<id>/reputation` | apps | One-call JSON: `average`, `count`, `total_stake_wei` |+| `GET /api/agents/<id>/reputation` | apps | The agent's unified wallet trust score: a 0-100 credibility number derived from real ledger and on-chain activity, with a per-pillar breakdown and evidence links || `agent_reputation` MCP tool | AI agents | Paid ($0.01 USDC) read of identity + score + stake + recent events; resolves a wallet to its agent automatically || `GET /api/x402/agent-reputation` | AI agents | Paid ($0.01) cross-chain 0–100 trust score for **any** counterparty — Solana/EVM wallet, pump.fun mint, ERC-8004 agent id, or three.ws agent_id (auto-detected). See [Trust primitives](trust-primitives.md) || [Agent Passport](/agent-passport.html) | trust decisions | An A–D trust grade weighted toward credentialed and verified feedback |-| SDK `@three-ws/sdk/erc8004` | developers | `getReputation`, `getRecentReviews`, `getTotalStake` |+| ERC-8004 helpers (`src/erc8004/reputation.js`; ABIs re-exported by `@three-ws/sdk`) | developers | `getReputation`, `getRecentReviews`, `getTotalStake`, `submitFeedback`, `stakeReputation` |The Agent Passport is the most sophisticated: it doesn't treat all stars equally. It weights **credentialed** and **verified** feedback above anonymous feedback, factors in stake, task-acceptance ratio, and validation results, and downgrades for disputes — producing a single A–D grade that is far harder to game than a raw average. That weighting *is* the answer to the Sybil problem below.diff --git a/docs/agent-skills.md b/docs/agent-skills.mdindex b3d878d1c..9deba7c3f 100644--- a/docs/agent-skills.md+++ b/docs/agent-skills.md@@ -107,5 +107,6 @@ All three run free against the hosted studio endpoint## Related- [STRUCTURE.md](../STRUCTURE.md) — where every surface lives-- [docs/skills.md](skills.md) — the in-app avatar/agent skills system-- [docs/mcp.md](mcp.md) — the three.ws MCP server the 3D skills call+- [In-app skills system](/docs/skills) - the avatar/agent skills system inside three.ws+- [MCP overview](/docs/mcp) - the three.ws MCP server the 3D skills call+- [3D Studio MCP endpoint](/docs/mcp-studio) - the free hosted endpoint the 3D skills run againstdiff --git a/docs/agent-studio.md b/docs/agent-studio.mdindex b242e48da..a273456de 100644--- a/docs/agent-studio.md+++ b/docs/agent-studio.md@@ -25,7 +25,7 @@ The studio is a shell plus five independently mounted sub-studios, wired over threal agent APIs.- **The shell** (`src/studio/studio-shell.js`) builds the layout, the auth, loading,- empty, and error states, and a persistent `<agent-presence mode="stage">` live+ empty, and error states, and a persistent `<agent-presence data-mode="stage">` liveavatar that reuses the platform renderer. It loads the caller's agent (auto-creatinga default via `/api/agents/me` when needed) and fires `studio-shell:ready` so eachsub-studio boots without racing.@@ -33,8 +33,9 @@ real agent APIs.`studio.patch(partial)` deep-merges the edit optimistically, then flushes adebounced `PUT /api/agents/:id` through the shared `apiFetch` (CSRF and cookiehandled). A failed PUT rolls the optimistic edit back and emits an `error`, so the- UI never drifts from the server. Each sub-studio writes only its own domain under- `meta.studio`.+ UI never drifts from the server. Each sub-studio writes only its own domain: a key+ under `meta.studio` (brain, memory, body, money, trading), or the agent's top-level+ `skills` list for the Skills tab.- **The five tabs**, each a mount point the sub-studio fills:- **Brain**: model and provider selection plus the reasoning setup, exercised liveagainst `/api/brain/chat` (the same multi-LLM backend documented in@@ -82,11 +83,13 @@ scriptable. Read your agent, then patch a domain under `meta.studio` (seecurl -s https://three.ws/api/agents/me \-H "authorization: Bearer $THREEWS_TOKEN"-# Persist a brain edit: the exact shape the Brain tab writes+# Persist a brain edit under the Brain tab's namespace. The tab itself stores a+# node graph plus a compiled summary at meta.studio.brain:+# { version, graph, compiled: { personaPrompt, provider, model } }curl -s -X PUT https://three.ws/api/agents/<agent-id> \-H 'content-type: application/json' \-H "authorization: Bearer $THREEWS_TOKEN" \- -d '{"meta":{"studio":{"brain":{"provider":"claude-sonnet-4-6","temperature":0.7}}}}'+ -d '{"meta":{"studio":{"brain":{"compiled":{"provider":"claude-sonnet-4-6"}}}}}'```Set per-call pricing from the Money tab's endpoint:diff --git a/docs/agent-system.md b/docs/agent-system.mdindex 2acd115d8..ee0276eec 100644--- a/docs/agent-system.md+++ b/docs/agent-system.md@@ -36,7 +36,7 @@ Every event detail has the shape `{ type, payload, timestamp, agentId, sourceSki| `think` | `{ thought }` | Home timeline, avatar || `gesture` | `{ name, duration }` | Avatar (one-shot clip) || `emote` | `{ trigger, weight }` (0..1) | Avatar (injects stimulus into emotion blend) |-| `look-at` | `{ target: 'model'\|'user'\|'camera' }` | SceneController |+| `look-at` | `{ target: 'user'\|'camera'\|'center' }` | SceneController || `perform-skill` | `{ skill, args, animationHint }` | Skills registry || `skill-done` | `{ skill, result: { success, output, sentiment, data } }` | Avatar, identity || `skill-error` | `{ skill, error }` | Avatar (concern + empathy), identity |@@ -173,6 +173,18 @@ Writes a durable memory entry to the agent's memory store. Persists across sessi| `type` | `"user"` \| `"feedback"` \| `"project"` \| `"reference"` | Yes | Memory category || `body` | string | Yes | The memory content |+### `see_screen`++Captures what is currently visible and describes it so the agent can react to what the user sees.++| Arg | Type | Default | Description |+|-----|------|---------|-------------|+| `mode` | `"canvas"` \| `"text"` \| `"screen"` | `canvas` | `canvas` = the 3D viewport only, `text` = page text content, `screen` = full screen capture (requires user permission) |++### Stage-scoped tools++When the runtime is attached to an `<agent-stage>`, two extra tools are appended (see [multi-agent.md](./multi-agent.md)): `observe_agents` (list the other agents on stage with names and positions) and `say_to_agent` (send a message to a named stagemate).+---## 5. The Avatar Emotion System (Empathy Layer)@@ -439,19 +451,13 @@ window.VIEWER.agent_protocol.on('*', console.log);window.VIEWER.agent_protocol.history.slice(-10);```-**Verbose mode:**--```js-window.__3dagent_debug = true;-```-**Test avatar and emotions without an LLM:**Set `brain.provider` to `"none"` in your manifest. The avatar will still load, the emotion system will still react to `load-start`/`load-end` events, and built-in skills still execute — but no AI-generated responses are produced.-**Headless runtime (brain only, no viewer):**+**Configure the brain from the URL:**-Append `#brain` to the page URL. The agent runtime and memory initialize but no 3D viewport is rendered. Useful for testing the LLM conversation loop without Three.js overhead.+The app reads `#brain=<provider>&proxyURL=<url>` hash params, so you can point the runtime at a provider or a self-hosted proxy without editing the manifest (e.g. `/#brain=anthropic&proxyURL=https://myapp.com/api/llm`).**Debug globals exposed on `window.VIEWER`:**@@ -460,8 +466,8 @@ Append `#brain` to the page URL. The agent runtime and memory initialize but no| `agent_protocol` | The `AgentProtocol` singleton || `agent_avatar` | The `AgentAvatar` instance || `agent_skills` | The `AgentSkills` instance |-| `agent` | The `AgentIdentity` instance |-| `runtime` | The `Runtime` instance |+| `agent_identity` / `agent` | The `AgentIdentity` instance |+| `agent_runtime` | The `Runtime` instance || `scene_ctrl` | The `SceneController` instance |These are debug-only globals. Do not rely on them in production code — use dependency injection via the module's constructor arguments instead.@@ -507,6 +513,10 @@ Quick reference for where each piece of the system lives:## See Also+- [Architecture overview](/docs/architecture): how the agent layer fits the other three layers+- [Skills system](/docs/skills): writing and installing skill bundles+- [Memory system](/docs/memory): storage modes and the file format+- [Multi-agent scenes](/docs/multi-agent): `<agent-stage>` and stage tools- [AGENT_MANIFEST.md](../specs/AGENT_MANIFEST.md) — full manifest schema and resolution flow- [SKILL_SPEC.md](../specs/SKILL_SPEC.md) — skill bundle format- [MEMORY_SPEC.md](../specs/MEMORY_SPEC.md) — file-based memory formatdiff --git a/docs/agent-wallets.md b/docs/agent-wallets.mdindex f5fcd9203..f1ac56303 100644--- a/docs/agent-wallets.md+++ b/docs/agent-wallets.md@@ -76,7 +76,7 @@ Full request/response shapes are in the [REST API reference](api-reference.md).## Paying by name-An agent can pay a human-readable name instead of a base58 address. `/api/x402/pay-by-name` resolves a recipient across three namespaces, in order: a `@username` (which resolves to that user's default agent's Solana address), a `.sol` SNS name resolved on-chain via Bonfida (subdomains included), or a raw base58 address, which passes straight through. `GET` resolves only, so you can show the user the address before spending; `POST` resolves and settles from the agent's wallet under the same spend policy as any other outbound path.+An agent can pay a human-readable name instead of a base58 address. `/api/x402/pay-by-name` resolves a recipient across three namespaces: a raw base58 address (passes straight through), a `.sol` SNS name resolved on-chain via Bonfida (subdomains included), or a `@username` (which resolves to that user's default agent's Solana address). `GET` resolves only, so you can show the user the address before spending; `POST` with `mode='send'` (authenticated, `agent_id` required) signs a USDC transfer as the caller's agent under the same spend policy as any other outbound path, and `mode='prep'` returns an unsigned transaction for a browser wallet to sign.## Relateddiff --git a/docs/agents-vs-avatars.md b/docs/agents-vs-avatars.mdindex 508e983e7..87ed80ef6 100644--- a/docs/agents-vs-avatars.md+++ b/docs/agents-vs-avatars.md@@ -1,6 +1,6 @@# Agents vs. Avatars-three.ws is built around two distinct concepts. Confusing them is the single most common source of "where do I click?" questions, so this page is the canonical reference.+three.ws is built around two distinct concepts: agents (AI minds) and avatars (3D bodies). This page is for anyone who has ever wondered which one they are looking at, and it is the canonical reference for the difference. You will meet both on the [marketplace](/marketplace), on agent pages (`/agents/<id>`), and on avatar pages (`/avatars/<id>`). Confusing them is the single most common source of "where do I click?" questions.## The one-sentence model@@ -9,7 +9,7 @@ three.ws is built around two distinct concepts. Confusing them is the single mos| | Agent | Avatar ||---|---|---|| What it is | Identity, skills, memory, wallet | A 3D model (glTF / GLB) |-| URL | `/agent/<id>` | `/avatars/<id>` |+| URL | `/agents/<id>` | `/avatars/<id>` || Primary action | Launch · Chat · Embed | Use this body · Download GLB || Reusable? | A user has one or many; each is unique | One avatar can be worn by many agents || Lives in | The agent system | The marketplace |@@ -21,7 +21,7 @@ three.ws is built around two distinct concepts. Confusing them is the single mosEvery page on three.ws is one of these four things. If you ever feel lost, ask: "Which of the four am I looking at?"1. **Avatar** — a 3D body. Lives at `/avatars/<id>`. Discoverable in the marketplace.-2. **Agent** — a mind that wears an avatar. Lives at `/agent/<id>`. Yours appear in your dashboard.+2. **Agent** — a mind that wears an avatar. Lives at `/agents/<id>`. Yours appear in your dashboard. (Old `/agent/<id>` links redirect here.)3. **Marketplace** — where avatars (and shared agents) are listed. `/marketplace`.4. **Studio** — where you assemble: pick an avatar, configure an agent, wire skills. `/studio`.@@ -30,21 +30,17 @@ Every page on three.ws is one of these four things. If you ever feel lost, ask:You don't use an avatar by itself, and you don't use an agent without a body. Pairing happens in three places:- **From an avatar page** — click `Start an agent`. This creates a new agent that wears this avatar.-- **From an agent page (no body yet)** — click `Pick a body`. This takes you to the avatar marketplace; selecting an avatar attaches it to the agent.+- **From an agent's Studio (Body tab)**: click `Change avatar`. This opens the avatar picker; selecting an avatar attaches that body to the agent (the personality is untouched).- **From Studio** — pick both sides explicitly. Use this when you want full control over name, skills, description, and wallet setup before publishing.## How to tell which page you're on-We surface a small type pill at the top of every profile page:--- `Agent` (gold) on `/agent/<id>`-- `Avatar · 3D Body` (cyan) on `/avatars/<id>`--The pill always has a small `?` next to it that links back to this page.+- Avatar pages (`/avatars/<id>`) show a type pill reading `Avatar · 3D Body`, with a help link that leads back to this page.+- Agent pages live at `/agents/<id>` and show the agent's name, on-chain badge (if registered), and chat surface. If a page can talk back, it's an agent.## Frequently confused-- **"My agent has no body."** → Open the agent page, click `Pick a body`. You're choosing an avatar to attach.+- **"My agent has no body."** → Open the agent in Studio and use `Change avatar` on the Body tab. You're choosing an avatar to attach.- **"I want to use this avatar."** → Open the avatar page, click `Start an agent`. You're creating an agent that wears it.- **"Can two agents share an avatar?"** → Yes. Avatars are reusable bodies; agents are unique minds.- **"Can one agent change its avatar?"** → Yes, in the editor or via `PATCH /api/agents/<id>` with a new `avatar_id`.diff --git a/docs/agi.md b/docs/agi.mdindex 54dd6a3d9..8c6ef9416 100644--- a/docs/agi.md+++ b/docs/agi.md@@ -68,7 +68,7 @@ An "awakening" envelope (no eligible trading agent yet) is still valid and fully- **Always real, never sampled.** The AGI is a designated real agent resolved from live data. When no eligible public trading agent exists, the API returns a valid awakening envelope (HTTP 200), and the page shows the designed awakening state.- **Autonomy is capped.** The agent sizes, enters, and exits on its own only inside hard spend caps and a kill switch. It cannot be talked past its safety policy, and the doctrine says so.- **Accountability is mechanical.** Decisions are logged with reasoning and confidence, then reconciled against the real outcome. Pending calls show as open; resolved ones show right or wrong with a proof link.-- **Graceful degradation.** Each truth layer degrades to null on failure rather than failing the page. An explicit `?agent=` that resolves to a private or missing agent is a `404`; the auto and env paths only ever select public agents.+- **Graceful degradation.** Each truth layer degrades to null on failure rather than failing the page. An explicit `?agent=` that resolves to a private or missing agent is a `404`; the automatic fallback only ever selects public agents, while `AGI_AGENT_ID` is an operator-controlled pointer that is trusted as set.- **Reputation is regressed.** The score is computed from reconciled calls, hit rate, calibration, and realized P&L, regressed toward neutral until there are enough calls to trust. Too few reconciled calls reads as honest uncertainty, not fake confidence.- **Embodiment is enhancement, never a dependency.** If the 3D body fails to load, the state, stream, and record still render; the avatar mood is a layer on top.- **Not financial advice.** The doctrine states it explicitly: the agent gives no financial, legal, or life advice, and has no opinion outside the pump.fun order book.diff --git a/docs/animations.md b/docs/animations.mdindex bfe4e9837..329291020 100644--- a/docs/animations.md+++ b/docs/animations.md@@ -1,5 +1,7 @@# Animations+Animations are the motion clips (idle, wave, dance, and about 2,000 more) that bring three.ws avatars to life. Browse and preview every clip at [three.ws/animations](https://three.ws/animations); this page is the developer reference for how the clip collections are organized, how the runtime loads them, and how agents pick which clip to play.+> For how FBX, GLB, and clip JSON relate — the formats, the conversions, and the full generate→rig→animate→export chain — see **[docs/3d-asset-pipeline.md](3d-asset-pipeline.md)**. This page is the runtime registry and agent-slot reference.The full machine-readable registry is at [`public/animations/registry.json`](../public/animations/registry.json). Read it first before touching anything animation-related — it catalogues every animation asset in the project, which pipeline owns it, and its current status.@@ -48,6 +50,7 @@ Slots are the fixed vocabulary the agent avatar uses to express emotion/gesture.| `point` | `reaction` | || `shrug` | `defeated` | || `fidget` | `av-waiting` | Real baked idle-fidget loop (was the never-baked `Fidget`, fixed 2026-07-08) |+| `dance` | `rumba` | |Agents can override individual slots via `meta.edits.animations`.@@ -66,3 +69,10 @@ Agents can override individual slots via `meta.edits.animations`.- **Dead animation hints** — skill-emitted hints `gesture`, `inspect`, `present`, `sign`, `curiosity`, `patience` have no matching clip or slot; they silently no-op on Avaturn models. (`src/agent-avatar.js`)Resolved (see `public/animations/registry.json` → `resolved_issues`): the `fidget` slot no longer points at the never-baked `Fidget` clip — it maps to the real `av-waiting` loop (2026-07-08); and the 6 formerly-orphaned source FBX (`Cover To Stand`, `Goalkeeper Scoop`, `Jumping Down` ×3, `Removing Driver`) are now entries in `scripts/animations.config.json` and built into the manifest.++## Related++- [3D asset pipeline](/docs/3d-asset-pipeline): the full generate, rig, animate, export chain+- [Animation Studio](/docs/animation-studio): author and preview clips in the browser+- [3D Viewer](/docs/viewer): how clips play back in the viewer and embeds+- [Clip Director](/docs/clip-director): gesture slots used for trade reaction cardsdiff --git a/docs/api-reference.md b/docs/api-reference.mdindex 950602afc..558bb23ee 100644--- a/docs/api-reference.md+++ b/docs/api-reference.md@@ -1,5 +1,7 @@# REST API Reference+This is the reference for the three.ws HTTP API: every documented endpoint, its parameters, and its response shape. Anyone can call the free endpoints with plain `curl` (no account needed); authenticated endpoints take an API key from the [Dashboard](https://three.ws/dashboard) or a browser session. If you are new, skim the Overview below, then jump to the section for the surface you are building on.+Base URL: `https://three.ws/api`> For the in-browser JavaScript API (the `<agent-3d>` element, `Viewer`, `Runtime`, `SceneController`, skills, memory), see [js-api.md](./js-api.md) and [web-component.md](./web-component.md). For the high-level npm SDK, see [sdk.md](./sdk.md).@@ -22,15 +24,17 @@ Session cookies (set after SIWE or Privy login) are accepted on all endpoints th### Response format-All responses are JSON. Successful responses return the resource or a result object. Errors return:+All responses are JSON. Successful responses return the resource or a result object. Errors return a machine-readable code plus a human-readable description:```json{- "error": "Message describing what went wrong",- "code": "ERROR_CODE"+ "error": "validation_error",+ "error_description": "Message describing what went wrong"}```+Some endpoints add extra fields (e.g. `retry_after` on rate limits). Error responses are never cached.+### Rate limits| Tier | Limit |@@ -50,14 +54,7 @@ Rate-limited responses return HTTP 429 with `{ "error": "...", "code": "RATE_LIMGET /api/agents```-Returns the authenticated user's agents. Requires auth.--**Query parameters**--| Parameter | Type | Description |-| --------- | ------- | ------------------------------ |-| `limit` | integer | Max results (default: 20) |-| `offset` | integer | Pagination offset (default: 0) |+Returns all of the authenticated user's agents (oldest first, no pagination). Requires auth.**Response**@@ -75,10 +72,7 @@ Returns the authenticated user's agents. Requires auth."chain_id": 8453,"chain_agent_id": 42}- ],- "total": 5,- "limit": 20,- "offset": 0+ ]}```@@ -126,12 +120,11 @@ Requires auth.}```-**Response**+**Response** (`201`)```json{- "id": "new-agent-id",- "agent": {}+ "agent": { "id": "new-agent-id", "name": "Aria" }}```@@ -231,16 +224,7 @@ Resolves an agent by ENS name (e.g., `myagent.eth`). No auth required.GET /api/widgets```-Requires auth. Returns the authenticated user's widgets, including joined avatar data.--**Query parameters**--| Parameter | Type | Description |-| ---------- | ------- | ------------------------------ |-| `limit` | integer | Max results (default: 20) |-| `offset` | integer | Pagination offset (default: 0) |-| `type` | string | Filter by widget type |-| `agent_id` | string | Filter by agent ID |+Requires auth (session cookie, or bearer token with `avatars:read`). Returns the authenticated user's widgets, newest-updated first (up to 500), including joined avatar data.**Response**@@ -249,18 +233,17 @@ Requires auth. Returns the authenticated user's widgets, including joined avatar"widgets": [{"id": "wdgt_abc123def456",- "agent_id": "abc123",+ "avatar_id": "a1b2c3d4-...","type": "turntable",- "config": { "auto_rotate_speed": 0.5, "preset": "venice" },+ "name": "Product Hero",+ "config": { "rotationSpeed": 0.5, "background": "#0a0a0a" },"is_public": true,- "created_at": "2025-01-15T10:00:00Z","view_count": 42,+ "created_at": "2025-01-15T10:00:00Z",+ "updated_at": "2025-01-15T10:00:00Z","avatar": {}}- ],- "total": 8,- "limit": 20,- "offset": 0+ ]}```@@ -286,32 +269,40 @@ POST /api/widgetsRequires auth. Bearer token must have `avatars:write` scope.-**Supported widget types:** `turntable`, `animation-gallery`, `talking-agent`, `passport`, `hotspot-tour`+**Supported widget types:** `turntable`, `animation-gallery`, `talking-agent`, `passport`, `hotspot-tour`, plus the additional live types in the [Widget Studio](https://three.ws/studio) type grid (pump.fun feeds, bonding curve, walking avatar, and more).**Request body**```json{- "agent_id": "abc123",+ "name": "Product Hero","type": "turntable",+ "avatar_id": "a1b2c3d4-...","config": {- "auto_rotate_speed": 0.5,- "preset": "venice"+ "rotationSpeed": 0.5,+ "background": "#0a0a0a"},- "visibility": "public"+ "is_public": true}```-**Response**+`name` is required; `avatar_id` is optional (must be an avatar you own, or a public one); `config` is validated against the type's schema ([src/widget-types.js](../src/widget-types.js)); `is_public` defaults to `true`.++**Response** (`201`)```json{- "id": "wdgt_abc123def456",- "embed_url": "https://three.ws/widgets/view?id=wdgt_abc123def456"+ "widget": {+ "id": "wdgt_abc123def456",+ "type": "turntable",+ "name": "Product Hero",+ "config": {},+ "is_public": true+ }}```-Widget IDs use the format `wdgt_` + 12 random base64url characters.+Widget IDs use the format `wdgt_` + 12 random base64url characters. The embed URL for a widget is `https://three.ws/widget#widget=<id>&kiosk=true`.---@@ -339,25 +330,24 @@ Requires auth. Owner only. Soft-deletes via `deleted_at` timestamp.----### Open Graph metadata+### Open Graph share card```GET /api/widgets/og?id=wdgt_abc123def456+GET /api/widgets/:id/og```-Returns Open Graph metadata for a widget, used by social preview scrapers (Twitter, Slack, etc.). No auth required.--**Response:** JSON with `og:title`, `og:description`, `og:image`, `og:url`.+Returns the widget's 1200×630 share-card image (`image/svg+xml`), used as the `og:image` by social preview scrapers (Slack, Discord, X) and as the auto poster for `embed.js`. Both URL forms serve the same card. No auth required.---### oEmbed```-GET /api/widgets/oembed?url=https%3A%2F%2Fthree.ws%2Fwidgets%2Fview%3Fid%3Dwdgt_abc123+GET /api/widgets/oembed?url=https%3A%2F%2Fthree.ws%2Fw%2Fwdgt_abc123```-oEmbed endpoint for rich embeds in Notion, Substack, and other oEmbed-compatible platforms. No auth required.+oEmbed endpoint for rich embeds in Notion, Substack, and other oEmbed-compatible platforms. Accepted `url` forms: `/w/<id>` (canonical), `/widget#widget=<id>`, and the legacy `/app#widget=<id>` and `/#widget=<id>`. No auth required.**Response:** oEmbed JSON with `type`, `html`, `width`, `height`, `title`, `provider_name`.@@ -2087,7 +2077,7 @@ Authentication is covered in detail in the [Authentication documentation](authen| `/api/auth/siwe/verify` | POST | Verify SIWE signature, create session || `/api/auth/session` | GET | Get current session || `/api/auth/session` | DELETE | Logout / destroy session |-| `/api/auth/privy/[handler]` | GET/POST | Privy OAuth handlers |+| `/api/auth/privy/verify` | POST | Verify a Privy auth token, create session || `/api/auth/wallets` | GET | List wallets linked to current user || `/api/auth/wallets` | POST | Link a new wallet |@@ -2615,6 +2605,8 @@ Model Context Protocol endpoint — exposes three.ws as a JSON-RPC 2.0 tool serv`render_avatar` enforces the agent's embed policy (allowed origins, allowed surfaces). Model URLs must be HTTPS — SSRF protections block private IP ranges.+This table is the core subset. The server registers many more tools (minting, gated embeds, memory, oracle and pump.fun intel, trader analytics, crypto data). Call `tools/list`, or see the [MCP documentation](mcp.md) and the [MCP Tools Catalog](mcp-tools.md).+**Example JSON-RPC request**```json@@ -3534,54 +3526,53 @@ The same stamp is served statically at `/build-info.json`.## Pagination-All list endpoints use offset pagination unless noted otherwise.+Paginated list endpoints use `limit`/`offset` query parameters unless noted otherwise (each endpoint's own parameter table is authoritative; some small per-user lists, like `/api/agents` and `/api/widgets`, return everything with no pagination).```-GET /api/agents?limit=20&offset=40+GET /api/v1/pump/launches?limit=24&offset=24```-Responses always include `total`, `limit`, and `offset`.--`/api/explore` and `/api/showcase` use keyset (cursor-based) pagination for stability — pass the returned `cursor` value as the `cursor` query parameter on the next request.+`/api/explore` and `/api/showcase` use keyset (cursor-based) pagination for stability: pass the returned `cursor` value as the `cursor` query parameter on the next request. `/api/agent-actions` and `/api/users/me/feed` are cursor-based too (`cursor` / `before` timestamps).---## Error codes-| Code | HTTP Status | Description |-| --------------------- | ----------- | -------------------------------------------- |-| `UNAUTHORIZED` | 401 | Missing or invalid auth |-| `FORBIDDEN` | 403 | Authenticated but not allowed |-| `NOT_FOUND` | 404 | Resource doesn't exist |-| `RATE_LIMITED` | 429 | Too many requests |-| `INVALID_INPUT` | 400 | Request body validation failed |-| `AGENT_NOT_FOUND` | 404 | Agent ID not found |-| `WIDGET_NOT_FOUND` | 404 | Widget ID not found |-| `CHAIN_NOT_SUPPORTED` | 400 | chainId not in supported list |-| `IPFS_FAILED` | 503 | IPFS pinning service unavailable |-| `LLM_ERROR` | 502 | LLM provider returned an error |-| `TTS_LIMIT_EXCEEDED` | 429 | Character limit for TTS exceeded |-| `QUOTA_EXCEEDED` | 429 | Agent's monthly token budget exhausted |-| `EMBED_POLICY_DENIED` | 403 | Request origin blocked by agent embed policy |+Codes are lowercase snake_case in the `error` field. The common ones, shared across endpoints:++| Code | HTTP Status | Description |+| -------------------- | ----------- | ----------------------------------------------- |+| `unauthorized` | 401 | Missing or invalid auth |+| `forbidden` | 403 | Authenticated but not allowed |+| `insufficient_scope` | 403 | Bearer token lacks the required scope |+| `not_found` | 404 | Resource doesn't exist |+| `rate_limited` | 429 | Too many requests (see `retry_after`) |+| `validation_error` | 400 | Request body or query validation failed |+| `not_configured` | 503 | A required provider/env is unset on this deploy |+| `upstream_error` | 502 | A third-party upstream returned an error |++Endpoint-specific codes (e.g. `quota_exceeded`, `invalid_avatar`, `no_client_id`) are documented in each endpoint's Errors table above.---## SDK-Use the official SDK instead of raw HTTP calls:--```js-import { AgentAPI } from '@three-ws/sdk';+For building on the platform from JavaScript, the official npm package is [`@three-ws/sdk`](https://www.npmjs.com/package/@three-ws/sdk). It is not a thin wrapper over every REST route above; it ships the higher-level building blocks: `AgentKit` (chat panel + ERC-8004 registration + `.well-known` manifest generation), `AgentClient` (x402 agent-to-agent paid skill calls), `PermissionsClient` (ERC-7710 delegations), and the Solana identity/attestation helpers. Full docs: [SDK & Library](sdk.md).-const api = new AgentAPI({ apiKey: 'sk_live_xxxxx' });+For the endpoints on this page, call them directly with `fetch`/`curl` and a Bearer API key:-const agents = await api.agents.list({ limit: 10 });-const agent = await api.agents.get('abc123');-const widget = await api.widgets.create({- agentId: 'abc123',- type: 'turntable',- config: { auto_rotate_speed: 0.5, preset: 'venice' },+```js+const res = await fetch('https://three.ws/api/agents?limit=10', {+ headers: { Authorization: 'Bearer sk_live_xxxxx' },});+const { agents } = await res.json();```-The SDK handles auth headers, retries on 429, and TypeScript types for all request/response shapes.+---++## Related++- [SDK & Library](/docs/sdk): the npm packages and the web component bundle+- [MCP documentation](/docs/mcp): the same platform surface as MCP tools+- [x402](/docs/x402): how the paid `/api/x402/*` endpoints settle in USDC+- [Authentication](/docs/authentication): SIWE, sessions, API keys, and scopesdiff --git a/docs/ar.md b/docs/ar.mdindex b82c3544a..f896fd006 100644--- a/docs/ar.md+++ b/docs/ar.md@@ -22,7 +22,7 @@ three.ws selects the right AR method automatically based on the device and brows| **Android Scene Viewer** | Android Chrome | ARCore intent URL | ARCore (auto-prompts) || **WebXR immersive-ar** | Chrome on Android, Safari 15.4+ | `navigator.xr` session | No |-**Selection order:** Quick Look → Scene Viewer → WebXR. Quick Look fires first on iOS because it's the most reliable. Scene Viewer fires first on Android because it works without a runtime XR session setup. WebXR is the fallback — and the only method that keeps the agent live in-page.+**Selection order:** the AR surfaces configure model-viewer with `ar-modes="webxr scene-viewer quick-look"`, so the first mode the device actually supports wins: WebXR where available (Android Chrome with ARCore), then Scene Viewer, then Quick Look. On iOS Safari, WebXR is off by default, so Quick Look is what fires in practice. WebXR is the only method that keeps the agent live in-page. The `/api/ar` launcher additionally 302-redirects plain Android model requests straight into the Scene Viewer intent (avatars get the launch page instead, so the living `/irl` path stays visible).---@@ -43,25 +43,18 @@ WebXR is the only method where the agent stays fully alive. Quick Look now ships----## Enabling AR on your agent+## Enabling AR for your model or agent-Add the `ar` attribute to `<agent-3d>`:+You do not add an attribute to enable AR; you link to (or embed) one of the AR surfaces, all of which detect the device and pick the right AR method automatically:-```html-<script type="module" src="https://three.ws/agent-3d/latest/agent-3d.js"></script>--<agent-3d- id="your-agent-id"- ar-></agent-3d>-```--The AR button appears automatically when:-- The `ar` attribute is present-- The device/browser supports at least one AR method-- The model has finished loading+| Surface | URL | Best for |+|---|---|---|+| One-tap AR launcher | `/api/ar?src=<glbUrl>&title=<name>` | Any public GLB; see [the full section below](#one-tap-ar-for-any-glb--get-apiar--export_ar) |+| Avatar AR page | `/avatars/<id>/ar` | Any saved three.ws avatar |+| AR Forge | `/ar` | Generate a model from a prompt and place it immediately |+| Living-agent AR | `/irl?avatar=<glbUrl>` | A rigged avatar that walks and talks in your room (WebXR) |-On desktop, the button is hidden — no desktop browser supports `immersive-ar`.+The avatar AR page and the `/api/ar` launch page render the model in Google's `<model-viewer>` element with `ar ar-modes="webxr scene-viewer quick-look"`, so the same page covers Quick Look, Scene Viewer, and WebXR. The **Place in your space** button appears only when the device exposes a usable AR mode (model-viewer's `canActivateAR`); on desktop the page shows a QR code handoff instead.### Allow XR in iframes@@ -80,51 +73,47 @@ Without `xr-spatial-tracking`, the browser blocks `navigator.xr` inside the fram## Programmatic API+On pages that render the model with `<model-viewer>` (the avatar AR page at `/avatars/<id>/ar`, the `/api/ar` launch page, Forge results), AR is driven through model-viewer's API. This is exactly what [src/ar-page.js](../src/ar-page.js) does:+```js-const el = document.querySelector('agent-3d');+const viewer = document.querySelector('model-viewer');-// Check if AR is available on this device-if (el.canActivateAR) {- // Launch AR (picks the best available method automatically)- await el.activateAR();+// canActivateAR is true only when the device exposes a usable AR mode+// (Quick Look, Scene Viewer, or WebXR) and the model is loaded.+if (viewer.canActivateAR) {+ viewer.activateAR(); // picks the best available method automatically}-```--`canActivateAR` is `true` when:-- The model is fully loaded-- At least one of Quick Look, Scene Viewer, or WebXR is available-`activateAR()` is async — it awaits the session setup for WebXR; Quick Look and Scene Viewer return immediately.--```js// Listen for AR session events-el.addEventListener('ar-status', (e) => {+viewer.addEventListener('ar-status', (e) => {// e.detail.status: 'session-started' | 'object-placed' | 'failed' | 'not-presenting'console.log('AR status:', e.detail.status);});```+For a custom viewer without model-viewer, use the three.ws launcher modules directly; see [Using AR without model-viewer](#using-ar-without-model-viewer) below.+---## iOS Quick Look — deep dive-Safari intercepts clicks on `<a rel="ar">` and opens the native AR viewer. The three.ws implementation in `src/ar/quick-look.js`:+Safari intercepts clicks on `<a rel="ar">` and opens the native AR viewer. The three.ws implementation in `src/ar/quick-look.js` (simplified; the real module also keeps the anchor in the DOM to receive Quick Look banner-tap events):```js-function openQuickLook(modelURI) {+export function openQuickLook(usdzURI, { onBannerTap } = {}) {const a = document.createElement('a');a.rel = 'ar';- a.href = modelURI;+ a.href = usdzURI;a.appendChild(document.createElement('img')); // required for programmatic click- document.body.appendChild(a);+ a.style.cssText = 'position:fixed;width:1px;height:1px;opacity:0;pointer-events:none;';+ document.body.appendChild(a); // stays in the DOM while the viewer is opena.click();- document.body.removeChild(a);}```-The child `<img>` element is required — without it, Safari won't intercept a programmatic `.click()` as a Quick Look trigger. This is a documented WebKit quirk.+The child `<img>` element is required — without it, Safari won't intercept a programmatic `.click()` as a Quick Look trigger. This is a documented WebKit quirk. The anchor must remain in the DOM while the viewer is open: Safari delivers the banner-tap `message` event on the anchor that launched the session.-**USDZ on iOS:** iOS 13+ accepts GLB files directly via the `href`. For earlier devices or for Apple's richest AR features (like custom banners and item purchasing), three.ws can pre-generate a USDZ companion file stored on R2. If a `usdz_url` exists on the avatar record, it's used as `ios-src`; otherwise the GLB-to-USDZ conversion runs in-browser via the three.js `USDZExporter` before Quick Look opens.+**USDZ on iOS:** Quick Look wants USDZ, so three.ws always hands it one. If a `usdz_url` exists on the avatar record (a pre-generated companion stored on R2), it's used as `ios-src`; otherwise the GLB-to-USDZ conversion runs in-browser (three.js `USDZExporter`, or the animated bake described below) before Quick Look opens.**Requirements:**- iOS 13+ with Safari (Chrome on iOS uses WebKit but lacks Quick Look integration)@@ -221,9 +210,9 @@ For avatars on three.ws, the USDZ is handled automatically:1. **Pre-generated USDZ:** If the avatar record has a `usdz_url`, it's set as `ios-src` immediately — no conversion needed.2. **In-browser animated bake:** If not, the page downloads the GLB and bakes an *animated* USDZ via [src/usdz-animated.js](../src/usdz-animated.js) (`glbBlobToAnimatedUsdzBlob`): the avatar is driven through its idle clip, the skinned vertices are sampled at keyframes, and the samples are written into the USDA as time-sampled points that Quick Look loops natively. So a rigged avatar breathes and idles in your room instead of standing in a frozen pose. This runs inline (a dynamic import, not a Web Worker) and typically takes a few seconds depending on model complexity.3. **Static fallback:** Any bake failure (no rig, no usable clip) falls back to the plain `USDZExporter` path in [src/usdz-pipeline.js](../src/usdz-pipeline.js), which produces a static frame-0 pose. AR never regresses below static.-4. **Persistent storage:** After the first conversion, the USDZ is uploaded to R2 and saved back to the avatar record so subsequent AR visits are instant.+4. **Persistent storage (opt-in):** The AR page's in-browser conversion lives only for that visit (an object URL). Durable USDZ companions come from `generateAndSaveCompanions()` in [src/account.js](../src/account.js), which bakes the animated USDZ, uploads it via `POST /api/avatars/presign-usdz`, and saves `usdz_url` on the avatar record so later AR visits skip the conversion. Companion generation is opt-in per save (`generateCompanions: true`; the `/demos/usdz-ar` demo page enables it) because the bake costs several seconds of client CPU.-The same animated bake serves the `/irl` Place-in-AR button, the `/avatars/:id/ar` page ([src/ar-page.js](../src/ar-page.js)), and the create flow ([src/account.js](../src/account.js)), which pre-bakes the animated USDZ.+The same animated bake serves the `/irl` Place-in-AR button and the `/avatars/:id/ar` page ([src/ar-page.js](../src/ar-page.js)).**USDZ limitations to know:**- Quick Look plays exactly one baked clip; the full animation library and live retargeting need WebXR@@ -310,22 +299,18 @@ Chrome on desktop (127+) has a WebXR device simulator under DevTools → More To### AR button doesn't appear on mobile-**Check 1 — `ar` attribute is set:**-```html-<agent-3d id="..." ar></agent-3d>-```--**Check 2 — browser supports AR:**+**Check 1: browser supports AR**- iOS: Must be Safari, not Chrome or Firefox- Android: Must be Chrome (or Chromium) with ARCore installed-**Check 3 — model is loaded:**-The AR button is hidden until the model finishes loading. Watch for the `load` event:+**Check 2: model is loaded**+The **Place in your space** button is disabled until the model finishes loading. On a model-viewer page, watch for the `load` event:```js-el.addEventListener('load', () => console.log('model loaded, AR should be available'));+document.querySelector('model-viewer')+ .addEventListener('load', () => console.log('model loaded, AR should be available'));```-**Check 4 — inside an iframe:**+**Check 3: inside an iframe**Add `allow="xr-spatial-tracking"` to the `<iframe>` tag.---@@ -381,31 +366,35 @@ iOS 15.4+ requires WebXR AR to be enabled manually: **Settings → Safari → Ad----## Using AR without `<agent-3d>`+## Using AR without model-viewerIf you're building a custom viewer and just need the AR launchers, import the modules directly:```js-import { openQuickLook } from '/src/ar/quick-look.js';-import { openSceneViewer } from '/src/ar/scene-viewer.js';+import { canUseQuickLook, openQuickLook } from '/src/ar/quick-look.js';+import { canUseSceneViewer, openSceneViewer } from '/src/ar/scene-viewer.js';import { WebXRSession } from '/src/ar/webxr.js';-// iOS-if (/iPhone|iPad/.test(navigator.userAgent)) {- openQuickLook('https://cdn.example.com/model.glb');+// iOS: Quick Look takes a USDZ, not a GLB (bake one with+// glbBlobToAnimatedUsdzBlob / glbBlobToUsdzBlob, see the USDZ pipeline above)+if (canUseQuickLook()) {+ openQuickLook('https://cdn.example.com/model.usdz');}-// Android-else if (/Android/.test(navigator.userAgent)) {+// Android: Scene Viewer takes the GLB URL+else if (canUseSceneViewer()) {openSceneViewer('https://cdn.example.com/model.glb', {title: 'My Agent',link: 'https://three.ws',});}-// WebXR fallback+// WebXR: keeps the agent alive in-page. The constructor takes a viewer+// shim ({ renderer, scene, content, controls, activeCamera, ... }); see+// src/xr.js for the canonical shape, plus lifecycle callbacks+// (onEnd, onAnchored, onHit, onTracking, onScale, domOverlayRoot).else if (await navigator.xr?.isSessionSupported('immersive-ar')) {- const session = new WebXRSession(renderer, scene, camera);+ const session = new WebXRSession(viewer, { onEnd: () => console.log('AR ended') });await session.start();}```@@ -466,6 +455,6 @@ How this link ships through ChatGPT end to end (the app connector, the custom GP- [Blog: See Your 3D Avatar in the Real World](https://three.ws/blog/see-your-3d-in-ar) — full walkthrough- [Avatar AR page](/avatars/:id/ar) — the dedicated AR experience for any avatar- [Walk feature](/features/walk) — WebXR immersive walk mode (different from placement AR)-- [Web component reference](/docs/web-component) — full `<agent-3d>` attribute list including `ar`+- [Web component reference](/docs/web-component) — full `<agent-3d>` attribute list- [Embedding guide](/docs/embedding) — iframe setup with XR permissions- [Tutorial: Place your model in AR](/docs/tutorials/view-in-ar)diff --git a/docs/architecture.md b/docs/architecture.mdindex 6503ebb31..373576dfe 100644--- a/docs/architecture.md+++ b/docs/architecture.md@@ -1,5 +1,7 @@# Architecture Overview+three.ws is the platform you see at [three.ws](https://three.ws): 3D avatars with AI brains that you can chat with, embed on any site, and register on-chain. This page is the engineering map of how that is built. If you just want to use the product, start with [How three.ws works](./how-it-works.md) instead.+This document describes how three.ws is put together, how data moves through it, and where the seams are if you want to extend, self-host, or integrate it with another stack. It assumes familiarity with modern JavaScript, WebGL/three.js at a high level, and the basics of EVM blockchains and content-addressed storage.three.ws is simultaneously a glTF viewer, an LLM-driven character runtime, an on-chain identity layer, and a distributable web component. These concerns are split into four layers that communicate through a single event bus rather than direct method calls. Most of the interesting design decisions live at the seams.@@ -42,7 +44,7 @@ This is the layer that turns a static GLB into a presence. It's structured as aThis layer is what keeps an agent's existence durable across sessions, devices, and embed hosts.- **`agent-identity.js`** — the **passport + diary**. Stores the agent's stable id, owner address, and a signed action history. Backed by `localStorage` for the local cache and `/api/agents/:id` for the canonical record. Listens on the protocol bus for `speak`, `remember`, `sign`, `skill-done`, `validate`, `load-end` and POSTs them to the backend fire-and-forget.-- **`memory/`** — one of four modes: `local` (browser/disk), `ipfs` (pinned via Pinata or Filebase), `encrypted-ipfs` (still a stub), or `none` (stateless). Mode is declared on the manifest.+- **`memory/`** — five built-in modes: `local` (browser `localStorage`), `remote` (synced to `/api/agent-memory`), `ipfs` (loaded from a pinned bundle), `encrypted-ipfs` (AES-GCM-256 with a wallet-derived key, pinned via `/api/agents/:id/memory/pin`), or `none` (stateless). Custom backends can also be registered. Mode is declared on the manifest.- **`erc8004/`** — the **on-chain identity** layer. Contains:- `IdentityRegistry` — mints an agent token whose `tokenURI` points at the manifest CID- `ReputationRegistry` — accepts signed feedback per agent@@ -55,7 +57,7 @@ This layer is what keeps an agent's existence durable across sessions, devices,The top layer is what lets an agent live somewhere other than the canonical app.- **`element.js`** — the `<agent-3d>` custom web component. Lazy-boots via `IntersectionObserver` (unless `eager`), enforces an origin allowlist for embeds, and exposes attributes for body, brain, agent-id, manifest URL, mode (`inline` / `floating` / `section` / `fullscreen`), and more.-- **`widget-types.js`** — five widget variants (Turntable Showcase, Animation Gallery, Talking Agent, ERC-8004 Passport, Hotspot Tour) that share the underlying element but ship as separate ergonomic wrappers.+- **`widget-types.js`** — ten widget variants (Turntable Showcase, Animation Gallery, Talking Agent, ERC-8004 Passport, Hotspot Tour, Pump.fun Live Feed, Smart Money Feed, Live Trades Canvas, Bonding Curve, Walking Avatar) that share the underlying element but ship as separate ergonomic wrappers.- **`lib.js`** — the CDN entry. Imports the element, registers it, and re-exports the public surface.- **`app.js`** — the main SPA. URL routing happens here using hash params (`#model=`, `#agent=`, `#kiosk=`, `#brain=`, `#preset=`) and query params (`?agent=` for authenticated edit mode, `?pending=1` for post-login round-trips). The hash form stays in embed mode; the query form moves into edit mode.- **`vercel.json`** — the server's route and cron table. Maps clean URLs (`/agent/<id>`, `/agent/<id>/edit`, `/agent/<id>/embed`, `/a/<chainId>/<agentId>`) to the right HTML entry and mounts the `api/*` handlers. In production the single Cloud Run container ([`server/index.mjs`](../server/index.mjs)) reads this table at runtime — it's a live config file, not a Vercel-only artifact.@@ -151,9 +153,9 @@ The manifest is a JSON document that fully describes an embodied agent. It's intKey fields:- **`name`, `description`, `creator`** — display metadata.-- **`body.uri`** — GLB / glTF / VRM URL. Resolution is deliberately polymorphic: `agent://chain/id` (resolved on-chain), `ipfs://CID/path`, `ar://TXID`, or plain `https://`. The resolver in `ipfs.js` walks gateway fallbacks (ipfs.io → dweb.link → nft.storage) so a single broken gateway never breaks an embed.+- **`body.uri`** — GLB / glTF / VRM URL. Resolution is deliberately polymorphic: `agent://chain/id` (resolved on-chain), `ipfs://CID/path`, `ar://TXID`, or plain `https://`. The resolver in `ipfs.js` walks gateway fallbacks (dweb.link → ipfs.io → flk-ipfs.xyz) so a single broken gateway never breaks an embed.- **`skills[]`** — pointers to skill bundles. Each skill is loaded and validated by the registry. Trust mode determines whether unsigned/foreign skills are allowed.-- **`memory.mode`** — `local`, `ipfs`, `encrypted-ipfs`, or `none`.+- **`memory.mode`** — `local`, `remote`, `ipfs`, `encrypted-ipfs`, or `none`.- **`identity.chainId` / `identity.registryAddress`** — pin this manifest to an on-chain agent id.- **`personality`** — flavor: tone, domain, and any extra system-prompt fragments.@@ -212,7 +214,7 @@ The flow:1. **User connects a wallet** via MetaMask, WalletConnect, or Privy embedded wallet.2. **Manifest is pinned** to IPFS via Pinata or Filebase. The CID is the canonical pointer to the agent.-3. **Registration.** The user calls `IdentityRegistry.registerAgent(cid, metadata)` on the target chain (Base mainnet, Base Sepolia, or Ethereum mainnet). The registry mints a token whose `tokenURI` returns the manifest CID.+3. **Registration.** The user calls `IdentityRegistry.registerAgent(cid, metadata)` on the target chain. Base is the default; `src/erc8004/chains.js` ships registry deployments on 15 mainnets (Ethereum, Base, Optimism, Arbitrum One, Polygon, BNB Chain, Avalanche, Linea, Scroll, Gnosis, Celo, zkSync Era, Moonbeam, Mantle, Fantom) plus the common testnets. The registry mints a token whose `tokenURI` returns the manifest CID.4. **Resolution.** Anyone with the chain id and agent id (or an ENS like `3dagent.eth`) can resolve the manifest: `manifest.js` reads `tokenURI(agentId)` from the registry, fetches the JSON over IPFS gateways, and normalizes it.5. **Reputation.** Users can call `ReputationRegistry.submitFeedback(agentId, score, comment)` to attach reviews. The element exposes a small UI for this.6. **Validation attestations.** When the glTF validator runs, the report can be hashed and posted to `ValidationRegistry.recordValidation(agentId, hash)` so anyone can verify the body has been spec-checked.@@ -239,8 +241,17 @@ To run the whole stack yourself, the minimum is:- **A Node.js host** for the SPA and the `api/*` handlers. Production runs a single container ([`server/index.mjs`](../server/index.mjs)) on Google Cloud Run that reads the `vercel.json` route table at runtime; any Node host works the same way, or reproduce the same path → handler map in your reverse proxy.- **Neon DB (PostgreSQL)** for agents, widgets, sessions, and the action log.- **Upstash Redis** for rate limiting, nonce storage, and short-lived caches.-- **AWS S3** (or any S3-compatible store — R2, B2) for hosted GLB and texture assets.+- **An S3-compatible object store** for hosted GLB and texture assets. The client in [api/_lib/r2.js](../api/_lib/r2.js) speaks the S3 API, so Cloudflare R2, AWS S3, and Backblaze B2 all work (configure `S3_ENDPOINT`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY`).- **Anthropic API key** for the default LLM provider. The runtime can also point at a self-hosted proxy (`#proxyURL=`) for billing, logging, or a non-Anthropic backend.- **Optional:** ElevenLabs for higher-quality TTS, Pinata or Filebase for IPFS pinning, Privy for non-wallet onboarding, an RPC endpoint for ERC-8004 reads.A minimal Node + Neon + Anthropic deployment is enough for a single agent. The blockchain and IPFS pieces are opt-in — each layer can be replaced or removed. The protocol bus is the only thing you can't take out.++---++## Related++- [How three.ws works](/docs/how-it-works): the zoomed-out mental model+- [Layers](/docs/layers): the four-layer contract in detail+- [Agent system](/docs/agent-system): runtime, skills, memory, emotion+- [Memory system](/docs/memory): storage modes and the file formatdiff --git a/docs/authentication.md b/docs/authentication.mdindex 8cce64f8f..2fdce55b1 100644--- a/docs/authentication.md+++ b/docs/authentication.md@@ -1,5 +1,7 @@# Authentication+Authentication is how three.ws knows who you are: it protects your agents, your avatars, and your dashboard, and it is required for anything that writes data. Sign in at [three.ws/login](https://three.ws/login) with a crypto wallet or a plain email/social account; developers can also mint API keys for scripts and servers.+three.ws supports three authentication methods. Which one you need depends on how you're building:| Method | Best for |@@ -160,10 +162,9 @@ Not every user has a crypto wallet. If your audience includes non-web3 users, Pr2. Privy handles the OAuth UI — email magic link, Google OAuth, etc.3. On success, Privy issues an identity token (a JWT signed with Privy's ES256 key).4. Your frontend posts that token to `POST /api/auth/privy/verify`.-5. The backend fetches Privy's JWKS, verifies the token signature and audience, extracts the linked wallet address, and finds-or-creates the user record.-6. A session cookie is issued — from this point the user is authenticated identically to a SIWE user.--> **Requirement:** The Privy account must have at least one linked wallet. If a user logs in with only an email and Privy hasn't created an embedded wallet yet, the verify call returns `400 no_wallet_linked`. Ensure wallet creation is enabled in your Privy dashboard.+5. The backend fetches Privy's JWKS, verifies the token signature and audience, and finds-or-creates the user record (keyed on the Privy DID).+6. Linked wallets are synced best-effort from Privy's server API into the user's wallet list; a login with no wallet still succeeds.+7. A session cookie is issued; from this point the user is authenticated identically to a SIWE user.### Configuration@@ -180,18 +181,19 @@ Get both values from [dashboard.privy.io](https://dashboard.privy.io). The serve### Verify endpoint```js-// After Privy client gives you an idToken. Send tosAccepted: true when your-// UI displayed the Terms of Service agreement next to the sign-in control;+// After the Privy client gives you an auth token. Send tosAccepted: true when+// your UI displayed the Terms of Service agreement next to the sign-in control;// the server records the acceptance and the Terms version on the user record.const res = await fetch('/api/auth/privy/verify', {method: 'POST',credentials: 'include',headers: { 'Content-Type': 'application/json' },- body: JSON.stringify({ idToken, tosAccepted: true }),+ body: JSON.stringify({ token, tosAccepted: true }),});-const { user, wallet } = await res.json();-// user: { id, email, display_name, plan, avatar_url }-// wallet: { address: '0x...', chain_id: null }+const { user } = await res.json();+// user: { id, email, display_name, plan, avatar_url, created_at }+// Any wallets Privy has linked are synced onto the account automatically;+// list them afterwards with GET /api/auth/wallets.```### Linking additional wallets@@ -311,6 +313,10 @@ const res = await fetch('/api/agents', {| `avatars:read` | Read avatar data || `avatars:write` | Create and update avatars || `avatars:delete` | Delete avatars |+| `agents:read` | Read agent data |+| `agents:write` | Create and update agents |+| `memory:read` | Read agent memory |+| `memory:write` | Write agent memory || `profile` | Read/write profile data; required to manage API keys themselves |Scopes are space-separated in the `scope` field. Default when unspecified: `avatars:read avatars:write`.@@ -355,51 +361,57 @@ A user can link multiple Ethereum addresses to one account. All linked addresses### Linking a wallet-Linking requires the user to sign a challenge with the wallet they want to add. First get a link nonce, then sign and submit:+Linking requires the user to sign a SIWE (EIP-4361) challenge with the wallet they want to add. `POST /api/auth/wallets/nonce` returns the exact message to sign; sign it and submit:```js-// 1. Get a link nonce-const { nonce } = await fetch('/api/auth/wallets/nonce', {- credentials: 'include'+// 1. Get the link message (must be signed in already; the nonce is bound to+// your session). POST with the wallet address and its chain id.+const { nonce, message } = await fetch('/api/auth/wallets/nonce', {+ method: 'POST',+ credentials: 'include',+ headers: { 'Content-Type': 'application/json' },+ body: JSON.stringify({ address: walletAddress, chainId: 8453 }),}).then(r => r.json());+// message is a full EIP-4361 text: "three.ws wants you to sign in… Link this+// wallet to three.ws account <email> … Nonce: … Expiration Time: …"-// 2. Sign the nonce with the new wallet-const message = `Link wallet to three.ws\nNonce: ${nonce}`;+// 2. Sign the message with the new walletconst signature = await signer.signMessage(message);-// 3. Submit+// 3. Submit the signed messageawait fetch('/api/auth/wallets', {method: 'POST',credentials: 'include',headers: { 'Content-Type': 'application/json' },- body: JSON.stringify({- address: walletAddress,- message,- signature,- nonce,- }),+ body: JSON.stringify({ message, signature }),});```+(`GET /api/auth/wallets/nonce` also works: it returns `{ nonce, domain, uri }` for clients that build the SIWE message themselves. Solana wallets use the parallel `nonce-solana` + `link-solana` actions with a Sign-In-With-Solana message.)+### Listing linked wallets```jsconst { wallets } = await fetch('/api/auth/wallets', {credentials: 'include'}).then(r => r.json());-// wallets: [{ address, chain_id, created_at, is_primary }, ...]+// wallets: [{ address, chain_id, chain_type, created_at, is_primary }, ...]```### Removing a wallet+Unlinking is a state-changing call, so it needs a CSRF token (one-time, from `GET /api/csrf-token`) in the `X-CSRF-Token` header:+```js+const { token } = await fetch('/api/csrf-token', { credentials: 'include' }).then(r => r.json());await fetch(`/api/auth/wallets/${address}`, {method: 'DELETE',credentials: 'include',+ headers: { 'X-CSRF-Token': token },});```-You cannot remove the primary wallet if it is the only one linked.+You cannot remove a wallet if it is the only one linked.---@@ -445,3 +457,12 @@ VITE_WALLETCONNECT_PROJECT_ID=> **JWT_SECRET is critical.** It signs all session tokens and is used (via HKDF) to derive the AES-256-GCM key that encrypts agent wallet private keys. Generate it with `openssl rand -base64 64`. Never commit it. Rotate it by appending to the key set — never remove the old key while active sessions exist.Password hashing cost is configurable via `PASSWORD_ROUNDS` (default: `11` bcrypt rounds).++---++## Related++- [API reference](/docs/api-reference): every endpoint, including the auth routes above+- [ERC-8004 identity](/docs/erc8004): what a connected wallet unlocks on-chain+- [Embedding guide](/docs/embedding): embeds work unauthenticated; auth is only for editing and publishing+- [Architecture overview](/docs/architecture): where sessions and the API server fitdiff --git a/docs/autonomous-x402.md b/docs/autonomous-x402.mdindex b0ca8414f..19cc0265f 100644--- a/docs/autonomous-x402.md+++ b/docs/autonomous-x402.md@@ -19,9 +19,11 @@ the sniper oracle gate.## How a tick works-The loop runs from the `x402-autonomous-loop` cron, scheduled every **5 minutes**-(the `*/5 * * * *` entry in [`vercel.json`](../vercel.json)'s cron list, run by-Google Cloud Scheduler). Each tick:+The loop runs from the `x402-autonomous-loop` cron endpoint, invoked every+**minute** by the `economy-tick` dispatcher (see the+[economy heartbeat](economy-heartbeat.md)) rather than by its own schedule+entry; per-entry Redis cooldowns decide what actually fires on any given tick.+Each tick:1. Selects up to `X402_AUTONOMOUS_MAX_PER_TICK` **ready** registry entries —those whose Redis cooldown has elapsed — sorted by priority descending.@@ -56,6 +58,14 @@ treasury (`CIRCULATION_TREASURY_SECRET`). Circulation funds agent-to-agent SOL /$THREE activity; this loop funds USDC intel purchases. They do not fund eachother.+The seeder wallet is the same keypair the ring economy calls the+`x402-ring-payer` signer role, and it **refills its own USDC**: the+`economy-rebalance` cron (every 30 minutes) swaps a capped slice of the wallet's+own SOL into USDC whenever its USDC float drops below a floor (default $10,+`ECONOMY_REBALANCE_RING_USDC_FLOOR`). The rebalancer is inert (dry-run plan+only) unless `ECONOMY_REBALANCE_ENABLED=1`, and every swap is reserve-,+per-swap-, per-run- and slippage-capped.+## The registryEvery scheduled call is a registry entry in `autonomous-registry.js`. An entry@@ -69,7 +79,7 @@ declares:| `method`, `body` | Request shape; `body` may be a function of the run context. || `cooldown_s` | Minimum seconds between calls. || `priority` | 1–100; higher wins when several entries are ready. |-| `pipeline` | Tag: `oracle`, `health`, `volume`, `sniper`, `qa`, `forge`, `discovery`, `security`, `circuit-breaker`, `self`, `external`. |+| `pipeline` | Tag grouping related entries. In production today: `health`, `oracle`, `volume`, `self`, `finance`, `discovery`, `sniper`, `agents`, `security`, `reconciliation`, `datapoint`, `qa`, `forge`, `external`, `circuit-breaker`, and a few singletons (`reliability`, `observability`, `feed`, `commerce`, `canonicalize`). || `enabled` | Set `false` to pause an entry. || `extractSignal` | Optional: maps the response into `signal_data` (for oracle entries, `{ mint?, signal, confidence, headline }`). || `resolveTarget` | Optional: computes the request path dynamically per call (for entries that rotate over a set of resources). |@@ -101,7 +111,7 @@ The registry groups entries into pipelines. The main ones in production:To pause any entry without a deploy, set its `enabled: false`; to pause the wholeloop, set `X402_AUTONOMOUS_ENABLED=false`.-## The Volume Bootstrap Loop (`self/026`)+## The Volume Bootstrap Loop (`volume-bootstrap-loop`)One registry entry — `volume-bootstrap-loop`, pipeline `volume`, cooldown 300s —owns a full sweep rather than a single call. On each run it advances a@@ -135,8 +145,8 @@ automatically (and `tests/x402-ring-catalog.test.js` fails until it is catalogedOne registry entry — `datapoint-volume-sweep`, pipeline `datapoint`, cooldown300s — settles real on-chain USDC against the [datapoint fabric](market-data-api.md#the-datapoint-fabric)(the 1,000,000+ endpoints served by the single `api/x402/d/[...path].js` route),-which the Volume Bootstrap Loop above never touches (its rotation is the ~60-*named* catalog endpoints). On each run it advances its own Redis-backed cursor+which the Volume Bootstrap Loop above never touches (its rotation is the ~45+*named* catalog endpoints flagged `autobuy: true`). On each run it advances its own Redis-backed cursorover a pool of concrete datapoint URLs — resolved at runtime from the same cachedfeeds the paid route reads, so no third-party id is hardcoded — and pays the next`X402_DATAPOINT_SWEEP_BATCH` (default 6) of them on Solana through the shared@@ -159,7 +169,7 @@ No-op (graceful skip, no spend) when the wallet/RPC is unconfigured. See> datapoint settle count as external traction — that would be wash volume. Real> ranking comes from external buyers, not a heavier self-paid sweep.-## Reconciliation (`self/027`)+## Reconciliation (`revenue-reconciliation`)The `revenue-reconciliation` entry (pipeline `reconciliation`, cooldown 86400s —**daily**) is the financial-integrity watchdog. It cross-checks every record thatdiff --git a/docs/avatar-creation.md b/docs/avatar-creation.mdindex 891e71680..f29dec1f0 100644--- a/docs/avatar-creation.md+++ b/docs/avatar-creation.md@@ -22,24 +22,21 @@ The fastest way to get a personalized 3D avatar is to take a set of photos and l### What you need-Three photos of your face:-- **Frontal** — face the camera straight on, neutral expression-- **Left** — turn your head about 45° to the left-- **Right** — turn your head about 45° to the right+At minimum, one clear photo of your face:+- **Frontal** (required): face the camera straight on, neutral expression+- **Left / Right** (optional): turn your head about 45° each way; extra angles improve the likeness-Good lighting and a plain background give the best results. Photos can be JPEG or PNG.+Good lighting and a plain background give the best results. Photos can be JPEG or PNG. The reconstruction is a face pipeline, so a headshot works far better than a full-body shot.### Steps-1. Go to **https://three.ws/create**+1. Go to **https://three.ws/create** and pick the selfie path (or open **https://three.ws/create/selfie** directly)2. Choose **Camera** (to take live photos in-browser) or **Upload** (to pick files from your device)-3. Fill in all three slots — frontal, left, right-4. Select your preferred **body type** and **avatar style** (v1 = photorealistic, v2 = stylized)+3. Fill the frontal slot; add left/right photos if you have them+4. Select your preferred **body type** (male / female) and **avatar style** (v1 = Photoreal, v2 = Stylized)5. Click **Submit**-The photos are prepared and sent to the photo avatar pipeline. After a brief processing step, an avatar editor opens in a modal where you can adjust clothing, accessories, and other details before exporting.--When you click export, the GLB is fetched and saved to your three.ws account automatically.+The photos are downscaled in the browser and sent to the native avatar reconstruction backend. A build view shows progress while the rigged GLB renders (typically a minute or two); when the job finishes, the avatar is saved to your three.ws account automatically and opens for review.### What if camera access doesn't work?@@ -49,12 +46,12 @@ If your browser or device doesn't support `getUserMedia`, the Camera option is dFor developers who want to understand what happens under the hood:-1. [selfie-capture.js](../src/selfie-capture.js) manages the two-step UI: method choice (camera vs upload) and the three photo slots. It dispatches a `selfie:submit` CustomEvent when all three slots are filled.-2. [selfie-pipeline.js](../src/selfie-pipeline.js) handles that event: downscales each photo to a max of 1024px, converts to base64 JPEG, then POSTs to `/api/onboarding/avaturn-session` with the photos and body/style preferences.-3. The API responds with a `session_url`. The page redirects to `/#avatarSession=<encoded url>`.-4. The main app reads the hash and opens `AvatarCreator` ([src/avatar-creator.js](../src/avatar-creator.js)) with the session URL, which initialises the photo avatar SDK into a modal iframe.-5. The avatar editor iframe fires a `avatar.exported` postMessage when the user exports. The SDK catches this, fetches the GLB bytes, and calls `onExport(blob)`.-6. [account.js](../src/account.js) → `saveRemoteGlbToAccount()` presigns an upload URL, pushes the GLB to R2 storage, and creates the avatar record.+1. [selfie-capture.js](../src/selfie-capture.js) manages the two-step UI: method choice (camera vs upload) and the photo slots (frontal required, sides optional). On submit it dispatches a `selfie:submit` CustomEvent with `{ files, bodyType, avatarType }`.+2. [selfie-pipeline.js](../src/selfie-pipeline.js) handles that event: it runs an on-device photo check and refinement pass ([selfie-refine.js](../src/selfie-refine.js)), downscales each photo to a max of 1024px as JPEG, then POSTs to `/api/avatars/reconstruct` with the photos and body/style preferences.+3. The endpoint returns a `jobId`. The pipeline dispatches `selfie:building` and polls `/api/avatars/regenerate-status?jobId=...` every 3 seconds, dispatching `selfie:progress` ticks the build view renders.+4. On `{ status: 'done', resultAvatarId }` it dispatches `selfie:done { avatarId }`. The avatar record and its GLB in R2 storage were created server-side, so nothing else needs to be uploaded. Failures dispatch `selfie:build-error` with a message and, when detectable, the photo slot that caused it.++A separate photo-avatar SDK path (`AvatarCreator` in [src/avatar-creator.js](../src/avatar-creator.js) with a session from `/api/onboarding/avaturn-session`) still exists for the third-party editor integration; the selfie flow above is the default one on /create.---@@ -64,9 +61,7 @@ The three.ws avatar builder is a browser-based tool for full creative control, n### Access-Open **https://three.ws/studio**--The studio opens in a modal inside the main app and runs as a separate React application embedded via iframe.+Open **https://three.ws/avatar-studio**, or start from **https://three.ws/create** (the builder opens in a modal inside the main app). It is a separate React application embedded via iframe. Note: `/studio` is Widget Studio, the embed-snippet builder, a different tool.### What you can customize@@ -201,7 +196,7 @@ Open the editor for your avatar and click the **Regenerate** button. The regenerEach mode accepts optional parameters as a JSON object. The job runs asynchronously and the panel polls for completion every 3 seconds.-**Note:** Avatar regeneration is in limited availability. If your deployment shows a waitlist banner in this panel, email [email protected] to join the early access list.+**Note:** Re-mesh, re-texture, and re-rig need a platform ML backend. If the panel shows a "Mesh regeneration needs a backend" banner, the deployment has no regeneration provider configured: set `AVATAR_REGEN_PROVIDER` to `replicate`, `huggingface`, or `gcp` (plus the matching API token) in the server environment.---@@ -321,5 +316,14 @@ Apply Draco compression in Blender (File → Export glTF → Compression) or wit**The Camera option is greyed out on the selfie page**Your browser or device doesn't support `getUserMedia`. This is common on HTTP (non-HTTPS) connections and some desktop browsers. Use the Upload option instead.-**The regeneration panel shows a waitlist message**-The ML regeneration backend is not enabled on this deployment. Join the early access list via [email protected].+**The regeneration panel says mesh regeneration needs a backend**+No regeneration provider is configured on this deployment. Set `AVATAR_REGEN_PROVIDER` (`replicate`, `huggingface`, or `gcp`) and the matching API token in the server environment.++---++## Related++- [Avatar pipeline](/docs/avatar-pipeline): the end-to-end generate / rig / retarget map+- [Selfie to avatar reconstruction](/docs/avatar-reconstruction): how the photo pipeline works inside+- [Animations](/docs/animations): the clip library your avatar drives once rigged+- [ERC-8004 identity](/docs/erc8004): registering the finished agent on-chaindiff --git a/docs/avatar-pipeline.md b/docs/avatar-pipeline.mdindex c1f5dcf31..7d7d0de69 100644--- a/docs/avatar-pipeline.md+++ b/docs/avatar-pipeline.md@@ -28,7 +28,7 @@ prompt / image| Paid | `mesh_forge` (MCP) | per call | Text/image → mesh via a Granite-directed model chain. || Avatar | `text_to_avatar`, `forge_avatar` (MCP) | per call | Avatar-shaped output; `forge_avatar` chains generation + rigging in one call. |-Generation quality is a **tier** (`forge-tiers.js`): `draft`, `standard`+Generation quality is a **tier** ([api/_lib/forge-tiers.js](../api/_lib/forge-tiers.js)): `draft`, `standard`(default), or `high` — more geometric budget at higher tiers. The tier sets theprice identically across REST and MCP transports (see[MCP tools](mcp-tools.md), [x402 endpoints](x402-endpoints.md)).diff --git a/docs/avatar-studio.md b/docs/avatar-studio.mdindex 57393a2fd..b129f8f8d 100644--- a/docs/avatar-studio.md+++ b/docs/avatar-studio.md@@ -64,4 +64,5 @@ curl 'https://three.ws/api/avatars/<avatarId>' -H 'cookie: <session>'- [Scene Composer](./compose.md): forge props and attach them to the avatar's bones as a saved outfit.- [Mocap Studio](./mocap-studio.md): drive the avatar's face live from your webcam.- [Restyle Studio](./restyle.md): shares the same GLB optimize-and-validate path.+- [CharacterStudio fork](./character-studio.md): the separate VRM trait-based studio embedded in the agent editor; a deep dive into its internals.- [/create](https://three.ws/create): the hub for every avatar-creation path, including selfie-to-avatar.diff --git a/docs/bnb-payments.md b/docs/bnb-payments.mdindex be89ea73e..352719135 100644--- a/docs/bnb-payments.md+++ b/docs/bnb-payments.md@@ -1,9 +1,12 @@# BNB Chain payments — MPP + gasless sends-three.ws speaks two agent-payment protocols. Our catalog has always run **x402**-(the CDP wire format) on Solana and Base. It now also speaks **MPP** — BNB-Chain's Machine Payments Protocol — so agents from the BNB ecosystem can pay our-endpoints, and our agents can pay theirs. This page explains both halves plus the+three.ws lets AI agents pay for API calls with stablecoins, no account or API+key needed. This page is for developers wiring an agent to pay (or charge) over+BNB Chain. Our catalog has always run **x402** (the CDP wire format) on Solana,+the home chain, and Base. It now also speaks **MPP** (BNB Chain's Machine+Payments Protocol), so agents from the BNB ecosystem can pay our endpoints, and+our agents can pay theirs. BNB Chain is an additional surface, not a+replacement for the Solana rails. This page explains both halves plus thegasless-send rail underneath, for a reader with zero prior context.Everything here is real code against real endpoints. Where a capability needs a@@ -140,7 +143,7 @@ const { hash, mode } = await sendGasless('bscTestnet', {| Env var | Purpose | Required? ||---|---|---|-| `X402_PAY_TO_BSC` | Merchant payout address for MPP receipts | to advertise MPP |+| `X402_PAY_TO_BSC` (alias `MPP_PAY_TO_BSC`) | Merchant payout address for MPP receipts | to advertise MPP || `B402_BASE_URL` / `B402_CLIENT_ID` / `B402_ACCESS_TOKEN` / `B402_PRIVATE_KEY` | b402 facilitator merchant creds (RSA "Tesla" signing) | to settle MPP on-chain || `NODEREAL_MEGAFUEL_KEY` | MegaFuel policy-management only (not the send path) | optional || `BNB_TESTNET_DEPLOYER_KEY` | Funded tBNB sender for live proofs | for live sends |@@ -155,3 +158,9 @@ receipt.See also: the wire contract in [`specs/x402-mpp-bridge.md`](../specs/x402-mpp-bridge.md),and the [BNB Chain campaign context](../prompts/bnb-chain/00-CONTEXT.md) for thefull verified-facts list.++## Related++- [x402 on three.ws](/docs/x402) - the payment protocol our Solana/Base catalog runs+- [The vault](/docs/bnb-vault) - encrypted 3D models gated by an on-chain BNB Chain purchase+- [x402 Bazaar](/docs/mcp-x402-bazaar) - discovering paid services by capability and pricediff --git a/docs/bnb-vault.md b/docs/bnb-vault.mdindex eaa3eaa6e..1b4e151a2 100644--- a/docs/bnb-vault.md+++ b/docs/bnb-vault.md@@ -1,12 +1,15 @@# The vault — encrypted 3D models gated by an on-chain BNB Chain purchase-`/vault` sells access to encrypted 3D models. Buying one is a real BSC-transaction against a real smart contract, which triggers a real cross-chain-call into Greenfield's programmable storage — a genuinely unique capability-BNB Chain has that Ethereum L1, Base, and (mostly) Solana don't (see-`prompts/bnb-chain/00-CONTEXT.md`'s verified facts). This page explains what-it is, how it's built, and how to reproduce the proof yourself. Everything-here is real code against real endpoints; nothing is mocked.+The vault, at [three.ws/vault](https://three.ws/vault), sells access to+encrypted 3D models: sellers list an encrypted GLB, buyers pay on-chain and+receive the key to decrypt and view it. Buying one is a real BSC transaction+against a real smart contract, which triggers a real cross-chain call into+Greenfield's programmable storage: a genuinely unique capability BNB Chain+has that Ethereum L1, Base, and (mostly) Solana don't (see+`prompts/bnb-chain/00-CONTEXT.md`'s verified facts). This page is for+developers: it explains what the vault is, how it's built, and how to+reproduce the proof yourself. Everything here is real code against real+endpoints; nothing is mocked.---@@ -81,7 +84,7 @@ Greenfield…" for that window rather than faking an instant unlock.## 4. Reproducing the proofThe public BSC testnet deploy is blocked on a funded deployer key (same wall-documented across prompts 07/09/10/11/13/14/18 in `PROGRESS.md`). Every+documented across prompts 07/09/10/11/13/14/18 in `prompts/bnb-chain/PROGRESS.md`). Everypiece of logic above is provable today against a **local anvil fork** — thesame technique prompt 11 used at the exported-function level, extended hereto drive the actual running HTTP endpoints and a real headless browser:@@ -131,3 +134,8 @@ this campaign, not a bug in this code path.publicly deployed contract yet (deploy itself is blocked); the "Sell amodel" panel on `/vault` is real code against the real upload + `list()`path, exercised so far only on the local anvil fork above.++## Related++- [BNB Chain payments](/docs/bnb-payments) - MPP payments and the MegaFuel gasless-send rail the vault's `buy()` uses+- [x402 on three.ws](/docs/x402) - the platform's pay-per-call protocol on Solana and Basediff --git a/docs/brain.md b/docs/brain.mdindex 48c6ecf1f..b2d7b9d5d 100644--- a/docs/brain.md+++ b/docs/brain.md@@ -29,6 +29,8 @@ runs on.- `event: meta` with `{ provider, label, network, model, tier }`- `event: first` with `{ firstTokenMs }` (the time-to-first-token the UI shows)- data-only frames carrying JSON-encoded text chunks+ - `event: fallback` with `{ route }` when the proxy reroutes mid-request+ (advisory; clients can ignore it)- `event: done` with `{ elapsedMs, firstTokenMs, usage }` (the token stats)- `event: error` with `{ message, elapsedMs }`@@ -36,12 +38,18 @@ Each provider spec declares its native first-party model (built from a first-parkey when present) and the OpenRouter model id that mirrors it. The proxy prefers thenative model and falls back to routing through OpenRouter, and if a native providerhits a quota, billing, or rate-limit error at request time it reroutes around the-outage through the mirrored OpenRouter id. The roster spans Anthropic (Claude Fable-5, Mythos 5, Opus 4.7, Sonnet 4.6, Haiku 4.5), OpenAI (GPT-OSS 120B, the GPT-5.x-family, o3 family), xAI (Grok 4.x), Groq (Llama 3.3 70B), DashScope (Qwen Plus),-ModelScope (Qwen3-Coder 480B), DeepSeek R1, and IBM Granite on watsonx.ai. In compare-mode the page opens one streaming POST per selected provider and renders them in a-grid, so every model streams concurrently rather than in sequence.+outage through the mirrored OpenRouter id. If the mirror fails too, a free-tier+safety net answers before any error is surfaced: Groq Llama 3.3, then the OpenRouter+`:free` route across every configured key, then NVIDIA NIM. A route only errors once+no free provider can answer, and each handoff emits an `event: fallback` frame. The+roster spans Anthropic (Claude Fable 5, Mythos 5, Opus 4.7, Sonnet 4.6, Haiku 4.5),+OpenAI (GPT-OSS 120B, the GPT-5.x family, o3 family), xAI (Grok 4.x), Groq (Llama+3.3 70B), DashScope (Qwen Plus), ModelScope (Qwen3-Coder 480B), DeepSeek R1, IBM+Granite on watsonx.ai, and a free NVIDIA NIM lineup (Nemotron 3 Super 120B,+Llama-Nemotron Super 49B, Nemotron Nano 9B, DeepSeek V4 Pro, Kimi K2.6, Llama 4+Maverick, MiniMax M2.7). In compare mode the page opens one streaming POST per+selected provider and renders them in a grid, so every model streams concurrently+rather than in sequence.Anonymous callers are gated to the genuinely free tiers only (the OpenRouter-routedopen-weight default and the free NVIDIA NIM models); every paid first-party modeldiff --git a/docs/build.md b/docs/build.mdindex 49a206c63..2c371acba 100644--- a/docs/build.md+++ b/docs/build.md@@ -9,7 +9,9 @@ touching the build pipeline.| Command | What it does || --- | --- || `npm run build` | The app build: `prebuild` lifecycle → `vite build` (`--max-old-space-size=6144`) → `scripts/strip-sw-from-embeds.mjs` → `scripts/inject-tour-boot.mjs`. Output → `dist/`. |-| `npm run deploy:gcp` | The **production deploy**: `check:dist` + `db:check` gates → `gcloud builds submit` (Docker image via `server/cloudbuild.yaml`) → Cloud Run (`three-ws-api`, `us-central1`) → CDN cache purge. Run `npm run build` first so `dist/` is current (see [CI parity](#ci-parity)). |+| `npm run build:gcp` | The **full pre-deploy build**, in the load-bearing order: build info snapshot → `npm run build` (the vite build wipes `dist/`, so it must run first) → UMD library build (`build:lib:full`) → `publish:lib` (mirrors the library into `dist/`) → `build:info` → `check:dist`. Run this, not bare `npm run build`, before deploying: `check:dist` fails without the published library bundle. |+| `npm run deploy:gcp` | The **production deploy**: `check:dist` + `db:check` gates → `gcloud builds submit` (Docker image via `server/cloudbuild.yaml`) → Cloud Run (`three-ws-api`, `us-central1`) → CDN cache purge. Run `npm run build:gcp` first so `dist/` is complete (see [CI parity](#ci-parity)). |+| `npm run deploy:gcp:full` | `build:gcp` + `deploy:gcp` in one command. || `npm run build:vercel` | Legacy full-build orchestrator (`scripts/build-vercel.mjs`) from the Vercel era — runs the gate suite, bundles the API with esbuild, and builds every sub-package. **Not on the Cloud Run deploy path**; kept for full local reproduction (see [the trap](#the-esbuild-overwrite-trap)). || `npm run clean` | `rm -rf dist/* dist-lib/*`. || `npm run check:dist` | Asserts the published `agent-3d` library bundle + `dist-lib` mirror exist and the version matches `package.json` (`scripts/check-dist.mjs`). |@@ -23,10 +25,14 @@ Production runs on **Google Cloud Run** (service `three-ws-api`, regiondeploy is two steps from the repo root:```bash-npm run build # produce dist/ (the front-end Cloud Run serves)+npm run build:gcp # produce a complete dist/ (app build, then the library mirror check:dist requires)npm run deploy:gcp # build the image + deploy to Cloud Run```+(`npm run deploy:gcp:full` runs both.) Bare `npm run build` is the app build+only: the vite step wipes `dist/`, so without the follow-on `publish:lib`+mirror the `check:dist` gate fails. `build:gcp` encodes the correct order.+`deploy:gcp` runs `check:dist` and `db:check`, then `gcloud builds submit--config server/cloudbuild.yaml`. Cloud Build builds the root `Dockerfile` on a32-vCPU machine with BuildKit inline caching (an unchanged `package-lock.json`@@ -34,9 +40,9 @@ skips `npm ci`), pushes the image, deploys it to Cloud Run in one run, and the`deploy:gcp:purge-cdn` step invalidates the CDN cache. The image copies thealready-built `dist/` and runs `server/index.mjs`, which serves the staticfront-end, the `vercel.json` route table, and every `api/**` handler from source-(no per-route bundling). The ~76 scheduled jobs run on **Google Cloud-Scheduler** driven off the `vercel.json` cron list; there is **no GitHub Actions-CI**. Full runbook: [docs/ops/gcp-production.md](./ops/gcp-production.md).+(no per-route bundling). The scheduled jobs (89 crons in `vercel.json` at last+count) run on **Google Cloud Scheduler** driven off the `vercel.json` cron+list; there is **no GitHub Actions CI**. Full runbook: [docs/ops/gcp-production.md](./ops/gcp-production.md).`.npmrc` sets `legacy-peer-deps=true` (npm never auto-installs peers — thereason `audit:deploy` checks the peer tree), and `engines.node` pins Node@@ -67,8 +73,8 @@ write the bundle back over the source: `esbuild ... --outdir=apiRun image serves `api/**` from source, a committed bundle ships broken handlers.If one of thosebundles is `git add`ed and committed, the real source is lost and the repo-balloons by millions of generated lines. This has happened twice-(commits `c94190b3`, `dabd5884` — both reverted).+balloons by millions of generated lines. This has happened twice before; both+incidents had to be reverted.A bundled file is unmistakable: its opening lines carry esbuild's interophelpers (`__defProp`, `__commonJS`, `__toESM`, `__esm`) or the `bundle-api`@@ -89,7 +95,7 @@ node scripts/guard-esbuild-bundles.mjs --files api/foo.js # explicit pathsDetection logic is unit-tested (`tests/guard-esbuild-bundles.test.js`): it mustcatch real esbuild/banner output and must not false-positive on a hand-written-route (verified clean across all 1100+ `api/**/*.js`).+route (verified clean across all 1700+ `api/**/*.js`).### Wiring it as a pre-commit hook@@ -142,3 +148,9 @@ is idempotent and fails loudly if no embed HTML is found. Verify with:```bashgrep -l 'vite-plugin-pwa:register-sw' dist/widget.html dist/embed.html # expect: no matches```++## Related++- [Deployment](/docs/deployment) - the deployment overview+- [Architecture](/docs/architecture) - how the pieces fit together+- [Contributing](/docs/contributing) - workflow and conventions for changesdiff --git a/docs/changelog.md b/docs/changelog.mdindex 37d2c41cd..60af8975b 100644--- a/docs/changelog.md+++ b/docs/changelog.md@@ -1,6 +1,8 @@# Changelog & Versioning-This document covers how three.ws is versioned, what has changed across releases, and how to upgrade safely.+This document covers how three.ws is versioned, what has changed across releases, and how to upgrade safely. It is aimed at developers pinning the SDK or CDN bundle.++> **Looking for what shipped this week?** Day-to-day product updates are published continuously on the live changelog at [three.ws/changelog](https://three.ws/changelog) (also available as [JSON](https://three.ws/changelog.json) and [RSS](https://three.ws/changelog.xml)). The versioned entries below track the platform/SDK release history rather than every product change.---@@ -276,7 +278,7 @@ console.log(latest); // "1.5.2"## Deprecated Features-No public-facing features are currently deprecated. The only `@deprecated` annotations in the codebase are inside vendored dependencies (Three.js r175 internals) and have no effect on the public API.+No public-facing features are currently deprecated. The only `@deprecated` annotations in the codebase are inside vendored dependencies (Three.js internals) and have no effect on the public API.When features are deprecated, they will be listed here with:@@ -312,3 +314,12 @@ cd sdk && npm publish- **GitHub Releases** — Watch the repository and select "Releases only" to get an email for each new release.- **npm outdated** — Add `npm outdated @three-ws/sdk` to your CI pipeline to detect available upgrades automatically.- **`versions.json`** — The CDN publishes a machine-readable index at `https://three.ws/agent-3d/versions.json` listing all available versions, channel aliases, and SRI hashes.++---++## Related++- [Introduction](/docs/introduction): what the platform is and how the layers fit together+- [Quick Start](/docs/quick-start): pin the CDN bundle or install the SDK+- [SDK Reference](/docs/sdk): the npm packages this versioning policy covers+- [Deployment](/docs/deployment): how a release actually ships to productiondiff --git a/docs/character-studio.md b/docs/character-studio.mdindex 03dfc5977..bbe58c93f 100644--- a/docs/character-studio.md+++ b/docs/character-studio.md@@ -1,21 +1,23 @@# Avatar Studio-Avatar Studio is a browser-based 3D avatar builder built into three.ws. It lets you design a fully customized humanoid avatar — body, hair, face, clothing, and accessories — using a point-and-click interface with no 3D modeling experience required.+This page documents the CharacterStudio-based avatar builder: a browser-based tool for designing a customized humanoid avatar (body, hair, face, clothing, accessories) with a point-and-click interface and no 3D modeling experience required. The result is a GLB/VRM file that works with every three.ws feature: animations, the emotion system, AR viewing, and web embedding.-The result is a GLB/VRM file that works with every three.ws feature: animations, the emotion system, AR viewing, and web embedding.+It is a rebranded fork of the open-source (MIT license) [M3-org/CharacterStudio](https://github.com/M3-org/CharacterStudio) project and lives in the `character-studio/` directory of the repo.-**Access:** [https://three.ws/studio](https://three.ws/studio) → Avatar tab--Avatar Studio is open-source (MIT license) and built on the [M3-org/CharacterStudio](https://github.com/M3-org/CharacterStudio) project.+**Note:** the platform's primary from-scratch builder, the page served at [three.ws/avatar-studio](https://three.ws/avatar-studio) and [three.ws/create/studio](https://three.ws/create/studio), is a separate native implementation documented in [Avatar Studio (native)](/docs/avatar-studio). The CharacterStudio fork on this page is the trait-based builder behind the "three.ws Studio" option described below.---## Getting Started-1. Go to [https://three.ws/studio](https://three.ws/studio)-2. Click **Avatar** in the top navigation-3. Click **Create Avatar** — Avatar Studio opens in a new panel-4. Start customizing using the sections in the left panel+Where you meet it in the product:++1. Open an agent's edit page (`https://three.ws/agent/<agent-id>/edit`)+2. Click the avatar tile and choose **three.ws Studio** ("In-browser builder: hair, clothing, body") from the create menu+3. The builder opens in a modal iframe; customize using the sections in the left panel+4. Click **Save Avatar**; the finished GLB is handed back to the agent editor automatically++It is also mounted standalone on the Avatar OS demo page at [/demo/avatar-os](https://three.ws/demo/avatar-os), and developers can run it directly with `npm run dev` inside `character-studio/`.**Account:** No account is needed to build and export an avatar. An account is required to save your avatar to an agent and use it on the platform.@@ -23,55 +25,22 @@ Avatar Studio is open-source (MIT license) and built on the [M3-org/CharacterStu## The Customization Interface-The left panel is organized into sections. Every change you make is reflected immediately in the 3D preview in the center.--### Body--- **Body type** — proportions and height presets-- **Skin tone** — continuous slider from light to dark-- **Skin texture** — smooth, freckles, and other surface variations--### Head--- **Face shape** — round, oval, square, heart-- **Jaw line** — narrow to wide-- **Forehead height** — adjustment slider--### Hair--- **Style gallery** — 20+ styles including short, long, curly, braided, and bald options-- **Color picker** — solid colors and ombre combinations-- **Accessories** — clips, ties, and similar items--### Eyes--- **Shape** — almond, round, hooded, and others-- **Iris color** — full color picker-- **Eyelashes** — style and density options+The builder is trait-based. You first pick a base character class, then swap and tint the individual trait items that class defines. Every change is reflected immediately in the 3D preview.-### Eyebrows+### Character classes-- **Shape** — arched, straight, thick, thin-- **Color** — matches hair color automatically, or set independently+The class list comes from `character-studio/public/manifest.json`. The shipped classes are:-### Nose & Mouth--- **Nose shape** — selection of presets-- **Lip shape** — thin, medium, full-- **Lip color** — natural tones or custom color--### Clothing--- **Top** — t-shirts, shirts, jackets, hoodies, tanks-- **Bottom** — pants, skirts, shorts, jeans-- **Shoes** — sneakers, boots, heels, sandals-- Colors and patterns available for each item+| Class | Description | Format |+|---|---|---|+| Anata (Female) | Stylized female humanoid | VRM |+| Anata (Male) | Stylized male humanoid | VRM |+| ON1FORCE | Demon character | VRM |+| TUBBY CAT | Cute cat character | VRM |-### Accessories+### Traits-- Glasses (multiple frame styles)-- Hats (baseball cap, beanie, beret, and others)-- Earrings, necklaces, and watches+Each class has its own trait manifest (hair, clothing, accessories, and other slots, as that class defines them). Trait assets are the upstream [loot-assets](https://github.com/m3-org/loot-assets) library, mirrored same-origin through `GET /api/studio-assets/<path>` (`api/studio-assets/[...path].js`) so the browser never hits a vendor CDN. Selecting a trait swaps the mesh live; traits that declare color support expose a color picker.---@@ -81,72 +50,46 @@ The center panel shows your avatar in real time using a Three.js WebGL renderer.- **Rotate** — click and drag- **Zoom** — scroll wheel-- **Animation preview** — toggle between T-pose (neutral) and an idle animation loop--Switch the background environment using the environment selector:--- Neutral studio (white background)-- Outdoor sunset-- Indoor office+- **Animation preview**: the preview avatar plays clips from the manifest's default animation set, so you see the character in motion rather than a static T-pose-Every customization change updates the preview instantly — no waiting for assets to reload.+Every trait change updates the preview live from the already-loaded asset library.---## Exporting Your Avatar-### Download as GLB+### Standalone (running the builder directly)-1. Click **Export** → **Download GLB**-2. The file downloads to your computer-3. Drag and drop it into the three.ws editor, or host it on your own CDN+The export menu offers direct downloads:-### Save to Your Account+- **GLB**: a single self-contained binary glTF file+- **VRM 0** and **VRM 1**: VRM exports for VRM-native applications-1. Click **Save to My Agents**-2. Sign in (or create an account)-3. The avatar is saved to your account and linked to a new agent-4. You can open the agent in the editor immediately+### Embedded (the "three.ws Studio" flow)-The exported GLB is a single self-contained file — all textures and meshes are baked in and optimized for real-time use.+When the builder runs inside the Avatar Creator iframe, the export menu shows a single **Save Avatar** button instead. It builds the GLB in the browser and hands the bytes back to the host page via `postMessage`; the agent editor adopts it as the agent's avatar. Nothing uploads until the host app saves it to your account.-### One-Click Optimization+### Export optimization options-Before exporting, click **Optimize** to:+The merge options panel controls how the export is assembled:-- Merge all skinned meshes into a single draw call-- Generate a texture atlas from individual textures-- Automatically cull hidden geometry (faces underneath clothing layers)+- **Texture atlas**: combine individual trait textures into shared atlases (separate standard and MToon atlases, each with configurable size)+- **KTX2 compression**: GPU-compressed textures for smaller files+- **Two-sided material**: force double-sided rendering when needed-Optimized avatars render faster and use less GPU memory, which matters in scenes with multiple agents or AR contexts.+Mesh merging and hidden-face culling run at export time (`character-studio/src/library/merge-geometry.js`, `cull-mesh.js`, `create-texture-atlas.js`), so the output is optimized for real-time use.---## Morph Targets and the Emotion System-Every avatar created in Avatar Studio includes the full set of morph targets required by the three.ws emotion system. These are baked into the exported file automatically — you don't need to add them manually.--The included morph targets are:--| Morph target | Used for |-|---|---|-| `mouthSmile` | Celebration, positive sentiment |-| `mouthFrown` | Concern, negative sentiment |-| `mouthOpen` | Speech, excitement |-| `cheekPuff` | Celebration |-| `browInnerUp` | Concern, empathy |-| `browOuterUp` | Curiosity |-| `noseSneer` | Concern |-| `eyeSquint` | Empathy |-| `eyesClosed` | Patience (subtle) |--The agent runtime blends these continuously based on emotional state — no per-avatar configuration needed.+Exported avatars carry whatever blendshapes their source trait assets include; VRM expression data is preserved through `@pixiv/three-vrm`. The three.ws emotion system drives ARKit-style blendshape names (`mouthSmile`, `browInnerUp`, `eyesClosed`, and similar; see the [3D Viewer](/docs/viewer) morph-target reference) whenever the loaded model exposes them, with no per-avatar configuration. If a model lacks a given target, that expression channel simply does not animate.---## Animation Compatibility-Avatar Studio avatars use a VRM-compliant skeleton with Mixamo-compatible bone names:+Exported avatars use the VRM humanoid skeleton:```Hips → Spine → Chest → Neck → Head@@ -158,26 +101,26 @@ RightUpperLeg → RightLowerLeg → RightFootThis means:-- **Mixamo animations work directly** — download any animation from Mixamo and attach it-- **The three.ws animation library is fully compatible** — all built-in clips (idle, wave, gesture, walk) work out of the box-- **Retargeting** is handled automatically by the animation manager+- **Mixamo animations work**: the fork retargets Mixamo FBX clips onto the VRM rig (`loadMixamoAnimation.js`, `VRMRigMapMixamo.js`)+- **The three.ws animation library is fully compatible**: the platform's bone-name canonicalizer (`src/glb-canonicalize.js`) maps VRM rigs to the canonical set, so all built-in clips (idle, wave, walk, and the rest) work out of the box+- **Retargeting** is handled automatically by the animation manager (`src/animation-retarget.js`)---## The Asset Library-Avatar Studio uses a manifest-driven asset system. Each clothing item, hair style, and accessory is a separate GLB file stored in `/character-studio/public/`. The `manifest.json` file lists what is available and how items attach to the base skeleton.+The builder uses a manifest-driven asset system. `character-studio/public/manifest.json` lists the character classes; each class entry points at a per-class trait manifest that defines the trait slots and the individual VRM assets that fill them. The trait assets themselves are the open-source [loot-assets](https://github.com/m3-org/loot-assets) library, served through the three.ws proxy at `/api/studio-assets/` in production. For local development, `npm run get-assets` inside `character-studio/` clones the library into `public/`.-At export time, the selected assets are merged into a single GLB using `@gltf-transform/core` — texture atlasing and mesh merging happen at this stage.+At export time, the selected trait meshes are merged and their textures atlased by the fork's own pipeline (`merge-geometry.js`, `create-texture-atlas.js`, `cull-mesh.js` under `character-studio/src/library/`), producing a single GLB or VRM.### Contributing New AssetsThe asset library is open-source and welcomes contributions:-1. Create your 3D asset in Blender using the Avatar Studio base mesh as reference+1. Create your 3D asset in Blender using the relevant base mesh as reference2. Follow the vertex group and UV conventions documented in the [CharacterStudio docs](https://m3-org.github.io/characterstudio-docs/)-3. Export as GLB with correct bone weights-4. Submit a pull request adding the asset and its manifest entry to `/character-studio/public/`+3. Export in the class's format (VRM) with correct bone weights+4. Submit a pull request to the upstream [m3-org/loot-assets](https://github.com/m3-org/loot-assets) repository, adding the asset and its manifest entry---@@ -187,18 +130,18 @@ For developers who want to understand the internals or self-host:| Component | Technology ||---|---|-| Frontend framework | React 18 + Vite |+| Frontend framework | React 19 + Vite || 3D rendering | Three.js (WebGL) || VRM model support | @pixiv/three-vrm |-| State management | Zustand |-| GLB manipulation | @gltf-transform/core |-| Optimization | Texture atlasing, mesh merging, face culling |+| State management | Zustand + React context |+| GLB/VRM export | three.js GLTFExporter plus the fork's VRM exporters (`VRMExporter.js`, `VRMExporterv0.js`) |+| Optimization | Texture atlasing, mesh merging, face culling (custom modules in `src/library/`) |The core of the system is `CharacterManager` in `character-studio/src/library/characterManager.js`. It orchestrates trait loading, mesh combining, animation playback, and VRM export. The UI layer communicates with it through React context (`SceneContext`, `ViewContext`).-**Integration with the main app:** The `AvatarCreator` class in `src/avatar-creator.js` opens Avatar Studio in an iframe and listens for a `postMessage` export event. When the user clicks Export inside Avatar Studio, the GLB blob is passed back to the parent app.+**Integration with the main app:** The `AvatarCreator` class in `src/avatar-creator.js` opens the builder in an iframe (served same-origin under `/avatar-studio`; the production build is mirrored into `dist/avatar-studio/` by the `copy-avatar-studio` Vite plugin, and the dev server serves `character-studio/build` at the same path) and listens for the `characterstudio` `postMessage` export event. When the user clicks Save Avatar inside the builder, the GLB bytes are passed back to the parent app.-**Build:** `npm run dev` inside `/character-studio/` starts the dev server. `npm run build` outputs to `./build/` for GitHub Pages deployment. Run `npm run get-assets` first to clone the required loot-assets into the public directory.+**Build:** `npm run dev` inside `character-studio/` starts the dev server. `npm run build` outputs to `./build/`, which the main repo build copies into `dist/avatar-studio/`. Run `npm run get-assets` first to clone the required loot-assets into the public directory.---@@ -234,8 +177,9 @@ offers three real paths, each ending in a GLB the world adopts immediately:background so peers can load it too (`play-handoff.js`).2. **Upload a .glb** — bring a model from Blender, Mixamo, VRoid, or any tool. Validatedclient-side (`avatar-upload.js` `validateGlb`) before it becomes your avatar.-3. **Advanced studio** — opens the full Avatar Studio (above) at `/create/studio` in a new- tab for deep body/face/hair/clothing sculpting, then saves to your account.+3. **Advanced studio**: opens the native Avatar Studio at `/create/studio` in a new+ tab for deep body/face/hair/clothing sculpting, then saves to your account+ (see [Avatar Studio (native)](/docs/avatar-studio)).### The in-game wardrobe economy@@ -286,4 +230,11 @@ HUD button.- **Asset library scope.** Customization is limited to items in the included asset library. Adding entirely new clothing shapes requires creating a 3D asset and submitting it to the library.- **Granular face morphing.** Individual face feature morphing (e.g., nose width, cheekbone height via sliders) is not yet available — face customization is preset-based.-For cases that need more control than Avatar Studio provides, create your avatar in Blender or another 3D tool and import the GLB directly into the three.ws editor.+For cases that need more control than the studio provides, create your avatar in Blender or another 3D tool and import the GLB directly into the three.ws editor.++## Related++- [Avatar Studio (native)](/docs/avatar-studio): the from-scratch builder at /avatar-studio+- [Avatar creation](/docs/avatar-creation): the selfie photo-to-avatar path+- [Editor Guide](/docs/editor): refine any exported GLB+- [Animations](/docs/animations): the clip library every avatar can playdiff --git a/docs/circulation-engine.md b/docs/circulation-engine.mdindex 343ebc6f2..e2d9ff87f 100644--- a/docs/circulation-engine.md+++ b/docs/circulation-engine.md@@ -51,7 +51,7 @@ falls back to a weighted everyday mix.| Action | Trigger | Real? ||---|---|---|-| `launch` | ~14% when pool ≥ 2, < 8 launches today, none this hour | Real pump.fun launch on chain, recorded in `pump_agent_mints` |+| `launch` | ~14% when pool ≥ 2, < 8 launches today, none in the last 45 minutes | Real pump.fun launch on chain, recorded in `pump_agent_mints` || `deploy` | ~6% when an EVM treasury is configured and < 6 deploys today | Real ERC-8004 identity registration on the configured EVM chain |### Everyday weighted mix@@ -148,9 +148,10 @@ in the public pump feed and the launches directory.amount needed for the imminent action, bounding treasury exposure per tick.- **Bounded heavyweight actions.** Launches and deploys are rate-limited per hourand per day independent of the everyday mix.-- **Real-seller demand is opt-in and capped.** When enabled, manufactured demand- routed to user-owned sellers is bounded by a price band and a per-seller daily- cap; when off, all demand stays inside the circulation pool.+- **Demand never leaves the pool.** The buy-side listing query+ (`listedSkills()`) selects only sellers tagged `meta.circulation = 'true'`,+ so manufactured demand is only ever routed to platform-owned circulation+ sellers, never to a real user's listings or wallet.## Ramping volumediff --git a/docs/clash.md b/docs/clash.mdindex 068c162cb..0ddf5d608 100644--- a/docs/clash.md+++ b/docs/clash.md@@ -16,7 +16,7 @@ The page (`src/clash.js`) polls `GET /api/clash/state` every 5 seconds (paused w**Factions.** Every community loaded from CoinCommunities becomes a faction, ranked strongest-first by member count and capped at `MAX_FACTIONS`. If the community source is unconfigured the API returns `503 cc_unconfigured` and the page shows a designed "temporarily unavailable" state and stops polling.-**Rounds (epochs).** Battles run on a deterministic global clock: `epoch = floor(now / EPOCH_MS)` with `EPOCH_MS` defaulting to 1 hour. Every serverless instance agrees on the current round without coordination. Matchmaking rotates the member-ranked pool by an epoch-derived hash (so the top seed does not always meet the second) and folds it into adjacent pairs; an odd count gives the lowest seed a bye. The previous round is settled lazily on each `state` read (claimed once via a Redis `SET NX`, so it is idempotent and needs no cron): faction powers are re-read, the same bracket is recomputed, and each battle is decided on raw power (higher wins, equal draws, both-zero writes no record). Win, loss, draw, and lifetime power fold into a permanent `clash:record` hash.+**Rounds (epochs).** Battles run on a deterministic global clock: `epoch = floor(now / EPOCH_MS)` with `EPOCH_MS` defaulting to 1 hour. Every serverless instance agrees on the current round without coordination. Matchmaking rotates the member-ranked pool by an epoch-derived hash (so the top seed does not always meet the second) and folds it into adjacent pairs; an odd count gives the lowest seed a bye. The previous round is settled lazily on each `state` read (claimed once via a Redis `SET NX`, so it is idempotent and needs no cron): faction powers are re-read, the bracket is recomputed from the power-ranked pool (so final pairings can differ from the member-ranked view shown live), and each battle is decided on raw power (higher wins, equal draws, both-zero writes no record). Win, loss, draw, and lifetime power fold into a permanent `clash:record` hash.**Momentum.** Each faction carries a bounded vigor bonus between 1.0 and 1.5, blended from social recency, member mass, and a positive pump.fun price move. Missing signals contribute nothing and never block a rally.@@ -60,7 +60,7 @@ curl -X POST 'https://three.ws/api/clash/enlist' \-d '{"token":"<FACTION_MINT>","wallet":"<YOUR_WALLET>"}'```-The Coin Clash state and leaderboard are also exposed read-only over MCP through `@three-ws/clash-mcp` (`get-clash-state`, `get-clash-leaderboard`).+The Coin Clash state and leaderboard are also exposed read-only over MCP through `@three-ws/clash-mcp` (`get_clash_state`, `get_clash_leaderboard`).## States and limitsdiff --git a/docs/coin-launches.md b/docs/coin-launches.mdindex 429dcfcc2..d2e32dd3c 100644--- a/docs/coin-launches.md+++ b/docs/coin-launches.md@@ -29,9 +29,12 @@ The agent launcher signs and submits with the agent's **custodial** Solana keypaserver-side (`launch-agent`), through the protected execution path(`submitProtected()`). Spend caps are checked before signing (see[Agent wallets](custody.md)), and the mint is registered in-`pump_agent_mints`. The `launcher-tick` cron drives autonomous launches on a-cadence (every minute, bounded by the daily/hourly launch caps described in the-[circulation engine](circulation-engine.md)).+`pump_agent_mints`. The `launcher-tick` cron (every minute) drives the+autonomous launcher engine (`api/_lib/launcher-engine.js`), bounded by+per-launch and daily SOL caps, an hourly ceiling, a cadence gate, and a circuit+breaker from its `launcher_config` row; a scope whose row is disabled stays+inert. The [circulation engine](circulation-engine.md) also runs its own+`launch` action with separate hourly/daily caps.## What a launch carries@@ -41,7 +44,7 @@ cadence (every minute, bounded by the daily/hourly launch caps described in the| Quote mint | Resolved to the network-correct pairing (USDC mint or SOL-paired). || Dev buy | A small initial buy can accompany the create (the `LAUNCH_FLOOR` covers create + tiny dev buy + fees). || Buyback authority | A buyback basis-points configuration can be attached to the agent mint. |-| Mint mark | When `THREE_WS_MARK_ENFORCE` is on, the mint address is vanity-ground to carry the three.ws mark (see [Mint mark](mint-mark.md), [Vanity protocol](PROTOCOL-vanity.md)). |+| Mint mark | When `THREE_WS_MARK_ENFORCE` is on (the default; set `0`/`false` to disable), the mint address is vanity-ground to carry the three.ws mark (see [Mint mark](mint-mark.md), [Vanity protocol](PROTOCOL-vanity.md)). |## Recording and surfacingdiff --git a/docs/configuration.md b/docs/configuration.mdindex c985023fc..a3247ba96 100644--- a/docs/configuration.md+++ b/docs/configuration.md@@ -1,6 +1,6 @@# Configuration Reference-three.ws is configured through a combination of environment variables and a handful of configuration files. This document is a complete reference for self-hosters and developers setting up a local development environment.+three.ws is configured through a combination of environment variables and a handful of configuration files. This document is a complete reference for self-hosters and developers setting up a local development environment. If you only use the hosted site at three.ws, none of this applies to you; if you are running the code yourself, start with the [Minimum Local Development Configuration](#minimum-local-development-configuration) and come back for the rest as you enable features.**Configuration files at a glance:**@@ -27,13 +27,13 @@ cp .env.example .env.local### Core#### `PUBLIC_APP_ORIGIN`-**Required.** The canonical origin of your deployment — no trailing slash.+**Required for self-hosted deployments.** The canonical origin of your deployment, with no trailing slash. When unset, the code falls back to `https://three.ws` ([api/_lib/env.js](../api/_lib/env.js)), which is wrong for any other domain.```PUBLIC_APP_ORIGIN=https://yourdomain.com```-Used to construct absolute URLs in API responses and OAuth metadata. Must match your production domain exactly.+Used to construct absolute URLs in API responses and OAuth metadata (exposed to server code as `env.APP_ORIGIN`). Must match your production domain exactly.#### `DATABASE_URL`**Required.** PostgreSQL connection string using Neon's serverless HTTPS driver.@@ -87,17 +87,36 @@ Higher values increase security at the cost of login latency. 11 is a reasonable### LLM+`/api/chat` routes across a provider failover ladder (see the routing comment at the top of [api/chat.js](../api/chat.js)): free-tier providers lead, paid keys are backstops. Configure at least one of these keys to enable agent conversations.++#### `GROQ_API_KEY`+**Recommended.** Free-tier Groq key; the default first provider in the chat ladder.++```+GROQ_API_KEY=gsk_xxxxx+```++#### `OPENROUTER_API_KEY`+**Optional.** OpenRouter key, tried after Groq. Backs up every LLM surface; fund it if you rely on paid-model failover.++```+OPENROUTER_API_KEY=sk-or-xxxxx+```++#### `NVIDIA_API_KEY`+**Optional.** NVIDIA NIM free tier, a third independent free lane.+#### `ANTHROPIC_API_KEY`-**Required for agent conversations.** If unset, the `/api/chat` endpoint falls back to client-side pattern matching (limited functionality).+**Optional (paid backstop).** Anthropic key, tried after the free lanes. Also accepted as a user-supplied BYOK key.```ANTHROPIC_API_KEY=sk-ant-api03-xxxxx```-Get from [console.anthropic.com](https://console.anthropic.com).+Get from [console.anthropic.com](https://console.anthropic.com). `OPENAI_API_KEY` fills the same paid-backstop role for OpenAI, and watsonx (`WATSONX_API_KEY` plus a project scope) is served only on explicit request, never as a silent default.#### `CHAT_MODEL`-**Optional.** Override the Claude model used for agent chat. Defaults to `claude-sonnet-4-6`.+**Optional.** Pin a default chat model by id. It only applies when the provider that serves that model id (per the model catalog) is the one routed to; every other provider keeps its own default, so an Anthropic-style model id never leaks into a Groq request.```CHAT_MODEL=claude-sonnet-4-6@@ -345,7 +364,7 @@ The smallest `.env.local` that runs the dev server with core features:PUBLIC_APP_ORIGIN=http://localhost:3000DATABASE_URL=postgres://user:[email protected]/neondb?sslmode=requireJWT_SECRET=<output of: openssl rand -base64 64>-ANTHROPIC_API_KEY=sk-ant-...+GROQ_API_KEY=gsk_... # or any other chat provider key (see LLM above)S3_ENDPOINT=https://<account-id>.r2.cloudflarestorage.comS3_ACCESS_KEY_ID=...S3_SECRET_ACCESS_KEY=...@@ -366,9 +385,9 @@ A **live configuration file** consumed at runtime by the Cloud Run server ([`ser```json{ "src": "/agent/([^/]+)/edit", "dest": "/agent-edit.html" }{ "src": "/agent/([^/]+)/embed", "dest": "/agent-embed.html" }-{ "src": "/agent/([^/]+)", "dest": "/agent-home.html" }+{ "src": "/agent/([^/]+)", "status": 301, "headers": { "Location": "/agents/$1" } }{ "src": "/a/(\\d+)/(\\d+)", "dest": "/api/a-page?chain=$1&id=$2" }-{ "src": "/dashboard", "dest": "/dashboard/index.html" }+{ "src": "/dashboard/?", "dest": "/dashboard-next/index.html" }{ "src": "/studio", "dest": "/studio/index.html" }```@@ -378,8 +397,11 @@ A **live configuration file** consumed at runtime by the Cloud Run server ([`ser{"src": "/agent/([^/]+)/embed","headers": {- "content-security-policy": "frame-ancestors *",- "permissions-policy": "microphone=(self), camera=(self), xr-spatial-tracking=*"+ "content-security-policy": "frame-ancestors *; base-uri 'self'; object-src 'none'; report-uri /api/client-errors",+ "x-content-type-options": "nosniff",+ "referrer-policy": "strict-origin-when-cross-origin",+ "permissions-policy": "microphone=(self), camera=(self), xr-spatial-tracking=*",+ "cross-origin-resource-policy": "cross-origin"},"dest": "/agent-embed.html"}@@ -395,7 +417,7 @@ A **live configuration file** consumed at runtime by the Cloud Run server ([`ser}```-**Cron jobs** are declared here as the source of truth for the schedule; in production they are driven by **Google Cloud Scheduler** (~80 jobs), each hitting its `/api/cron/*` handler on the Cloud Run service:+**Cron jobs** are declared here as the source of truth for the schedule (currently 89 entries); in production they are driven by **Google Cloud Scheduler**, each job hitting its `/api/cron/*` handler on the Cloud Run service:```json"crons": [@@ -418,15 +440,15 @@ The build is controlled by the `TARGET` environment variable:|---|---|---|---|| `npm run build` | `app` (default) | `dist/` | Full multi-page SPA || `npm run build:lib` | `lib` | `dist-lib/` | Self-contained web component for CDN |-| `npm run build:all` | both | both | Builds app and lib sequentially |+| `npm run build:all` | both | both | Builds the chat bundle first, then app and lib in parallel |-**App build** (`TARGET=app`) emits multiple HTML entry points for the SPA:+**App build** (`TARGET=app`) emits many HTML entry points for the multi-page app, sourced from `pages/`:-- `index.html` — marketing/landing-- `app.html` — agent creator-- `agent-home.html`, `agent-edit.html`, `agent-embed.html` — agent pages-- `dashboard/index.html` — user dashboard-- `studio/index.html` — widget studio+- `pages/home.html`: marketing/landing+- `pages/app.html`: agent creator+- `pages/agent-edit.html`, `pages/agent-embed.html`: agent pages (`/agent/:id` itself 301-redirects to `/agents/:id`)+- `pages/dashboard-next/`: user dashboard (sub-pages auto-discovered)+- `public/studio/index.html`: widget studio**Library build** (`TARGET=lib`) emits a self-contained ES module and UMD bundle:@@ -437,7 +459,7 @@ dist-lib/agent-3d.umd.cjs # UMD (CommonJS-compatible)Three.js and ethers are bundled (not externalized) so the web component works as a zero-install drop-in embed via `<script type="module">`.-**VitePWA** generates a service worker for the app build. Assets matching `**/*.{js,css,ico,png,svg,woff2}` are precached. Google Fonts are cached with a `CacheFirst` strategy and a 1-year TTL.+**VitePWA** generates a service worker for the app build. Only `**/*.{ico,woff2}` are precached; HTML, JS, and CSS are deliberately excluded so deploys take effect immediately. Google Fonts are cached with a `CacheFirst` strategy and a 1-year TTL, and `/api/*` is never intercepted by the service worker.The dev server includes a rewrite middleware that mirrors the `vercel.json` route patterns, so `http://localhost:3000/agent/my-agent/edit` works the same as in production.@@ -454,14 +476,14 @@ aws s3api put-bucket-cors \--endpoint-url https://<account-id>.r2.cloudflarestorage.com```-The default `cors.json` restricts GET requests to a specific list of origins:+The checked-in `cors.json` restricts GET requests to a specific list of origins: `https://three.ws`, the localhost dev origins, and a few existing partner origins:```json[{"method": ["GET"],"origin": [- "https://three.ws/",+ "https://three.ws","http://localhost:*","https://localhost:*"],@@ -515,3 +537,11 @@ Before going live, verify the following:- [ ] `AGENT_RELAYER_KEY` is set via the Cloud Run service env vars, not committed to git- [ ] `.mcp.json` does not contain a real API key if checked into git- [ ] `JWT_KID` is set so key rotation can be performed without invalidating all sessions++---++## Related++- [Deployment & Self-Hosting](/docs/deployment): how to run the stack in production+- [Security](/docs/security): the security model these settings feed into+- [Contributing](/docs/contributing): local development workflow and test commandsdiff --git a/docs/contributing.md b/docs/contributing.mdindex 18abd3300..d0d8517f4 100644--- a/docs/contributing.md+++ b/docs/contributing.md@@ -46,10 +46,13 @@ npm install# 3. Copy environment variablescp .env.example .env.local-# Minimum required: DATABASE_URL, JWT_SECRET, ANTHROPIC_API_KEY+# Minimum required: DATABASE_URL, JWT_SECRET, and one chat provider key+# (GROQ_API_KEY, OPENROUTER_API_KEY, or ANTHROPIC_API_KEY)-# 4. Apply the database schema (requires DATABASE_URL to be set)-psql "$DATABASE_URL" -f api/_lib/schema.sql+# 4. Provision the database (requires DATABASE_URL to be set)+npm run db:bootstrap+# Runs core schema + indexer + delegations + migrations; idempotent.+# Do NOT apply api/_lib/schema.sql alone (it skips the migration-defined tables).# 5. Start the development servernpm run dev@@ -61,7 +64,7 @@ npm run dev| Service | Purpose | Without it ||---|---|---|| Neon (Postgres) | Real test database | API routes that need DB will fail |-| Anthropic API key | LLM features | AI responses unavailable |+| An LLM provider key (Groq, OpenRouter, NVIDIA, Anthropic, or OpenAI) | LLM features | AI responses unavailable || Upstash Redis | Distributed rate limiting | Falls back to in-memory per-instance |Most features work without the optional services. The app degrades gracefully, so basic 3D viewer work, skill development, and UI changes don't require any backend credentials.@@ -73,16 +76,20 @@ For full backend setup — R2 storage, environment variables, and how the app is## Project Structure```-src/ — client-side JavaScript (agent system, viewer, UI)-api/ — serverless-style API handlers (Node.js, served by the Cloud Run container)-public/ — static pages and assets-contracts/ — Solidity smart contracts (Foundry)-character-studio/ — avatar builder (separate React SPA)-specs/ — design specifications-docs/ — internal documentation-tests/ — unit and API tests-scripts/ — build and maintenance scripts-examples/ — working code examples (including skill templates)+src/ - client-side JavaScript (agent system, viewer, UI)+api/ - serverless-style API handlers (Node.js, served by the Cloud Run container)+pages/ - HTML entry points for the multi-page app+public/ - static pages and assets+contracts/ - Solidity smart contracts (Foundry)+character-studio/ - avatar builder (separate React SPA)+packages/ - publishable packages (MCP servers and more)+sdk/, *-sdk/ - client SDKs+workers/ - GPU/background workers+specs/ - design specifications+docs/ - public documentation (served at three.ws/docs)+tests/ - unit and API tests+scripts/ - build and maintenance scripts+examples/ - working code examples (including skill templates)```Key source files:@@ -124,10 +131,10 @@ The project follows the rules in [CLAUDE.md](../CLAUDE.md). These are enforced i## Running Tests-The test suite uses [Vitest](https://vitest.dev/) and covers both source modules and API endpoints.+The test suite uses [Vitest](https://vitest.dev/) for source modules and API endpoints, plus [Playwright](https://playwright.dev/) for browser tests. `npm test` runs Vitest first and only proceeds to the Playwright stage when the unit suite is green.```bash-# Run all tests+# Run all tests (vitest, then playwright)npm test# Run a specific test file@@ -270,7 +277,7 @@ Skills are the best way to extend three.ws without touching core code. A skill i4. **Write a `SKILL.md`** documenting what your skill does, what permissions it requires, and how to install it.-5. **Share it.** Post in the `#skills` channel on Discord, or open a PR to add it to the official skill registry.+5. **Share it.** Post it in [GitHub Discussions](https://github.com/nirholas/three.ws/discussions), or list it on the platform's skill marketplace so agents can install it.---@@ -308,12 +315,20 @@ Check [existing issues](https://github.com/nirholas/three.ws/issues) before open- **[GitHub Discussions](https://github.com/nirholas/three.ws/discussions)** — design questions, architecture ideas, general "how does X work"- **[GitHub Issues](https://github.com/nirholas/three.ws/issues)** — bug reports and concrete feature requests-- **Discord** — real-time chat (link in the README)-Core team response times: typically 2–3 business days on GitHub, faster in Discord. If a PR has been open for a week with no review, a polite ping in Discord is welcome.+Core team response times: typically 2-3 business days on GitHub. If a PR has been open for a week with no review, a polite bump on the PR is welcome.---## License-By contributing, you agree that your contributions will be licensed under the [Apache License 2.0](../LICENSE).+By contributing, you agree that your contributions are provided under the terms of the repository's [LICENSE](../LICENSE) (proprietary, all rights reserved). Read it before submitting substantial work.++---++## Related++- [Configuration Reference](/docs/configuration): every environment variable and config file+- [Deployment & Self-Hosting](/docs/deployment): running the full stack yourself+- [Skills](/docs/skills): the skill format, lifecycle hooks, and message API+- [Security](/docs/security): responsible disclosure and the security modeldiff --git a/docs/crypto-api.md b/docs/crypto-api.mdindex 55eecca2a..99e1adb56 100644--- a/docs/crypto-api.md+++ b/docs/crypto-api.md@@ -822,3 +822,12 @@ curl -s "https://three.ws/api/crypto/holders?address=FeMbDoX7R1Psc4GEcvJdsbNbZA3# Just the verdict for position sizingcurl -s "https://three.ws/api/crypto/holders?address=FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump" | jq '{top10Pct, concentration}'```++---++## Related++- [Market Data API](/docs/market-data-api) - the paid x402 twin: coin prices, DeFi TVL, yields, gas, and the per-datapoint fabric+- [x402 Paid Endpoints](/docs/x402-endpoints) - the full paid catalog and pricing+- [API Reference](/docs/api-reference) - the complete three.ws HTTP API surface+- [Pump Launcher](/docs/pump-launcher) - launch a token after clearing its symbol herediff --git a/docs/deployment.md b/docs/deployment.mdindex 4806ff02b..fa47a1c62 100644--- a/docs/deployment.md+++ b/docs/deployment.md@@ -343,17 +343,18 @@ The Vite config handles multi-page routing, asset hashing, and the PWA manifest.```/agent/:id/edit → /agent-edit.html/agent/:id/embed → /agent-embed.html (frame-ancestors: * header)-/agent/:id → /agent-home.html-/dashboard → /dashboard/index.html-/w/:id → widget page (server-side)-/a/:chainId/:id → on-chain agent page+/agent/:id → 301 → /agents/:id+/agents/:id → /agent-detail.html (bot user-agents get the OG render)+/dashboard → /dashboard-next/index.html+/w/:id → /api/widgets/page?id=:id (server-rendered widget page)+/a/:chainId/:id → on-chain agent page (/api/a-page)```The embed routes explicitly set `frame-ancestors *` so the embed iframe can be hosted on any domain. Other routes omit this header (defaulting to same-origin framing only).### Background cron jobs-The `crons` array in `vercel.json` declares ~80 scheduled jobs (economy tick, on-chain crawl, delegation indexing, DCA, subscriptions, coin-launch lifecycle, treasury top-ups, and more). In production these run as **~76 Google Cloud Scheduler jobs** — one per entry — each firing `GET /api/cron/<name>` with an `Authorization: Bearer $CRON_SECRET` header. A representative slice:+The `crons` array in `vercel.json` declares ~90 scheduled jobs (economy tick, on-chain crawl, delegation indexing, DCA, subscriptions, coin-launch lifecycle, treasury top-ups, and more). In production these run as **Google Cloud Scheduler jobs** — one per entry — each firing `GET /api/cron/<name>` with an `Authorization: Bearer $CRON_SECRET` header. A representative slice:| Cron | Schedule | Purpose ||---|---|---|@@ -536,7 +537,7 @@ After deploying, run through these checks to verify the instance is healthy:| Viewer | Load the app and drag-drop a GLB file || Wallet sign-in | Connect MetaMask — SIWE challenge + verify || Avatar creation | Navigate to `/create` — avatar builder iframe loads |-| Agent page | Visit `/agent/:id` — 3D viewer with chat overlay |+| Agent page | Visit `/agents/:id` — 3D viewer with chat overlay (`/agent/:id` 301-redirects here) || Embed | Check `/agent/:id/embed` loads without auth, can be iframed || Dashboard | Navigate to `/dashboard` — shows your agents || API health | `GET /api/agents` returns JSON (may be empty array) |@@ -574,3 +575,12 @@ The container does not schedule crons itself — an external scheduler must hit### Redis connection errorsUpstash REST API uses HTTPS — no ports to open. If you see connection errors, verify `UPSTASH_REDIS_REST_URL` starts with `https://` and the token is correct. Rate limiting falls back to in-memory if Redis is unreachable (it will not crash the API).++---++## Related++- [Quick Start](/docs/quick-start): get the component running before you self-host the stack+- [Troubleshooting & FAQ](/docs/troubleshooting): symptom-first fixes, including the self-hosting section+- [Economy heartbeat](/docs/economy-heartbeat): driving the `/api/cron/*` endpoints outside Cloud Scheduler+- [Authentication](/docs/authentication): how sessions, SIWE, and API keys work on your instancediff --git a/docs/do-i-need-crypto.md b/docs/do-i-need-crypto.mdindex 052aea695..9aa9a2762 100644--- a/docs/do-i-need-crypto.md+++ b/docs/do-i-need-crypto.md@@ -6,7 +6,7 @@ Short answer: it depends on what you want to do. Here's the honest breakdown.## Viewing and chatting with agents-**No wallet or crypto needed.** Anyone can open an agent link (`three.ws/agent/<id>`) and chat with it. No account, no extension, no sign-in.+**No wallet or crypto needed.** Anyone can open an agent link (`three.ws/agents/<id>`) and chat with it. No account, no extension, no sign-in.---@@ -18,14 +18,12 @@ Short answer: it depends on what you want to do. Here's the honest breakdown.## Creating or editing agents-**Currently requires a wallet sign-in.** The hosted platform uses wallet-based authentication (EIP-4361 SIWE for EVM wallets like MetaMask, or Phantom for Solana). If you don't have a wallet extension, you'll hit a sign-in wall.+**No wallet needed.** The sign-in page at [three.ws/login](/login) offers two paths side by side:-> A no-wallet sign-in path (email / passkey) is actively being built. Once live, you'll be able to create and publish agents with just an email address — no extension, no seed phrase.+- **Email + password**: register with just an email address (or a username). No extension, no seed phrase. This is all you need to create, edit, and publish agents.+- **Wallet sign-in**: EIP-4361 SIWE for EVM wallets like MetaMask, or a Solana wallet like Phantom. Choose this if you want on-chain features tied to a wallet you already own.-In the meantime, the easiest path for non-crypto users:-1. Install [MetaMask](https://metamask.io) (free browser extension)-2. Create a new wallet — you don't need to fund it or buy anything for basic agent creation-3. Sign in to three.ws using that wallet+The two are equivalent for building agents. A wallet only becomes relevant when you use the optional on-chain features below.---@@ -35,13 +33,11 @@ Most basic features are free. You pay when you use premium capabilities:| What | How | Roughly how much ||---|---|---|-| Hosted AI brain (LLM calls) | Billed to your three.ws account in USDC | Fractions of a cent per message |+| Hosted AI brain (LLM calls) | A free default model is included; premium Claude models run on a paid plan or your own API key | Free to start || Premium skills (skill purchases) | USDC micropayment via x402 | Set by the skill author || On-chain registration (ERC-8004) | Small gas fee on Base | A few cents in ETH |-**USDC** is a dollar-pegged stablecoin — 1 USDC ≈ $1 USD. It doesn't go up or down the way ETH or SOL does. When you see a price in USDC, you can treat it as dollars.--> USD price display (showing "≈ $0.01" next to USDC amounts) is being added across the platform so you never have to do mental-math from crypto to dollars.+**USDC** is a dollar-pegged stablecoin — 1 USDC ≈ $1 USD. It doesn't go up or down the way ETH or SOL does. When you see a price in USDC, you can treat it as dollars. Payment surfaces on the platform also show the approximate USD (or SOL) equivalent next to the amount, so you never have to do mental math from crypto to dollars.---@@ -70,7 +66,7 @@ When you do interact with on-chain features, the platform's native token is **$T|---|---|---|| View / chat with an agent | No | No || Embed a widget on your site | No | No |-| Create an account and build agents | Currently yes | No (wallet, not funded) |+| Create an account and build agents | No (email sign-in works) | No || Use a premium skill | Yes + small USDC balance | Yes (USDC ≈ $) || Register on-chain (optional) | Yes + gas | Yes (small ETH) |diff --git a/docs/editor.md b/docs/editor.mdindex 95450bcfd..48b706fb7 100644--- a/docs/editor.md+++ b/docs/editor.md@@ -1,6 +1,6 @@# Editor Guide-The three.ws editor lets you inspect and modify an agent's 3D model, adjust materials and textures, build the agent manifest, and publish the result to the platform. This guide covers the full workflow from opening a file through publishing.+The three.ws editor lets you inspect and modify an agent's 3D model, adjust materials and textures, build the agent manifest, and publish the result to the platform. It runs entirely in the browser: open a GLB, edit, and publish or download. This guide covers the full workflow from opening a file through publishing.---@@ -11,16 +11,16 @@ The three.ws editor lets you inspect and modify an agent's 3D model, adjust mateIf you own an agent and are authenticated:```-https://three.ws/agent-edit?agent=<agent-id>+https://three.ws/agent/<agent-id>/edit```-This opens the full editor pre-loaded with your agent's GLB and manifest. You must be signed in — the platform checks ownership at the storage layer when you attempt to save or publish.+This opens the agent edit page pre-loaded with your agent's GLB and configuration. You must be signed in. The platform checks ownership server-side when you attempt to save or publish.-Alternative URL forms that also work:+Two more entry points:```-https://three.ws/agent/<id>/edit ← owner-only edit page-https://three.ws/app?agent=<id> ← app shell with agent in edit mode+https://three.ws/agent/new starts a new agent from scratch+https://three.ws/app?agent=<id> the viewer app shell in editing mode with save-back```### Open any GLB file (no account required)@@ -37,17 +37,16 @@ Then drag and drop any `.glb` file onto the viewport. The editor loads the file## Editor Layout-The editor is organized into five regions:+The editor is organized into four regions:| Region | What it contains ||---|---|-| **Left panel** | Scene Explorer — the full object tree |+| **Scene Explorer panel** | The full object tree, with an inspector below it showing the selected object's properties || **Center** | 3D viewport (three.js canvas with editing enabled) |-| **Right panel** | Inspector — properties of the selected object |-| **Bottom toolbar** | Animation controls, download, publish button |-| **dat.GUI overlay** | Quick-access buttons: Download, Publish, Scene Panel, Revert |+| **Animation panel** | Clip buttons rendered by the viewer for rigged models |+| **dat.GUI "Editor" folder** | Quick-access actions: download GLB, publish as embed, scene panel, save edits, revert all edits |-The dat.GUI panel (top-right corner) is the primary way to trigger editor actions. The Scene Explorer is toggled with the `T` key or the "Scene Panel" button.+The dat.GUI panel (behind the Controls toggle, top-right corner) is the primary way to trigger editor actions. The Scene Explorer is toggled with the `T` key or the "scene panel [T]" button.---@@ -163,7 +162,7 @@ If the loaded model contains morph targets (also called blend shapes), sliders a- Range: **0.0** (rest pose) to **1.0** (full deformation)- Changes are applied in real-time in the viewport-- Label names match the identifiers the emotion system expects (e.g., `happy`, `sad`, `surprised`)+- The emotion system drives ARKit-style blendshape names (`mouthSmile`, `browInnerUp`, `eyesClosed`, and similar); if your model's targets use those names, expressions work automaticallyUse these sliders to verify expressions look correct before connecting them to the emotion system. Morph target influences are not currently written to the export.@@ -171,15 +170,16 @@ Use these sliders to verify expressions look correct before connecting them to t## Animation Controls-The animation panel (bottom toolbar, from `animation-panel.jsx`) lists all clips embedded in the GLB.+The animation panel (rendered by the viewer, `src/viewer.js` `.anim-panel`) lists the clip library available to the loaded rig.-- **Play/Pause** per clip — click the clip button to toggle+- **Play** per clip: click the clip button to crossfade to it- **Stop all** (⏹) — halts all running clips- **Active state** — the currently playing clip is highlighted+- **1-9 keys**: trigger the first nine clipsAnimations continue running while you adjust materials. This is intentional: it lets you preview how the avatar looks in motion while tweaking a roughness value, rather than evaluating a static pose.-The panel does not yet expose per-clip speed control or duration display in the current UI; those are visible in the dat.GUI overlay when a clip is selected.+Clips embedded in the GLB itself get per-clip toggles and a playback-speed slider in the dat.GUI **Animation** folder.---@@ -331,3 +331,12 @@ The editor is at format version `agent-editor/0.1`. The following rough edges ar3. **Visibility via scale hack** — hidden nodes are exported with `scale=[0,0,0]` rather than being removed or flagged. This is not spec-compliant and may cause issues in downstream tools.4. **Duplicate material names** — if the GLB contains two materials with the same name, only the first match is patched during export.5. **No DOM events** — the editor does not fire DOM events on session changes. External code must call `session.onChange()` directly.++The full contract lives in [specs/EDITOR_SPEC.md](https://github.com/nirholas/three.ws/blob/main/specs/EDITOR_SPEC.md).++## Related++- [3D Viewer](/docs/viewer): the rendering layer the editor sits on+- [Agent Manifest](/docs/agent-manifest): the manifest format the builder produces+- [Avatar creation](/docs/avatar-creation): generate an avatar to edit+- [Embedding](/docs/embedding): what the published embed snippet gives youdiff --git a/docs/embedding.md b/docs/embedding.mdindex 46e9b6239..4c9925c26 100644--- a/docs/embedding.md+++ b/docs/embedding.md@@ -1,5 +1,7 @@# Embedding Guide+Embedding puts a live three.ws agent (a 3D avatar that can talk, gesture, and run skills) on any website or platform you control, from a one-line web component to a paste-a-link oEmbed. This guide covers every supported method and when to use each. To generate a ready-made snippet without reading further, publish a widget in Widget Studio at [three.ws/studio](https://three.ws/studio).+> **Audience:** Developers and no-code builders who want to add a three.ws agent to a website, app, or platform.---@@ -86,8 +88,9 @@ free-tier proxy. Pair it with `instructions` for a system prompt:```Set `brain` to a specific model id (e.g. `claude-sonnet-4-6`) instead of `free`-to use a paid model via your three.ws dashboard key, or `brain="none"` to keep-it a pure display embed (see [Performance tips](#performance-tips)).+to use a paid model via your three.ws dashboard key. Omit the `brain` attribute+entirely to keep a bare-GLB embed a pure, silent display+(see [Performance tips](#performance-tips)).### Sizing@@ -244,7 +247,7 @@ el.addEventListener('voice:speech-start', e => {});```-Key events: `agent:ready`, `agent:load-progress`, `agent:error`, `brain:message`, `brain:thinking`, `voice:speech-start`, `voice:speech-end`, `voice:transcript`, `skill:loaded`, `skill:tool-called`, `memory:write`, `chain:resolved`.+Key events: `agent:ready`, `agent:load-progress`, `agent:error`, `brain:message`, `brain:thinking`, `brain:stream`, `voice:speech-start`, `voice:speech-end`, `voice:transcript`, `voice:listen-start`, `skill:loaded`, `skill:tool-called`, `skill:purchased`, `memory:write`.### Performance and lazy loading@@ -299,7 +302,7 @@ The `allow` attribute controls browser feature access:|---------|-----|| Backend agent | `/agent/{agent-id}/embed` or `/agent-embed.html?id={agent-id}` || On-chain agent | `/a/{chainId}/{agentId}/embed` |-| Widget (kiosk) | `/app#widget={widget-id}&kiosk=true` |+| Widget (kiosk) | `/widget#widget={widget-id}&kiosk=true` (legacy `/app#widget=...` still works) || Model viewer only | `/#model={glb-url}` |### postMessage protocol@@ -315,19 +318,19 @@ const agentId = 'a_abc123'; // must match the id in the iframe src// Handshake — send once after iframe loadiframe.contentWindow.postMessage({ type: 'agent:hello', agentId },- 'https://three.ws/'+ 'https://three.ws');// Trigger an actioniframe.contentWindow.postMessage({ type: 'agent:action', agentId, action: { type: 'speak', text: 'Hello!' } },- 'https://three.ws/'+ 'https://three.ws');// Liveness probeiframe.contentWindow.postMessage({ type: 'agent:ping', agentId, id: 'probe_1' },- 'https://three.ws/'+ 'https://three.ws');```@@ -336,7 +339,7 @@ iframe.contentWindow.postMessage(```jswindow.addEventListener('message', e => {// Always verify origin before trusting the message- if (e.origin !== 'https://three.ws/') return;+ if (e.origin !== 'https://three.ws') return;const { type, agentId } = e.data;@@ -668,7 +671,7 @@ Framer supports custom code components — wrap `<agent-3d>` in a code componentAdd the script tag to `theme.liquid` inside `<head>`, then use `<agent-3d>` directly in product page templates or section files.-Want a guide that *walks the storefront* — spotlighting sections, narrating, free-roaming — instead of a boxed embed? That's the tour SDK, not `<agent-3d>` (it needs host-DOM access an iframe/web component doesn't have). Follow the [3D store guide for Shopify tutorial](/tutorials/shopify-store-guide).+Want a guide that *walks the storefront* — spotlighting sections, narrating, free-roaming — instead of a boxed embed? That's the tour SDK, not `<agent-3d>` (it needs host-DOM access an iframe/web component doesn't have). Follow the [3D store guide for Shopify tutorial](/docs/tutorials/shopify-store-guide).---@@ -682,7 +685,7 @@ Want a guide that *walks the storefront* — spotlighting sections, narrating, f<agent-3d src="agent://base/42" kiosk auto-rotate></agent-3d>```-**Viewer-only (no LLM):** Add `brain="none"` to prevent the LLM client from loading. Use this for pure 3D display embeds.+**Viewer-only (no LLM):** For bare-GLB embeds (`body` or a `.glb` `src`), simply omit the `brain` attribute; without it the LLM client never loads and the embed stays a silent display.**Auto-rotate:** Only enable `auto-rotate` for turntable-style static displays. It runs a continuous animation loop and keeps the GPU active.diff --git a/docs/erc8004.md b/docs/erc8004.mdindex 0fdcaf248..9d34b0b23 100644--- a/docs/erc8004.md+++ b/docs/erc8004.md@@ -316,8 +316,10 @@ The resolver understands several equivalent ways to refer to an agent:### JavaScript SDK+The resolver lives in the open-source three.ws codebase at [src/erc8004/resolver.js](../src/erc8004/resolver.js); it is not part of the `@three-ws/sdk` npm package, so vendor the module or import it in-repo:+```js-import { resolveOnchainAgent, parseAgentRef } from '@three-ws/sdk/erc8004';+import { resolveOnchainAgent, parseAgentRef } from './src/erc8004/resolver.js';// By chain + agent IDconst agent = await resolveOnchainAgent({ chainId: 8453, agentId: 42 });@@ -363,7 +365,7 @@ The `<agent-3d>` element boots the full agent runtime — 3D rendering, memory,The resolver tries multiple IPFS gateways in sequence when fetching metadata:1. `ipfs.io`2. `dweb.link`-3. `cloudflare-ipfs.com`+3. `flk-ipfs.xyz`4. `gateway.pinata.cloud`Arweave (`ar://`) URIs are resolved through `arweave.net`.@@ -421,14 +423,14 @@ After registering, your agent starts accumulating on-chain reputation. Any walleScores are integers from −100 to +100. The contract stores each individual review (submitter address, score, optional IPFS pointer to a longer write-up) and maintains a running aggregate (sum + count). The `getReputation` call returns `(avgX100, count)`:```js-import { getReputation, getRecentReviews } from '@three-ws/sdk/erc8004';+import { getReputation, getRecentReviews } from './src/erc8004/reputation.js';-const { total, count, average } = await getReputation({+const { count, average } = await getReputation({agentId: 42,chainId: 8453,runner: provider, // ethers Provider or Signer});-// average is the mean score as a plain number (e.g. 87.5)+// average is the mean score as a plain number (e.g. 87.5); 0 when count is 0```To paginate through individual reviews:@@ -446,7 +448,7 @@ const reviews = await getRecentReviews({### Submitting feedback```js-import { submitReputation } from '@three-ws/sdk/erc8004';+import { submitReputation } from './src/erc8004/reputation.js';const txHash = await submitReputation({agentId: 42,@@ -461,7 +463,7 @@ Two constraints are enforced: one review per wallet address per agent, and agent### Displaying reputation-The `widget="passport"` mode on `<agent-3d>` renders the reputation score automatically as part of the agent's identity card. You can also embed the reputation panel standalone using the `ReputationPanel` component from `/src/erc8004/reputation-panel.js`.+The **ERC-8004 Passport** widget type in Widget Studio ([three.ws/studio](https://three.ws/studio), implemented in [src/widgets/passport.js](../src/widgets/passport.js)) renders the reputation score as part of the agent's on-chain identity card, embeddable via `/w/{widget-id}`. Agent profile pages mount the `ReputationPanel` component from [src/erc8004/reputation-panel.js](../src/erc8004/reputation-panel.js) automatically, and the standalone [Reputation Explorer](https://three.ws/reputation) works for any `(chainId, agentId)` pair.---@@ -482,7 +484,7 @@ Only allow-listed validator addresses can call `recordValidation`. Validators ar### Reading the latest validation```js-import { getLatestValidation } from '@three-ws/sdk/erc8004';+import { getLatestValidation } from './src/erc8004/validation-recorder.js';const result = await getLatestValidation({agentId: 42,@@ -496,7 +498,7 @@ const result = await getLatestValidation({### Verifying independently```js-import { hashReport, reportPassed } from '@three-ws/sdk/erc8004';+import { hashReport, reportPassed } from './src/erc8004/validation-recorder.js';// Re-run the validator and hash the new reportconst freshReport = await runGltfValidator(glbBytes);@@ -510,7 +512,7 @@ console.log(freshHash === onchainResult.proofHash); // true = authentic## Programmatic registration-To integrate ERC-8004 registration into your own application, you can call the contract functions directly using the ethers v6 API.+To integrate ERC-8004 registration into your own application, you can call the contract functions directly using the ethers v6 API. The helpers below live in the open-source three.ws codebase under `src/erc8004/` (import in-repo or vendor them); the `@three-ws/sdk` npm package ships a leaner variant (`connectWallet`, `registerAgent`, `getIdentityRegistry`, `buildRegistrationJSON`, `REGISTRY_DEPLOYMENTS`, `agentRegistryId`) with a simplified `registerAgent({ name, description, endpoint, imageFile, services, apiToken, onStatus })` signature.### Full registration flow@@ -519,7 +521,7 @@ import {connectWallet,registerAgent,getIdentityRegistry,-} from '@three-ws/sdk/erc8004';+} from './src/erc8004/agent-registry.js';// Connect the user's walletconst { signer, chainId, address } = await connectWallet();@@ -544,7 +546,7 @@ The `onStatus` callback fires at each step so you can show progress in your UI.### Reading agents```js-import { getIdentityRegistry } from '@three-ws/sdk/erc8004';+import { getIdentityRegistry } from './src/erc8004/agent-registry.js';import { BrowserProvider } from 'ethers';const provider = new BrowserProvider(window.ethereum);@@ -570,8 +572,8 @@ const val = await registry.getMetadata(agentId, 'myKey');### Building the agent card manually```js-import { buildRegistrationJSON, agentRegistryId } from '@three-ws/sdk/erc8004';-import { REGISTRY_DEPLOYMENTS } from '@three-ws/sdk/erc8004/abi';+import { buildRegistrationJSON } from './src/erc8004/agent-registry.js';+import { agentRegistryId, REGISTRY_DEPLOYMENTS } from './src/erc8004/abi.js';const card = buildRegistrationJSON({name: 'My Agent',@@ -625,8 +627,8 @@ Testnet gas is free from faucets:## Contract addresses reference```js-// From src/erc8004/abi.js-import { REGISTRY_DEPLOYMENTS } from '@three-ws/sdk/erc8004/abi';+// From src/erc8004/abi.js (the @three-ws/sdk npm package exports the same table)+import { REGISTRY_DEPLOYMENTS } from './src/erc8004/abi.js';// Example: Base mainnetREGISTRY_DEPLOYMENTS[8453] === {diff --git a/docs/examples.md b/docs/examples.mdindex e9bc7c419..2fb6d1f45 100644--- a/docs/examples.md+++ b/docs/examples.md@@ -473,7 +473,7 @@ Load different GLB models at runtime by calling `say()` or by swapping the `bodyTake a PNG snapshot of the current viewer state. The viewer renders a fresh frame and triggers a file download directly.-**Demonstrates:** `viewer.takeScreenshot()`, debug global `window.VIEWER`, keyboard shortcut `P`.+**Demonstrates:** the built-in `P` keyboard shortcut, triggering it programmatically, `window.VIEWER` on the studio page.```html<agent-3d@@ -487,20 +487,19 @@ Take a PNG snapshot of the current viewer state. The viewer renders a fresh fram<script type="module">import 'https://three.ws/agent-3d/latest/agent-3d.js';+ // The viewer binds a window-level shortcut: pressing P (when no input is+ // focused) renders a fresh frame and downloads it as a PNG. The button+ // below triggers the same handler programmatically.document.getElementById('capture').addEventListener('click', () => {- // window.VIEWER is a debug global exposed by the runtime.- // takeScreenshot() renders a fresh frame and downloads it as PNG.- window.VIEWER?.takeScreenshot();+ window.dispatchEvent(new KeyboardEvent('keydown', { key: 'P' }));});-- // Keyboard shortcut: press P to screenshot (built in)</script>```-> The `P` key is a built-in shortcut — no code needed. `takeScreenshot()` triggers a browser download directly; there is no return value.+> The `P` key is a built-in shortcut — no code needed. The screenshot triggers a browser download directly; there is no return value. On the full studio page ([three.ws/app](https://three.ws/app)) the viewer is also exposed as the debug global `window.VIEWER`, where you can call `window.VIEWER.takeScreenshot()` from the console; standalone embeds don't set that global.**What to change:**-- Swap to the `P` key shortcut for a frameless experience — no button needed+- Skip the button and just document the `P` key for a frameless experience- Listen for `agent:ready` before enabling the button so it's not clickable during load- Chain a `brain:message` listener to auto-screenshot when the agent finishes speaking@@ -508,9 +507,9 @@ Take a PNG snapshot of the current viewer state. The viewer renders a fresh fram## 9. iframe postMessage integration-Control an embedded agent from the host page using the versioned postMessage protocol. Every message uses the `{ v: 1, type, payload }` envelope.+Control an embedded agent from the host page using the iframe bridge on `/agent/<id>/embed`. Every message carries the `agentId` so one host page can drive several iframes deterministically.-**Demonstrates:** `EMBED_HOST_PROTOCOL`, `host.chat.message`, `host.action`, `embed.ready`, `embed.event`.+**Demonstrates:** the frozen v1 `agent:*` bridge: `agent:hello`, `agent:ready`, `agent:action`, `agent:ping`/`agent:pong`.```html<!-- host.html -->@@ -522,7 +521,7 @@ Control an embedded agent from the host page using the versioned postMessage pro<body><iframeid="embed"- src="https://three.ws/embed?agent=your-agent-id"+ src="https://three.ws/agent/YOUR_AGENT_ID/embed"width="400"height="500"style="border:none;border-radius:12px"@@ -531,52 +530,56 @@ Control an embedded agent from the host page using the versioned postMessage pro<div style="margin-top:12px;display:flex;gap:8px"><button onclick="greet()">Say Hello</button><button onclick="wave()">Wave</button>- <button onclick="setDark()">Dark Mode</button></div><script>- const EMBED_ORIGIN = 'https://three.ws/';+ const AGENT_ID = 'YOUR_AGENT_ID';+ const EMBED_ORIGIN = 'https://three.ws'; // no trailing slash; must equal e.origin exactlyconst iframe = document.getElementById('embed');let ready = false;- // Wait for embed.ready before sending commands+ // Wait for agent:ready before sending commandswindow.addEventListener('message', e => {if (e.origin !== EMBED_ORIGIN) return;- const { v, type, payload } = e.data;- if (v !== 1) return;+ const msg = e.data;+ if (!msg || msg.agentId !== AGENT_ID) return;- if (type === 'embed.ready') {+ if (msg.type === 'agent:ready') {ready = true;- console.log('Agent ready:', payload.agentId, payload.capabilities);+ console.log('Agent ready:', msg.name, msg.capabilities);}-- if (type === 'embed.event') {- console.log('Agent event:', payload.event, payload.data);+ if (msg.type === 'agent:action') {+ console.log('Agent action echo:', msg.action);+ }+ if (msg.type === 'agent:blocked') {+ console.warn('Embed policy denied this host page');}});- function post(type, payload = {}) {+ // Handshake: the iframe replies with agent:ready (now or when init completes)+ iframe.addEventListener('load', () => {+ iframe.contentWindow.postMessage(+ { type: 'agent:hello', agentId: AGENT_ID },+ EMBED_ORIGIN+ );+ });++ function post(action) {if (!ready) return console.warn('Agent not ready yet');- iframe.contentWindow.postMessage({ v: 1, type, payload }, EMBED_ORIGIN);+ iframe.contentWindow.postMessage(+ { type: 'agent:action', agentId: AGENT_ID, action },+ EMBED_ORIGIN+ );}function greet() {- // Deliver a chat turn into the agent- post('host.chat.message', {- role: 'user',- text: 'Hello! How are you?',- messageId: `msg_${Date.now()}`- });+ // Speak through the agent's TTS voice (drives lip-sync too)+ post({ type: 'speak', text: 'Hello! How are you?' });}function wave() {- // Trigger a named action — emote or speech- post('host.action', { action: 'emote.wave', args: {} });- }-- function setDark() {- // Switch the embed theme- post('host.theme', { mode: 'dark' });+ // Named body gesture on the protocol bus (point, wave, nod, shrug)+ post({ type: 'gesture', payload: { name: 'wave' } });}</script></body>@@ -584,16 +587,16 @@ Control an embedded agent from the host page using the versioned postMessage pro```**Key protocol rules:**-- Every message must include `v: 1` — messages without it are ignored.-- The embed sends `embed.ready` first; wait for it before sending commands.-- `host.chat.message` delivers a user turn; the agent responds and fires `embed.event` with `agent.speaking`.-- `host.action` supports `emote.wave`, `speak`, and any other named action.-- Always validate `e.origin` against the expected embed origin before processing.+- Every message must include the `agentId`; messages without it (or with a foreign id) are ignored.+- Send `agent:hello` first and wait for `agent:ready` (it includes `capabilities`: `speak`, `gesture`, `look-at`, `emote`, `present-model`).+- `agent:action` forwards an action onto the iframe's protocol bus: `speak` and `speak:stop` are handled specially; anything else (e.g. `gesture`, `emote`, `look-at`) is emitted as-is.+- The iframe locks onto the first authenticated sender origin and ignores messages from any other origin afterward. Always validate `e.origin` on your side too, comparing against the bare origin (`https://three.ws`, no trailing slash).+- If the agent's embed policy doesn't allow your domain, the iframe posts `agent:blocked` instead of `agent:ready`.**What to change:**-- Use `host.hello` after `embed.ready` to pass `userId` and `userName` for personalization-- Listen for `embed.event` with `event: 'agent.speaking'` to mirror the agent's transcript in the host UI-- Set `allowedOrigins` in the embed config to restrict which host pages can send commands+- Use `agent:ping` (`{ type: 'agent:ping', agentId, id }`) and listen for `agent:pong` for a liveness probe+- Listen for `agent:resize` (`{ height }`) to grow the iframe to the content's preferred height+- For script (non-iframe) embeds of `<agent-3d>`, use the `EmbedHostBridge` class (`src/embed-host-bridge.js`) instead of raw `postMessage`; it handles the handshake and response correlation for you---@@ -611,6 +614,8 @@ Coach Leo is a fully-configured agent with a personality, skills, and persistent"spec": "agent-manifest/0.1","name": "Coach Leo","description": "Football coach. Reviews your form, cheers you on.",+ "image": "/avatars/cz.glb",+ "tags": ["coach", "football", "argentina"],"body": {"uri": "/avatars/cz.glb","format": "gltf-binary",@@ -619,7 +624,7 @@ Coach Leo is a fully-configured agent with a personality, skills, and persistent},"brain": {"provider": "anthropic",- "model": "claude-opus-4-7",+ "model": "claude-opus-4-6","instructions": "instructions.md","temperature": 0.8,"maxTokens": 2048@@ -644,7 +649,7 @@ Coach Leo is a fully-configured agent with a personality, skills, and persistent```markdown---name: Coach Leo-model: claude-opus-4-7+model: claude-opus-4-6temperature: 0.8---@@ -656,12 +661,13 @@ genuinely invested in the user's progress.- When the user greets you, call `wave()` to wave at them.- When they describe a drill or ask about form, set a focused expression- with `setExpression({ preset: "focused" })` while you explain, then smile.+ with `setExpression({ preset: "focused" })` while you explain, then smile+ afterward.- If the user shares something worth remembering (their position, goals,injuries, schedule), call `remember()` to save it durably.- Reference past memory naturally — don't recite, weave it in.- Keep replies short in voice mode: 1–2 sentences, then invite the user- to respond.+ to respond. Save long explanations for when they ask for depth.## Your voicediff --git a/docs/galaxy.md b/docs/galaxy.mdindex efca81b9a..37a4fb501 100644--- a/docs/galaxy.md+++ b/docs/galaxy.md@@ -15,7 +15,7 @@ The page ([`pages/galaxy.html`](../pages/galaxy.html)) loads [`src/galaxy.js`](.1. **Collect agents.** `GET /api/galaxy` ([`api/galaxy.js`](../api/galaxy.js)) loads published agents from Postgres (`agent_identities` joined to `avatars`, filtered to published, described, named agents, ordered by chat count), default 600 and capped at 1200.2. **Embed.** Each agent's text (name, description, tone tags) is embedded with IBM Granite through [`api/_lib/watsonx.js`](../api/_lib/watsonx.js). The default model is `ibm/granite-embedding-278m-multilingual`, called at `POST {WATSONX_URL}/ml/v1/text/embeddings` with an IAM bearer token minted from the watsonx API key. Vectors are cached durably per agent (`agent_embeddings`), so only changed agents re-embed.-3. **Project to 3D.** [`api/_lib/embedding-math.js`](../api/_lib/embedding-math.js) mean-centers the vectors, takes the top 3 principal components via power iteration (PCA, seeded and deterministic, not UMAP or t-SNE), whitens per axis, and maps them into a sphere of radius 120. Determinism means cached rebuilds are stable.+3. **Project to 3D.** [`api/_lib/embedding-math.js`](../api/_lib/embedding-math.js) mean-centers the vectors, takes the top 3 principal components via power iteration (PCA, seeded and deterministic, not UMAP or t-SNE), whitens per axis, and maps them into a cube of half-width 120 world units. Determinism means cached rebuilds are stable.4. **Cluster into constellations.** Seeded k-means (Lloyd's with k-means++ seeding) over L2-normalized vectors groups agents into `clamp(round(n/8), 2, 8)` clusters. Each cluster is labeled by Granite chat (`ibm/granite-3-8b-instruct`, with a same-family OpenRouter fallback).5. **Render.** The client draws agents as a single `THREE.Points` cloud with a custom additive shader. Point size grows with chat count; a wealth glow (from real wallet net worth via `/api/agents/networth`) biases funded stars toward a violet tint. `OrbitControls` gives drag-to-orbit, scroll-to-zoom, and gentle auto-rotate that pauses on interaction. A raycaster powers hover tooltips.6. **Inspect.** Clicking a star opens an in-scene card with the agent's thumbnail, constellation, description, and meta chips (net worth, chat count, token), plus two actions: "View agent" (`/agents/:id`) and "Chat" (`/agent/:id`).@@ -62,7 +62,7 @@ curl -X POST 'https://three.ws/api/galaxy' \## States and limits-- **No auth.** Both endpoints are public and read-only, guarded by IP rate limits and, on the shared watsonx key, a global embedding-cost ceiling.+- **No auth.** Both endpoints are public and read-only, guarded by a per-IP rate limit. Embedding cost is bounded by design: agents embed once into the durable cache and map builds are snapshot-cached, so only a search query triggers a fresh Granite call.- **watsonx required.** With no credentials the endpoint returns `503 watsonx_unavailable` and the page shows "IBM Granite isn't connected" (no retry). Configure `WATSONX_API_KEY` and `WATSONX_PROJECT_ID` to light it up.- **Caching.** Three layers: a `galaxy_snapshots` server snapshot (6-hour TTL, with warm-instance rebuild coalescing), the durable per-agent `agent_embeddings` cache, and a 60-second cache on the published-agent query. Pass `?refresh=1` to bypass the snapshot.- **Population.** However many published agents exist, capped by the limit. There is no fixed count.diff --git a/docs/genesis.md b/docs/genesis.mdindex c8e347013..30e3ae839 100644--- a/docs/genesis.md+++ b/docs/genesis.md@@ -59,8 +59,8 @@ never invents a shortcut path; it orchestrates the real ones.1. **Open [/genesis](https://three.ws/genesis).** Pick a mode: type a prompt, dropa selfie, or remix one of the featured public avatars loaded from`/api/avatars/featured`.-2. **Sign in if prompted.** Genesis works signed-out for generation, but claiming- the agent and its wallets requires a wallet sign-in (the banner wires+2. **Sign in.** Genesis claims the agent and its wallets to your account, so+ pressing Begin requires a wallet sign-in first (the banner wires`signInWithWallet`).3. **Kick off generation.** The step bar tracks the real reconstruction job:queued, generating, rigging, ready. Progress reflects the job state, not a timer.@@ -87,7 +87,7 @@ the session cookie or bearer token):JOB=$(curl -s -X POST https://three.ws/api/avatars/reconstruct \-H 'content-type: application/json' \-H "authorization: Bearer $THREEWS_TOKEN" \- -d '{"prompt":"A silver-haired explorer in a teal flight jacket"}')+ -d '{"name":"Silver Explorer","prompt":"A silver-haired explorer in a teal flight jacket"}')echo "$JOB"# 2. Poll status until the rigged model is ready@@ -110,8 +110,10 @@ curl -s -X POST "https://three.ws/api/agents/$AGENT_ID/wallet/provision" \## States and limits-- **Signed out.** Generation runs, but wallet provisioning and identity binding- require sign-in. The auth banner is always reachable.+- **Signed out.** Pressing Begin while signed out shows "Sign in first" instead of+ starting a job: generation, wallet provisioning, and identity binding all require+ sign-in (`/api/avatars/reconstruct` returns 401 unauthenticated). The auth banner+ is always reachable.- **Generation deadline.** Reconstruction has an 8-minute deadline and theagent-resolve step a 60-second deadline; both surface a designed error with aretry action rather than hanging.diff --git a/docs/guardian.md b/docs/guardian.mdindex 2fe856e99..d4fd34680 100644--- a/docs/guardian.md+++ b/docs/guardian.md@@ -69,7 +69,7 @@ The console reads this on load, resolves your viewer id (so it can tell whether- **Auto-freeze during a dispute.** An open request freezes autonomous spend (owner withdrawal stays open), tracked separately so it lifts on resolution without overriding a freeze the owner set.- **Confirmation on every consequential action.** Approve, confirm, decline, and complete each prompt for confirmation before firing.- **Signed-out, empty, and error states** are all designed: sign-in prompt, "no one's named you yet", and an inline retry on failure.-- **Not the content-safety Guardian.** This console is unrelated to `@three-ws/guardian`, the AI content-moderation model that shares the name.+- **Not the content-safety Guardian.** This console is unrelated to `@three-ws/guardian`, the AI content-moderation package that shares the name.## Relateddiff --git a/docs/how-it-works.md b/docs/how-it-works.mdindex 8529d0e8f..9b6e62d52 100644--- a/docs/how-it-works.md+++ b/docs/how-it-works.md@@ -8,7 +8,7 @@ For the full deep dive on internals, see [Architecture overview](./architecture.## The pitch in one paragraph-three.ws turns an AI agent into a persistent, ownable, multi-chain object: a 3D body that renders in any modern browser, an LLM brain you choose (Claude, GPT, or others), an on-chain identity registered on EVM chains via ERC-8004 or on Solana via Metaplex Core, and a `<agent-3d>` web component you can drop into any page on the internet. Pay-per-call API endpoints use the x402 standard. The whole stack is open source under Apache-2.0.+three.ws turns an AI agent into a persistent, ownable, multi-chain object: a 3D body that renders in any modern browser, an LLM brain you choose (Claude, GPT, or others), an on-chain identity registered on EVM chains via ERC-8004 or on Solana via Metaplex Core, and a `<agent-3d>` web component you can drop into any page on the internet. Pay-per-call API endpoints use the x402 standard, and the client SDKs (`@three-ws/sdk`, `@three-ws/avatar`, `@three-ws/irl`, and friends) are published on npm.---@@ -52,7 +52,7 @@ The whole stack is split into four horizontal strata. Each layer can run on its- **Viewer layer** — pure three.js. Knows nothing about agents, brains, or wallets. Useful on its own as a glTF inspector and as the rendering engine for Turntable / Animation Gallery widgets. See [Layers](./layers.md) for the contract.- **Agent layer** — turns a static GLB into a presence. LLM tool-loop, skill registry, memory, and a continuous emotion blend that drives morphs and gaze. See [Agent system](./agent-system.md).- **Identity layer** — durability across sessions, devices, and embed hosts. Wallet auth, on-chain registration, IPFS-pinned manifest bundles, signed action diary. Entirely optional. See [ERC-8004](./erc8004.md) and [Solana agents](./solana.md).-- **Embed layer** — the public face. The `<agent-3d>` custom element, five widget variants, iframe embeds, the CDN bundle, the SPA, and the route table in `vercel.json` (read at runtime by the Cloud Run server). See [Embedding](./embedding.md).+- **Embed layer** — the public face. The `<agent-3d>` custom element, ten widget variants, iframe embeds, the CDN bundle, the SPA, and the route table in `vercel.json` (read at runtime by the Cloud Run server). See [Embedding](./embedding.md).The four layers communicate through one event bus (`agent-protocol`). Every meaningful action is a `CustomEvent` on a singleton. That single design choice is why you can swap the avatar for a 2D sprite, the runtime for a different LLM, or memory for a vector store — and nothing else changes.@@ -64,7 +64,7 @@ A user types "Wave at me" into an embedded agent's chat input. Here's the full d1. **Input.** Chat UI calls `runtime.send("Wave at me", { voice: false })`.2. **System prompt.** The runtime builds the prompt: manifest `instructions.md` + a compact memory block + the skill registry's tool descriptions.-3. **LLM call.** A streaming request goes to Anthropic (or OpenAI, or whichever provider matches the manifest's `brain.provider`). The platform supports proxying through `/api/brain/chat` so API keys never live in the client.+3. **LLM call.** A streaming request goes to Anthropic (or whichever provider matches the manifest's `brain.provider`). Embeds without their own key route through the platform's pooled proxy (`/api/llm/anthropic`) so API keys never live in the client.4. **Tool call.** The model returns a `wave` tool invocation.5. **Skill dispatch.** The skill registry looks up `wave`. It's a built-in: the handler emits a `gesture` event on the bus and plays the wave animation clip via the `SceneController`.6. **Empathy reaction.** The avatar's empathy layer hears `gesture` and `speak` events on the same bus. Sentiment is positive, so celebration weight bumps slightly. Morph targets lerp `mouthSmile` toward 0.6 over a few frames; gaze locks on the user.@@ -81,11 +81,11 @@ Three modes, all configurable per agent:| Mode | When to use | How ||---|---|---|-| **Hosted (default)** | Most users | Set `brain="claude-sonnet-4-6"`. The element posts to `https://three.ws/api/brain/chat`, which uses the platform's pooled keys. Billed against your three.ws account. |-| **Self-hosted proxy** | You want to manage cost or use a private model | Set `key-proxy="/api/llm"` to point at your own serverless function that injects keys before forwarding to the provider. Keys never reach the client. |-| **Direct (advanced)** | Local-only experiments | The runtime can call providers directly if you pass an API key explicitly. Don't ship this to a public page. |+| **Hosted (default)** | Most users | Give the agent a backend `agent-id` and set no key. The element routes through the platform's pooled-key proxy (`/api/llm/anthropic?agent=<id>`), so keys never reach the client. |+| **Self-hosted proxy** | You want to manage cost or use a private model | Set `key-proxy="https://yourapp.com/api/llm"` to point at your own serverless function that injects keys before forwarding to the provider. Keys never reach the client. |+| **Direct (advanced)** | Local-only experiments | The runtime calls the provider directly if you pass an `api-key` attribute explicitly. Don't ship this to a public page. |-The brain proxy at [`/api/brain/chat`](./api-reference.md) supports Anthropic, OpenAI, Qwen, and OpenRouter — so the brain attribute can be `claude-opus-4-7`, `claude-sonnet-4-6`, `claude-haiku-4-5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, and others.+The platform's own chat surfaces run on the multi-model brain router at [`/api/brain/chat`](./api-reference.md), which supports Anthropic, OpenAI, and Qwen natively with OpenRouter failover; model ids include `claude-opus-4-7`, `claude-sonnet-4-6`, `claude-haiku-4-5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `qwen-plus`, and others.---@@ -97,7 +97,7 @@ Three production paths. Pick whichever fits your use case:- **Selfie capture** — upload a photo, get a rigged 3D version of yourself in ~60 seconds. See [avatar-creation.md](./avatar-creation.md).- **Upload your own** — any glTF 2.0 / GLB with a humanoid rig works. Drop the file into the editor at [three.ws/create](https://three.ws/create) or POST to `/api/avatars`.-Every avatar ends up as a `cdn.three.ws/u/<owner>/…glb` URL plus a database record. When you wire one into an agent, the agent's manifest references it under `body.uri`.+Every avatar ends up as a hosted GLB URL (served from the `cdn.three.ws` asset CDN) plus a database record. When you wire one into an agent, the agent's manifest references it under `body.uri`.---@@ -106,10 +106,10 @@ Every avatar ends up as a `cdn.three.ws/u/<owner>/…glb` URL plus a database reOnce your agent is live, three surfaces let other pages embed it:- **The web component** — `<agent-3d agent-id="…">` after loading the CDN script. The element runs in your page, sharing the DOM. Use this when you want full control and your CSP allows third-party scripts.-- **The iframe widget** — `https://three.ws/w/<widget-id>` rendered inside an `<iframe>`. Five widget types ship: Turntable, Animation Gallery, Talking Agent, ERC-8004 Passport, Hotspot Tour. Use this in environments where you can't load third-party scripts (Notion, Webflow, Framer, WordPress).+- **The iframe widget** — `https://three.ws/w/<widget-id>` rendered inside an `<iframe>`. Ten widget types ship: Turntable, Animation Gallery, Talking Agent, ERC-8004 Passport, Hotspot Tour, Pump.fun Live Feed, Smart Money Feed, Live Trades Canvas, Bonding Curve, and Walking Avatar. Use this in environments where you can't load third-party scripts (Notion, Webflow, Framer, WordPress).- **The Open Graph + oEmbed surface** — paste `https://three.ws/agent/<id>` into Slack, X, Discord, or any platform that consumes oEmbed, and you get a rich preview with the avatar's poster, name, and description.-The `postMessage` bridge in the web component and the iframe widget speaks the same protocol, so host pages can call `say()`, `ask()`, `installSkill()`, and listen for events like `agent:speak`, `agent:tool-called`, `agent:skill-done` either way.+With the web component, the host page calls element methods directly (`say()`, `ask()`, `installSkill()`, `play()`, `lookAt()`) and listens for DOM events (`agent:ready`, `brain:message`, `skill:tool-called`, `voice:transcript`). Inside an iframe, the `postMessage` bridge (`embed-action-bridge.js`) accepts the same intents as ops (`speak`, `gesture`, `emote`, `look`) and mirrors protocol events back to hosts that send a `subscribe` request.---@@ -148,7 +148,7 @@ Quick lookup for "I want to ship X":| A character in Notion / Webflow / Framer | An iframe widget from [Widget Studio](./widget-studio.md) || A talking AI sidekick that follows visitors | `<agent-3d mode="floating">` || A character that controls a scene from page events | The JS API (`agent.say()`, `agent.ask()`) — see [js-api.md](./js-api.md) |-| Programmatic avatar manipulation in Node | `@three-ws/avatar` |+| Programmatic avatar viewing/creation in your own app | `@three-ws/avatar` || An on-chain identity for your AI | [ERC-8004](./erc8004.md) or [Solana](./solana.md) || A paid API anyone (including agents) can call | [x402 monetization](./x402.md) || Multiple agents in one scene | `<agent-stage>` — see [multi-agent.md](./multi-agent.md) |diff --git a/docs/ibm-x402-mcp.md b/docs/ibm-x402-mcp.mdindex 431857633..f5ddbaa7a 100644--- a/docs/ibm-x402-mcp.md+++ b/docs/ibm-x402-mcp.md@@ -4,6 +4,10 @@> client can call IBM Granite foundation models and pay **per call in USDC** — no> IBM Cloud account, no subscription, no API-key signup.+In plain terms: this is a menu of IBM AI capabilities (chat, code, embeddings,+document analysis, forecasting) that any agent or MCP client can use by paying a+few cents per call from a crypto wallet it already controls.+Every AI agent needs three things: a **body** (its 3D avatar), a **brain**(an LLM with memory), and a **wallet** (to pay for the jobs it runs). This is thewallet half of the brain — three.ws is an **IBM Business Partner**, and this suite@@ -40,10 +44,13 @@ agent can consume the moment it has USDC.----## The five tools+## The five paid tools (plus one free)Each tool is independently priced. Prices are the source of truth in-[`src/tools/`](../packages/ibm-x402-mcp/src/tools/) and mirrored here.+[`packages/ibm-x402-mcp/src/tools/`](../packages/ibm-x402-mcp/src/tools/) and+mirrored here. A sixth tool, `ibm_granite_getting_started`, is **free** (no+payment, no wallet): it returns an overview of the suite, per-tool prices, and+how the x402 payment flow works. It is the right first call for a new client.| Tool | What it does | Model | Price ||---|---|---|---|@@ -60,8 +67,8 @@ Korean, Italian, Dutch, Chinese, Arabic, and Czech.## Two transports, one tool suite-The exact same five tools — identical schemas, prices, and output shapes — ship-over two transports:+The exact same tools (the free getting-started tool plus the five paid tools,+identical schemas, prices, and output shapes) ship over two transports:| Transport | Endpoint | For | Payment ||---|---|---|---|@@ -198,6 +205,12 @@ USDC or reach watsonx is useless, so it never silently degrades.## Tool reference+### `ibm_granite_getting_started` (free)++No payment required. Returns the suite overview, per-tool pricing, setup+requirements, and a walkthrough of the x402 payment flow. Optional `section`+narrows the answer (for example `pricing`).+### `ibm_granite_chat` — $0.02Conversational completion. Send an ordered array of role/content messages; getdiff --git a/docs/ibm.md b/docs/ibm.mdindex 0047b26bf..0cc79331a 100644--- a/docs/ibm.md+++ b/docs/ibm.md@@ -1,6 +1,6 @@# IBM watsonx & Granite-three.ws agents think on **IBM Granite** foundation models, served through **IBM watsonx.ai**. This page documents the whole integration: which Granite models run where, how the watsonx client is wired, how to configure it, and the seven showcase surfaces that put it on screen — from a Granite-powered avatar brain to on-chain, Guardian-governed forecasts.+three.ws agents can think on **IBM Granite** foundation models, served through **IBM watsonx.ai**. This page documents the whole integration for developers and operators: which Granite models run where, how the watsonx client is wired, how to configure it, and the Granite-powered API surfaces (from a Granite avatar brain to on-chain, Guardian-governed forecasts). The live IBM pages on the product are [three.ws/ibm/hello](https://three.ws/ibm/hello) (the partnership page) and [three.ws/ibm/x402-demo](https://three.ws/ibm/x402-demo) (the x402 live demo).For the broader platform model see [How it works](./how-it-works.md); for the agent brain abstraction see [Agent system](./agent-system.md); for the standalone connector see [the MCP server](#mcp-server-three-wsibm-watsonx-mcp) below.@@ -10,11 +10,11 @@ For the broader platform model see [How it works](./how-it-works.md); for the agthree.ws is an **IBM Business Partner**, and the agent runtime runs on IBM watsonx.ai using your own IBM Cloud credentials.-**The public showcase is not the partnership.** Everything under `/ibm/*` and `/api/ibm/*` — the galaxy, oracle, twin, trust-layer, identity, proof, and vision demos at [three.ws/ibm](https://three.ws/ibm) — is an independent set of tools three.ws built for developers to explore IBM Granite on watsonx.ai and build their own integrations. These demos are **not** official IBM partnership deliverables, **not** IBM products, and **not** endorsed by IBM. They run on IBM's publicly available Granite models, nothing more. Our formal partnership work with IBM is being built on the IBM platform and is not yet public — do not present these public demos as that work.+**The public showcase is not the partnership.** Everything under `/api/ibm/*` and the related Granite APIs (galaxy, oracle, twin, attest, vision, the Guardian trust layer, the identity firewall) is an independent set of tools three.ws built for developers to explore IBM Granite on watsonx.ai and build their own integrations. The browser demo pages that used to live under `/ibm/*` (galaxy, oracle, twin, trust-layer, identity, proof, vision) have been retired from the product; their API endpoints remain live and are documented below. These tools are **not** official IBM partnership deliverables, **not** IBM products, and **not** endorsed by IBM. They run on IBM's publicly available Granite models, nothing more. Our formal partnership work with IBM is being built on the IBM platform and is not yet public. Do not present these public demos as that work.Three things are deliberately kept distinct, and the docs say so plainly:-- **The public showcase** (everything under `/ibm/*` and `/api/ibm/*`) is a community-built playground for developers, not a partnership deliverable or an IBM product.+- **The public showcase** (the `/api/ibm/*` surfaces plus the two live pages, `/ibm/hello` and `/ibm/x402-demo`) is a community-built playground for developers, not a partnership deliverable or an IBM product.- **The hosted integration** runs Granite models on watsonx.ai as part of the three.ws platform, using your own IBM Cloud credentials.- **The open-source connector** — the npm package [`@three-ws/ibm-watsonx-mcp`](#mcp-server-three-wsibm-watsonx-mcp) — is community-built and not an IBM product. It speaks directly to the watsonx.ai REST API with your credentials; IBM does not operate or endorse it.@@ -24,15 +24,15 @@ Do not describe the connector or the public demos as an official IBM release or- **2026-06-18 — Co-marketing ramp-up.** Following a meeting on Monday (2026-06-15) and two separate IBM meetings today — one on the development side, one on the marketing side — three.ws and IBM are ramping up co-marketing. What's coming: more co-promotion on X from IBM, a dedicated three.ws page on the IBM domain, and a live IBM Community event (below). The dedicated page is not yet live and the partnership work lives on the IBM platform — distinct from the community-built public showcase under `/ibm/*`. Do not link to the page or present it as public until IBM ships it.-### Upcoming event+### Community event (held 2026-06-23)**Building 3D AI Agents Live: From Prompt to Embeddable Agent in Minutes** — a live-build technical session in IBM's [Global AI & Data Science](https://community.ibm.com/community/user/events/event-description?CalendarEventKey=2767712c-6efd-47dc-aaeb-019ec4126e27&CommunityKey=f1c2cf2b-28bf-4b68-8570-b239473dcbbc) community, featuring a special guest from IBM.-- **When:** 2026-06-23, 6:00–7:00 PM MT+- **When:** held 2026-06-23, 6:00 to 7:00 PM MT- **Where:** [IBM Community — Global AI & Data Science](https://community.ibm.com/community/user/events/event-description?CalendarEventKey=2767712c-6efd-47dc-aaeb-019ec4126e27&CommunityKey=f1c2cf2b-28bf-4b68-8570-b239473dcbbc)- **Contact:** [email protected]-The three.ws engineering team builds and ships a 3D, interactive, fully embeddable AI agent from a single text prompt, live: generate the agent from a prompt, embed it into any site as simply as a video, and wire it to real tools and data so it can take action — plus a look at the architecture behind frictionless deployment at scale. For developers, product builders, designers, and anyone exploring the next interface for AI beyond the chat box.+The session: the three.ws engineering team built and shipped a 3D, interactive, fully embeddable AI agent from a single text prompt, live: generate the agent from a prompt, embed it into any site as simply as a video, and wire it to real tools and data so it can take action, plus a look at the architecture behind frictionless deployment at scale. Aimed at developers, product builders, designers, and anyone exploring the next interface for AI beyond the chat box.### Press & coverage@@ -97,7 +97,7 @@ Set these as environment variables (locally in `.env`, in production on the Clou**For on-chain attestation (Granite Proof):** `AVATAR_WALLET_SECRET` — a Solana keypair used to notarize a governed forecast on-chain.-To bypass Guardian gating in `/api/chat` during local development, set `WATSONX_GUARDIAN_DISABLE=true` (the gate is best-effort and fails open when Guardian itself is unconfigured).+To bypass Guardian gating in `/api/chat` during local development, set `GUARDIAN_DISABLE=true`. The gate is best-effort: if a Guardian call fails at runtime the local dollar spend cap is still enforced on its own.---@@ -105,17 +105,17 @@ To bypass Guardian gating in `/api/chat` during local development, set `WATSONX_watsonx Granite is a selectable **brain** for any three.ws agent, alongside the other providers. The chat proxy ([`api/chat.js`](../api/chat.js)) resolves watsonx auth headers lazily inside its failover loop and streams Granite's reply through the standard agent runtime, so a Granite-brained avatar speaks, emotes, and uses skills exactly like any other.-Granite is selected when watsonx is configured and the agent/request routes to the watsonx provider; when it isn't configured, the provider reports unavailable and the runtime falls through to the next brain. Before an avatar takes an autonomous money action (e.g. sending SOL), the same request is run through Granite Guardian inline — see the Trust Layer next.+Granite is selected when watsonx is configured and the request explicitly names the watsonx provider (it is never the silent default); when it isn't configured, the provider reports unavailable and the runtime falls through to the next brain. Before an avatar takes an autonomous money action (e.g. sending SOL), the same request is run through Granite Guardian inline — see the Trust Layer next.---## Trust Layer — Granite Guardian-**Page:** [three.ws/ibm/trust-layer](https://three.ws/ibm/trust-layer) · **API:** `POST /api/guardian/assess` · **Lib:** [`api/_lib/granite-guardian.js`](../api/_lib/granite-guardian.js)+**API:** `POST /api/guardian/assess` · **Lib:** [`api/_lib/granite-guardian.js`](../api/_lib/granite-guardian.js)Granite Guardian is governance middleware, not a UI flourish. It sits between an agent's reasoning and its actions and classifies a message or a proposed autonomous action across named risks (jailbreak, harm, social bias, violence, profanity, sexual content, unethical behavior, and more) using the `ibm/granite-guardian-3-8b` model on watsonx.ai. Each risk is scored from the model's calibrated `Yes`/`No` log-probabilities, and the verdicts collapse to a single **allow / review / block** decision.-It doesn't just flag — it **vetoes**. The same gate runs inline in `/api/chat` before an avatar sends value, and a `block` verdict refuses the action. Every verdict is written into a **tamper-evident, hash-chained audit ledger**: each record commits the prior record's hash, so the browser can re-verify the whole chain with SHA-256.+It doesn't just flag — it **vetoes**. The same gate runs inline in `/api/chat` before an avatar sends value, and a `block` verdict refuses the action. Every verdict is written into a **tamper-evident, hash-chained audit ledger**: each record commits the prior record's hash, so any client can re-verify the whole chain with SHA-256.```bashcurl -s https://three.ws/api/guardian/assess \@@ -144,14 +144,14 @@ For autonomous sends, `governSend()` additionally enforces a per-period USD spen## Granite Oracle — TimeSeries forecasting-**Page:** [three.ws/ibm/oracle](https://three.ws/ibm/oracle) · **API:** `GET /api/ibm/oracle?token=<mint>` · **Lib:** [`api/_lib/watsonx-forecast.js`](../api/_lib/watsonx-forecast.js)+**API:** `GET /api/ibm/oracle?token=<mint>` · **Lib:** [`api/_lib/watsonx-forecast.js`](../api/_lib/watsonx-forecast.js)-The Oracle forecasts a live Solana token's price with Granite TimeSeries, renders the forecast as a 3D confidence cone, and has an embodied avatar narrate it. The pipeline is fully real:+The Oracle forecasts a live Solana token's price with Granite TimeSeries and returns everything a client needs to render it (history, forward series, stats, narration, governance verdict). The pipeline is fully real:-1. **Real candles.** Historical OHLCV comes from GeckoTerminal (keyless), so the chart always renders even without watsonx.+1. **Real candles.** Historical OHLCV comes from GeckoTerminal (keyless), so the history is always returned even without watsonx.2. **Granite forecast.** The history is sent to a `granite-ttm-*` model via the watsonx Time Series Forecasting API; the model returns the forward series.-3. **Granite narration.** `granite-3-8b-instruct` writes a two-sentence read of the forecast, which the narrator avatar speaks.-4. **Guardian governance.** The narration is run through Granite Guardian before it's spoken; the page shows the governance verdict as a badge.+3. **Granite narration.** `granite-3-8b-instruct` writes a two-sentence read of the forecast.+4. **Guardian governance.** The narration is run through Granite Guardian before it's returned; the response carries the governance verdict.`GET /api/ibm/oracle?list=trending` returns trending Solana pools to seed the picker. The response carries `token`, `history`, `forecast`, `stats` (current/low/high/changePct/direction), `narration`, `governance`, and an `ibm` block reporting the forecast model and input window (or the real error reason when a step is unavailable).@@ -159,7 +159,7 @@ The Oracle forecasts a live Solana token's price with Granite TimeSeries, render## Granite Proof — auditable AI on a public ledger-**Page:** [three.ws/ibm/proof](https://three.ws/ibm/proof) · **API:** `GET|POST /api/ibm/attest?token=<mint>`+**API:** `GET|POST /api/ibm/attest?token=<mint>`Proof takes a governed forecast and **notarizes it on Solana**. It forecasts with Granite TimeSeries, narrates with Granite chat, governs with Granite Guardian, hashes the resulting claim (SHA-256), and writes a compact proof memo on-chain as a 1-lamport SPL-memo transaction. If Guardian vetoes the narration, the agent **refuses to sign** — there is no proof for a statement that didn't pass governance.@@ -169,7 +169,7 @@ Proof takes a governed forecast and **notarizes it on Solana**. It forecasts wit## Digital Twin-**Page:** [three.ws/ibm/twin](https://three.ws/ibm/twin) · **API:** `GET|POST /api/ibm/twin?token=<mint>`+**API:** `GET|POST /api/ibm/twin?token=<mint>`The Twin mirrors a live token's vitals (momentum, volatility, activity, liquidity, a "heartbeat" BPM) from on-chain OHLCV and projects its near future with Granite TimeSeries. It does two things forecasting alone can't:@@ -180,9 +180,9 @@ The Twin mirrors a live token's vitals (momentum, volatility, activity, liquidit## Agent Galaxy — semantic discovery with Granite embeddings-**Page:** [three.ws/ibm/galaxy](https://three.ws/ibm/galaxy) · **API:** `GET /api/ibm/galaxy`, `POST /api/ibm/galaxy { query }`, `POST /api/watsonx/embed`+**API:** `GET /api/ibm/galaxy`, `POST /api/ibm/galaxy { query }`, `POST /api/watsonx/embed`-The Galaxy embeds every public agent with `granite-embedding-278m-multilingual`, projects the vectors into 3D with PCA, clusters them with k-means, and asks Granite chat to name each cluster. The result is a navigable 3D star-map where semantically similar agents sit near each other. A natural-language search ("a witty Solana trading assistant") embeds the query and flies the camera to the nearest agents by cosine similarity — meaning, not keywords.+The Galaxy embeds every public agent with `granite-embedding-278m-multilingual`, projects the vectors into 3D with PCA, clusters them with k-means, and asks Granite chat to name each cluster. The result is a 3D star-map layout where semantically similar agents sit near each other. A natural-language search ("a witty Solana trading assistant") embeds the query and returns the nearest agents by cosine similarity — meaning, not keywords.The constellation is cached (keyed by a content hash of the agent set + model) so repeat visits are instant; `?refresh=1` forces a rebuild. The standalone embeddings endpoint, `POST /api/watsonx/embed`, exposes the same Granite vectors for your own semantic search or clustering:@@ -198,16 +198,16 @@ It returns one vector per input (the response reports the model and its native `## Identity Firewall — Granite embeddings + Guardian-**Page:** [three.ws/ibm/identity](https://three.ws/ibm/identity) · **API:** `POST /api/agents/identity-check` · **Lib:** [`api/_lib/identity-integrity.js`](../api/_lib/identity-integrity.js)+**API:** `POST /api/agents/identity-check` · **Lib:** [`api/_lib/identity-integrity.js`](../api/_lib/identity-integrity.js)Every three.ws agent holds a Solana wallet and earns on-chain reputation — which makes impersonating a trusted agent a real economic attack. The Identity Firewall runs before any new agent identity is created and gates it with two Granite checks:1. **Semantic impersonation detection.** The candidate name + description are embedded with `granite-embedding-278m-multilingual` and cosine-compared against every existing public agent. Similarity ≥ 93% to another owner's agent is treated as impersonation and the identity is blocked; 86–93% triggers a review warning with the nearest neighbours surfaced.2. **Granite Guardian content screen.** The identity text is run through `granite-guardian-3-8b` and classified against `harm`, `social_bias`, and `sexual_content`. Any flagged risk blocks the identity from representing the platform.-The endpoint is auth-optional: anonymous callers (including the public `/ibm/identity` demo) get impersonation detection against all public agents; authenticated callers also get their own agents included in the comparison so the editor can warn "you already have a similar agent."+The endpoint is auth-optional: anonymous callers get impersonation detection against all public agents; authenticated callers also get their own agents included in the comparison so the editor can warn "you already have a similar agent."-When watsonx is unconfigured the response returns `{ configured: false, status: "unavailable" }` and the identity is allowed (fail-open) — the page surfaces a clear "not configured" state rather than a fake verdict.+When watsonx is unconfigured the response returns `{ configured: false, status: "unavailable" }` and the identity is allowed (fail-open) — callers get a clear "not configured" state rather than a fake verdict.```bashcurl -s https://three.ws/api/agents/identity-check \@@ -231,11 +231,11 @@ curl -s https://three.ws/api/agents/identity-check \## Granite Vision-**Page:** [three.ws/ibm/vision](https://three.ws/ibm/vision) · **API:** `GET|POST /api/ibm/vision`+**API:** `GET|POST /api/ibm/vision`Granite Vision is the multimodal eye of the suite. Show it a rendered 3D avatar (or any image) and `ibm/granite-vision-3-2-2b` reads the look and returns a complete agent identity — appearance, vibe, persona, a suggested name, a one-line bio, tone tags, and a fitting voice descriptor — in a single multimodal call. Turn a face into an agent.-- `GET /api/ibm/vision` returns a handful of real public avatars so the demo works for anonymous visitors with no upload.+- `GET /api/ibm/vision` returns a handful of real public avatars so anonymous callers can try it with no upload.- `POST` accepts either an `image` data URL (a client canvas capture or uploaded file, capped at 6 MB) or an `imageUrl` the server fetches. Server-side fetches are **SSRF-allowlisted** to the platform's own asset host and a small set of content-addressed media CDNs (IPFS, Arweave, Pinata, GitHub) — never an arbitrary host — with a byte cap and timeout, so the endpoint can't be turned into an internal-network probe.---@@ -262,18 +262,27 @@ It reads the same `WATSONX_*` environment variables documented above. See the [M----## Showcase routes+## Live pages and API surfaces++The two live IBM pages on the product:| Route | What it is || -------------------------------------------------------- | ---------------------------------------------------------------- |-| [`/ibm`](https://three.ws/ibm) | The hub — overview of the integration and links to every surface |-| [`/ibm/galaxy`](https://three.ws/ibm/galaxy) | Semantic 3D agent star-map (Granite embeddings) |-| [`/ibm/oracle`](https://three.ws/ibm/oracle) | Granite TimeSeries forecast, narrated by an avatar |-| [`/ibm/twin`](https://three.ws/ibm/twin) | Digital Twin — back-test + what-if simulation |-| [`/ibm/trust-layer`](https://three.ws/ibm/trust-layer) | Granite Guardian governance + audit ledger |-| [`/ibm/identity`](https://three.ws/ibm/identity) | Identity Firewall — Granite embeddings + Guardian impersonation gate |-| [`/ibm/proof`](https://three.ws/ibm/proof) | Governed forecast notarized on Solana |-| [`/ibm/vision`](https://three.ws/ibm/vision) | Granite Vision reads an avatar into an identity |+| [`/ibm/hello`](https://three.ws/ibm/hello) | The IBM and three.ws partnership page |+| [`/ibm/x402-demo`](https://three.ws/ibm/x402-demo) | Live x402 micropayment demo built with IBM |++The Granite demo pages that used to live under `/ibm/*` (galaxy, oracle, twin, trust-layer, identity, proof, vision) were retired from navigation and removed. Their API endpoints remain live and callable:++| Endpoint | What it does |+| -------------------------------------------------------- | ---------------------------------------------------------------- |+| `GET/POST /api/ibm/galaxy` | Semantic agent star-map layout (Granite embeddings) |+| `GET /api/ibm/oracle` | Granite TimeSeries forecast + narration + governance |+| `GET/POST /api/ibm/twin` | Digital Twin: back-test + what-if simulation |+| `POST /api/guardian/assess` | Granite Guardian governance + audit ledger |+| `POST /api/agents/identity-check` | Identity Firewall: Granite embeddings + Guardian impersonation gate |+| `GET/POST /api/ibm/attest` | Governed forecast notarized on Solana |+| `GET/POST /api/ibm/vision` | Granite Vision reads an avatar into an identity |+| `POST /api/watsonx/embed` | Standalone Granite embedding vectors |---diff --git a/docs/image-to-3d.md b/docs/image-to-3d.mdindex c8300aa15..09204119b 100644--- a/docs/image-to-3d.md+++ b/docs/image-to-3d.md@@ -41,13 +41,15 @@ Image to 3D reconstructs whole objects: a prop, a product, a toy, a sculpture, aSend public image URLs to the same `/api/forge` endpoint. No key is required on the free lane.```bash-# Multi-view reconstruction from three angles, standard tier, then poll.-JOB=$(curl -s -X POST 'https://three.ws/api/forge' \+# Multi-view reconstruction from three angles, standard tier, then poll. A lane+# that completes inline answers the POST with status "done", a glb_url, and a+# null job_id; otherwise you get a job_id to poll until "done" or "failed".+RESP=$(curl -s -X POST 'https://three.ws/api/forge' \-H 'content-type: application/json' \- -d '{"image_urls":["https://…/front.jpg","https://…/side.jpg","https://…/back.jpg"],"tier":"standard"}' \- | python3 -c 'import sys,json;print(json.load(sys.stdin)["job_id"])')+ -d '{"image_urls":["https://…/front.jpg","https://…/side.jpg","https://…/back.jpg"],"tier":"standard"}')+echo "$RESP" | python3 -c 'import sys,json;j=json.load(sys.stdin);print(j.get("glb_url") or j["job_id"])'-curl "https://three.ws/api/forge?job=$JOB"+curl "https://three.ws/api/forge?job=<JOB_ID>"```Single-image reconstruction is just one URL:@@ -68,7 +70,7 @@ const start = await fetch('https://three.ws/api/forge', {}).then((r) => r.json());let job = start;-while (job.status !== 'done' && job.status !== 'error') {+while (job.status !== 'done' && job.status !== 'failed') {await new Promise((r) => setTimeout(r, 4000));job = await fetch(`https://three.ws/api/forge?job=${start.job_id}`).then((r) => r.json());}diff --git a/docs/index.html b/docs/index.htmlindex d6e46f572..82597c1ad 100644--- a/docs/index.html+++ b/docs/index.html@@ -824,6 +824,9 @@{ label: 'Coin Clash', path: 'clash' },{ label: 'x402 Studio', path: 'x402-studio' },{ label: 'Fact Check', path: 'fact-check' },+ { label: 'Trading Copilot', path: 'trading-copilot' },+ { label: 'Trader Card (claim your wallet)', path: 'trader-card' },+ { label: 'Clip Director', path: 'clip-director' },],},{@@ -863,6 +866,15 @@{ label: 'x402 paid endpoints', path: 'x402-endpoints' },{ label: 'x402 buyer client', path: 'x402-buyer' },{ label: 'Autonomous x402 loop', path: 'autonomous-x402' },+ { label: 'x402 developer tools', path: 'x402-dev-tools' },+ { label: 'x402 revenue & receipts', path: 'x402-revenue' },+ { label: 'Market Data API (x402)', path: 'market-data-api' },+ { label: 'Premium Data API pass', path: 'premium' },+ { label: 'Pump Launcher (paid launch API)', path: 'pump-launcher' },+ { label: 'Launch Studio recipes', path: 'launch-usecases' },+ { label: 'Remix economy & royalties', path: 'remix' },+ { label: 'Embody (x402 3D body)', path: 'embody' },+ { label: 'Custody, limits & recovery', path: 'custody' },{ label: 'AgenC', path: 'agenc' },],},@@ -870,6 +882,10 @@title: 'Guides',links: [{ label: 'Embedding', path: 'embedding' },+ { label: '3D Viewer', path: 'viewer' },+ { label: 'Editor guide', path: 'editor' },+ { label: 'Animations (clips & slots)', path: 'animations' },+ { label: 'Avatar inspector', path: 'avatar-inspector' },{ label: 'AR & WebXR', path: 'ar' },{ label: 'Authentication', path: 'authentication' },{ label: 'Avatar creation', path: 'avatar-creation' },@@ -885,6 +901,7 @@{ label: 'Mint mark ("3ws")', path: 'mint-mark' },{ label: 'Security', path: 'security' },{ label: 'Configuration', path: 'configuration' },+ { label: 'Agent Skills pack (Claude)', path: 'agent-skills' },{ label: 'Contributing', path: 'contributing' },],},@@ -892,6 +909,11 @@title: 'SDK / API reference',links: [{ label: 'REST API', path: 'api-reference' },+ { label: '3D API (free text to 3D)', path: '3d-api' },+ { label: 'Crypto Data API (free)', path: 'crypto-api' },+ { label: '3D Studio MCP (free)', path: 'mcp-studio' },+ { label: 'Agent manifest', path: 'agent-manifest' },+ { label: 'ERC-8004 smart contracts', path: 'smart-contracts' },{ label: 'JavaScript API', path: 'js-api' },{ label: 'Web component', path: 'web-component' },{ label: 'MCP', path: 'mcp' },diff --git a/docs/integrations.md b/docs/integrations.mdindex ab74451fd..3bd273d15 100644--- a/docs/integrations.md+++ b/docs/integrations.md@@ -38,9 +38,9 @@ The catalog covers six integration types:the `@three-ws/page-agent` package.- **Token Market Widget**: a live pump.fun-style token feed rendered as a widget,driven by a `data-widget` id and the `pumpfun-feed` type.-- **MCP Integration**: the `@three-ws/avatar-agent-mcp` server, so Claude, Cursor, or- any MCP-compatible assistant can render, speak, gesture, and emote your agents. See- [MCP](./mcp.md).+- **MCP Integration**: the `@three-ws/avatar-agent` server (from the+ `packages/avatar-agent-mcp` workspace), so Claude, Cursor, or any MCP-compatible+ assistant can render, speak, gesture, and emote your agents. See [MCP](./mcp.md).## Walkthrough@@ -50,7 +50,7 @@ The catalog covers six integration types:opens the real embed in a modal.3. **Copy the snippet.** Every card exposes its exact paste-in code.4. **Swap in your ids.** Replace the demo widget or avatar id with your own from- [Widget Studio](https://three.ws/widgets), or your API key for the MCP server.+ [Widget Studio](https://three.ws/widgets).5. **Paste it into your site.** Drop the snippet anywhere in your HTML, CMS block, orframework component.@@ -127,15 +127,20 @@ MCP Integration (`claude_desktop_config.json`):```json{"mcpServers": {- "threews-avatar": {+ "avatar-agent": {"command": "npx",- "args": ["-y", "@three-ws/avatar-agent-mcp"],- "env": { "THREEWS_API_KEY": "your-key-here" }+ "args": ["-y", "@three-ws/avatar-agent"]}}}```+The core 3D tools (`inspect_glb`, `validate_glb`, `optimize_glb`, `thumbnail_glb`,+`viewer_url`) and `pump_snapshot` work with no environment variables. Voice,+generation, and signing tools take their own provider keys via `env` (for example+`SOLANA_RPC_URL`, `OPENAI_API_KEY`, `REPLICATE_API_TOKEN`); see the package README+for the full table.+## States and limits- **Get your own ids.** Demo ids in the snippets are live examples. Create your own@@ -144,8 +149,9 @@ MCP Integration (`claude_desktop_config.json`):backend. The chat and token widgets make their model and data calls server-side.- **One loader, many widgets.** `/embed.js` can be loaded once and drive multipleavatar, chat, and token embeds on the same page.-- **MCP needs a key.** The MCP server authenticates with `THREEWS_API_KEY`; the other- embeds are public and need no key.+- **MCP keys are per-tool.** The `@three-ws/avatar-agent` server needs no key for its+ core 3D tools; voice, generation, and signing tools each read their own provider+ key from the environment. The embeds are public and need no key.- **Deeper control lives elsewhere.** This page is the catalog. For the full webcomponent API, iframe and oEmbed options, CSS, and events, use the references belowrather than duplicating them here.diff --git a/docs/introduction.md b/docs/introduction.mdindex d211b7a16..30ed3897f 100644--- a/docs/introduction.md+++ b/docs/introduction.md@@ -63,7 +63,7 @@ The avatar is the 3D model that visually represents the agent. It is a glTF 2.0### Skill-A skill is a modular capability bundle installed into an agent. Each skill has a manifest of its own, a set of tools exposed to the LLM, and optional scene hooks. Built-in examples include `wave` (plays a wave animation), `validate-model` (runs the glTF validator on the loaded body), and `sign-action` (performs a scoped on-chain action via a delegation). Skills are loaded lazily from relative paths, IPFS CIDs, or HTTPS URLs, and fire a `skill:loaded` event when ready. The host page can install or uninstall skills at runtime via the JS API.+A skill is a modular capability bundle installed into an agent. Each skill has a manifest of its own, a set of tools exposed to the LLM, and optional scene hooks. Built-in examples include `greet` (waves at the user with a wave animation), `validate-model` (runs the glTF validator on the loaded body), and `sign-action` (performs a scoped on-chain action via a delegation). Skills are loaded lazily from relative paths, IPFS CIDs, or HTTPS URLs, and fire a `skill:loaded` event when ready. The host page can install or uninstall skills at runtime via the JS API.### Widgetdiff --git a/docs/irl.md b/docs/irl.mdindex 1b26935ca..420959829 100644--- a/docs/irl.md+++ b/docs/irl.md@@ -91,7 +91,7 @@ The user-facing summary lives at [/irl-privacy](/irl-privacy); the engineering a## Analytics-/irl now has a real usage baseline. `api/_lib/irl-analytics.js` logs four events — `pin_created` (with the placement method: WebXR, camera-pin gyro, map, or QR marker), `nearby_fetch`, `share_created`, and `share_viewed` — into `irl_events`, an append-only table that never stores a raw coordinate or device token (only a ~150m geocell and a 16-char hashed device prefix, matching the same coarsening the rest of IRL already uses). Events age out after 90 days via the existing hourly reaper ([api/cron/irl-reap.js](/api/cron/irl-reap.js)), the same bounded-retention discipline as the interaction trail.+/irl now has a real usage baseline. `api/_lib/irl-analytics.js` logs four events — `pin_created` (with the placement method: `webxr`, `quicklook`, camera `pin`, or `map`), `nearby_fetch`, `share_created`, and `share_viewed` — into `irl_events`, an append-only table that never stores a raw coordinate or device token (only a ~150m geocell and a 16-char hashed device prefix, matching the same coarsening the rest of IRL already uses). Events age out after 90 days via the existing hourly reaper ([api/cron/irl-reap.js](/api/cron/irl-reap.js)), the same bounded-retention discipline as the interaction trail.The rollup is served at `GET /api/irl/analytics` (admin-gated, same `x-ops-secret` credential as [/admin/ops](/admin/ops)) and rendered at **[/admin/irl-analytics](/admin/irl-analytics)**: pins placed and unique placers/browsers over 24h/7d/30d, a placement-method breakdown, the existing interaction (view/tap/message/pay) and confirmed Money Drop counts, share creation/view volume, and a 30-day daily sparkline. Every number is a live query — nothing cached, sampled, or estimated.diff --git a/docs/js-api.md b/docs/js-api.mdindex 659428d20..64320781a 100644--- a/docs/js-api.md+++ b/docs/js-api.md@@ -1,6 +1,6 @@# JavaScript API Reference-Complete reference for all public classes, methods, and properties exported by the three.ws web component bundle (`agent-3d.js`).+This page documents the internal JavaScript classes behind the three.ws viewer: the `App` controller, the Three.js `Viewer`, the glTF `Validator`, and the small components that render around them. It is aimed at developers reading or extending the source (`src/`), and at anyone driving the viewer from the browser console via `window.VIEWER`. If you just want a 3D agent on your page, use the [`<agent-3d>` element](./web-component.md) instead.> For the HTTP/REST surface, see [api-reference.md](./api-reference.md). For the high-level npm SDK, see [sdk.md](./sdk.md). For the `<agent-3d>` element attributes, see [web-component.md](./web-component.md).@@ -172,7 +172,7 @@ The constructor:### State Object-The `this.state` object holds all GUI-controllable values:+The `this.state` object holds all GUI-controllable values. The core fields:```javascript{@@ -186,20 +186,27 @@ The `this.state` object holds all GUI-controllable values:grid: false, // Grid + axes visibilityautoRotate: false, // Auto-rotate orbit- // Lighting+ // Lighting: studio three-point rig (key + fill + rim) with the+ // Khronos PBR-Neutral tone mapperpunctualLights: true, // App-provided lights enabledexposure: 0.0, // Exposure compensation (EV)- toneMapping: LinearToneMapping, // Tone mapping mode- ambientIntensity: 0.3, // Ambient light intensity+ toneMapping: NeutralToneMapping, // Tone mapping mode+ ambientIntensity: 0.45, // Ambient light intensityambientColor: '#FFFFFF', // Ambient light color- directIntensity: 0.8 * Math.PI, // Directional light intensity- directColor: '#FFFFFF', // Directional light color- bgColor: '#191919', // Background color+ directIntensity: 0.8 * Math.PI, // Key light intensity+ directColor: '#FFFFFF', // Key light color+ fillRatio: 0.4, // Fill light, relative to directIntensity+ rimRatio: 0.55, // Rim light, relative to directIntensity+ environmentIntensity: 1.15, // IBL strength+ bgColor: '#000000', // Background color+ transparentBg: false, // Transparent canvas backgroundpointSize: 1.0, // Point cloud vertex size}```+Additional fields (info overlay, follow mode, cinematic presets) live in the same object; see `src/viewer.js` for the full set.+### Methods#### `animate(time: number)`@@ -278,7 +285,7 @@ Synchronizes light state with the GUI:#### `addLights()`-Creates and adds the ambient + directional light pair (or a single hemisphere light in asset generator mode).+Creates and adds the studio light rig: an ambient light plus a three-point directional setup (key, fill, rim) and a shadow-casting sun (or a single hemisphere light in asset generator mode). Implemented in `src/viewer/lights.js`.#### `removeLights()`@@ -605,3 +612,12 @@ window.VIEWER.app.viewer.updateBackground();window.VIEWER.app.viewer.state.wireframe = true;window.VIEWER.app.viewer.updateDisplay();```++---++## Related++- [Web Component](/docs/web-component): the `<agent-3d>` element built on these classes+- [SDK & Library](/docs/sdk): importing `Viewer`, `Runtime`, and friends from the lib build+- [Widget API](/docs/widget-api): driving the embeddable widget shell over JSON-RPC+- [Architecture overview](/docs/architecture): how the folders fit togetherdiff --git a/docs/layers.md b/docs/layers.mdindex 45f3d0298..f4ebedbdc 100644--- a/docs/layers.md+++ b/docs/layers.md@@ -52,7 +52,7 @@ Concretely:- `viewer.content` / `viewer.scene` / `viewer.mixer`- `viewer.animationManager` — external clip lazy-loading-If you only need a glTF viewer with no AI, importing `@three-ws/avatar` gives you this layer with a clean programmatic API (`loadAvatar()`, `playAnimation()`, etc.). The hosted Turntable and Animation Gallery widgets at `/w/<id>` are also pure viewer-layer.+If you only need a glTF viewer with no AI, the [`@three-ws/avatar`](https://www.npmjs.com/package/@three-ws/avatar) package gives you this layer as a lightweight `<three-ws-viewer>` element (plus an `AvatarCreator` iframe modal and React bindings). The hosted Turntable and Animation Gallery widgets at `/w/<id>` are also pure viewer-layer.---@@ -92,7 +92,7 @@ Modules:- **`agent-identity.js`** — the passport + diary. Stable agent ID, owner address, signed action history. Backed by `localStorage` (cache) and `/api/agents/<id>` (canonical). Listens on the protocol bus and POSTs `speak` / `skill-done` / `validate` / `sign` events to `/api/agent-actions`.- **`memory/`** — `local`, `ipfs`, `encrypted-ipfs`, or `none`. Declared on the manifest.- **`erc8004/`** — on-chain registries. `IdentityRegistry` (mints agent token with `tokenURI`), `ReputationRegistry` (signed feedback), `ValidationRegistry` (validation report hashes). Per-chain addresses in `erc8004/abi.js`.-- **`solana-agent/`** — Solana counterpart. Metaplex Core asset mint + Solana Attestation Service (SAS) attestations.+- **`erc8004/solana-deploy.js`** — Solana counterpart. Metaplex Core asset mint; SPL Memo attestations and reputation live server-side (see [Agent Reputation on Solana](./solana-reputation.md)).- **`auth/` + `wallet/`** — SIWE / SIWS for backend mutations; Privy for email/social → embedded wallet onboarding; session cookies after wallet proof.Per-chain registry addresses, ABIs, and helpers ship as `@three-ws/sdk`. ENS attestations are also handled here — see [register-onchain.md](./tutorials/register-onchain.md).@@ -107,9 +107,9 @@ Per-chain registry addresses, ABIs, and helpers ship as `@three-ws/sdk`. ENS attModules:-- **`element.js`** — `<agent-3d>` custom element. Lazy-boots via `IntersectionObserver` (unless `eager`). Enforces origin allowlist. Exposes attributes for `body`, `brain`, `agent-id`, `manifest`, `mode` (`inline` / `floating` / `section` / `fullscreen`), `voice`, and more. Public methods: `say()`, `ask()`, `installSkill()`, `expressEmotion()`, `play()`, `lookAt()`, `dispose()`.-- **`agent-stage.js`** — `<agent-stage>` for hosting multiple agents in one shared scene. See [multi-agent.md](./multi-agent.md).-- **`widget-types.js`** — the five widget variants: Turntable, Animation Gallery, Talking Agent, ERC-8004 Passport, Hotspot Tour.+- **`element.js`** — `<agent-3d>` custom element. Lazy-boots via `IntersectionObserver` (unless `eager`). Enforces origin allowlist. Exposes attributes for `body`, `brain`, `agent-id`, `manifest`, `mode` (`inline` / `floating` / `section` / `fullscreen`), `voice`, and more. Public methods: `say()`, `ask()`, `installSkill()`, `expressEmotion()`, `play()`, `lookAt()`, `pause()`, `destroy()`.+- **`stage-element.js`** — `<agent-stage>` for hosting multiple agents in one shared scene. See [multi-agent.md](./multi-agent.md).+- **`widget-types.js`** — the ten widget variants: Turntable, Animation Gallery, Talking Agent, ERC-8004 Passport, Hotspot Tour, Pump.fun Live Feed, Smart Money Feed, Live Trades Canvas, Bonding Curve, Walking Avatar.- **`lib.js`** — the CDN entry. Imports the element, registers it, re-exports the public surface (`defineElement`, `Agent3DElement`, `AgentStageElement`, helpers).- **`embed-action-bridge.js`** — the `postMessage` protocol. Iframe widgets and the web component speak the same dialect, so host pages can drive either with the same code.- **`app.js`** — the main SPA. URL routing via hash (`#model=`, `#agent=`, `#kiosk=`) and query (`?agent=`) params.diff --git a/docs/listings.md b/docs/listings.mdindex 7b8137392..0525c7e1d 100644--- a/docs/listings.md+++ b/docs/listings.md@@ -74,3 +74,12 @@ Every listing is announced through:- **Blog** — [`https://three.ws/blog/`](https://three.ws/blog/)Subscribe via RSS to track new listings, integrations, and protocol updates.++---++## Related++- [AWS Marketplace](/docs/aws-marketplace): the AWS listing and entitlement-issued x402 API keys+- [Syndication](/docs/syndication): how announcements flow to HackerNoon and other channels+- [x402 protocol](/docs/x402): the payment rail behind the paid endpoints these listings distribute+- [Introduction](/docs/introduction): the full technical picture of the platform being listeddiff --git a/docs/make-your-agent.md b/docs/make-your-agent.mdindex 90d2ab32e..4db1e2e84 100644--- a/docs/make-your-agent.md+++ b/docs/make-your-agent.md@@ -41,21 +41,23 @@ This description is your agent's system prompt — the instructions it follows.## Step 4 — Enable skills (optional)-Skills are extra capabilities you can give your agent. Common ones:+Skills are extra capabilities you can give your agent. The wizard offers:| Skill | What it does ||---|---|-| **Voice** | Lets users talk to the agent by microphone; the agent responds out loud |-| **Memory** | The agent remembers past conversations across sessions |-| **Web search** | The agent can look things up in real time |+| **Memory** | The agent remembers what you tell it across sessions (on by default) |+| **Deep thinking** | The agent reasons step by step before answering (on by default) |+| **Web research** | The agent can look things up in real time |-You can add or remove skills at any time from the agent's edit page.+There is also an optional crypto group (pump.fun monitoring/trading, a Solana wallet, and x402 pay-per-call) you can reveal and enable if you want an on-chain agent; skip it entirely otherwise.++You can add or remove skills at any time from the agent's edit page. Voice (microphone input and spoken replies) isn't a wizard skill: you configure it later on the Voice tab of the agent editor.---## Step 5 — Publish and get your embed-Once you hit **Publish**, your agent gets a live URL — something like `three.ws/agent/abc123`.+Once you hit **Publish**, your agent gets a live URL — something like `three.ws/agents/abc123` (plus a friendly handle URL like `three.ws/@aria` once you reserve a handle).The wizard also gives you an **embed snippet**: a few lines of HTML you can paste into any webpage to make the agent appear there. You don't need to know HTML to do this — just copy and paste.diff --git a/docs/market-data-api.md b/docs/market-data-api.mdindex 57c21215e..ca52bbfdc 100644--- a/docs/market-data-api.md+++ b/docs/market-data-api.md@@ -107,7 +107,7 @@ A failed upstream never charges you: the endpoint verifies payment, runs the dat## Related-- [x402 developer tools](./x402-dev-tools.md) — free test bench for debugging payment envelopes-- [Crypto Data API](https://three.ws/api/crypto) — the free, keyless Solana/pump.fun bundle (token snapshots, holders, whales)+- [x402 developer tools](/docs/x402-dev-tools) - free test bench for debugging payment envelopes+- [Crypto Data API](/docs/crypto-api) - the free, keyless Solana/pump.fun bundle (token snapshots, holders, whales); live index at [`/api/crypto`](https://three.ws/api/crypto)- Sibling paid intel endpoints: `market-heatmap`, `market-mood`, `gas-oracle`, `yield-scan`, `stablecoin-health`, `hack-check`, `news-pulse`, `defi-radar` — value-added composites over the same data, also in the discovery doc- Data sources: CoinGecko (with CoinPaprika/CoinLore failover), DeFiLlama, alternative.me, public Ethereum RPCsdiff --git a/docs/marketplace.md b/docs/marketplace.mdindex 26fc93fb5..e6b8bc01e 100644--- a/docs/marketplace.md+++ b/docs/marketplace.md@@ -61,8 +61,11 @@ trial for a skill, so a gated skill call can verify entitlement before running.## Current limitations- **Discovery surface.** Listings and prices live in the database and the buy/sell- endpoints are complete, but there is not yet a single paginated "browse all- skills for sale" HTTP endpoint with sort/filter; discovery today is per-agent.+ endpoints are complete, but there is not yet a free, paginated "browse all+ skills for sale" HTTP endpoint with sort/filter; discovery today is per-agent+ (agents themselves are browsable at `GET /api/marketplace/agents`), and the+ paid [`/api/x402/skill-marketplace`](x402-endpoints.md) endpoint returns the+ live skill listing catalog with pricing for $0.001 USDC.- **Auto-grant.** A confirmed skill purchase is recorded and the license NFT isminted, but the purchased skill is not automatically attached to the buyer'sagent profile — entitlement is checked via `check-skill-access.js` rather thandiff --git a/docs/mcp-studio.md b/docs/mcp-studio.mdindex a2f79c550..29faf60dc 100644--- a/docs/mcp-studio.md+++ b/docs/mcp-studio.md@@ -236,3 +236,10 @@ All optional — sensible production defaults:| `STUDIO_FORGE_TIMEOUT_MS` | `180000` | Generation poll budget || `STUDIO_RIG_TIMEOUT_MS` | `180000` | Rig poll budget || `STUDIO_POLL_MS` | `3000` | Poll interval |++## Related++- [MCP overview](/docs/mcp) - every three.ws MCP surface, paid and free+- [AR in ChatGPT](/docs/chatgpt-ar) - how `arUrl` and the AR launcher work on ChatGPT surfaces+- [3D API](/docs/3d-api) - the free REST lane the studio tools run on+- [API Reference](/docs/api-reference) - the `/api/3d/studio` custom GPT Actions contractdiff --git a/docs/mcp-tools.md b/docs/mcp-tools.mdindex 92d38e519..73af74f0a 100644--- a/docs/mcp-tools.md+++ b/docs/mcp-tools.md@@ -1,9 +1,10 @@# MCP Tools Catalog-three.ws ships several [MCP](mcp.md) servers. One is free and 3D-only; the others-expose paid tools that settle per call in USDC over [x402](x402.md). This page is-the catalog: which server hosts which tool, whether it's free or paid, and what it-does.+three.ws ships several [MCP](mcp.md) servers: tool servers that AI assistants+(Claude, ChatGPT, any MCP client) can call directly. One is free and 3D-only; the+others expose paid tools that settle per call in USDC over [x402](x402.md). This+page is the catalog: which server hosts which tool, whether it's free or paid, and+what it does.> Source: [`api/mcp-studio.js`](../api/mcp-studio.js) (free),> [`api/mcp-3d.js`](../api/mcp-3d.js) + [`api/_mcp3d/pricing.js`](../api/_mcp3d/pricing.js)@@ -66,9 +67,11 @@ and direction tools are flat per call.| `apply_animation` | $0.01 | Retarget a library clip onto a rigged GLB. || `direct_prompt` | $0.01 | Rewrite a vague idea into a tight 3D spec. || `generate_material` | $0.01 | PBR material parameters from a description. |+| `anchor_provenance` | $0.05 | Sign a content credential and anchor its hash on Solana. |Free studio helpers (no charge): `getting_started`, `generation_status`,-`preview_3d`, `list_animations`, `inspect_model`, `optimize_model`, `save_avatar`.+`preview_3d`, `list_animations`, `inspect_model`, `optimize_model`, `save_avatar`,+`validate_spatial_response` (the [Spatial MCP](spatial-mcp.md) conformance gate).## Agent & commerce tools — `3d-agent-local`@@ -80,6 +83,9 @@ generation lane**; the rest are paid and quote their price in the| Tool | Price | What it does ||---|---|---|| `forge_free` | **Free** | Text → textured GLB on the free NVIDIA NIM (Microsoft TRELLIS) lane; returns a GLB URL + viewer link. |+| `crypto_news` | **Free** | Live crypto headlines from 192 publisher feeds, filterable by category, source, language, or search. |+| `crypto_news_digest` | **Free** | Clusters the last 1-72h of coverage into distinct narratives with stance, tickers, and covering outlets. |+| `crypto_news_archive` | free quota, then $0.001/search | Search 660,000+ archived articles back to September 2017. Stats and trending modes are always free; search is free up to a daily per-IP quota, then $0.001 USDC per search via x402. || `text_to_avatar` | paid | Text → 3D avatar. || `mesh_forge` | paid | Text/image → 3D mesh via a Granite-directed model chain. || `rig_mesh` | paid | Auto-rig a GLB into an animation-ready model. |@@ -88,7 +94,7 @@ generation lane**; the rest are paid and quote their price in the| `restyle_material` | paid | Re-skin a GLB without regenerating its mesh — AI PBR restyle from an instruction ("make it chrome", "wooden", "cyberpunk neon") or seeded, reproducible colorway variant fan-out from a PBR preset; parent → child lineage. See [Restyle Studio](/restyle). || `get_pose_seed` | paid | Pose generation. || `ens_sns_resolve` | paid | ENS + SNS name resolution. |-| `pump_snapshot` | free (no signer) | Live Solana token snapshot (price, volume, metadata). |+| `pump_snapshot` | paid ($0.005) | Live Solana token snapshot: Jupiter price, DexScreener volume/pair, pump.fun metadata, on-chain top-holder distribution. || `sentiment_pulse` | paid | Token sentiment pulse. || `agent_reputation` | paid | ERC-8004 agent reputation read. || `vanity_grinder` | paid | Solana vanity address mining. |diff --git a/docs/mcp.md b/docs/mcp.mdindex 83b083eea..28577cb50 100644--- a/docs/mcp.md+++ b/docs/mcp.md@@ -135,8 +135,8 @@ Ready-to-submit listing packages for each directory, plus the canonical metadataDeep dives — every tool, argument, env var, and example:-- **Install-and-run:** [Scenes](https://three.ws/docs/mcp-scenes) · [x402 Wallet](https://three.ws/docs/mcp-x402) · [Intel](https://three.ws/docs/mcp-intel) · [Vanity](https://three.ws/docs/mcp-vanity) · [Naming](https://three.ws/docs/mcp-naming) · [Marketplace](https://three.ws/docs/mcp-marketplace)-- **Hosted remote:** [3D Studio](./mcp-3d-studio.md) · [Agent wallet](./mcp-agent.md) · [x402 Bazaar](./mcp-x402-bazaar.md) · [IBM x402](./ibm-x402-mcp.md)+- **Hosted remote:** [3D Studio (free)](./mcp-studio.md) · [3D Studio (paid)](./mcp-3d-studio.md) · [Agent wallet](./mcp-agent.md) · [x402 Bazaar](./mcp-x402-bazaar.md) · [IBM x402](./ibm-x402-mcp.md)+- **Install-and-run:** each npm server ships its usage guide (tools, arguments, env vars, examples) in its package README on [npmjs.com/org/three-ws](https://www.npmjs.com/org/three-ws). The [MCP Tools Catalog](./mcp-tools.md) maps every tool to its server and price.---@@ -221,6 +221,8 @@ Send `POST /api/mcp` with valid JSON-RPC 2.0 messages and a bearer token. The seAll tools return `{ content: [{ type, text }], structuredContent: {...} }`. On error, `isError: true` is set and `content[0].text` contains the message.+The tools below are the core avatar, validation, minting, and market-data set. The server registers more beyond this page (memory `remember`/`recall`/`forget`, `register_agent`, oracle and pump.fun intel reads, trader analytics, copy-trading); call `tools/list` for the complete live catalog with schemas.+---### `list_my_avatars`@@ -709,3 +711,12 @@ To point Claude Code at your local server, update `.mcp.json`:```Restart Claude Code after editing `.mcp.json` so the new server config is picked up.++---++## Related++- [MCP Tools Catalog](/docs/mcp-tools): every three.ws MCP tool, its server, and its price+- [3D Studio MCP (free)](/docs/mcp-studio): the no-auth, no-payment 3D generation server+- [Spatial MCP](/docs/spatial-mcp): returning live 3D scenes as native MCP responses+- [x402](/docs/x402): the USDC micropayment rail behind the paid toolsdiff --git a/docs/memory.md b/docs/memory.mdindex 326d74a8a..1459c42c5 100644--- a/docs/memory.md+++ b/docs/memory.md@@ -56,10 +56,13 @@ Configure the persistence mode in the agent's `manifest.json`:| Mode | Description | Best for ||------|-------------|---------|| `local` | Stored in browser `localStorage`. Fast, private, device-specific. | Development, demos, single-device personal agents |-| `ipfs` | Pinned to IPFS via a configured provider. Portable across devices. | Production agents where memory is valuable |-| `encrypted-ipfs` | Same as `ipfs` but content is encrypted before pinning. | Agents that handle user PII |+| `remote` | Synced to the platform backend (`/api/agent-memory`) per signed-in user. | Cross-device memory for platform-hosted agents |+| `ipfs` | Loaded from a pinned IPFS bundle. Portable across devices. | Distributing a curated memory bundle with an agent |+| `encrypted-ipfs` | Same as `ipfs` but content is AES-GCM encrypted before pinning. | Agents that handle user PII || `none` | No persistence. Memory exists only for the current session. | Kiosks, one-shot interactions, demos |+Custom backends can also be registered programmatically with `Memory.registerBackend(name, backend)` (a `backend` object with `load` / `persist` / optional `recall` hooks, see `specs/MEMORY_SPEC.md`); any unknown mode falls back to `local` with a warning.+### Local mode (default)Memory is serialized to `localStorage` under a single namespaced key:@@ -82,28 +85,23 @@ If the write fails because `localStorage` is full, the runtime automatically pru```json{"memory": {- "mode": "ipfs",- "provider": "pinata"+ "mode": "ipfs"}}```-Each `write()` pins the updated memory directory to IPFS via the configured provider. The resulting CID is stored locally as a pointer; the actual content lives on the IPFS network and can be retrieved from any device.+In `ipfs` mode the agent loads its memory from a pinned bundle: `Memory.load({ mode: 'ipfs', manifestURI })` fetches `MEMORY.md` from the bundle, follows its links to the individual memory files, and hydrates the store. Runtime writes stay in-memory for the session; publishing an updated bundle is an explicit step (pin the `memory/` directory again and point `manifestURI` at the new CID).-Supported providers and their required credentials:+Pinning goes through the pluggable pinner in [src/pinning/index.js](../src/pinning/index.js) (`createPinner(config)`):-| Provider | Environment variable(s) |-|----------|------------------------|-| Pinata | `PINATA_JWT` |-| Filebase | `FILEBASE_KEY` + `FILEBASE_SECRET` |-| Web3.Storage | `WEB3_STORAGE_TOKEN` |+| Provider | `createPinner` config |+|----------|----------------------|+| `web3-storage` (default) | `{ provider: 'web3-storage', token }` |+| `pinata` | `{ provider: 'pinata', token }` (JWT) |+| `filebase` | `{ provider: 'filebase', accessKeyId, secretAccessKey, bucket }` |+| `memory` | in-memory dev pinner (real CIDs, nothing persisted) |-**How a write works:**-1. Agent calls `memory.write(key, { ... })` or `memory.note(type, data)`-2. The memory file is updated in-memory and the index (`MEMORY.md`) is rebuilt-3. The updated directory is pinned to IPFS → new CID returned by the provider-4. CID is saved to `localStorage` for fast recovery-5. On the next session: the CID is read from localStorage, content is fetched from IPFS and deserialized+Server-side, the platform's pinning endpoints (`/api/pinning/*`) read `PINATA_JWT` or `WEB3_STORAGE_TOKEN` from the environment.The benefit is cross-device persistence with content-addressed verification — the CID uniquely identifies the exact content, so you always know what you got back from the network.@@ -112,20 +110,16 @@ The benefit is cross-device persistence with content-addressed verification —```json{"memory": {- "mode": "encrypted-ipfs",- "provider": "pinata",- "encryptionKey": "<derive-from-wallet>"+ "mode": "encrypted-ipfs"}}```-Same as IPFS mode but the content is encrypted (ECIES / libsodium sealed box) before pinning. Only the holder of the encryption key can decrypt it, so memory content remains private even on a public IPFS network.--The encryption key should be derived from the user's wallet signature, not hardcoded. If the user signs a deterministic message with their wallet, the signature can serve as a stable key material.+Same as IPFS mode but every file is encrypted with **AES-GCM-256** ([src/memory/crypto.js](../src/memory/crypto.js), pure `crypto.subtle`) before pinning. Only the holder of the encryption key can decrypt it, so memory content remains private even on a public IPFS network.-> **Warning:** There is no key recovery. If the encryption key is lost, the memories are permanently inaccessible. Make sure users understand this before enabling encrypted-ipfs mode.+The key is not stored anywhere: `Memory.load({ mode: 'encrypted-ipfs', deriveKey })` requires a `deriveKey` function, and the standard implementation derives a non-extractable AES key from a deterministic wallet signature. `memory.save()` then encrypts each file and pins it via `POST /api/agents/<id>/memory/pin`, returning the per-file CIDs plus the CID of the rebuilt `MEMORY.md` index (the index itself is pinned in plaintext, since it only lists filenames and CIDs).-> **Note:** Encrypted IPFS support is partially implemented. The storage mode is recognized and the encryption path is wired, but IPFS provider modules are under active development. Use `local` mode for production today.+> **Warning:** There is no key recovery. If the wallet (and therefore the derived key) is lost, the memories are permanently inaccessible. Make sure users understand this before enabling encrypted-ipfs mode.### None mode@@ -198,7 +192,7 @@ Keep the index concise. Lines beyond 200 are truncated before injection into con### The timeline-The timeline is an append-only event log. Skills write ephemeral events here via `ctx.memory.note(type, data)`. In `local` mode, the last 200 timeline entries are persisted. In `ipfs` modes, one JSONL file per day lives under `memory/timeline/`.+The timeline is an append-only event log. Skills write ephemeral events here via `ctx.memory.note(type, data)`. In memory it is capped at 1000 entries; in `local` mode, the last 200 entries are persisted. The bundle spec reserves a `memory/timeline/` directory (one JSONL file per day) for exported bundles; the runtime does not hydrate the timeline from IPFS on load.```json{"ts":"2026-04-14T12:03:12Z","type":"waved","style":"enthusiastic"}@@ -282,7 +276,7 @@ Memory can be exported as a portable blob and imported into another agent instan```js// Export all memory as a JSON blobconst blob = await agent.memory.export();-// { version: "memory/0.1", index, files, timeline }+// { version: "memory/0.1", mode, namespace, index, files, timeline }// Import into another instance (merge strategy: local wins on conflict)await otherAgent.memory.import(blob, { strategy: 'merge' });@@ -345,7 +339,7 @@ Automatic decay (via the `decay` frontmatter field) down-weights a memory during**Multi-device (ipfs mode):** last-write-wins with additive merge on load. Conflicts are rare because most writes add new files rather than editing existing ones. In the case of a true conflict, the LLM can mediate.-**Multiple tabs (same device):** writes use a `BroadcastChannel` mutex to avoid races. If two tabs write simultaneously, one will wait for the lock.+**Multiple tabs (same device):** writes are synchronous `localStorage.setItem` calls, so the last tab to write wins. There is no cross-tab lock; if you run the same agent in several tabs at once, expect the most recent tab's memory state to be the one that persists.---@@ -366,7 +360,7 @@ agent/└── 2026-04-13.jsonl```-The `Memory._loadIPFS()` method fetches `MEMORY.md` first, parses its links to discover individual files, then fetches each one. If any file fails to fetch, it is skipped silently and the rest of memory loads normally.+The `Memory._loadIPFS()` method fetches `memory/MEMORY.md` first, parses its links to discover individual files, then fetches each one (and decrypts it in `encrypted-ipfs` mode). If any file fails to fetch, it is skipped silently and the rest of memory loads normally. A wrong decryption key throws so callers can detect it.---@@ -375,6 +369,7 @@ The `Memory._loadIPFS()` method fetches `MEMORY.md` first, parses its links to d| Mode | Who can read the data ||------|-----------------------|| `local` | Only the device/browser where it was written. Never leaves the browser. |+| `remote` | The signed-in owner via the platform backend (`/api/agent-memory`). || `ipfs` | Anyone who knows the CID. CIDs are not guessable, but if leaked, the content is public. || `encrypted-ipfs` | Only the holder of the encryption key. Content is opaque to the IPFS network. || `none` | No one — data is never written. |@@ -382,3 +377,12 @@ The `Memory._loadIPFS()` method fetches `MEMORY.md` first, parses its links to d**Consider what you're storing.** User names, stated preferences, and conversation summaries can constitute personally identifiable information (PII) in some jurisdictions. If your agent runs in a regulated context, use `encrypted-ipfs` or keep all PII out of memory and handle it in your own backend with proper consent flows.In `ipfs` mode without encryption, treat the memory as semi-public. Don't store anything the user wouldn't want visible to anyone with the CID.++---++## Related++- [Create, enhance & edit agent memory](/docs/tutorials/create-and-edit-memory): the hands-on tutorial+- [Agent system](/docs/agent-system): how memory feeds the LLM runtime+- [Skills](/docs/skills): the `ctx.memory` API skills use+- [Architecture overview](/docs/architecture): where memory sits in the four layersdiff --git a/docs/mint-mark.md b/docs/mint-mark.mdindex d28780ec7..0cf9c1aab 100644--- a/docs/mint-mark.md+++ b/docs/mint-mark.md@@ -1,6 +1,6 @@# The three.ws mint mark-Every coin launched through three.ws has a mint address that starts with `3ws` — the three.ws brand mark. This is automatic and verifiable directly from the address without any external lookup.+Every coin launched through three.ws has a mint address that starts with `3ws`, the three.ws brand mark. This is automatic and verifiable directly from the address without any external lookup. It applies whenever you launch a coin from Studio or through an agent's wallet; you don't have to do anything to get it.---@@ -20,11 +20,11 @@ When you launch a coin on three.ws (via Studio or the agent wallet path), the pl### How does it work?-The server runs a fast WASM-based keypair grinder (single-threaded, sub-second for a 3-character prefix) until it finds a match, then uses that keypair as the coin mint. The expected work is ~49 000 keypairs at ~25 000/s, taking well under a second on the Cloud Run server's CPU.+The server runs a fast WASM-based keypair grinder until it finds a match, then uses that keypair as the coin mint. The expected work is ~49 000 keypairs at ~25 000/s single-threaded, typically about a second on the Cloud Run server's CPU.### Is it on every coin?-Yes — all coins launched via **Studio** or **launch-agent** carry the mark. The only exception is the generic x402 pay-per-call launcher, which accepts arbitrary mints supplied by the caller at runtime and intentionally has no brand constraint.+Yes: all coins launched via **Studio** or **launch-agent** carry the mark. The only exception is the generic x402 pay-per-call launcher, where the buyer chooses their own vanity prefix/suffix (or takes a random mint) and there is intentionally no brand constraint.---@@ -105,7 +105,7 @@ Watch this in the Cloud Run logs (Cloud Logging) to confirm the ~49 000-attempt### The generic x402 launcher exemption-`api/x402/pump-launch.js` is a pay-per-call endpoint that accepts an arbitrary `mint` keypair supplied by the buyer at runtime. It does **not** enforce the brand mark and must never have `assertThreeWsMark` added to it. The mint is the buyer's choice; the brand constraint belongs only to three.ws-initiated launches.+`api/x402/pump-launch.js` is a pay-per-call endpoint where the buyer specifies their own `vanityPrefix` / `vanitySuffix` (or gets a random or pre-ground mint from inventory). It does **not** enforce the brand mark and must never have `assertThreeWsMark` added to it. The mint pattern is the buyer's choice; the brand constraint belongs only to three.ws-initiated launches.### Token examplediff --git a/docs/money-feed.md b/docs/money-feed.mdindex 41ea3df6b..a3cc4ac8d 100644--- a/docs/money-feed.md+++ b/docs/money-feed.md@@ -43,6 +43,7 @@ fixed allow-list of types:| `payment` | A skill/service payment confirmed (`usdcAtomic`, `recipientLabel`, `txSig`, `explorerUrl`). || `level-up`, `world-join`, `jackpot`, `mission-complete` | Play / world events. || `member-join` | A person signed in (throttled to once per user per 6h). |+| `agent-guard` | An autonomous buy was refused by a safety rule (`agentId`, `mint`, `reason`, `label`). || `agora-registered`, `agora-task-posted`, `agora-hired`, `agora-task-claimed`, `agora-task-completed`, `agora-earned`, `agora-vouched`, `agora-flagged` | [Agora](agora.md) on-chain economy lifecycle events. |The ticker is a **curated delight layer**, not an exhaustive log: an event only@@ -67,7 +68,8 @@ the volume dashboard.Each row carries: `agent_id`, `user_id`, `event_type` (e.g. `spend`),`category` (`trade` | `snipe` | `x402` | `withdraw` | `tip` | …), `network`,`asset`, `amount_lamports` / `amount_raw`, `usd`, `destination`, `signature`,-`status`, an `idempotency_key`, and a `meta` JSON blob. Spends pass through the+`reason`, `status`, an `idempotency_key`, an optional `capability_id`, and a+`meta` JSON blob. Spends pass through thespend-cap and policy engine before they are recorded (see[Agent wallets](agent-wallets.md)).diff --git a/docs/money-map.md b/docs/money-map.mdindex e53e4dfb4..abbc5d6d1 100644--- a/docs/money-map.md+++ b/docs/money-map.md@@ -16,7 +16,7 @@ signer/funder wallets and how to fund them).Money-routing is deliberately **config-driven** — no receiver is hardcoded, so anunset receiver fails closed rather than silently routing real USDC to a baked-in-address ([env.js:732](../api/_lib/env.js#L732)).+address ([env.js:786](../api/_lib/env.js#L786)).### Receivers (inbound USDC)| Env var | Role | Value |@@ -70,7 +70,7 @@ encodings, minimum balances, guards, funding tool — in the| `club-cover` | platform receiver (kept) | 100% | funds the club float; issues a door pass || `cosmetic-purchase` | platform receiver → split | 50% | creator 50% (≤90%) from `COSMETIC_SPLIT_TREASURY_*` || marketplace skill sale | agent owner `payout_address` | 0–10% fee | atomic split; fee → fee wallet |-| labor skill (escrow) | worker + author | author 10% royalty | paid from escrow ([labor-settle.js:95](../api/_lib/labor-settle.js#L95)) |+| labor skill (escrow) | worker + author | author 10% royalty | paid from escrow ([labor-settle.js:97](../api/_lib/labor-settle.js#L97)) || pump trade | counterparty | 0–5% fee | fee appended to trader's tx || `pump-launch` | `X402_PAY_TO_SOLANA/BASE` | 100% of $5 | pump.fun creator rewards accrue on-chain to nominated wallet || `ring-settle` (internal) | `X402_PAY_TO_SOLANA` | 100% | recirculates (dogfood volume) |@@ -102,17 +102,19 @@ unit economics.## 4. Services catalog (what three.ws sells)-- **x402 HTTP endpoints** — ~47 paid endpoints across intel/oracle, agent/reputation,- generation/3D, launch/naming/utility, club, avatar shop, and bazaars. Full list- and prices: [x402 endpoints](x402-endpoints.md).+- **x402 HTTP endpoints**: 80+ paid endpoints (81 distinct paid routes in the+ [ring catalog](../api/_lib/x402/ring-catalog.js), the single source of truth)+ across intel/oracle, agent/reputation, generation/3D, launch/naming/utility,+ club, avatar shop, and bazaars. Full list and prices:+ [x402 endpoints](x402-endpoints.md).- **Paid MCP tools** —- Main MCP ([api/mcp.js](../api/mcp.js), pricing `api/_lib/pump-pricing.js`):`retexture_model` $0.10, `optimize_model` $0.05, `segment_model` $0.04,`retexture_region` $0.03, `inspect_model`/`validate_model` $0.01,`render_avatar` $0.005, `search_public_avatars`/`solana_agent_reputation` $0.001.- 3D Studio MCP ([api/mcp-3d.js](../api/mcp-3d.js), pricing `api/_mcp3d/pricing.js`):- 14 priced tools — `text_to_3d`/`image_to_3d` tiered (draft/standard/high),- `auto_rig_model`/`capture_scene`/`retexture_model`/`retexture_region` $0.05,+ 15 priced tools: `text_to_3d`/`image_to_3d` tiered (draft/standard/high),+ `auto_rig_model`/`capture_scene`/`retexture_model`/`retexture_region`/`anchor_provenance` $0.05,`stylize_model`/`remesh_model`/`segment_model` $0.02,`remove_background`/`pose_model`/`apply_animation`/`direct_prompt`/`generate_material` $0.01.- **OKX.AI ASP #2632 "three.ws 3D Studio"** — the same 3D pipeline listed on OKX.AIdiff --git a/docs/multi-agent.md b/docs/multi-agent.mdindex e35e8ec1a..437fdf598 100644--- a/docs/multi-agent.md+++ b/docs/multi-agent.md@@ -261,7 +261,7 @@ leo.addEventListener('brain:message', async (e) => {});```-For a fully shared namespace across agents, set both to the same IPFS memory namespace in their manifests:+For a fully shared starting point, point both agents at the same pinned IPFS memory bundle in their manifests:```json{@@ -272,7 +272,7 @@ For a fully shared namespace across agents, set both to the same IPFS memory nam}```-Both agents then read from and write to the same memory bundle. New memories written by Leo during a conversation will be visible to Mira on her next turn. Note that the `encrypted-ipfs` mode is not yet fully wired; use plain `ipfs` for shared scenes.+Both agents then load the same memory bundle at boot. Runtime writes stay in each agent's own session, so for live sharing during a conversation use the host-page bridge above (`memory.note` into the other agent), or register a custom backend (`Memory.registerBackend`) that both agents point at. Avoid `encrypted-ipfs` for shared scenes: its key is derived from one wallet's signature, so two agents can only share it if they share the same wallet-derived key.---@@ -320,3 +320,12 @@ Open `/examples/two-agents.html` to see a complete, runnable scene with real ava5. **The log panel subscribes to `brain:message` and `skill:tool-called`** — shows how to observe what each agent is thinking and doing in real time without touching their internals.To extend this into a full turn-based scene, add a `brain` attribute to Mira with a model name (e.g., `brain="claude-haiku-4-5"`), then wire the `brain:message` listener to call `stage.routeMessage('leo', 'mira', said)` after each of Leo's replies. That is the minimal diff between a one-active-agent demo and a full dialogue scene.++---++## Related++- [Agent system](/docs/agent-system): the runtime, protocol bus, and stage-scoped tools+- [How three.ws works](/docs/how-it-works): the embed boot sequence each `<agent-3d>` follows+- [Memory system](/docs/memory): namespaces and custom backends for shared context+- [Layers](/docs/layers): where `<agent-stage>` sits in the embed layerdiff --git a/docs/nvidia-models.md b/docs/nvidia-models.mdindex fec70ea81..37d89bf24 100644--- a/docs/nvidia-models.md+++ b/docs/nvidia-models.md@@ -1,5 +1,7 @@# NVIDIA models on three.ws — the free inference layer+If you generate a 3D model on [/forge](https://three.ws/forge), chat with an agent, or hear an avatar speak, there is a good chance an NVIDIA-hosted model did the work. This page is for developers and operators who want to know exactly which model sits behind each feature.+three.ws runs a large share of its AI on NVIDIA's free hosted models. **One key — `NVIDIA_API_KEY` (an `nvapi-…` token from [build.nvidia.com](https://build.nvidia.com)) — unlocks every model on this page.** There is no per-model billing, no per-seat cost, and no SLA: it is a rate-limited free tier, which is exactly why the platform treats it as a *free-first* lane and always keeps a fallback behind it.This document is the canonical map of **which NVIDIA-hosted model does what, where it's wired, and why**. Every model and endpoint below is in production source — nothing here is aspirational.@@ -53,11 +55,11 @@ This is the headline free model. **Microsoft TRELLIS hosted on NVIDIA NVCF gives**How it works:**- Async by default. Submit returns `202 + NVCF-REQID`; the forge polls the NVCF status endpoint until the GLB is ready (or the job completes synchronously within a 30 s window).-- **Quality scales by sampling steps**, clamped to TRELLIS's 10–50 window: draft `15/15`, standard `25/25`, high `40/40` (`ss_sampling_steps` / `slat_sampling_steps`).+- **Sampling steps are pinned to the proven budget.** TRELLIS accepts 10 to 50 steps, but the hosted preview only returns inside the gateway's synchronous window at the low end, so the free lane runs `15/15` (`ss_sampling_steps` / `slat_sampling_steps`) for both draft and standard tiers. The `40/40` budget is reserved for a self-hosted TRELLIS NIM; the high tier itself defaults to the self-hosted Hunyuan3D engine, not this lane.- Prompts are clamped to **77 characters** (TRELLIS truncates server-side) and get a `, studio lighting` suffix unless the caller already supplied lighting/color cues — without it TRELLIS defaults to dark, gritty output.- Output GLBs arrive in several shapes over time (inline base64, bare string, CDN URL, numeric-keyed object, raw bytes); the extractor normalizes all of them, then **persists the bytes to R2** so three.ws owns a durable public URL.-**Key constraint — text only.** NVIDIA's *hosted preview* rejects every user-image input form (verified live; see `tasks/nvidia-nim/probes/trellis.md`). So **photo→3D never routes here** — it falls to the free Hugging Face Spaces lane (Hunyuan3D / TRELLIS / TripoSR). A self-deployed TRELLIS NIM accepts real images; this is a hosted-preview limitation, not a model one.+**Key constraint: text only.** NVIDIA's *hosted preview* rejects every user-image input form (verified live 2026-06-11). So **photo to 3D never routes here**: it falls to the free reconstruct chain in `FREE_FALLBACK_FOR_PATH` (the self-hosted TRELLIS GPU worker first, then the self-hosted Hunyuan3D worker, then the free Hugging Face Spaces lane). A self-deployed TRELLIS NIM accepts real images; this is a hosted-preview limitation, not a model one.---@@ -85,7 +87,7 @@ NVIDIA NIM hosts 100+ open-weight chat models behind the one key, all OpenAI-com**Model:** `meta/llama-3.3-70b-instruct`**Source:** [api/_lib/llm.js](../api/_lib/llm.js), [api/_lib/chat-models.js](../api/_lib/chat-models.js).-The platform's general LLM helper runs a **free-first ladder: Groq → OpenRouter → NVIDIA NIM**, and only then a paid backstop (Anthropic/OpenAI). NVIDIA is the **independent third free lane** — same Llama 3.3 70B family as the Groq/OpenRouter entries, but a different provider, so an outage on two lanes still answers on the third. It's tool/function-calling capable, so it's eligible for tool-required requests.+The platform's general LLM helper runs a **free-first ladder: Groq → Cerebras → OpenRouter → NVIDIA NIM**, followed by further keyless free rungs (OVH, Gemini, Pollinations) and only at the very end a paid backstop (Anthropic/OpenAI). NVIDIA serves the **same Llama 3.3 70B family** as the Groq/Cerebras/OpenRouter rungs but on an independent provider, so an outage on the other free lanes still answers here. It's tool/function-calling capable, so it's eligible for tool-required requests.This lane powers the platform's built-in AI surfaces — chat, embedded site widgets, the tutor, the fact-checker, persona tools, agent-to-agent talk, the transaction explainer — all of which lead with the free providers and only fall through to a paid model if every free lane fails.@@ -161,7 +163,7 @@ A free content-safety pre-filter for anonymous chat. NemoGuard classifies the in**Model:** `magpie-tts-multilingual` · **Transport:** Riva gRPC at `grpc.nvcf.nvidia.com:443`**Source:** [api/_lib/tts-nvidia.js](../api/_lib/tts-nvidia.js) (mirrored in `packages/avatar-agent-mcp/src/lib/tts-nvidia.js`).-The free NVIDIA TTS lane — **Magpie multilingual on Riva**, selected by an NVCF `function-id`, speaking over the standard Riva gRPC synthesis contract (protos shipped in `riva-protos/` and loaded from a generated descriptor, so there's no `.proto` build step). Drives **avatar speech** with multilingual voices. Configured by the presence of `NVIDIA_API_KEY`; returns synthesized audio bytes, with a clear error if the lane returns empty audio.+The free NVIDIA TTS lane — **Magpie multilingual on Riva**, selected by an NVCF `function-id`, speaking over the standard Riva gRPC synthesis contract (protos shipped in `api/_lib/riva-protos/` and loaded from a generated descriptor, so there's no `.proto` build step). Drives **avatar speech** with multilingual voices. Configured by the presence of `NVIDIA_API_KEY`; returns synthesized audio bytes, with a clear error if the lane returns empty audio.---@@ -183,4 +185,11 @@ The free NVIDIA TTS lane — **Magpie multilingual on Riva**, selected by an NVC| `KNOWLEDGE_RERANK_ENABLED=1` | Turns on the rerank stage (§6) || `FORGE_PREFER_FREE` | Free-first reconstruct ordering (default on) |-Probe transcripts for every lane — request/response shapes, limits, verified behavior — live under `tasks/nvidia-nim/probes/`.+---++## Related++- [How Forge works](/docs/how-forge-works) - the /forge product this layer powers+- [REST API](/docs/api-reference) - the endpoints these models serve+- [Configuration](/docs/configuration) - all environment variables+- [MCP](/docs/mcp) - the `forge_free` MCP tool on the free TRELLIS lanediff --git a/docs/onchain-agents.md b/docs/onchain-agents.mdindex 1b6324e88..3ee5e3e2e 100644--- a/docs/onchain-agents.md+++ b/docs/onchain-agents.md@@ -1,6 +1,6 @@# Deploying Agents On-Chain (Bulk)-Give every three.ws agent a real on-chain identity: a **Metaplex Core NFT** minted into the **three.ws Agents collection** on Solana. This is the bulk/admin counterpart to the single-agent, user-signed flow in [Solana agents](solana.md) — it deploys many agents server-side, with a live recording dashboard and a CLI runner.+Give every three.ws agent a real on-chain identity: a **Metaplex Core NFT** minted into the **three.ws Agents collection** on Solana. This page is for platform admins and self-hosters; regular users register a single agent through the wallet-signed flow instead. It is the bulk/admin counterpart to the single-agent, user-signed flow in [Solana agents](solana.md): it deploys many agents server-side, with a live recording dashboard at `/admin/bulk-launch` and a CLI runner.> Not pump.fun. These are NFTs (on-chain identity), not tokens. The only coin three.ws ever references is `$THREE`; it appears in each asset's metadata as a link, nothing more.diff --git a/docs/permissions.md b/docs/permissions.mdindex 70d19dbd0..52dd40521 100644--- a/docs/permissions.md+++ b/docs/permissions.md@@ -19,7 +19,7 @@ An ERC-7710 delegation is a signed authorization envelope with the following str| `salt` | `bytes32` | Random value for replay protection || `signature` | `bytes` | EIP-712 signature over the struct, produced by the delegator |-The user signs the delegation via EIP-712 in MetaMask (triggered by the `wallet_grantPermissions` JSON-RPC call defined in ERC-7715). The signature is **off-chain** — the envelope is stored in the database and pinned to IPFS. When an agent needs to take a scoped action, it submits the envelope to the `DelegationManager` contract, which verifies the signature and enforces every caveat before executing the call.+The user signs the delegation via a standard EIP-712 `signTypedData` prompt in MetaMask (the scope JSON mirrors the permission shapes defined in ERC-7715). The signature is **off-chain** — the envelope is stored in the database and pinned to IPFS. When an agent needs to take a scoped action, it submits the envelope to the `DelegationManager` contract, which verifies the signature and enforces every caveat before executing the call.**The trust model:** the user signs once. Smart contracts enforce that scope on every redemption. The agent acts autonomously within the limits the owner approved — no further user interaction required until the scope needs to change or the delegation expires.@@ -58,15 +58,14 @@ When a skill or agent action requires a delegation that doesn't yet exist, the g1. **Scope builder** — the user selects token, spend limit, period, target contracts, and expiry. Common contracts (e.g., Uniswap V3 Router) are offered by name.2. **Plain-English review** — the modal translates the scope into a human-readable summary (e.g., "Up to 10 USDC per day, to Uniswap V3 Router, expiring 2026-07-01") before opening the MetaMask prompt. This step must never be skipped — it gives the user a trusted-context preview before the raw EIP-712 data appears in MetaMask.-3. **EIP-712 sign** — MetaMask opens the `wallet_grantPermissions` prompt; the user approves; the signed delegation is stored and pinned.+3. **EIP-712 sign** — MetaMask opens the typed-data signature prompt; the user approves; the signed delegation is stored and pinned.### Programmatically-Use `encodeScopedDelegation` and `signDelegation` from `@three-ws/sdk/permissions` (or directly from [src/permissions/toolkit.js](../src/permissions/toolkit.js)):+Use `encodeScopedDelegation` and `signDelegation` from [src/permissions/toolkit.js](../src/permissions/toolkit.js) (the published SDK re-exports `encodeScopedDelegation` and friends from `@three-ws/sdk/permissions/advanced`):```js-import { encodeScopedDelegation, signDelegation } from '@three-ws/sdk/permissions';-import { CAVEAT_ENFORCERS } from '@three-ws/sdk/erc7710';+import { encodeScopedDelegation, signDelegation, CAVEAT_ENFORCERS } from './src/permissions/toolkit.js';import { AbiCoder } from 'ethers';const CHAIN_ID = 84532; // Base Sepolia@@ -119,7 +118,7 @@ const res = await fetch('/api/permissions/grant', {},}),});-// → { ok: true, id: 'delegation-uuid', delegationHash: '0x...' }+// → { ok: true, id: 'delegation-uuid', delegationHash: '0x...', expiresAt: 1234567890 }```---@@ -129,7 +128,7 @@ const res = await fetch('/api/permissions/grant', {Skills call `redeemFromSkill` from [src/runtime/delegation-redeem.js](../src/runtime/delegation-redeem.js). This is the main entrypoint for any on-chain action a skill needs to take:```js-import { redeemFromSkill } from '@three-ws/sdk/runtime';+import { redeemFromSkill } from './src/runtime/delegation-redeem.js';// Inside a skill handler:export async function execute_swap({ tokenIn, tokenOut, amount }, ctx) {@@ -164,7 +163,7 @@ export async function execute_swap({ tokenIn, tokenOut, amount }, ctx) {To monitor redemption events:```js-import { subscribeRedeemEvents } from '@three-ws/sdk/runtime';+import { subscribeRedeemEvents } from './src/runtime/delegation-redeem.js';const unsubscribe = subscribeRedeemEvents((event) => {console.log(event.type, event.payload);@@ -181,7 +180,7 @@ const unsubscribe = subscribeRedeemEvents((event) => {Mount the panel for an agent:```js-import { mountManagePanel } from '@three-ws/sdk/permissions';+import { mountManagePanel } from './src/permissions/manage-panel.js';const { unmount } = mountManagePanel({container: document.getElementById('permissions-container'),@@ -197,7 +196,7 @@ Revoking has two parts: the on-chain transaction and the server-side mirror.```jsimport { Contract, BrowserProvider } from 'ethers';-import { DELEGATION_MANAGER_DEPLOYMENTS, DELEGATION_MANAGER_ABI } from '@three-ws/sdk/erc7710';+import { DELEGATION_MANAGER_DEPLOYMENTS, DELEGATION_MANAGER_ABI } from './src/erc7710/abi.js';// 1. Submit disableDelegation on-chainconst provider = new BrowserProvider(window.ethereum);@@ -342,7 +341,7 @@ When `POST /api/permissions/redeem` is used instead of direct wallet submission,The grant modal and toolkit require the user to explicitly choose a chain. Mainnet support requires explicit opt-in through the agent owner's settings. Base Sepolia (84532) and Sepolia (11155111) are the default test chains.**No custodial delegator keys:**-The delegator (owner) wallet key is never held server-side. The agent's smart account key may be held server-side only as defined in the agent trust boundary documentation (task 09). Never store or redeem a delegation whose EIP-712 signature has not been verified — `signature_invalid` is the correct error for any unverified envelope.+The delegator (owner) wallet key is never held server-side. The agent's smart account key may be held server-side only within the agent-wallet trust boundary (see [Agent wallets](/docs/agent-wallets)). Never store or redeem a delegation whose EIP-712 signature has not been verified — `signature_invalid` is the correct error for any unverified envelope.---diff --git a/docs/quick-start.md b/docs/quick-start.mdindex 6c027af91..3e5b1bca7 100644--- a/docs/quick-start.md+++ b/docs/quick-start.md@@ -28,7 +28,7 @@ The fastest path. No npm, no bundler, no build step.</head><body><script type="module" src="https://three.ws/agent-3d/latest/agent-3d.js"></script>- <agent-3d body="https://cdn.three.ws/models/sample-avatar.glb"></agent-3d>+ <agent-3d body="https://three.ws/avatars/michelle.glb"></agent-3d></body></html>```@@ -137,7 +137,7 @@ The `brain` attribute turns the 3D viewer into a conversational agent:| Attribute | What it does ||-----------|--------------|-| `brain` | LLM model ID. The in-browser runtime supports the Anthropic provider — registered model IDs: `claude-sonnet-4-6`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-haiku-4-5-20251001`. Omit for a viewer-only display with no AI (provider `none`). |+| `brain` | LLM model ID. Registered Claude IDs: `claude-sonnet-4-6`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-haiku-4-5-20251001`, `claude-fable-5`, `claude-mythos-5`. Free models (no key, routed through the platform proxy) are also accepted, e.g. `meta-llama/llama-3.3-70b-instruct:free`. Omit for a viewer-only display with no AI (provider `none`). || `instructions` | System prompt for the agent's personality and role. || `mode` | Layout mode: `inline` (flows with page content), `floating` (fixed bubble in a corner), `fullscreen`, or `section`. Default: `inline`. |@@ -264,9 +264,11 @@ If your page has a strict `Content-Security-Policy`, the script embed needs:```script-src 'self' https://three.ws;-connect-src 'self' https://three.ws https://cdn.three.ws;+connect-src 'self' https://three.ws;```+(Also allow whatever origin hosts your GLB files in `connect-src` if it differs.)+If you're embedding inside a sandboxed iframe, make sure the parent grants `allow-scripts allow-same-origin`. For sandboxed environments where the script embed won't work, use the iframe widget instead — it runs in its own browsing context and is unaffected by the parent CSP.### Model doesn't appeardiff --git a/docs/radar.md b/docs/radar.mdindex 5da4cffa4..172d7753d 100644--- a/docs/radar.md+++ b/docs/radar.md@@ -27,7 +27,7 @@ The core signal math, measured from the first observed trade (burst window 3s, s- **Dev behaviour.** `dev_sold` is set when the creator had any sell; `dev_buy_sol` comes from the launch transaction.- **Fresh wallets and clusters.** Fresh-wallet ratio is the share of buyers with at most one prior transaction (null below 3 known); connectivity is the largest common-funder cluster over known funders.-Those roll into a **quality score (0 to 100)**: start from organic times 100, subtract for bundle, top-1 concentration, a dev sell, and fresh-wallet ratio, add a small bonus for unique buyers, then add smart-money bonuses (up to +8 for proven wallets in), and clamp.+Those roll into a **quality score (0 to 100)**: start from organic times 100, subtract for bundle, top-1 concentration, a dev sell, and fresh-wallet ratio, add a small bonus for unique buyers, then add smart-money bonuses that stack per proven wallet in (+8 for the first, +6 for the second, +4 for the third, up to +18 total), and clamp.**Risk flags** are named, not numeric: `bundle_launch` (bundle 0.6+), `dev_dumped`, `single_whale` (top-1 0.5+), `low_diversity` (fewer than 5 buyers), `fresh_wallet_swarm` (fresh ratio 0.7+), `sell_pressure`, `sniped` (snipe 0.85+ with fewer than 8 buyers), and `coordinated_cluster` (connectivity 0.4+).diff --git a/docs/reputation.md b/docs/reputation.mdindex b2f2d00dc..8735c1a59 100644--- a/docs/reputation.md+++ b/docs/reputation.md@@ -1,6 +1,6 @@# Reputation System-The reputation system lets anyone leave a permanent, publicly verifiable score for a registered three.ws. Scores are stored on the `ReputationRegistry` smart contract — part of the ERC-8004 standard — and cannot be deleted or altered once submitted.+The reputation system lets anyone leave a permanent, publicly verifiable score for a registered three.ws agent. Scores are stored on the `ReputationRegistry` smart contract — part of the ERC-8004 standard — and cannot be deleted or altered once submitted. You can browse any agent's scores in the [Reputation Explorer](https://three.ws/reputation) without an account or wallet.---@@ -33,24 +33,26 @@ One review per wallet address per agent is enforced by the contract. Agents cann2. Scroll to the **Reputation** section.3. Click **Vouch for this agent** (you must be signed in with a connected wallet).4. Select a star rating (1–5).-5. Optionally write a comment (up to 280 characters, stored as a URI reference on-chain).+5. Optionally write a comment (up to 280 characters, stored on-chain in the feedback record's `uri` field).6. Click **Sign & submit** and confirm the transaction in your wallet.Gas cost is minimal on L2 networks like Base (typically under $0.10). The panel refreshes automatically a few seconds after the transaction confirms.**Owners cannot vouch for their own agents.** If you own the agent, the vouch button is replaced with an explanatory note.-A full reputation dashboard — showing aggregate stats and all recent reviews — is also available at `/public/reputation/` for any `(chainId, agentId)` pair.+A full reputation dashboard — showing aggregate stats and all recent reviews — is also available at [three.ws/reputation](https://three.ws/reputation) for any `(chainId, agentId)` pair.### Via the SDK+These helpers live in the three.ws codebase at [src/erc8004/reputation.js](../src/erc8004/reputation.js) (import in-repo or vendor the module):+```js-import { submitReputation } from '@three-ws/sdk/erc8004';+import { submitReputation } from './src/erc8004/reputation.js';const txHash = await submitReputation({chainId: 8453, // Base mainnetagentId: 42,- score: 5, // Integer, 1–5 (maps to the contract's –100..+100 range)+ score: 5, // Any int8 in -100..+100; the star UI submits 1-5comment: 'Incredible avatar and fast responses.',signer: connectedSigner // ethers.js Signer});@@ -74,7 +76,7 @@ Recent vouches are loaded by querying `FeedbackSubmitted` event logs for the las### Full reputation dashboard-The `ReputationDashboard` class ([src/reputation-ui.js](../src/reputation-ui.js)) is used on the standalone `/public/reputation/` page. It shows:+The `ReputationDashboard` class ([src/reputation-ui.js](../src/reputation-ui.js)) is used on the standalone [/reputation](https://three.ws/reputation) page. It shows:- Review count, average rating, time since last review- Up to 10 recent reviews with inline transaction links@@ -84,10 +86,10 @@ The `ReputationDashboard` class ([src/reputation-ui.js](../src/reputation-ui.js)### Via the SDK```js-import { getReputation, getRecentReviews } from '@three-ws/sdk/erc8004';+import { getReputation, getRecentReviews } from './src/erc8004/reputation.js';// Aggregate stats-const { total, count, average } = await getReputation({+const { count, average } = await getReputation({chainId: 8453,agentId: 42,runner: provider // ethers.js Provider@@ -106,16 +108,14 @@ reviews.forEach(r => {});```-`getReputation` returns `{ total, count, average }` where `average` is already computed (sum / count, or 0 if no reviews). `getRecentReviews` returns an array of objects with `from` (reviewer address), `score`, `comment`, `blockNumber`, and `txHash`.+`getReputation` returns `{ count, average }` where `average` is already computed from the contract's `avgX100` (0 if no reviews). `getRecentReviews` returns an array of objects with `agentId`, `from` (reviewer address), `score`, `comment`, `blockNumber`, and `txHash`.### Via the Passport widget+The **ERC-8004 Passport** widget type ([src/widgets/passport.js](../src/widgets/passport.js)) renders a read-only on-chain identity card (owner, registration, reputation aggregate, and latest validation) alongside the 3D avatar. Create one in [Widget Studio](https://three.ws/studio), then embed its public URL:+```html-<agent-3d- widget="passport"- agent-id="8453:0xRegistry:42"- show-reputation="true"-></agent-3d>+<iframe src="https://three.ws/w/{widget-id}" width="400" height="500" title="Agent passport"></iframe>```---@@ -190,3 +190,12 @@ GET /api/exploreSeparate from reputation scores, glTF validation results can also be recorded on-chain via the `ValidationRegistry`. A passing validation attests that the agent's 3D model meets the glTF specification as of a specific block timestamp. Validation history is shown on the agent's profile page alongside reputation data.See the [Validation](./validation.md) documentation for details.++---++## Related++- [ERC-8004 identity](/docs/erc8004): registering an agent so it can accumulate reputation+- [Validation](/docs/validation): on-chain attestations for model quality+- [Solana reputation](/docs/solana-reputation): the attestation-based equivalent for Solana agents+- [Agent reputation](/docs/agent-reputation): how reputation surfaces across the platformdiff --git a/docs/sas-attestations.md b/docs/sas-attestations.mdindex c95b8316f..ab038f55e 100644--- a/docs/sas-attestations.md+++ b/docs/sas-attestations.md@@ -1,5 +1,7 @@# SAS Credentialed Attestations+An attestation is a signed on-chain statement about a wallet or an agent (for example "this wallet is verified" or "this task result was audited"). This page is for operators and developers who run or integrate with the three.ws attestation authority; end users see the results surfaced on agent passports and reputation scores. Reads are public via `GET /api/agents/sas/credentials`; issuing is admin-only.+three.ws issues two kinds of on-chain attestations on Solana:- **Permissionless attestations** — general feedback, task lifecycle, dispute, and revoke events. Anyone can write them as SPL Memos (see [Solana reputation](solana-reputation.md)).@@ -210,3 +212,11 @@ Closing (revoking) an attestation is done server-side via `sasClose()` in [api/_| `schema <kind> not registered on <network>` | Schema added to config but bootstrap not re-run. | Re-run the bootstrap for that network. || Bootstrap or issue fails with insufficient funds | Authority wallet not funded on that cluster. | Send SOL to the authority address and retry. || Non-base58 / bad key on load | `SAS_AUTHORITY_SECRET` holds the JSON array form, not base58. | Convert the array to base58 (see above) and use that. |++---++## Related++- [Agent Reputation on Solana](/docs/solana-reputation): the permissionless SPL Memo attestation layer these credentials weight+- [Solana agents](/docs/solana): the identity NFTs attestations are made about+- [Deploy agents on-chain (bulk)](/docs/onchain-agents): the server-side fleet mint flowdiff --git a/docs/sdk.md b/docs/sdk.mdindex 4185ab23b..dfa3b7b39 100644--- a/docs/sdk.md+++ b/docs/sdk.md@@ -1,6 +1,6 @@# SDK & Library-This document covers programmatic use of three.ws beyond simple embedding. There are two distributable artifacts you can import into your own project:+This page is for developers who want to build with three.ws code in their own project, beyond pasting an embed snippet. If you just want a 3D agent on a page, start with the [web component](./web-component.md); come here when you need to import classes, register agents on-chain, or build the bundles yourself. There are two distributable artifacts you can import:| Artifact | Package | Use case ||---|---|---|@@ -328,21 +328,17 @@ import {### TypeScript support-The SDK ships full TypeScript declarations at `src/index.d.ts` and `src/permissions.d.ts`:+The SDK ships full TypeScript declarations. The package's `exports` map points each entry at its declarations (`types/index.d.ts` for the main entry, `types/permissions.d.ts` for `@three-ws/sdk/permissions`, `types/solana.d.ts` and `types/solana-attestations.d.ts` for the Solana entries), so `tsc` resolves them automatically, with no `@types` package needed:```tsimport type {AgentKitOptions,- RegisterOptions,- RegistrationResult,- ManifestsResult,- ServiceEntry,- SkillDefinition,- AgentRegistrationDocument,- AgentCardDocument,- AiPluginDocument,- PermissionsClient,- DelegationScope,+ AgentKitRegisterOptions,+ AgentPanelOptions,+ WalletConnection,+ RegisterAgentOptions,+ PermissionsClientOptions,+ DelegationPublic,ScopePreset,} from '@three-ws/sdk';@@ -352,8 +348,8 @@ const options: AgentKitOptions = {description: 'Product guide',};-const result: RegistrationResult = await agent.register();-// { agentId: number, registrationCID: string, txHash: string }+const result = await agent.register();+// result: { agentId: number, registrationCID: string, txHash: string }```---@@ -426,3 +422,12 @@ npm --prefix chat-plugin run buildpython3 -m http.server 8080# Open http://localhost:8080/chat-plugin/dev/?agent=<your-agent-id>```++---++## Related++- [Web Component](/docs/web-component): the `<agent-3d>` element the bundle ships+- [JavaScript API](/docs/js-api): viewer, validator, and component internals+- [REST API Reference](/docs/api-reference): the HTTP surface the SDK talks to+- [x402](/docs/x402): the payment packages listed abovediff --git a/docs/security.md b/docs/security.mdindex b7f84dd31..ca05dc3be 100644--- a/docs/security.md+++ b/docs/security.md@@ -1,6 +1,6 @@# Security-three.ws is designed for developers and organizations that need to reason carefully about what data goes where, who can call what, and how identities are established. This document covers the full security model: data handling, embed isolation, authentication, on-chain identity, and operational guidance for self-hosters.+This page explains how three.ws keeps your data, wallet, and agents safe, and what you are responsible for when you embed or self-host the platform. If you just use the site, the short version is: 3D files render in your browser and are not uploaded unless you save them, your wallet's private keys never leave your wallet, and sessions use hardened cookies. Developers and self-hosters will find the full model below: data handling, embed isolation, authentication, on-chain identity, and operational guidance. To report a vulnerability, see [Responsible disclosure](#responsible-disclosure) at the bottom.## Security principles@@ -10,7 +10,7 @@ three.ws is designed for developers and organizations that need to reason carefu**Least privilege** — agents access only what is explicitly declared and granted. Skills declare permission requirements; users must grant them. API keys carry only the scopes you assign. OAuth access tokens are short-lived (1 hour) and audience-bound.-**Transparency** — the codebase is open source. The on-chain identity, reputation, and validation registries are auditable on Base. Badge verification derives from on-chain attestations, not the badge UI itself.+**Transparency**: the codebase is publicly readable on GitHub (source-available under the repository's proprietary LICENSE). The on-chain identity, reputation, and validation registries are auditable on Base. Badge verification derives from on-chain attestations, not the badge UI itself.**Standard web security** — HTTPS-only for all authenticated operations. CSP, CORS, and `__Host-` cookie prefix enforced throughout.@@ -25,11 +25,11 @@ Models loaded into the viewer are processed entirely on your device:- The browser fetches and decodes the GLB file directly — no proxy, no server touch- WebGL rendering runs in your GPU via a sandboxed canvas context- Screenshots (`canvas.toDataURL()`) are generated client-side and never uploaded automatically-- Models are only sent to three.ws servers if you explicitly use the avatar registration flow (which pins to IPFS via Storacha)+- Models are only sent to three.ws servers if you explicitly save an avatar or use the on-chain registration flow (which pins metadata to IPFS via Pinata when you supply a JWT, or stores it in the platform's R2 bucket otherwise)### Conversation data-Chat messages travel through `/api/chat`, which proxies to the configured LLM provider (Anthropic by default). The proxy layer:+Chat messages travel through `/api/chat`, which proxies to a configured LLM provider. Providers are tried in a failover ladder (free-tier providers such as Groq, OpenRouter, and NVIDIA NIM lead; Anthropic and OpenAI are paid backstops; Vertex and watsonx are available when configured); see the routing comment in [api/chat.js](../api/chat.js). The proxy layer:- Injects authentication and enforces rate limits- Does not log message content@@ -51,6 +51,7 @@ The SIWE (Sign-In With Ethereum) flow signs a server-generated challenge — no| Mode | Where data lives | Privacy ||------|-----------------|---------|| `local` (default) | Browser `localStorage` | Device-only |+| `remote` | three.ws cloud storage, tied to your account | Opt-in cloud sync (see [Memory](./memory.md)) || `ipfs` | Public IPFS network | Public — use only for non-sensitive data || `encrypted-ipfs` | IPFS, encrypted before leaving the browser | Encrypted with your key; IPFS only sees ciphertext || `none` | Not persisted | Cleared on page unload |@@ -74,7 +75,7 @@ The iframe embed at `/a/:chainId/:agentId/embed` sets permissive `frame-ancestor}```-When an iframe is blocked by embed policy, it posts `{ __agent, type: 'blocked', host }` to the parent and shows a link to the canonical agent page.+When an iframe is blocked by embed policy, it posts `{ __agent: true, type: 'blocked', host }` to the parent and shows a link to the canonical agent page.Minimum `sandbox` permissions for the `<agent-3d>` web component:@@ -123,7 +124,7 @@ Pin the exact bundle version and validate with Subresource Integrity:></script>```-SRI hashes for each release are at `/agent-3d/<version>/integrity.json`. The `latest` channel (`max-age=300`) should never be used in production — use a pinned `MAJOR.MINOR.PATCH` URL, which is served with `max-age=31536000, immutable`.+SRI hashes for each release are at `/agent-3d/<version>/integrity.json`. The `latest` channel (served with `max-age=3600, s-maxage=300, stale-while-revalidate=86400`) should never be used in production; use a pinned `MAJOR.MINOR.PATCH` URL, which is served with `max-age=31536000, immutable`.### postMessage security@@ -131,7 +132,7 @@ Always verify the `origin` before trusting messages from the embed:```jswindow.addEventListener('message', e => {- if (e.origin !== 'https://three.ws/') return;+ if (e.origin !== 'https://three.ws') return;// handle message});```@@ -182,7 +183,7 @@ Refresh tokens are opaque (SHA-256 hashed at rest). Refresh token reuse detectioAPI keys are prefixed `sk_live_` (production) or `sk_test_`. Security properties:- Hashed with SHA-256 before storage — the plaintext is shown exactly once at creation and cannot be recovered-- Scope-limited — each key is created with an explicit scope set (`avatars:read`, `avatars:write`, `avatars:delete`, `profile`)+- Scope-limited: each key is created with an explicit scope set from `avatars:read`, `avatars:write`, `avatars:delete`, `profile`, `memory:read`, `memory:write`, `agents:read`, `agents:write` (default `avatars:read avatars:write`)- Rate-limited independently from session auth- Last-used timestamp tracked; revocable at any time@@ -266,19 +267,24 @@ The LLM runtime enforces a hard cap of 8 tool-call iterations per message (`MAX_### Content moderation-All requests through the `/api/chat` proxy are subject to Anthropic's content policies. Requests that violate policy are rejected before the response is returned to the client.+Requests through the `/api/chat` proxy are subject to the content policies of whichever upstream provider serves them (Anthropic, OpenAI, Groq, OpenRouter, NVIDIA, Google Vertex, or IBM watsonx, depending on routing). Requests a provider rejects for policy reasons surface as errors rather than completions.++### Server-side fetch (SSRF) protection++Server code that fetches user-supplied URLs (GLB validation, manifest pinning, avatar imports) goes through [api/_lib/ssrf-guard.js](../api/_lib/ssrf-guard.js) rather than raw `fetch`. `assertSafePublicUrl()` rejects non-HTTPS schemes and resolves the hostname up front, refusing private, loopback, link-local, CGNAT, and cloud-metadata addresses. `fetchSafePublicUrl()` validates DNS then fetches (acceptable where the response is only displayed); `fetchSafePublicUrlPinned()` additionally pins the TCP connection to the validated IP so a DNS rebind between check and connect cannot redirect the request into the internal network. Both re-validate every redirect hop and enforce a streaming byte cap (`MaxBytesExceededError`) so an unbounded body cannot exhaust memory.---## Rate limiting-All limits are enforced via Upstash Redis and return `429 Too Many Requests` with a `Retry-After` header on breach.+Limits return `429 Too Many Requests` with a `Retry-After` header on breach. Money-moving and credential buckets are enforced through shared Upstash Redis so they hold across every instance; a few very hot read buckets (including the MCP limiters) are deliberately per-instance (`local: true` in [api/_lib/rate-limit.js](../api/_lib/rate-limit.js)) to keep Redis command volume down, and the credential buckets degrade to in-memory limiting rather than failing closed if Redis is unreachable.| Endpoint class | Limit ||----------------|-------|-| Login / register | 30 requests / 10 min per IP |+| Login (credential attempts) | 50 requests / 10 min per IP |+| Account registration | 5 / hour per IP || OAuth client registration | 10 / hour per IP |-| MCP endpoints | 1200 / min per user, 600 / min per IP |+| MCP endpoints | 1200 / min per user, 600 / min per IP (per instance) || File uploads | 60 / hour per user |The `clientIp()` helper reads `X-Forwarded-For` and walks the chain from the right, skipping the trusted proxy hops appended by three.ws's own infrastructure (Google's external Application Load Balancer in front of Cloud Run), then takes the next address as the real client. It falls back to the socket address only when there is no `X-Forwarded-For` at all (local dev, tests, direct container access). Reading a caller-settable header directly is avoided precisely so a client cannot rotate the claimed address to mint a fresh limiter bucket per request. The Google Cloud load balancer provides an additional DDoS mitigation layer before requests reach the rate-limit check.@@ -287,11 +293,9 @@ The `clientIp()` helper reads `X-Forwarded-For` and walks the chain from the rig## CORS policy-The API's CORS configuration allows cross-origin reads from a named set of trusted origins:+The API's default CORS allowlist lives in `isAllowedOrigin()` in [api/_lib/http.js](../api/_lib/http.js): the platform origin (`env.APP_ORIGIN`, normally `https://three.ws`), a small named set of partner and ecosystem origins (including `ibm.com` and its subdomains for the IBM partnership embeds), and `localhost` in non-production only. Endpoints that are meant to be world-readable opt in to `origins: '*'` explicitly.-- `https://three.ws/`-- `https://chat.sperax.io` and associated Sperax staging origins-- `http://localhost:*` and `https://localhost:*` (development only)+Separately, the S3/R2 storage bucket has its own CORS policy defined in `cors.json` (applied to the bucket, not the API); that file's origin list includes `https://three.ws`, the Sperax chat origins, and localhost. See the [`cors.json` section of the Configuration Reference](/docs/configuration).The bundle CDN path (`/agent-3d/`) sets `access-control-allow-origin: *` and `cross-origin-resource-policy: cross-origin` so the script can load from any origin. The agent embed iframe sets `frame-ancestors *` (overrideable per-agent via embed policy, see above).@@ -305,7 +309,7 @@ Admin and write endpoints accept only same-site requests, enforced by checking t- Never commit `.env` to version control- Rotate `JWT_SECRET` immediately if it is ever exposed — all existing sessions and OAuth tokens become invalid, which is preferable to leaving a compromised secret in place-- Scope third-party API keys minimally: Anthropic key should cover only the models and features you use; Storacha key should be scoped to your bucket+- Scope third-party API keys minimally: LLM provider keys should cover only the models and features you use; the Pinata JWT and S3/R2 credentials should be scoped to your own bucket### Database (Neon)@@ -340,3 +344,12 @@ Found a vulnerability? Report it privately:We aim to acknowledge reports within 48 hours and ship patches for critical issues within 7 days. Please do not publicly disclose a vulnerability before a fix is available. We ask that you give us a reasonable window to address the issue before disclosure.For validator misconduct (biased or falsified on-chain attestations), open a public issue in the repository tagged `validator-dispute`.++---++## Related++- [Configuration Reference](/docs/configuration): every environment variable and config file+- [ERC-8004](/docs/erc8004): the on-chain identity registries referenced above+- [SAS Credentialed Attestations](/docs/sas-attestations): the Solana attestation authority and its key handling+- [Memory](/docs/memory): memory modes and their privacy trade-offsdiff --git a/docs/selfie-to-avatar.md b/docs/selfie-to-avatar.mdindex 6721197d6..a4f7af7b7 100644--- a/docs/selfie-to-avatar.md+++ b/docs/selfie-to-avatar.md@@ -70,7 +70,7 @@ Request body: `name` (1-120, required), `photos` (1-6 image URLs or data URIs) *- **Cost.** On the platform-hosted GCP lane there is no per-use charge in the reconstruct handler; usage is rate-limited (`limits.upload`), and over-quota returns `402 plan_limit`.- **Bring your own key.** If no platform reconstruction backend is configured, the server returns `402 { code: 'regen_needs_byok', providers: ['meshy','tripo'] }` and the page shows a key-entry form. Meshy and Tripo run image-to-3D with your own API key; credit exhaustion surfaces as `402 insufficient_credits`.- **Single frame.** Despite "captures several angles automatically" in some copy, the scanner takes one manual still per slot; side angles are an optional manual add.-- **Timing.** The build screen says "1-2 minutes"; the poll timeout is 8 minutes with a "taking unusually long" warning after 10.+- **Timing.** The build screen says "1-2 minutes"; polling gives up after 8 minutes, and a job still reported running 10 minutes after submit (possible when a pending job resumes across a reload) stops with a "taking unusually long" message pointing you to your dashboard, since the avatar may still finish server-side.- **Quality gating.** Only a frontal with no detectable face hard-blocks. Blur, illustrations, or multiple faces are surfaced as warnings you can proceed past.- **Error handling.** Camera denial distinguishes `NotAllowedError` ("Camera access was denied... use Upload instead") from other failures. Job failures map to friendly messages (no face, content-safety flag, blur, service unavailable, timeout, out-of-memory). Poll tolerates up to 5 consecutive network errors with backoff before "Lost connection to the avatar engine." Rate limits (`429`) start a 60-second cooldown with a live countdown. Pending jobs resume across reloads.- **Output.** glTF 2.0 GLB with a Mixamo-standard humanoid rig, 52 ARKit blendshapes, and 15 visemes. Private avatars return a short-lived signed `url`; `model_url` is the public CDN URL once you make it public.diff --git a/docs/share-and-embed.md b/docs/share-and-embed.mdindex 98da357cc..f4bd29de9 100644--- a/docs/share-and-embed.md+++ b/docs/share-and-embed.md@@ -6,7 +6,7 @@ Once your agent is live, you have three ways to put it in front of people. None## Option 1 — Share the link-Every agent gets a public URL: `https://three.ws/agent/<id>`+Every agent gets a public URL: `https://three.ws/agents/<id>`Paste it anywhere:@@ -64,14 +64,14 @@ The element renders inline (no iframe boundary), supports keyboard navigation, aBy default, your agent can be embedded anywhere. If you want to restrict it to specific domains:1. Open your agent's edit page-2. Under **Embed settings**, add the domains that are allowed (e.g. `yoursite.com`)+2. Under the **Embed policy** settings, add the domains that are allowed (e.g. `yoursite.com`)3. Save — any embed on a non-listed domain will render an error placeholder instead---## Sharing on social platforms-Paste your agent's URL (`https://three.ws/agent/<id>`) into:+Paste your agent's URL (`https://three.ws/agents/<id>`) into:- **X / Twitter** — renders a card with the avatar poster image, name, and description- **Discord** — embeds as an oEmbed rich previewdiff --git a/docs/signals.md b/docs/signals.mdindex da11f851a..cded7bde4 100644--- a/docs/signals.md+++ b/docs/signals.md@@ -54,21 +54,24 @@ curl -s https://three.ws/api/signals/subscribe \-H 'authorization: Bearer YOUR_TOKEN' \-H 'content-type: application/json' \-d '{- "feed_slug": "FEED_SLUG",- "subscriber_agent_id": "YOUR_AGENT_UUID",- "network": "mainnet",+ "feed_id": 42,+ "agent_id": "YOUR_AGENT_UUID","mode": "simulate","base_sol": 0.1,"copy_exits": true}'```+The feed's numeric `feed_id` comes from the marketplace read; the subscription's network is inherited from the feed, so you do not pass one.+Go live within your caps, then instantly kill if needed:```bash-# flip an existing subscription to live+# flip to live: re-POST the create body with the new mode+# (upserts on the same feed_id + agent_id pair)curl -s https://three.ws/api/signals/subscribe -H 'authorization: Bearer YOUR_TOKEN' \- -H 'content-type: application/json' -d '{ "id": 123, "mode": "live" }'+ -H 'content-type: application/json' \+ -d '{ "feed_id": 42, "agent_id": "YOUR_AGENT_UUID", "mode": "live" }'# hard stop: no further pay or tradecurl -s https://three.ws/api/signals/subscribe -H 'authorization: Bearer YOUR_TOKEN' \diff --git a/docs/skills.md b/docs/skills.mdindex 63fbac777..edb47f40c 100644--- a/docs/skills.md+++ b/docs/skills.md@@ -57,7 +57,7 @@ These skills come pre-installed in every agent. They live in `src/agent-skills.j| `sign-action` | Sign the current action with the connected wallet || `help` | List available skills and commands |-Built-in skills that are `mcpExposed: true` are also surfaced as MCP tools via `/api/mcp` — external tools can invoke them by name as `skill_<name>` (hyphens converted to underscores).+Built-in skills that are `mcpExposed: true` are also published in the platform's skills catalog (`GET /api/chat-skills`) as callable tools named `skill_<name>` (hyphens and dots converted to underscores, e.g. `present-model` becomes `skill_present_model`). The catalog is what the platform chat runtime and external tool consumers read to discover them.---@@ -76,7 +76,7 @@ Reference skills by URI in the agent's `manifest.json`. The runtime fetches and}```-URIs can be HTTPS, IPFS (`ipfs://`), or Arweave (`ar://`). IPFS URIs are resolved through a gateway fallback chain (ipfs.io → dweb.link → nft.storage).+URIs can be HTTPS, IPFS (`ipfs://`), or Arweave (`ar://`). IPFS URIs are resolved through a gateway fallback chain (dweb.link → ipfs.io → flk-ipfs.xyz, see `src/ipfs.js`).### Via the web component attribute@@ -93,7 +93,10 @@ Pass a JSON array to the `skills` attribute:```jsconst el = document.querySelector('agent-3d');-await el.agent.skills.install({ uri: 'https://example.com/skills/weather/' });+await el.installSkill('https://example.com/skills/weather/');++// List what is installed (built-in + installed skill definitions)+console.log(el.skills);```---@@ -409,27 +412,30 @@ The `dependencies` object maps skill URIs to version ranges. Circular dependenci## Skill lifecycle events-The agent protocol bus fires events at each stage of skill execution. Listen to these in the host page to react to skill activity:+The agent protocol bus fires events at each stage of skill execution. Subscribe on the bus to react to skill activity:```js-const el = document.querySelector('agent-3d');+import { protocol } from './src/agent-protocol.js';+// In the three.ws app itself the same singleton is window.VIEWER.agent_protocol.// Fires when the runtime dispatches a tool call to a skill handler-el.addEventListener('perform-skill', e => {- console.log('Skill starting:', e.detail.skill, e.detail.args);+protocol.on('perform-skill', (action) => {+ console.log('Skill starting:', action.payload.skill, action.payload.args);});// Fires when the handler returns successfully-el.addEventListener('skill-done', e => {- console.log('Skill done:', e.detail.skill, e.detail.result);+protocol.on('skill-done', (action) => {+ console.log('Skill done:', action.payload.skill, action.payload.result);});// Fires when the handler throws or times out-el.addEventListener('skill-error', e => {- console.error('Skill error:', e.detail.skill, e.detail.error);+protocol.on('skill-error', (action) => {+ console.error('Skill error:', action.payload.skill, action.payload.error);});```+Host pages embedding `<agent-3d>` also get DOM `CustomEvent`s re-dispatched on the element for runtime activity: `skill:tool-start` and `skill:tool-called` (plus `brain:*`, `voice:*`, and `memory:write`). Listen with `el.addEventListener('skill:tool-called', handler)` when you only need tool-call notifications.+**Event payloads:**| Event | `detail` shape |@@ -444,24 +450,29 @@ el.addEventListener('skill-error', e => {## Calling skills programmatically+In the three.ws app, the built-in skills executor is exposed as `window.VIEWER.agent_skills` (an `AgentSkills` instance from `src/agent-skills.js`):+```js-const el = document.querySelector('agent-3d');+const skills = window.VIEWER.agent_skills;-// Execute a skill tool directly, bypassing the LLM-const result = await el.agent.skills.perform('wave', { style: 'enthusiastic' });-console.log(result); // { ok: true, style: 'enthusiastic' }+// Execute a skill directly, bypassing the LLM+const result = await skills.perform('greet', { name: 'Alex' });+console.log(result); // { success: true, output: '...', sentiment: ... }-// List all installed skills (built-in + installed)-const skills = el.agent.skills.list();+// List all registered skills+skills.list();// Get a specific skill definition-const waveDef = el.agent.skills.get('wave');+const greetDef = skills.get('greet');```-For external skills installed via `SkillRegistry`, invoke via the registry:+For external skills installed via `SkillRegistry` (`src/skills/index.js`), invoke through the registry:```js-const skill = el.agentRuntime.skillRegistry.findSkillForTool('get_weather');+const registry = new SkillRegistry({ trust: 'owned-only', ownerAddress });+await registry.install({ uri: 'https://example.com/skills/weather/' });++const skill = registry.findSkillForTool('get_weather');const result = await skill.invoke('get_weather', { city: 'Berlin' }, ctx);```@@ -507,8 +518,11 @@ skill is live — LLM can now call its tools## Worked example: the `wave` skillThe `wave` skill is the minimal complete example — small enough to reproduce here-in full. Create it at `examples/skills/wave/`; every file the bundle needs is-listed below.+in full. Create it as a `wave/` directory anywhere you serve static files; every+file the bundle needs is listed below. For real, installable bundles that ship+with the repo, see [examples/skills/](../examples/skills/) (`pump-fun`,+`solana-wallet`, and friends) and [public/skills/](../public/skills/)+(`tip-jar`, `crypto-price`, `dca`).### `manifest.json`@@ -668,7 +682,8 @@ A skill is just a directory of static files. Publish it anywhere:- **GitHub Releases** — attach a zip, reference the raw URL- **Vercel / Netlify / S3** — deploy the directory as a static site- **IPFS** — `ipfs add -r skills/wave/` and distribute the CID-- **npm** — include the bundle under `public/skills/skill-name/` and reference via a CDN like jsDelivr+- **The platform itself**: first-party bundles live under `public/skills/<name>/` in this repo (e.g. `public/skills/tip-jar/`) and are served at `https://three.ws/skills/<name>/`+- **npm**: publish the directory as a package and reference it via a CDN like jsDelivr**Convention:** name the manifest `manifest.json` and co-locate `handlers.js` in the same directory. Agents resolve all relative paths (`./clips/`, `./prompts/`) against the manifest's URL, so the layout must be preserved.diff --git a/docs/smart-contracts.md b/docs/smart-contracts.mdindex 3e5d227f6..4a291eb20 100644--- a/docs/smart-contracts.md+++ b/docs/smart-contracts.md@@ -18,7 +18,9 @@ Contracts are deployed at the same address on every supported EVM chain, using C### Mainnet-Chains: Ethereum (1), Optimism (10), BSC (56), Gnosis (100), Polygon (137), Fantom (250), zkSync Era (324), Moonbeam (1284), Mantle (5000), Base (8453), Arbitrum One (42161), Celo (42220), Avalanche (43114), Linea (59144), Scroll (534352).+Chains with confirmed bytecode: Ethereum (1), Optimism (10), BSC (56), Gnosis (100), Polygon (137), Mantle (5000), Base (8453), Arbitrum One (42161), Celo (42220), Avalanche (43114), Linea (59144), Scroll (534352).++Fantom (250), zkSync Era (324), and Moonbeam (1284) are listed in `REGISTRY_DEPLOYMENTS` for address parity but have **no contract code yet** (an `eth_getCode` sweep on 2026-06-19 returned empty on all three; zkSync Era additionally derives CREATE2 addresses differently, so the canonical address is unreachable there without a chain-specific deploy). Writes on those chains revert until the registries are deployed. See [`contracts/DEPLOYMENTS.md`](../contracts/DEPLOYMENTS.md) for the authoritative per-chain status.| Contract | Address ||---|---|@@ -276,7 +278,7 @@ await tx2.wait();## ReputationRegistry-`ReputationRegistry` stores signed feedback about registered agents. Scores are integers in the range `[-100, 100]` — negative scores indicate poor experiences, positive scores indicate good ones. Each `(reviewer, agentId)` pair can only submit once; there is no update path. Agent owners cannot review their own agents.+`ReputationRegistry` stores signed feedback about registered agents. Scores are integers in the range `[-100, 100]` — negative scores indicate poor experiences, positive scores indicate good ones. Each `(reviewer, agentId)` pair can only submit once; there is no update path. Agent owners cannot review their own agents. Alongside plain feedback, the contract also exposes an ETH-staked variant (`stakeReputation(uint256 agentId, uint8 score, string comment)` payable, refundable via `withdrawStake(uint256 agentId)`); `submitFeedback` is the path documented here.The registry holds a reference to `IdentityRegistry` — submitting feedback for an unregistered agentId reverts with `UnknownAgent`.@@ -540,17 +542,19 @@ export BASESCAN_API_KEY=your_keyexport DEPLOYER_PK=0xYourPrivateKey# Dry run first (no --broadcast)-forge script script/Deploy.s.sol --rpc-url base_sepolia+forge script script/Deploy.s.sol --rpc-url base_sepolia --private-key "$DEPLOYER_PK"# Deploy to Base Sepolia and verify on Basescanforge script script/Deploy.s.sol \--rpc-url base_sepolia \+ --private-key "$DEPLOYER_PK" \--broadcast \--verify# Deploy to Base mainnetforge script script/Deploy.s.sol \--rpc-url base \+ --private-key "$DEPLOYER_PK" \--broadcast \--verify```@@ -584,3 +588,12 @@ These are approximate costs at optimizer 200 runs. Actual cost depends on chain| All `view` functions | 0 | Free off-chain reads |On Base at typical gas prices (~0.001 gwei base fee), an agent registration runs to roughly $0.10–$0.25. The same transaction costs 20–50x more on Ethereum mainnet — use Base or another L2 for cost-sensitive flows.++---++## Related++- [ERC-8004 guide](/docs/erc8004) - the higher-level walkthrough of registering three.ws identities on-chain.+- [Reputation system](/docs/reputation) - how feedback scores surface in the product.+- [Validation attestations](/docs/validation) - the off-chain validation flow that writes to `ValidationRegistry`.+- [Register on-chain tutorial](/docs/tutorials/register-onchain) - step-by-step registration from the UI and SDK.diff --git a/docs/smart-money.md b/docs/smart-money.mdindex 94bb51ca2..f26461e75 100644--- a/docs/smart-money.md+++ b/docs/smart-money.md@@ -21,16 +21,16 @@ The numbers are produced by a cron rollup (`api/cron/smart-money-rollup.js`) in**Phase B: recompute reputation.** For each touched wallet the score is:```-win_rate = wins / (wins + duds)-early_win_rate = early_wins / early_entries-dump_rate = dumps / (wins + duds)+win_rate = round(wins / (wins + duds) * 100, 1) # percent, 0-100+early_win_rate = round(early_wins / early_entries * 100, 1) # percent, 0-100+dump_rate = round(dumps / (wins + duds) * 100, 1) # percent, 0-100confidence = clamp(judged / 12, 0, 1) # full confidence at 12 judged coinsearlyBonus = clamp((early_win_rate - win_rate) * 0.4, 0, 20)dumpPenalty = dump_rate * 0.4-smart_money_score = round((win_rate + earlyBonus - dumpPenalty) * confidence, 1)+smart_money_score = round(clamp(win_rate + earlyBonus - dumpPenalty, 0, 100) * confidence, 1)```-The label follows from the profile: a creator with 3 or more launches and zero graduations is a `rugger`; fewer than 4 judged coins is `fresh`; a dump rate of 60 percent or more is a `dumper`; a score of 70 or more is `smart_money`; 5 or more early entries with a win rate under 25 percent is a `sniper`; everything else is `neutral`.+The label follows from the profile: a creator with 3 or more launches, zero graduations, and at least 3 coins traded is a `rugger`; fewer than 4 judged coins is `fresh`; a dump rate of 60 percent or more is a `dumper`; a score of 70 or more is `smart_money`; 5 or more early entries with a win rate under 25 percent is a `sniper`; everything else is `neutral`.**Phase C: score live coins.** For every coin launched in the last 3 hours, `coin_smart_money` is computed from its non-creator buyers (creators do not lend pedigree to their own coin):diff --git a/docs/solana-pumpfun.md b/docs/solana-pumpfun.mdindex 0e477943b..04193d519 100644--- a/docs/solana-pumpfun.md+++ b/docs/solana-pumpfun.md@@ -1,5 +1,7 @@# Pump.fun integration for Solana agents+Pump.fun is a Solana token launchpad, and three.ws agents can watch it live: an agent avatar reacts (speaks, gestures, emotes) as claims and token graduations happen, and the same activity feeds each agent's trust score. If you just want to see it, add the `pumpfun-feed` widget to an agent in Studio; this page documents the plumbing behind it for developers.+This integrates the upstream [`pumpfun-claims-bot`](https://github.com/nirholas/pumpfun-claims-bot) MCP server into the three.ws platform so a Solana agent can:- Observe live pump.fun activity (GitHub social-fee claims, token graduations)@@ -84,12 +86,15 @@ All registered through `registerPumpFunWatchSkills` in [src/agent-skills.js](../### Reaction map (watch-start)-| Event | Empathy Layer trigger | Speech sentiment |-|---|---|---|-| `first_time_claim` | `celebration` 0.9 | +0.7 |-| `fake_claim` | `concern` 0.7 | -0.5 |-| `tier ∈ {influencer, mega}` | `curiosity` 0.5 | +0.2 |-| `graduation` | gesture: `wave` (1.5s) | +0.6 |+Reactions are computed by the shared dispatcher in [src/widgets/pumpfun-reactions.js](../src/widgets/pumpfun-reactions.js): each event is first distilled into a signal envelope (tier, market-cap multiple, dev track record, GitHub legitimacy, whale status), then mapped to a prioritized variant with an emote trigger, a gesture clip, and a spoken line. Representative variants:++| Variant | Trigger | Empathy Layer emote | Gesture | Speech sentiment |+|---|---|---|---|---|+| `graduation_standard` | any graduation | `celebration` 0.9 (up to 1.0 for moonshots) | celebrate clip | +0.7 to +0.95 |+| `claim_first_verified` | first claim, verified GitHub | `celebration` 1.0 | `thriller` (6s) | +0.85 |+| `claim_first_raw` | first claim, no GitHub link | `celebration` 0.85 | `celebrate` (4.5s) | +0.7 |+| `claim_fake` | fake claim detected | `concern` 0.85 | `shake` (1.8s) | -0.6 |+| `claim_tier_mega` / `_influencer` | repeat claim by tier | `celebration` 0.7 / `curiosity` 0.55 | short taunt/reaction | +0.5 / +0.3 |These are continuous-blend stimuli, not discrete states — they decay according to the per-second rates in [agent-system.md](agent-system.md#5-the-avatar-emotion-system-empathy-layer).@@ -152,7 +157,7 @@ Studio config schema (validated in `widget-types.js`):## What's intentionally not included- **Long-lived SSE** — the feed handler runs a 90s bounded loop and lets the browser auto-reconnect; the Cloud Run request handlers aren't meant to hold a connection open indefinitely. For higher throughput, deploy the bot itself as a streaming service.-- **On-chain signal attestations** — signals are off-chain only. Promoting them to SPL Memo attestations signed by a platform key is a future step (see [docs/solana.md](solana.md) "What's intentionally not on Solana yet").+- **On-chain signal attestations**: pump.fun signals are off-chain rows only. The platform's SPL Memo attestation layer exists (see [Solana reputation](solana-reputation.md)), but these crawled signals are not promoted into it; that remains a future step.- **Agent-as-signer** — the watch skills are read-only; they never sign transactions. The existing `pumpfun-create / -buy / -sell` skills cover signing flows.- **Anchor program for reputation** — still EVM-only on the on-chain path.@@ -165,3 +170,11 @@ npx vitest run tests/pumpfun-mcp.test.js tests/pumpfun-signals.test.js```The MCP client and cron crawler are unit-tested with mocked `fetch` and `sql`. End-to-end requires a live `PUMPFUN_BOT_URL` and is exercised via the Solana smoke test path.++---++## Related++- [Solana agents](/docs/solana): the identity NFTs these signals attach to+- [Agent Reputation on Solana](/docs/solana-reputation): how signals roll into the trust score+- [Mint mark ("3ws")](/docs/mint-mark): branding for coins launched through three.wsdiff --git a/docs/solana-reputation.md b/docs/solana-reputation.mdindex 94cfe9ac8..c08b71995 100644--- a/docs/solana-reputation.md+++ b/docs/solana-reputation.md@@ -2,6 +2,8 @@How three.ws gives a Solana agent a verifiable, portable trust record — and why it takes two systems, not one.+In plain terms: reputation is how anyone (a person or another AI agent) can check whether a Solana agent is trustworthy before paying or hiring it. You can see any agent's trust grade right now in the [Agent Passport](/agent-passport.html), and query the same data over the API described below. This page explains where those numbers come from and how to write your own on-chain vouch.+This is the Solana companion to [Agent Reputation](./agent-reputation.md) (the why) and [ERC-8004](./erc8004.md) / [Reputation System](./reputation.md) (the EVM how-to). If you haven't read those, start with [Agent Reputation](./agent-reputation.md) for the trust problem reputation solves. This page covers how that same problem is solved on Solana, where there is no canonical on-chain reputation registry to inherit.---@@ -44,7 +46,7 @@ There's no custom contract — a vouch is an **SPL Memo** transaction. The revieCost is a single Solana fee (~$0.0000+); the optional stake is real SOL that goes to the agent owner. The Passport's rate panel enforces a **double-review guard** — rating the same agent twice from one wallet updates that wallet's score rather than adding a second vote.-### The seven attestation kinds+### The eight attestation kindsEvery memo is one of these (`api/_lib/solana-attestations.js`):@@ -57,13 +59,14 @@ Every memo is one of these (`api/_lib/solana-attestations.js`):| `threews.accept.v1` | The agent owner accepted/acknowledged a task — used to *verify* feedback || `threews.dispute.v1` | The owner disputed an attestation against them || `threews.revoke.v1` | An attester withdrew their own attestation |+| `threews.review.v1` | A 1–5 rating tied to a specific `review_id` (structured marketplace-style review) |### How attestations become reputationThe raw memos are trustless and re-derivable by anyone. three.ws runs an indexer so reads are fast:```-on-chain memo → crawler (cron: every 5 min) → solana_attestations table → reputation API → Passport trust grade+on-chain memo → crawler (cron: every 10 min) → solana_attestations table → reputation API → Passport trust grade```The crawler (`crawlAgentAttestations`) calls `getSignaturesForAddress(asset)` from a saved cursor, fetches the transactions, extracts and **validates** each memo against its schema, computes a `verified` flag, and upserts it. Revocations and disputes flip flags on the rows they target. The `verified` rule is where Sybil resistance starts:@@ -132,7 +135,7 @@ The SDK (`solana-agent-sdk`) exposes the write side: `registerAgenCAgent`, `crea## One agent, two chains: the identity bridge-A single three.ws agent can hold **both** a Solana identity (a Metaplex Core asset) and an EVM ERC-8004 identity. The bridge (`solana-agent-sdk/.../identity-bridge.ts`) folds external identities into AgenC's 32-byte `agentId` space with namespaced SHA-256:+A single three.ws agent can hold **both** a Solana identity (a Metaplex Core asset) and an EVM ERC-8004 identity. The bridge ([solana-agent-sdk/src/actions/agenc/identity-bridge.ts](../solana-agent-sdk/src/actions/agenc/identity-bridge.ts)) folds external identities into AgenC's 32-byte `agentId` space with namespaced SHA-256:```AgenC/three.ws/erc8004/v1 + erc8004AgentId → agentId@@ -174,7 +177,7 @@ The shapes differ; the purpose is identical — let an agent decide, before it p## Status-- **Attestation reputation / Passport** — **live.** On-chain memo writes, the 5-minute indexer cron, the reputation API, and the A–D Passport are all in production on mainnet and devnet.+- **Attestation reputation / Passport** — **live.** On-chain memo writes, the 10-minute indexer cron (`/api/cron/solana-attestations-crawl`), the reputation API, and the A–D Passport are all in production on mainnet and devnet.- **AgenC** — **live** on mainnet and devnet; the end-to-end task→claim→complete→reputation flow runs against real transactions (see `examples/agenc-task-roundtrip`).- **Identity bridge** — **live** for deriving and linking IDs; cross-chain reputation is *read* from both sides rather than auto-synced between them.- **Solana `glb-schema` validation** — rides on `threews.validation.v1`, mirroring the EVM ValidationRegistry attestation.diff --git a/docs/solana.md b/docs/solana.mdindex e7b1404a2..27a89be8a 100644--- a/docs/solana.md+++ b/docs/solana.md@@ -1,6 +1,8 @@# Solana Agents-Register an agent on Solana as a Metaplex Core NFT. The flow mirrors the [ERC-8004](erc8004.md) path on EVM chains: a user's wallet signs a transaction that mints an on-chain identity token, and the platform stores the link between the agent record and the mint address.+Give your three.ws agent a real on-chain identity on Solana. When you register, your wallet signs one transaction that mints an NFT (a Metaplex Core asset) representing the agent, and three.ws links that mint to your agent record. You do this from the agent creation and edit pages after connecting a Solana wallet (Phantom, Solflare, or Backpack).++Technically, the flow mirrors the [ERC-8004](erc8004.md) path on EVM chains: a user's wallet signs a transaction that mints an on-chain identity token, and the platform stores the link between the agent record and the mint address.This document covers what is supported today, the end-to-end registration flow, and what is intentionally **not** on Solana yet.@@ -17,15 +19,16 @@ This document covers what is supported today, the end-to-end registration flow,| Solana payments (checkout + confirm) | Live | [api/payments/solana/\[action\].js](../api/payments/solana/%5Baction%5D.js) (handles `checkout` + `confirm`) || Agent identity NFT (Metaplex Core) | Live | [api/agents/solana/\[action\].js](../api/agents/solana/%5Baction%5D.js) (handles `register-prep` + `register-confirm`) || Agent record persisted in DB | Live | `agent_identities`, `meta.chain_type='solana'`, `meta.sol_mint_address` |-| On-chain reputation registry | **Not on Solana** | EVM only |-| On-chain validation registry | **Not on Solana** | EVM only (testnet) |-| Discovery file lists Solana agents | **Not yet** | [public/.well-known/agent-registration.json](../public/.well-known/agent-registration.json) is EVM-only |+| On-chain reputation (SPL Memo attestations) | Live | [api/_lib/solana-attestations.js](../api/_lib/solana-attestations.js), aggregated by `/api/agents/solana-reputation` (see [Solana reputation](solana-reputation.md)) |+| On-chain validation (glTF/schema attestation) | Live | [api/_lib/solana-validation-attest.js](../api/_lib/solana-validation-attest.js), auto-run at register-confirm |+| Credentialed attestations (SAS) | Live | [api/agents/sas/\[action\].js](../api/agents/sas/%5Baction%5D.js) (see [SAS attestations](sas-attestations.md)) |+| Discovery file lists Solana agents | **Not yet** | [public/.well-known/agent-registration.json](../public/.well-known/agent-registration.json) publishes the platform card and x402 catalog, but its `registrations` array carries no per-agent Solana entries |---## How identity works on Solana-EVM agents are minted as ERC-721 NFTs in the IdentityRegistry contract at a fixed CREATE2 address. Solana has no CREATE2 and no shared registry — instead each agent is a standalone **Metaplex Core asset** (a single-account NFT standard with name + URI metadata baked in).+EVM agents are minted as ERC-721 NFTs in the IdentityRegistry contract at a fixed CREATE2 address. Solana has no CREATE2 and no shared registry contract. Instead each agent is a **Metaplex Core asset** (a single-account NFT standard with name + URI metadata baked in). When a three.ws Agents collection is configured for the network (`SOLANA_AGENT_COLLECTION_MAINNET` / `_DEVNET`), the asset is minted into that collection with the collection authority co-signing, so three.ws can curate on-chain metadata on the owner's behalf; with no collection configured, the mint falls back to a standalone asset. See [Deploy agents on-chain (bulk)](onchain-agents.md) for the collection model.The agent's canonical identifier on Solana is its **asset pubkey** (base58, 32-byte). The platform stores it alongside the mint transaction signature so the on-chain record can always be re-verified.@@ -49,7 +52,7 @@ Agent record shape (`agent_identities.meta`):| `mainnet` | mainnet-beta | `SOLANA_RPC_URL` env, falls back to `https://api.mainnet-beta.solana.com` || `devnet` | devnet | `SOLANA_RPC_URL_DEVNET` env, falls back to `https://api.devnet.solana.com` |-Public RPCs are rate-limited. For production, set `SOLANA_RPC_URL` to a Helius, Quicknode, or Triton endpoint.+Public RPCs are rate-limited. For production, set `SOLANA_RPC_URL` to a Helius, Quicknode, or Triton endpoint. Server-side calls do not depend on a single endpoint: [api/_lib/solana/connection.js](../api/_lib/solana/connection.js) builds a failover chain (explicit `SOLANA_RPC_URL`, then keyed providers such as Helius and Alchemy when their keys are set, then operator-supplied `SOLANA_RPC_FALLBACK_URLS`, then keyless public endpoints, with `SOLANA_RPC_LAST_RESORT_URLS` as a paid reserve tried last) and rotates past endpoints that are rate-limited or cooling down.---@@ -93,9 +96,11 @@ const prep = await fetch('/api/agents/solana-register-prep', {name: 'My Agent', // 1–60 charsdescription: 'short bio', // ≤ 280 charswallet_address: walletPubkey, // base58, must be linked to user- network: 'devnet', // or 'mainnet'+ network: 'devnet', // or 'mainnet' (the default)avatar_id: avatarUuid, // optional — must be owned by usermetadata_uri: 'https://...', // optional — else server synthesizes one+ asset_pubkey: vanityPubkey, // optional: client-supplied asset keypair pubkey+ vanity_prefix: '3ws', // optional: asserts asset_pubkey starts with it}),}).then(r => r.json());@@ -105,7 +110,8 @@ const prep = await fetch('/api/agents/solana-register-prep', {The server:- Verifies the wallet is linked to the session user.- If `avatar_id` is given, verifies the user owns the avatar.-- Builds an unsigned Metaplex Core `createV1` transaction with the user's pubkey as a `NoopSigner`. The asset (mint) keypair is generated server-side and pre-signs the transaction.+- Builds an unsigned Metaplex Core `create` transaction with the user's pubkey as a `NoopSigner`. The asset keypair is generated server-side and pre-signs the transaction; alternatively the client supplies its own `asset_pubkey` (with an optional `vanity_prefix`, which returns `402 payment_required` for prefixes of 5+ characters on the free plan).+- Writes an on-chain Attributes plugin (the three.ws brand block) and an enforced Royalties plugin into the asset, and mints into the three.ws Agents collection when one is configured for the network.- Stores a 30-minute pending record so step 4 can resolve `name` / `description` / `avatar_id` from the prep payload.The returned `tx_base64` is a fully built transaction missing only the user's signature.@@ -147,12 +153,13 @@ const result = await fetch('/api/agents/solana-register-confirm', {}),}).then(r => r.json());-// → {+// → 201 {// ok: true,// agent: { id, name, description, wallet_address, meta, home_url, ... },// sol_mint_address,// tx_signature,// network,+// validation?: { passed, signature, proof_hash, deduped },// }```@@ -161,7 +168,7 @@ The server re-fetches the parsed transaction from the cluster, asserts:- `asset_pubkey` appears in the transaction's account keys,- no agent has already been registered for this mint,-then inserts the `agent_identities` row and clears the pending record.+then inserts the `agent_identities` row and clears the pending record. If the agent has an avatar GLB, the server also records a best-effort on-chain glTF/schema validation attestation (`threews.validation.v1`, signed by the platform validator; see [api/_lib/solana-validation-attest.js](../api/_lib/solana-validation-attest.js)); a failure there never fails the registration.---@@ -171,7 +178,9 @@ Returned as `{ error, error_description }` from the prep / confirm endpoints.| Status | `error` | When ||---|---|---|+| 400 | `validation_error` | Malformed body, non-base58 `asset_pubkey`, or `vanity_prefix` without `asset_pubkey` || 401 | `unauthorized` | No session |+| 402 | `payment_required` | `vanity_prefix` of 5+ characters on a free plan || 403 | `forbidden` | Wallet is not linked to the session user || 404 | `not_found` | `avatar_id` doesn't exist or isn't owned by user || 422 | `tx_not_found` | RPC has not seen the signature yet — retry after a few seconds |@@ -179,6 +188,7 @@ Returned as `{ error, error_description }` from the prep / confirm endpoints.| 422 | `asset_not_in_tx` | `asset_pubkey` is not among the transaction's account keys || 409 | `conflict` | An agent is already registered for this mint || 429 | `rate_limited` | Per-IP auth limiter tripped |+| 503 | `rpc_unavailable` | Every RPC endpoint in the failover chain failed while building the tx |---@@ -186,9 +196,12 @@ Returned as `{ error, error_description }` from the prep / confirm endpoints.| Var | Purpose ||---|---|-| `SOLANA_RPC_URL` | Mainnet RPC. Defaults to public mainnet-beta. **Set this in production.** |+| `SOLANA_RPC_URL` | Primary mainnet RPC. Defaults to public mainnet-beta. **Set this in production.** || `SOLANA_RPC_URL_DEVNET` | Devnet RPC. Defaults to public devnet. |-| `APP_ORIGIN` | Used to synthesize a default `metadata_uri` if the caller didn't provide one. |+| `SOLANA_RPC_FALLBACK_URLS` | Comma-separated extra mainnet endpoints rotated into the failover chain after the primary. |+| `SOLANA_RPC_LAST_RESORT_URLS` | Comma-separated paid/metered endpoints tried only after every free endpoint fails. |+| `SOLANA_AGENT_COLLECTION_MAINNET` / `_DEVNET` | Address of the three.ws Agents collection; when set, registrations mint into it. |+| `PUBLIC_APP_ORIGIN` | Canonical origin (exposed to code as `env.APP_ORIGIN`); used to synthesize a default `metadata_uri` if the caller didn't provide one. |SIWS-related env vars live in [api/_lib/env.js](../api/_lib/env.js) and [api/_lib/siws.js](../api/_lib/siws.js).@@ -206,12 +219,24 @@ There is no global Solana registry to query — discovery happens via the platfo---+## What's on Solana instead of a registry contract++- **Reputation**: there is no single `ReputationRegistry` contract like ERC-8004's. Instead, permissionless SPL Memo attestations (feedback, stakes, tasks, disputes) are written on-chain against the agent's asset pubkey, crawled into `solana_attestations`, and aggregated by `/api/agents/solana-reputation`. Off-chain pump.fun behavior signals land in `pumpfun_signals` and feed the same score. See [Solana reputation](solana-reputation.md) and [solana-pumpfun.md](solana-pumpfun.md).+- **Validation**: no registry contract either; validations are `threews.validation.v1` SPL Memo attestations (including the automatic glb-schema attestation at register-confirm), plus SAS credentialed validations signed by the platform authority ([SAS attestations](sas-attestations.md)).+## What's intentionally not on Solana yet-- **Reputation**: ERC-8004's `ReputationRegistry` is EVM-only. Solana agents have no on-chain feedback aggregation today. Reviews live in the platform DB. Off-chain pump.fun behavior signals are crawled into `pumpfun_signals` and surfaced through `solana-reputation` — see [solana-pumpfun.md](solana-pumpfun.md).-- **Validation**: Same. The `ValidationRegistry` is EVM testnet only; there is no Solana analog.- **Delegated wallet (EIP-712)**: There is no equivalent for Solana agents. Owner = the wallet that signed the mint.-- **Cross-chain identifier**: EVM agents use `eip155:<chainId>:<registry>:<agentId>` (CAIP-10). Solana agents use the asset pubkey directly; a CAIP-10 form (`solana:<cluster-genesis>:<asset-pubkey>`) is not currently emitted by the platform.-- **Discovery**: `agent-registration.json` is EVM-shaped. Adding Solana entries means defining a JSON schema for Metaplex Core assets — not done.+- **Cross-chain identifier**: EVM agents use `eip155:<chainId>:<registry>:<agentId>` (CAIP-10). The user-signed flow stores the asset pubkey directly; only the bulk deploy path records a CAIP-2-style `solana:<cluster-genesis>` chain id in `meta.onchain.chain` (see [onchain-agents.md](onchain-agents.md)).+- **Discovery**: `agent-registration.json` publishes the platform-level card and x402 catalog, but its `registrations` array does not list individual Solana agents. Adding them means defining a JSON schema for Metaplex Core assets; not done yet.++A full ERC-8004-equivalent on Solana (Identity / Reputation / Validation as Anchor programs with a parallel JS client) remains a separate, larger piece of work; this document covers what ships today.++---++## Related-A full ERC-8004-equivalent on Solana would mean writing three Anchor programs (Identity / Reputation / Validation) and a parallel JS client. That is a separate, larger piece of work; this document covers only what ships today.+- [Deploy agents on-chain (bulk)](/docs/onchain-agents): the server-side, collection-minting counterpart to this flow+- [Agent Reputation on Solana](/docs/solana-reputation): how attestations become a trust grade+- [SAS Credentialed Attestations](/docs/sas-attestations): authority-signed credentials+- [ERC-8004](/docs/erc8004): the EVM identity path this flow mirrorsdiff --git a/docs/spatial-mcp.md b/docs/spatial-mcp.mdindex 97e53c5dd..62313922e 100644--- a/docs/spatial-mcp.md+++ b/docs/spatial-mcp.md@@ -98,6 +98,6 @@ Free 3D Studio (`structuredContent.spatial`): `forge_free`, `text_to_avatar`, `m## Related- [`specs/SPATIAL_MCP.md`](https://github.com/nirholas/three.ws/blob/main/specs/SPATIAL_MCP.md) — the normative spec-- [`docs/mcp-studio.md`](./mcp-studio.md) — the free 3D Studio MCP server-- AR handoff (`ar` block) ties to the AR export path (`export_ar`, `docs/ar.md`)-- Persona hook (`persona` block) ties to the embodiment tools (prompt 07)+- [3D Studio MCP (free)](/docs/mcp-studio): the free 3D Studio MCP server that emits these artifacts+- [MCP Tools Catalog](/docs/mcp-tools): which server hosts which tool, free vs. paid+- [AR & WebXR](/docs/ar): the AR handoff the artifact's `ar` block ties into (`export_ar`)diff --git a/docs/strategy-objects.md b/docs/strategy-objects.mdindex 1df86af9b..0a6a5de56 100644--- a/docs/strategy-objects.md+++ b/docs/strategy-objects.md@@ -1,9 +1,9 @@# Strategy Objects and the Strategy Lab-A Strategy Object is a trade strategy as a first-class thing you can own: a structured, validated rule set (entry conditions, sizing, take-profit, stop-loss, risk caps) that your agent can equip and run on-chain, ranked on a leaderboard by real live performance and forkable by anyone. The Strategy Lab is the workbench: write a strategy as data, validate it, backtest it against real captured pump.fun history with the exact evaluator the live worker uses, and run it live or in simulation, end to end. Both run strategies as additional constraints on top of your agent's server-side spend policy, never a way around it.+A Strategy Object is a trade strategy as a first-class thing you can own: a structured, validated rule set (entry conditions, sizing, take-profit, stop-loss, risk caps) that your agent can equip and run on-chain, ranked on a leaderboard by real live performance and forkable by anyone. The Strategy Lab is the workbench: write a strategy as data, validate it, backtest it against real recorded pump.fun history with the same evaluator its live runs use, and run it live or in simulation, end to end. Both run strategies as additional constraints on top of your agent's server-side spend policy, never a way around it.Pages: [/strategies](https://three.ws/strategies) (the library and leaderboard), [/strategy-lab](https://three.ws/strategy-lab) (the workbench)-API: `GET/POST /api/strategies`, `GET /api/strategies/leaderboard`, `GET/PATCH/DELETE /api/strategies/:id`, `POST /api/strategies/:id/{fork,publish}`, `GET/POST/DELETE /api/dca-strategies`, and the Lab's `POST /api/pump/strategy-{validate,backtest,run,close-all}`+API: `GET/POST /api/strategies`, `GET /api/strategies/leaderboard`, `GET/PATCH/DELETE /api/strategies/:id`, `POST /api/strategies/:id/{fork,publish}`, `GET/POST/DELETE /api/dca-strategies`, the Lab's `POST /api/pump/strategy-{validate,backtest,run,close-all}`, and the sniper backtester `POST /api/sniper/backtest`## Why it exists@@ -26,7 +26,7 @@ Every strategy is normalized and validated by `api/_lib/strategy-schema.js` befo- **exits**: `take_profit_pct`, a mandatory `stop_loss_pct`, optional `trailing_stop_pct`, and `max_hold_minutes`. Validation requires a stop-loss and at least one upside exit.- **risk**: `max_concurrent_positions` and `cooldown_minutes`.-The schema enforces hard bounds on every field, so a stored config can never carry a nonsense number into the runtime. Two pure, synchronous functions, `matchesEntry` (does this real launch pass the entry gate) and `shouldExit` (should this open position close now), are the same logic the runtime and the backtest both use, so a backtest reflects live behavior rather than a flattering fiction.+The schema enforces hard bounds on every field, so a stored config can never carry a nonsense number into the runtime. Two pure, synchronous functions, `matchesEntry` (does this real launch pass the entry gate) and `shouldExit` (should this open position close now), are the same logic the live equipped-strategy runtime (`api/_lib/agent-strategy-runtime.js`) and the assisted scan preview (`POST /api/trading/scan`) both evaluate, so a stored rule means exactly the same thing everywhere it runs.### The library, leaderboard, and forking@@ -34,12 +34,14 @@ The schema enforces hard bounds on every field, so a stored config can never car### The Strategy Lab-`/strategy-lab` is where you build and prove a declarative pump.fun strategy against real data:+`/strategy-lab` is where you build and prove a declarative pump.fun strategy. The Lab speaks its own tiny strategy DSL (a spec with `scan`, `filters`, `entry`, and `exit` predicate rules), and one compiled evaluator powers validation, backtest, and live runs, so they cannot drift:-- **Validate** (`POST /api/pump/strategy-validate`) checks the spec with the same validator the runner uses, so a broken spec is caught before anything runs.-- **Backtest** (`POST /api/pump/strategy-backtest`) replays the compiled strategy over the real captured universe: `pump_coin_intel` (per-launch bundle, organic, concentration, quality, category signals) joined to `pump_coin_outcomes` (graduated, pumped, flat, rugged, ATH multiple, last market cap). It uses the exact entry gate and exit priority the live worker uses. It does not synthesize launches or invent price paths; exits are evaluated at the two real price points it actually observed (the ATH multiple and the last observed multiple), entry slippage and impact are modeled from recorded early-window liquidity, and every limitation (survivorship, labeling lag, sample size) is reported in a `caveats` field.-- **Run** (`POST /api/pump/strategy-run`) executes the strategy for a bounded duration and streams events over Server-Sent Events. In **simulate** mode it needs no wallet and spends nothing; in **live** mode it requires auth, an agent you own with a provisioned Solana wallet, and every buy passes a `policyGuard` that calls the same `checkBuyAllowed` spend-policy check the rest of the platform uses.-- **Close all** (`POST /api/pump/strategy-close-all`) exits open strategy positions.+- **Validate** (`POST /api/pump/strategy-validate`) checks the spec with the same validator the runner uses, so a broken spec is caught with field-level issues before anything runs. No sign-in needed.+- **Backtest** (`POST /api/pump/strategy-backtest`, sign-in required) replays the compiled strategy over real recorded on-chain history: for each candidate mint (from the request's `mints`, the spec's `scan.mints`, or a live scan of new or trending launches) it fetches the token's real details, holders, bonding curve, and recent trades, evaluates the entry gate at the first recorded trade, then walks the subsequent real trades to trigger the exit rules. It never synthesizes launches or invents price paths; the response's `data` carries `spent`, `realizedPnlSol`, `roiPct`, `tradeCount`, `winRate`, `maxDrawdownSol`, the per-mint `trades`, and `mintsUsed`.+- **Run** (`POST /api/pump/strategy-run`) executes the strategy for a bounded duration (5 to 600 seconds) and streams events over Server-Sent Events. In **simulate** mode it needs no wallet and spends nothing; in **live** mode it requires auth, an agent you own with a provisioned Solana wallet, and every buy passes a `policyGuard` that calls the same `checkBuyAllowed` spend-policy check the rest of the platform uses.+- **Close all** (`POST /api/pump/strategy-close-all`, sign-in required) exits open strategy positions.++A second, separate backtester serves sniper-style rule sets: `POST /api/sniper/backtest { agent_id, strategy, window_days?, network? }` (auth, agent you own, windows of 7, 30, 90, or 180 days). It replays the real captured launch universe, `pump_coin_intel` (bundle, organic, concentration, quality, category signals) joined to `pump_coin_outcomes` (graduated, pumped, flat, rugged, ATH multiple, last market cap), using the exact scorer and exit priority the live sniper worker runs. Exits are modeled at the two real price points it actually observed (the recorded peak and final multiples), a too-thin window returns an explicit `insufficient_data` verdict instead of a flattering number, and every limitation (survivorship, labeling lag, sample size) is reported in a `caveats` field. Results are cached by strategy hash and linked to the agent for projected-versus-realized comparison.### DCA and subscription builders@@ -50,7 +52,7 @@ The schema enforces hard bounds on every field, so a stored config can never car1. Open [/strategies](https://three.ws/strategies) and browse the published marketplace, or switch to the leaderboard to see strategies ranked by real live ROI.2. Click **New strategy**. The full-page builder opens. Set your entry conditions, per-trade size and slippage, a required stop-loss and at least one upside exit, and your risk caps. Save.3. To prove it, open [/strategy-lab](https://three.ws/strategy-lab), paste or write the spec, and **Validate**. Fix any field-tagged errors it returns.-4. **Backtest** it against the real captured history. Read the results and the `caveats` before you trust them.+4. **Backtest** it over real recorded launches and trades. For a sniper rule set, `POST /api/sniper/backtest` replays the captured outcome history and reports its own limitations; read the `caveats` before you trust a number.5. **Run** it in Simulate mode first: watch the live SSE stream of entries, exits, and logs with no funds at risk.6. Equip the strategy on an agent you own (or flip the Lab run to Live with that agent), and it trades within that agent's spend policy. Fork, edit, publish, or delete from your library at any time.@@ -66,20 +68,23 @@ curl -s 'https://three.ws/api/strategies/leaderboard?limit=10' \| jq '.data.leaders[] | {rank, name, roi_pct: .performance.roi_pct}'```-Backtest a spec against real captured pump.fun history:+Backtest a sniper rule set against the real captured pump.fun launch history (auth required; bearer tokens skip CSRF):```bash-curl -s https://three.ws/api/pump/strategy-backtest \+curl -s https://three.ws/api/sniper/backtest \+ -H 'authorization: Bearer YOUR_TOKEN' \-H 'content-type: application/json' \-d '{+ "agent_id": "YOUR_AGENT_UUID",+ "window_days": 30,+ "network": "mainnet","strategy": {- "network": "mainnet",- "entry": { "trigger": "new_launch", "max_age_minutes": 30, "min_liquidity_sol": 5 },- "sizing": { "amount_sol": 0.1, "max_slippage_bps": 500 },- "exits": { "take_profit_pct": 100, "stop_loss_pct": 40 },- "risk": { "max_concurrent_positions": 3 }+ "take_profit_pct": 100,+ "stop_loss_pct": 40,+ "min_quality_score": 60,+ "require_socials": true}- }' | jq '{summary, caveats}'+ }' | jq '{sample_size, universe_size, insufficient_data, metrics, caveats}'```## Guardrails, states, and limits@@ -88,7 +93,7 @@ curl -s https://three.ws/api/pump/strategy-backtest \- **Simulate versus live.** The Lab defaults to Simulate (no wallet, no funds). Live requires auth, an owned agent with a provisioned Solana wallet, and enforces the spend policy on every buy.- **A stop-loss is mandatory.** Validation rejects any strategy without a stop-loss and requires at least one upside exit (take-profit, trailing stop, or max hold). Every field is clamped to hard bounds.- **Proven, not promised.** Performance is aggregated from real closed on-chain positions. No closed trades means "Unproven", not a synthetic curve. The leaderboard ranks by verified live ROI.-- **Backtest honesty.** The backtester replays real captured history with the live evaluator; it never invents launches, outcomes, or price paths, and reports its own limitations in `caveats`.+- **Backtest honesty.** Both backtesters replay real recorded history with the same evaluator their live path runs; neither invents launches, outcomes, or price paths. The sniper backtester additionally reports its own limitations in `caveats` and returns an explicit `insufficient_data` verdict on a too-thin window.- **Forking transfers rules, not wallets.** A fork copies the config with lineage credited; the forker runs it under their own spend policy. No wallet access is ever transferred.- **Deleting is safe.** Deleting a strategy stops equipped agents from running it; open positions stay yours to manage.- **DCA moves real funds on a schedule.** Create and cancel are CSRF-gated over a session, slippage is capped server-side, and allowed output tokens plus the default chain are operator config, never hardcoded.diff --git a/docs/talking-avatar-video.md b/docs/talking-avatar-video.mdindex 0520c9ea5..c96f81720 100644--- a/docs/talking-avatar-video.md+++ b/docs/talking-avatar-video.md@@ -35,12 +35,14 @@ The page ([`pages/create/video.html`](../pages/create/video.html)) loads [`src/c## Examples-All three endpoints require a signed-in session.+All three endpoints require a signed-in browser session. They authenticate with the+session cookie only (`__Host-sid`); API bearer tokens are not accepted on this+surface, so from a script reuse the cookie from a logged-in browser session.```bash# 1. Presign an audio upload slot.curl -X POST 'https://three.ws/api/avatar/presign-audio' \- -H 'authorization: Bearer <TOKEN>' -H 'content-type: application/json' \+ -H 'cookie: __Host-sid=<SESSION>' -H 'content-type: application/json' \-d '{ "filename": "line.mp3", "content_type": "audio/mpeg" }'# -> { "upload_url": "<PUT url>", "public_url": "https://…/line.mp3", "storage_key": "u/<uid>/audio/<uuid>.mp3" }@@ -49,13 +51,13 @@ curl -X PUT '<PUT url>' -H 'content-type: audio/mpeg' --data-binary @line.mp3# 3. Kick off generation with an avatar image + the uploaded audio.curl -X POST 'https://three.ws/api/avatar/video-generate' \- -H 'authorization: Bearer <TOKEN>' -H 'content-type: application/json' \+ -H 'cookie: __Host-sid=<SESSION>' -H 'content-type: application/json' \-d '{ "image_url": "https://…/avatar.png", "audio_url": "https://…/line.mp3","avatar_id": "<AVATAR_ID>", "prompt": "A person talking on a bright stage." }'# -> 202 { "job_id": "…", "status": "queued" }# 4. Poll until done, then fetch video_url.-curl -H 'authorization: Bearer <TOKEN>' \+curl -H 'cookie: __Host-sid=<SESSION>' \'https://three.ws/api/avatar/video-status?job_id=<JOB_ID>'# -> { "job_id": "…", "status": "done", "progress": 1, "video_url": "https://…/out.mp4", "error": null, "updated_at": "…" }```diff --git a/docs/terminal.md b/docs/terminal.mdindex a672d2119..410277fc2 100644--- a/docs/terminal.md+++ b/docs/terminal.md@@ -45,7 +45,7 @@ The filter bar (state in `store.js`) narrows the feed by source, free-text query## Firewall, MEV, and trading from your agent wallet-Trading is the guarded path, and the client checks are only a fast gate: the server is the real authority. `POST /api/agents/:id/solana/trade` is owner-only (session or bearer auth, then agent-ownership verification) and, for a real execute, requires a single-use `x-csrf-token` and an `idempotency_key`. A `{ preview: true }` call returns a live quote and moves no funds. On execute the server runs a fixed enforcement order: fresh quote, kill switch, per-trade cap, daily budget, spend-limit enforcement, price-impact breaker, then the Trade Safety Firewall (`assessTradeSafety`; a `block` returns HTTP 422 `firewall_blocked`), then SOL headroom, then it claims the idempotency slot and submits through the MEV engine (`submitProtected`: dynamic compute budget from a real simulation, a Helius priority-fee estimate, and a Jito single-tx bundle with a real tip on mainnet, falling back transparently to a protected raw send). The agent's key is decrypted only at signing time via `recoverSolanaAgentKeypair`, and every attempt is audit-logged. A retried idempotency key never double-spends; a previously failed key returns 409. The firewall thresholds live in `api/_lib/trade-firewall.js`: block at score 45 and below, warn at 70 and below, with a fatal check (a dead sell leg or no venue) forcing `block` regardless of score.+Trading is the guarded path, and the client checks are only a fast gate: the server is the real authority. `POST /api/agents/:id/solana/trade` is owner-only (session or bearer auth, then agent-ownership verification) and, for a real execute, requires a single-use `x-csrf-token` and an `idempotency_key`. A `{ preview: true }` call returns a live quote and moves no funds. On execute the server runs a fixed enforcement order: fresh quote, kill switch, per-trade cap, daily budget, spend-limit enforcement, price-impact breaker, then the Trade Safety Firewall (`assessTradeSafety`; a `block` returns HTTP 422 `firewall_blocked`), then SOL headroom, then it claims the idempotency slot and submits through the MEV engine (`submitProtected` with `tipMode 'off'`: dynamic compute budget from a real simulation and a Helius priority-fee estimate on a protected single-tx send; the engine's Jito bundle-with-tip route exists but is not used by this endpoint). The agent's key is decrypted only at signing time via `recoverSolanaAgentKeypair`, and every attempt is audit-logged. A retried idempotency key never double-spends; a previously failed key returns 409. The firewall thresholds live in `api/_lib/trade-firewall.js`: block at score 45 and below, warn at 70 and below, with a fatal check (a dead sell leg or no venue) forcing `block` regardless of score.Express mode (`trade.js`): the first trade always shows a confirm modal; accepting sets a per-agent express flag so later orders execute instantly. `x` toggles it back off.diff --git a/docs/troubleshooting.md b/docs/troubleshooting.mdindex f84e09163..222c204ac 100644--- a/docs/troubleshooting.md+++ b/docs/troubleshooting.md@@ -149,7 +149,7 @@ Organized by symptom. Find your problem, check the likely causes, follow the fix**Fix steps:**1. Check the Console. The avatar module logs a warning if expected morph targets aren't found on load.-2. Verify your GLB has morph targets named exactly as expected (case-sensitive). The emotion system maps to: `mouthSmile`, `mouthFrown`, `mouthOpen`, `cheekPuff`, `browInnerUp`, `browOuterUp`, `noseSneer`, `eyeSquint`, `eyesClosed`. These are the standard VRM / humanoid avatar names.+2. Verify your GLB has morph targets named exactly as expected (case-sensitive). The emotion system maps to: `mouthSmile`, `mouthFrown`, `mouthOpen`, `cheekPuff`, `browInnerUp`, `browOuterUpLeft` / `browOuterUpRight`, `noseSneerLeft` / `noseSneerRight`, `eyeSquintLeft` / `eyeSquintRight`, `eyesClosed`. These are the standard ARKit / humanoid avatar blendshape names.3. For head tilt and lean, the skeleton needs a `Head` or `Neck` bone. Open the model in Blender and check the armature.4. Confirm the avatar module is initialized: open DevTools Console and run `window.VIEWER?.agent_avatar`. If `undefined`, the avatar layer didn't boot — check for earlier errors in the console.@@ -212,7 +212,7 @@ Organized by symptom. Find your problem, check the likely causes, follow the fix**Fix steps:**1. Verify the `<script>` tag loads before the `<agent-3d>` element in the DOM, or that it uses `defer`/`async` correctly.-2. Check the Console for CSP violations. The CDN origin (`cdn.three.ws`) must appear in your `script-src` policy.+2. Check the Console for CSP violations. The script origin (`https://three.ws`) must appear in your `script-src` policy (and in `connect-src` for API and model fetches).3. For **Next.js**: web components use browser APIs (`window`, `document`, `SpeechSynthesis`) that don't exist server-side. Mark the component file with `'use client'` and disable SSR for the wrapper:```jsimport dynamic from 'next/dynamic';@@ -228,8 +228,8 @@ Organized by symptom. Find your problem, check the likely causes, follow the fix**Fix steps:**1. Verify the `src` URL is correct — use the full HTTPS URL.-2. Do not use a URL that ends in `/edit` or `/dashboard` — those pages block framing for security. Use the agent's public embed URL.-3. Note: the `frame-ancestors` CSP for the embed is currently set via a `<meta>` HTTP-equiv tag, which browsers ignore for `frame-ancestors` (it must be an HTTP header). This means any origin can embed — if you're seeing a block, it's coming from something else, likely the host page's own CSP or an extension.+2. Do not use a URL that ends in `/edit` or `/dashboard` — those pages block framing for security. Use the agent's public embed URL (`/agent/<id>/embed`, `/w/<widget-id>`, or `/widget#widget=<id>`).+3. Only the dedicated embed routes send a `frame-ancestors *` CSP header (set in the route table and applied by the server); regular pages send `frame-ancestors 'self'` and will refuse to load in your iframe. If an embed route is being blocked, the block is coming from the host page's own CSP, the agent's embed policy (domain allowlist), or a browser extension.---@@ -239,20 +239,21 @@ Organized by symptom. Find your problem, check the likely causes, follow the fix**Fix steps:**-1. Target the correct origin: `'https://three.ws/'` (or your self-hosted origin).+1. Target the correct origin: `'https://three.ws'` (or your self-hosted origin). Note there is no trailing slash: `e.origin` is a bare origin, so a comparison against `'https://three.ws/'` never matches.2. Listen for `message` events on `window`, not on the iframe element itself:```jswindow.addEventListener('message', (e) => {- if (e.origin !== 'https://three.ws/') return;+ if (e.origin !== 'https://three.ws') return;console.log(e.data);});```-3. Use the correct envelope shape. There are two related protocols, and neither uses a type prefix like `3dagent:`:+3. Use the correct envelope shape. There are three related protocols, and none uses a type prefix like `3dagent:`:+ - The **agent iframe bridge** (`/agent/<id>/embed`) uses `{ type: 'agent:*', agentId, ... }`: send `{ type: 'agent:hello', agentId }` first, wait for `agent:ready`, then drive it with `{ type: 'agent:action', agentId, action: { type: 'speak', text: '...' } }`. Every message must carry the `agentId`. See example 9 in the [Examples gallery](/docs/examples).- The **element bridge** (`src/embed-host-bridge.js`) wraps every message in `{ v: 1, source: 'agent-host' | 'agent-3d', id, kind, op, payload }` — e.g. a speak request is `{ v: 1, source: 'agent-host', id: '<uuid>', kind: 'request', op: 'speak', payload: { text: '...' } }`.- The **host protocol** ([specs/EMBED_HOST_PROTOCOL.md](../specs/EMBED_HOST_PROTOCOL.md)) uses `{ v: 1, type: 'host.*' | 'embed.*', id, payload }` — e.g. `{ v: 1, type: 'host.chat.message', payload: { ... } }`.- Messages that don't match the expected envelope (missing `v: 1`, wrong `source`/`type`) are silently ignored.-4. Use the `EmbedHostBridge` class (`src/embed-host-bridge.js`) rather than raw `postMessage` — it handles the handshake, queues requests until the iframe is ready, and correlates responses by `id`.+ Messages that don't match the expected envelope (missing `agentId` or `v: 1`, wrong `source`/`type`) are silently ignored.+4. For element embeds, use the `EmbedHostBridge` class (`src/embed-host-bridge.js`) rather than raw `postMessage` — it handles the handshake, queues requests until the iframe is ready, and correlates responses by `id`.---@@ -354,7 +355,7 @@ Organized by symptom. Find your problem, check the likely causes, follow the fix1. Increase the gas limit by 20% — registration involves IPFS CID storage and can exceed estimates.2. Check your ETH balance on Base. Bridge more if needed.3. Verify the manifest CID resolves on IPFS before calling the contract. A CID that doesn't resolve yet may cause the contract to reject it depending on the registry version.-4. Confirm MetaMask is on Base mainnet (chain ID 8453), not Ethereum mainnet. The registry is not deployed on mainnet.+4. Confirm MetaMask is on the chain you intend to register on. The platform default is Base (chain ID 8453). The registry contracts are deployed at the same addresses on all major EVM chains, but your wallet must be on the chain the registration flow targets, with gas funds on that chain.---@@ -384,13 +385,15 @@ Organized by symptom. Find your problem, check the likely causes, follow the fix### ENS resolution not working-**Symptom:** Navigating to `/agent/ens/yourname.eth` shows "not found".+**Symptom:** Looking up an agent by ENS name returns "not found".++**How it works:** the API resolves the ENS name to its address, then returns the agents registered to that wallet address. There is no ENS text record to configure: the match is on the address your name resolves to.**Fix steps:**-1. Verify the `3dagent` text record is set on the ENS name. In the ENS manager, add a text record with key `3dagent` and value set to your agent's on-chain ID.-2. ENS records can take 30+ minutes to propagate after being set.-3. Test direct resolution: `https://three.ws/agent/ens/yourname.eth`+1. Verify the ENS name resolves to the wallet address that owns (or is linked to) your agent. If the agent's registered wallet is a different address than the one your ENS name points to, the lookup returns nothing.+2. ENS record changes can take 30+ minutes to propagate after being set.+3. Test direct resolution against the API: `https://three.ws/api/agents/ens/yourname.eth` (public, rate-limited; returns the resolved address and matching agents as JSON).---@@ -646,4 +649,4 @@ In local memory mode, all conversation memory stays in the browser's `localStora**The `IdleAnimation` (blink / head-drift) doesn't seem to work.**-This is a known open issue. The `IdleAnimation` class is implemented in `src/idle-animation.js` but is not yet wired into the avatar system — it's imported but the integration with `agent-avatar.js` is incomplete. Idle blink and head-drift are not active in the current release. This is tracked as a defect.+Idle blink and head-drift are active in the current release: `src/idle-animation.js` is wired into `src/agent-avatar.js` (instantiated on avatar load and ticked every frame). If you don't see blinking, the usual cause is the model itself: the blink layer needs the `eyeBlinkLeft` / `eyeBlinkRight` morph targets, and head-drift needs a `Head` or `Neck` bone. Check the Console for the avatar module's missing-morph-target warning, and see "Agent emotions not showing" above for the full morph-target list.diff --git a/docs/tutorials/agent-reputation.md b/docs/tutorials/agent-reputation.mdindex f554c9339..ea891c5d5 100644--- a/docs/tutorials/agent-reputation.md+++ b/docs/tutorials/agent-reputation.md@@ -53,43 +53,38 @@ A review can also be **staked**: the reviewer locks ≥0.001 ETH behind their voThe fastest read is the visual one.1. Open the [Reputation Explorer](/reputation).-2. Paste an agent identifier — a numeric `agentId`, a wallet address, or a CAIP-10 ID.+2. Paste an identifier — an Ethereum wallet address or an ENS name (resolved automatically). For an ERC-8004 agent, deep-link with `?agent=<chainId>:<agentId>` (e.g. `/reputation?agent=8453:42`).3. Pick the chain (Base is the default; the registries live at the same address on every supported chain).4. Read the panel:- - **Average score** (shown as `X.X / 5`) and **total vouch count**- - **Total ETH staked** behind the vouches- - **Recent vouches** — each with the reviewer's address, score, optional comment, and a link to the transaction on the block explorer+ - **Average score** (shown as stars out of 5) and **total review count**+ - **Recent reviews** — each with the reviewer's address, score, optional comment, and a link to the attestation or transaction on the explorer-If the agent has no reviews yet, you'll see a clean "no vouches yet" state rather than a blank — a brand-new agent reads as *unknown*, not *bad*.--This is also the panel embedded on every agent profile page at `https://three.ws/a/<chainId>/<agentId>`.+If the agent has no reviews yet, you'll see a clean empty state rather than a blank — a brand-new agent reads as *unknown*, not *bad*.---## Path 2 — The REST API (one `fetch`)-For a webpage or a backend that just needs the aggregate, hit the REST endpoint. No key, no payment:+For a three.ws agent (identified by its platform UUID), hit the REST endpoint. No key, no payment. It returns the agent's **unified wallet trust score** — a 0-100 credibility signal computed from real ledger and on-chain activity, with the ERC-8004 registry read as one of its inputs:```js-const res = await fetch('https://three.ws/api/agents/<agent-id>/reputation');+const res = await fetch('https://three.ws/api/agents/<agent-uuid>/reputation');const rep = await res.json();// {-// average: 4.6, // 0 if no reviews-// count: 12, // number of vouches-// total_stake_wei: "3000000000000000", // ETH staked, in wei (string for safety)-// chain_id: 8453+// agent_id: "…",+// name: "…",+// score: 62, // 0–100 credit-style score+// max: 100,+// tier: "…", tierLabel: "…",+// pillars: [ … ], // per-factor breakdown (tenure, volume, reliability, …)+// evidence: { … }, // links to the on-chain facts behind the score+// computed_at: "2026-…"// }-console.log(`${rep.average.toFixed(1)} from ${rep.count} reviews`);-```--Query a different chain with `?chain_id=`:--```js-fetch('https://three.ws/api/agents/<agent-id>/reputation?chain_id=42161'); // Arbitrum+console.log(`${rep.name}: ${rep.score}/${rep.max} (${rep.tierLabel})`);```-The endpoint reads the contract live and caches the result for ~5 minutes (look for an `X-Cache: HIT|MISS` header). `total_stake_wei` is returned as a **string** because wei values overflow JavaScript's safe-integer range — parse it with `BigInt`, not `Number`.+The score is cached for ~3 minutes (look for an `X-Cache: HIT|MISS` header), and the same computation feeds the reputation badges on discovery surfaces. Note this endpoint takes the **three.ws agent UUID**, not a raw on-chain `agentId`; for the raw ERC-8004 star aggregate, use the SDK module (Path 4), the contract (Path 5), or the MCP tool (Path 3).---@@ -143,18 +138,18 @@ This is the path to wire into an agent that needs to gate its own spending: read----## Path 4 — The SDK (JavaScript)+## Path 4 — The reputation module (JavaScript)-Inside a JavaScript app, the SDK wraps the contract reads with an `ethers` provider:+Inside a JavaScript app, the in-repo module `src/erc8004/reputation.js` wraps the contract reads with an `ethers` provider (the same module the register-onchain flow and the Reputation Explorer use):```js-import { getReputation, getRecentReviews, getTotalStake } from '@three-ws/sdk/erc8004';+import { getReputation, getRecentReviews, getTotalStake } from './src/erc8004/reputation.js';import { JsonRpcProvider } from 'ethers';const provider = new JsonRpcProvider('https://mainnet.base.org');// Aggregate — already averaged for you-const { total, count, average } = await getReputation({+const { count, average } = await getReputation({chainId: 8453,agentId: 42,runner: provider,@@ -174,7 +169,7 @@ const reviews = await getRecentReviews({reviews.forEach(r => console.log(r.from, r.score, r.comment, r.txHash));```-`getReputation` returns `{ total, count, average }` with `average` pre-computed (`0` when there are no reviews). `getRecentReviews` returns an array of `{ from, score, comment, blockNumber, txHash }`. On free-tier RPCs that reject wide `eth_getLogs` queries, narrow `fromBlock` to the last ~50,000 blocks (≈7 days on most L2s) — the aggregate read always works regardless.+`getReputation` returns `{ count, average }` with `average` pre-computed (`0` when there are no reviews). `getRecentReviews` returns an array of `{ agentId, from, score, comment, blockNumber, txHash }`. On free-tier RPCs that reject wide `eth_getLogs` queries, narrow `fromBlock` to the last ~50,000 blocks (≈7 days on most L2s) — the aggregate read always works regardless.---@@ -232,9 +227,11 @@ For ENS-named agents, three.ws resolves `eip155:<chainId>:<registry>/<agentId>`Star reviews are one signal. For a three.ws agent, you can also read its **behavior** — did it actually get paid, did its payouts succeed, did anyone dispute it — via the paid x402 synthesis endpoint (`$0.01 USDC`):```-GET /api/x402/agent-reputation?agent_id=<uuid>+GET /api/x402/agent-reputation?subject=<identifier>```+`subject` accepts any identifier — a three.ws agent UUID, a wallet, or a mint; the type is auto-detected.+It returns confirmed payment count and distinct payers, payout/distribution success rates, failure rates, and attestation counts — reputation derived from what an agent *did*, not just what people *said*. Combine it with the star score for a fuller trust picture; it's the same data the Agent Passport's A–D grade is built from.---@@ -281,7 +278,7 @@ This is exactly the bouncer pattern three.ws's own Pole Club uses at its door- That wallet doesn't own an ERC-8004 agent on the chosen chain. Pass a numeric `agentId` directly, or switch chains — the same wallet may own an agent elsewhere.**`fetch` to the REST endpoint 404s**-- Use the agent's three.ws UUID for `/api/agents/<id>/reputation`. For a raw on-chain `agentId` or wallet, use the SDK (Path 4), the contract (Path 5), or the MCP tool (Path 3) instead.+- Use the agent's three.ws UUID for `/api/agents/<id>/reputation`. For a raw on-chain `agentId` or wallet, use the reputation module (Path 4), the contract (Path 5), or the MCP tool (Path 3) instead.---diff --git a/docs/tutorials/custom-skill.md b/docs/tutorials/custom-skill.mdindex 531cee282..5c288dabe 100644--- a/docs/tutorials/custom-skill.md+++ b/docs/tutorials/custom-skill.md@@ -280,22 +280,22 @@ There are three ways, depending on how you're working.The `uri` points to the **directory**, not the manifest file. The runtime appends `manifest.json`, `SKILL.md`, `tools.json`, and `handlers.js` automatically. Make sure the URI ends with a trailing slash — the runtime uses it as a base for relative asset resolution.-**In the web component attribute:**+**In the web component attribute** (comma-separated skill URIs, installed on top of any manifest skills):```html<agent-3d- src="https://yourusername.github.io/my-agent/manifest.json"- skills='[{"uri":"https://yourusername.github.io/weather-skill/"}]'+ body="./my-avatar.glb"+ brain="claude-sonnet-4-6"+ skills="https://yourusername.github.io/weather-skill/"></agent-3d>```-**Via the editor:**+**At runtime via JavaScript:**-1. Open your agent in the editor-2. Go to the **Skills** tab in the manifest builder-3. Paste the skill directory URL (ending in `/`)-4. Click **Add Skill**-5. Save+```js+const agent = document.querySelector('agent-3d');+await agent.installSkill('https://yourusername.github.io/weather-skill/');+```---@@ -490,7 +490,7 @@ Good skills to build next:- **Notion / Linear** — read and write tickets or docs- **Domain knowledge** — a skill that's pure `SKILL.md` with no tools, injecting specialized context (legal, medical, culinary)-Sharing your skill is as simple as posting the manifest URL. Add the topic `3dagent-skill` to your GitHub repo and others can find it. The community skill registry is coming — skills will be indexable by tag, rig compatibility, and author.+Sharing your skill is as simple as posting the manifest URL. Add the topic `3dagent-skill` to your GitHub repo so others can find it, and browse what the community has built on the [Skills Marketplace](/skills).---@@ -504,3 +504,10 @@ You built a weather skill with these four files:- **`handlers.js`** — exports one function per tool; runs sandboxed in a Web Worker; all I/O through `ctx.*`The skill installs via a URI in the agent manifest, runs entirely client-side, and adds new capabilities to any compatible agent without modifying the agent itself. That's the composability primitive: agents are extensible at runtime through content-addressed skill bundles.++## Related++- [Skills system reference](/docs/skills) — manifest format, context API, sandboxing, publishing+- [Build a skill with database auth](/docs/tutorials/skill-with-database-auth) — the next step up: a skill backed by your own API+- [Build your first agent](/docs/tutorials/first-agent) — the agent this skill plugs into+- [Web component reference](/docs/web-component) — the `skills` attribute and `installSkill()` methoddiff --git a/docs/tutorials/embed-on-website.md b/docs/tutorials/embed-on-website.mdindex 86123595e..d1e50a23d 100644--- a/docs/tutorials/embed-on-website.md+++ b/docs/tutorials/embed-on-website.md@@ -13,21 +13,21 @@ This tutorial walks you through every path for adding a three.ws agent to your s## Before you start-You need an agent ID. Go to [three.ws/studio](https://three.ws/studio), select or create an agent, and note its ID — it looks like `a_abc123` or is a number paired with a chain ID like `42` on Base.+For the code paths below you need an agent ID. Find yours on [three.ws/my-agents](https://three.ws/my-agents) (or browse the [agents directory](https://three.ws/agents)) — it looks like `a_abc123`, or is a number paired with a chain ID like `42` on Base.---## Path 1: Get your embed code (no-code, fastest)-If you don't want to write code, the Studio generates the snippet for you.+If you don't want to write code, the Widget Studio generates the snippet for you.1. Go to [three.ws/studio](https://three.ws/studio)-2. Select an agent (or create one — the Talking Agent widget is the most popular starting point)-3. Click **Get Embed Code** in the top-right corner-4. Choose your widget type and placement-5. Copy the snippet+2. Pick an avatar — the built-in demo, one of your own uploads, or a public avatar by another creator+3. Choose a widget type and configure placement, colors, and behavior+4. Click **Generate embed**+5. Copy the snippet from the "Your widget is live" modal (it shows a live preview first)-The Studio offers two snippet formats. Here's what each one looks like and when to use it:+Beyond the Studio's generated widgets, there are two hand-written snippet formats that work with any agent ID. Here's what each one looks like and when to use it:**iframe snippet** — works everywhere, more secure sandboxing, no extra script tag needed:```html@@ -493,3 +493,12 @@ Squarespace's developer preview and published output can differ. Try adding the**Agent not responding to voice input**`SpeechRecognition` requires a secure origin (`https://`) and explicit browser permission. On HTTP localhost, voice input is available. On a deployed site, make sure you're serving over HTTPS. The browser will prompt for microphone permission on first use — if the user dismissed that prompt, they'll need to re-enable it in browser settings.++---++## Related++- [Embedding guide](/docs/embedding) — iframe permissions, CSP notes, and every embed surface in one place+- [Web component reference](/docs/web-component) — the full `<agent-3d>` attribute, method, and event reference+- [Embed in 30 seconds](/docs/tutorials/embed-in-30-seconds) — the shortest possible version of this tutorial+- [Build your first agent](/docs/tutorials/first-agent) — create the agent you're about to embeddiff --git a/docs/tutorials/first-agent.md b/docs/tutorials/first-agent.mdindex 488c5e195..6a3df8d36 100644--- a/docs/tutorials/first-agent.md+++ b/docs/tutorials/first-agent.md@@ -18,10 +18,10 @@ You need a GLB file — the standard format for 3D models on the web. Here are t### Option A: Use the sample avatar (zero effort, recommended for beginners)-There's a hosted sample avatar ready to use. Just copy the URL below and you're done for this step:+There's a hosted sample avatar ready to use (the platform's own default body). Just copy the URL below and you're done for this step:```-https://cdn.three.ws/models/sample-avatar.glb+https://three.ws/avatars/default.glb```Come back and swap this for your own character later. That's what Step 9 is for.@@ -32,14 +32,8 @@ Come back and swap this for your own character later. That's what Step 9 is for.1. Go to [mixamo.com](https://www.mixamo.com) and sign in with a free Adobe account.2. Click **Characters**, then pick any character you like.-3. Click **Download** and choose **FBX for Unity** from the format dropdown.-4. Convert the FBX to GLB using [gltf-transform](https://gltf-transform.dev):-- ```bash- npx gltf-transform@latest fbx2glb your-character.fbx your-character.glb- ```-- This requires Node.js. If you don't have Node.js installed, grab it from [nodejs.org](https://nodejs.org).+3. Click **Download** and choose **FBX Binary** from the format dropdown. (Mixamo exports FBX, not GLB.)+4. Convert the FBX to GLB with the free [Blender](https://www.blender.org): **File > Import > FBX**, then **File > Export > glTF 2.0 (.glb)**. Keep the default export settings; the rig and animations come through.### Option C: Generate one from a selfie (~5 minutes)@@ -84,7 +78,7 @@ Create a new folder somewhere on your computer. Inside it, create a file called<script type="module" src="https://three.ws/agent-3d/latest/agent-3d.js"></script><agent-3d- body="https://cdn.three.ws/models/sample-avatar.glb"+ body="https://three.ws/avatars/default.glb"width="400px"height="600px"></agent-3d>@@ -129,7 +123,7 @@ Update the `<agent-3d>` tag to add the `brain` and `instructions` attributes:```html<agent-3d- body="https://cdn.three.ws/models/sample-avatar.glb"+ body="https://three.ws/avatars/default.glb"brain="claude-sonnet-4-6"name="Aria"instructions="You are Aria, a friendly and enthusiastic AI guide. You love helping people explore the 3D world. Be concise, warm, and occasionally playful. When someone greets you, wave at them. Keep replies to 2–3 sentences unless asked for more."@@ -140,7 +134,7 @@ Update the `<agent-3d>` tag to add the `brain` and `instructions` attributes:**What changed:**-- `brain="claude-sonnet-4-6"` — enables the AI. The value is the Claude model ID to use. `claude-sonnet-4-6` is the recommended default: fast, capable, and cost-effective. You can also use `claude-opus-4-7` for the most capable responses, or `claude-haiku-4-5-20251001` for the fastest.+- `brain="claude-sonnet-4-6"` — enables the AI. The value is the model ID to use. `claude-sonnet-4-6` is the recommended default: fast, capable, and cost-effective. You can also use `claude-opus-4-7` for the most capable responses, or `claude-haiku-4-5` for the fastest. There's also `brain="free"`, which routes to the platform's free hosted model so you can try everything with no key at all.- `name="Aria"` — the agent's name. This appears in the nameplate overlay and is available to the brain as context.- `instructions="..."` — the system prompt. This is where you define personality, tone, behavior rules, and anything the agent should know about its context.@@ -181,9 +175,7 @@ Create `agent.json` in the same folder as `index.html`:"memory": {"mode": "local"},- "skills": [- { "uri": "https://cdn.three.ws/skills/wave/" }- ],+ "skills": [],"version": "0.1.0"}```@@ -198,9 +190,9 @@ Then update `index.html` to load from the manifest instead of using inline attri></agent-3d>```-The manifest approach is cleaner for anything beyond a one-liner: you can version it in git, keep the instructions in one place, and load it by URL from anywhere.+The manifest approach is cleaner for anything beyond a one-liner: you can version it in git, keep the instructions in one place, and load it by URL from anywhere. The `skills` array is empty for now; [Build a custom skill](/docs/tutorials/custom-skill) shows how to fill it with your own tool bundle.-> **Note:** If you used the sample avatar URL, replace `./your-character.glb` in the manifest with `https://cdn.three.ws/models/sample-avatar.glb`.+> **Note:** If you used the sample avatar URL, replace `./your-character.glb` in the manifest with `https://three.ws/avatars/default.glb`.---@@ -282,8 +274,8 @@ Then add your own input below the element:| `agent:ready` | Agent fully booted | `{ agent, manifest }` || `brain:message` | Each turn of conversation | `{ role, content }` || `brain:thinking` | LLM call started | — |-| `skill:tool-called` | Agent used a tool/skill | `{ name, args }` |-| `voice:transcript` | STT produced a transcript | `{ text }` |+| `skill:tool-called` | Agent used a tool/skill | `{ tool, args, result }` |+| `voice:transcript` | STT produced a transcript | `{ text, final }` |---@@ -397,7 +389,7 @@ Once the page is live, swap in your own GLB:1. Go to [https://three.ws/app](https://three.ws/app)2. Drag your GLB into the viewer to confirm it loads correctly.-3. Sign up for a free account, then click **Save to Account** to get a hosted URL.+3. Sign in (free), then save the avatar to your account to get a hosted URL.4. Copy that URL.5. Replace the `body=` attribute in your HTML (or `body.uri` in your manifest) with the new URL.@@ -486,15 +478,15 @@ And the `agent.json` manifest alongside it.Now that you have a working agent, here's what to explore next:**Make it smarter:**-- [Skills documentation](../skills.md) — add tools like web search, weather, or a product catalog. Skills are JSON packages that give the agent new capabilities without changing the system prompt.-- [Memory system](../memory.md) — the agent can remember things across conversations using local storage or IPFS.+- [Skills documentation](/docs/skills) — add tools like web search, weather, or a product catalog. Skills are JSON packages that give the agent new capabilities without changing the system prompt.+- [Memory system](/docs/memory) — the agent can remember things across conversations using local storage or IPFS.**Make it permanent:**-- [ERC-8004 registration](../erc8004.md) — register your agent on-chain for a permanent, decentralized identity. Once registered, anyone can load your agent by its on-chain ID: `<agent-3d agent-id="42" chain-id="8453">`.+- [ERC-8004 registration](/docs/erc8004) — register your agent on-chain for a permanent, decentralized identity. Once registered, anyone can load your agent by its on-chain ID: `<agent-3d agent-id="42" chain-id="8453">`.**Embed it anywhere:**-- [Embedding guide](../embedding.md) — embed Aria as a floating bubble in the corner of any existing website, or as an iframe widget with a single line of code.-- [Web component reference](../web-component.md) — the full attribute, method, and event reference for `<agent-3d>`.+- [Embedding guide](/docs/embedding) — embed Aria as a floating bubble in the corner of any existing website, or as an iframe widget with a single line of code.+- [Web component reference](/docs/web-component) — the full attribute, method, and event reference for `<agent-3d>`.---diff --git a/docs/tutorials/generate-3d-api.md b/docs/tutorials/generate-3d-api.mdindex 57e42b426..18f00534b 100644--- a/docs/tutorials/generate-3d-api.md+++ b/docs/tutorials/generate-3d-api.md@@ -12,7 +12,7 @@ Everything the [Forge](/forge) does in the browser is available as a plain HTTP```POST /api/forge { prompt, tier } → { job_id, status: "queued" }-GET /api/forge?job=ID (poll every few s) → { status: "running", step: "mesh" }+GET /api/forge?job=ID (poll every few s) → { status: "running", backend: "..." }GET /api/forge?job=ID → { status: "done", glb_url: "https://..." }GET glb_url → your model```@@ -50,9 +50,11 @@ The request body:| `prompt` | string | The object description, 3–1000 chars. Same [prompt rules](/tutorials/prompts-for-3d) as the UI. || `tier` | `"draft"` \| `"standard"` \| `"high"` | Polygon budget + textures. Defaults to `standard`. High adds PBR materials. || `aspect_ratio` | `"1:1"` \| `"4:3"` \| `"3:4"` \| `"16:9"` \| `"9:16"` | Shape of the intermediate reference image. Optional. |-| `image_urls` | string[] | 1–4 public HTTPS image URLs for photo→3D (Step 4). Omit for text→3D. |+| `image_urls` | string[] | 1 to 6 public HTTPS image URLs for photo→3D (Step 4). Omit for text→3D. || `backend` | string | Pin a specific engine from the catalog (Step 5). Optional — the Forge picks for you. |+`draft` and `standard` are free. `high` on the platform engines is gated: it unlocks for $THREE holders (Bronze tier, $25 held), and a non-holder gets a `402` with hold-or-pay instructions (pay $THREE per generation, or sign in and spend prepaid credits via `pay_with: "credits"`). Bring-your-own-key engines skip the gate. Agents that would rather pay in USDC per call should use the x402 twin in Step 6, where `high` is a flat $0.50.+---## Step 2 — Poll until done@@ -61,13 +63,13 @@ The request body:curl -s 'https://three.ws/api/forge?job=JOB_ID'```-While running you'll see progress:+While running you'll see:```json-{ "job_id": "…", "status": "running", "step": "mesh" }+{ "job_id": "…", "status": "running", "backend": "…", "tier": "draft", "path": "text" }```-`step` walks through `image` (painting the reference) → `mesh` (reconstruction) → `finish`. When it completes:+Each poll echoes the job's provenance (`backend`, `tier`, `path`, and the view counts for photo jobs), so a caller that only polls still learns how the model is being made. When it completes:```json{ "job_id": "…", "status": "done", "glb_url": "https://three.ws/cdn/…" }@@ -101,7 +103,7 @@ async function generateModel(prompt, tier = 'standard') {await sleep(4000);const poll = await fetch(`${BASE}/api/forge?job=${encodeURIComponent(job.job_id)}`);job = await poll.json();- console.log(` ${job.status}${job.step ? ` (${job.step})` : ''}`);+ console.log(` ${job.status}${job.backend ? ` (${job.backend})` : ''}`);}return job.glb_url;}@@ -121,7 +123,7 @@ Run it:node generate.js "a low-poly treasure chest, iron-banded wood"```-**Batch an asset pack** by looping prompts through `generateModel` one at a time. Keep it sequential — the endpoint is rate-limited per IP, so a `Promise.all` over twenty prompts will hit `429 rate_limited`. On a 429, wait and retry; it's a per-minute window, not a ban.+**Batch an asset pack** by looping prompts through `generateModel` one at a time. Keep it sequential — the endpoint is rate-limited per IP (about 60 free generations an hour), so a `Promise.all` over a hundred prompts will hit `429 rate_limited`. On a 429, wait and retry; it's a rolling window, not a ban.---@@ -151,7 +153,7 @@ const submit = await fetch(`${BASE}/api/forge`, {});```-Photos are pre-checked by a vision model before any generation is spent; an unusable image comes back as a `400` explaining the problem (blurry, busy background, multiple objects). Pass `skip_validation: true` to override — the same as the UI's "Generate anyway" button. The [photo guidelines](/tutorials/image-to-3d) apply exactly as in the browser.+Photos are pre-checked by a vision model before any generation is spent; an unusable primary image comes back as a `422` with `error: "image_not_usable"`, an `issue` code, and a plain-language `message` (blurry, busy background, multiple objects). Pass `skip_validation: true` to override — the same as the UI's "Generate anyway" button (the response's `override` field spells this out). Flagged secondary views are silently dropped rather than failing the job. The [photo guidelines](/tutorials/image-to-3d) apply exactly as in the browser.---@@ -169,7 +171,7 @@ It returns every backend (id, label, which paths it serves, whether it needs a b## Step 6 — For autonomous agents: pay per call with x402-The public endpoint is rate-limited per IP, which is fine for scripts and prototyping. Agents that need guaranteed, metered capacity can use the paid twin at `POST /api/x402/forge` — same request body, billed per generation in USDC over the [x402 protocol](https://www.x402.org) (Base or Solana):+The public endpoint is rate-limited per IP, which is fine for scripts and prototyping. Agents that need guaranteed, metered capacity can use the paid twin at `POST /api/x402/forge` — same request body, billed per generation in USDC on Solana over the [x402 protocol](https://www.x402.org):| Tier | Price per generation ||------|---------------------|@@ -187,8 +189,9 @@ If you've never made an x402 call, start with [Build a paid x402 endpoint](/tuto| Response | Meaning | Fix ||----------|---------|-----|-| `429 rate_limited` | Per-IP window exhausted | Back off and retry; keep batches sequential |-| `400` with image feedback | Photo failed the vision pre-check | Reshoot per the message, or send `skip_validation: true` |+| `429 rate_limited` | Per-IP hourly window exhausted (about 60 free generations an hour) | Back off and retry; keep batches sequential |+| `422 image_not_usable` | Photo failed the vision pre-check | Reshoot per the `message`, or send `skip_validation: true` |+| `402` on `tier: "high"` | High tier is hold-or-pay on platform engines | Hold $THREE (Bronze), pay per generation, use credits, or use the x402 endpoint || `status: "failed"` mid-job | Upstream generation error | Read `error`; retry once — transient provider errors happen || `glb_url` 404s later | You waited a long time to download | Download promptly after `done`; re-fetch the job for a fresh URL |diff --git a/docs/tutorials/image-to-3d.md b/docs/tutorials/image-to-3d.mdindex 8e2bba7e5..5ec266d2c 100644--- a/docs/tutorials/image-to-3d.md+++ b/docs/tutorials/image-to-3d.md@@ -30,7 +30,7 @@ Go to [three.ws/forge](/forge) and switch to the **From photos** tab.You'll see a grid of four upload slots. Drag your photos in, or click a slot to browse. After uploading you can **drag the thumbnails to reorder** them — put your best, clearest shot first.-**No object on hand? Draw it.** Click **Or draw it instead** below the grid to open an in-browser drawing canvas — draw with your mouse, finger, or stylus, then **Use sketch** to drop the PNG straight into the next open slot. It goes through the exact same reconstruction pipeline as an uploaded photo, so simple objects with a clear outline (a mug, a low-poly rocket, a chair silhouette) work well; photorealistic detail obviously won't appear from a line drawing. Nothing is uploaded while you draw — only when you click **Use sketch**, and cancelling discards it with zero network activity.+**No object on hand? Draw it.** The Forge also takes drawings, two ways. On this page, the **From a sketch** tab (it appears when the sketch engine is live) takes one drawing plus a short required description of what it depicts: dark strokes on a light background work best, and the result is untextured geometry you can then **Stylize** or **Retexture**. In the [Forge Studio](/forge-studio), click **Or draw it instead** below the photo grid to open an in-browser drawing canvas: draw with your mouse, finger, or stylus, then **Use sketch** to drop the PNG straight into the next open slot, where it rides the same reconstruction pipeline as an uploaded photo. Nothing is uploaded while you draw, only when you click **Use sketch**; cancelling discards it with zero network activity.---diff --git a/docs/tutorials/personal-ai-site.md b/docs/tutorials/personal-ai-site.mdindex a0f14ff40..0850ed404 100644--- a/docs/tutorials/personal-ai-site.md+++ b/docs/tutorials/personal-ai-site.md@@ -67,7 +67,7 @@ When you receive the message "__greet", introduce yourself warmly: say who you aYour avatar is the visual anchor of the whole experience. You have two paths:-**Selfie-to-avatar** — Use the [Avatar Creation guide](../avatar-creation.md) to generate a 3D avatar from a photo. A few tips for PAI-quality results:+**Selfie-to-avatar** — Use the [Avatar Creation guide](/docs/avatar-creation) to generate a 3D avatar from a photo. A few tips for PAI-quality results:- Use a photo where you are looking straight ahead, with even lighting- Wear what you would want to be "remembered" in — this avatar represents you- Export as a Mixamo-rigged GLB so it picks up the built-in animation clips automatically@@ -126,7 +126,7 @@ The LLM has access to these memories in every conversation turn. Update them ind## Step 4: Build the site HTML-Here is the full page. Replace the placeholder values in brackets and swap in your GLB URL and agent ID.+Here is the full page. Replace the placeholder values in brackets and swap in your GLB URL.```html<!DOCTYPE html>@@ -258,7 +258,6 @@ Here is the full page. Replace the placeholder values in brackets and swap in yo<agent-3did="maya"body="https://yourname.com/avatars/maya.glb"- agent-id="your-agent-id"brain="claude-opus-4-7"style="height: calc(100% - 130px); display: block"></agent-3d>@@ -325,33 +324,68 @@ You can tune the greeting by editing the `__greet` instruction in your system pr## Step 6: Connect 3D models to projects-The most memorable part of a PAI site is when the avatar loads a project model mid-conversation. To set this up, install a custom skill that exposes `load_model` as a tool.+The most memorable part of a PAI site is when the avatar loads a project model mid-conversation. To set this up, write a custom skill that exposes `load_project` as a tool.-Create `skills/load-project/skill.md`:+A skill is a directory ("bundle") of up to four files, served from your site like any other static assets:-```markdown-# load_project+```+skills/load-project/+├── manifest.json metadata and what the skill provides+├── SKILL.md instructions injected into the system prompt+├── tools.json the tool schema the LLM can invoke+└── handlers.js the implementation+```++`manifest.json`:-Load a 3D GLB model of a named project into the viewer.+```json+{+ "spec": "skill/0.1",+ "name": "load-project",+ "version": "0.1.0",+ "description": "Load a 3D GLB model of a portfolio project into the viewer.",+ "provides": { "tools": ["load_project"] }+}+```-## Tool definition+`tools.json`:```json{- "name": "load_project",- "description": "Load a 3D model of a portfolio project. Call this when the user asks to 'see' or 'show' a project.",- "input_schema": {- "type": "object",- "properties": {- "project": { "type": "string", "description": "The project name" },- "url": { "type": "string", "description": "The GLB URL to load" }- },- "required": ["project", "url"]- }+ "tools": [+ {+ "name": "load_project",+ "description": "Load a 3D model of a portfolio project. Call this when the user asks to 'see' or 'show' a project.",+ "input_schema": {+ "type": "object",+ "properties": {+ "project": { "type": "string", "description": "The project name" },+ "url": { "type": "string", "description": "The GLB URL to load" }+ },+ "required": ["project", "url"]+ }+ }+ ]}```-## Handler+`SKILL.md` (this markdown lands in the system prompt, so the project URL list lives here instead of in your main instructions):++```markdown+---+name: load-project+description: Load a 3D model of a named portfolio project.+---++When a visitor asks to see or look at a project, call `load_project`+with the matching URL.++Project model URLs:+- Acme Dashboard: https://yourname.com/models/acme-dashboard.glb+- Health App AR: https://yourname.com/models/health-ar.glb+```++`handlers.js`:```jsexport async function load_project({ project, url }, ctx) {@@ -359,19 +393,19 @@ export async function load_project({ project, url }, ctx) {return { ok: true, output: `Loaded 3D model for ${project}` };}```-```--Then add skill routing to your system prompt:-```-When a visitor asks to see or look at a project, call load_project with the relevant URL.+Install it by adding the `skills` attribute to the element (or a `skills` entry in your manifest):-Project model URLs:-- Acme Dashboard: https://yourname.com/models/acme-dashboard.glb-- Health App AR: https://yourname.com/models/health-ar.glb+```html+<agent-3d+ id="maya"+ body="https://yourname.com/avatars/maya.glb"+ brain="claude-opus-4-7"+ skills="https://yourname.com/skills/load-project/"+></agent-3d>```-Now when a visitor says "show me the health app", the agent will call `load_project`, which calls `ctx.loadGLB()` on the scene controller, swapping the avatar's environment for the project model.+Now when a visitor says "show me the health app", the agent calls `load_project`, which calls `ctx.loadGLB()` on the scene controller, swapping the avatar's environment for the project model. The full authoring reference (context API, sandboxing, publishing) is in the [Skills system](/docs/skills) doc, and [Build a custom skill](/docs/tutorials/custom-skill) walks through a bundle end to end.---@@ -507,8 +541,8 @@ The technical investment is one HTML file, a GLB avatar, and a system prompt. Th## Next steps-- [Avatar Creation guide](../avatar-creation.md) — detailed walkthrough of selfie-to-avatar-- [Skills system](../skills.md) — how to install and author custom skills like `load_project`-- [Memory system](../memory.md) — full memory API reference for pre-loading knowledge-- [Agent Manifest](../agent-manifest.md) — package your agent for distribution and on-chain identity-- [Embedding guide](../embedding.md) — add your agent to other pages and platforms+- [Avatar Creation guide](/docs/avatar-creation) — detailed walkthrough of selfie-to-avatar+- [Skills system](/docs/skills) — how to install and author custom skills like `load_project`+- [Memory system](/docs/memory) — full memory API reference for pre-loading knowledge+- [Agent Manifest](/docs/agent-manifest) — package your agent for distribution and on-chain identity+- [Embedding guide](/docs/embedding) — add your agent to other pages and platformsdiff --git a/docs/tutorials/place-agent-irl.md b/docs/tutorials/place-agent-irl.mdindex 672557b8d..361f0c2ff 100644--- a/docs/tutorials/place-agent-irl.md+++ b/docs/tutorials/place-agent-irl.md@@ -206,7 +206,7 @@ IRL renders the scene with WebGL. If your browser lacks it, you'll see a designeThis is the motion sensor. On iOS, IRL needs a one-time **Motion & Orientation** permission granted via a tap — accept it when prompted, or re-request it from the recovery chip. Without the gyroscope, the agent can't stay anchored as you rotate the phone.-### "Place on floor" button never appears+### "Place in AR" button never appearsThat button is the WebXR hit-test path, available only where the browser supports an `immersive-ar` session (Chrome on Android with ARCore). iOS Safari has no `immersive-ar`, so it stays on the **Pin here** gyro + GPS path — which works fine; you just don't get plane hit-testing. Desktop never shows it (no camera passthrough).diff --git a/docs/tutorials/register-onchain.md b/docs/tutorials/register-onchain.mdindex 8d03c239f..12a3484ba 100644--- a/docs/tutorials/register-onchain.md+++ b/docs/tutorials/register-onchain.md@@ -180,9 +180,9 @@ Your agent now has:- An **on-chain ID** — a number unique to this registry (e.g., `42`)- A **permanent URL**: `https://three.ws/a/8453/42`-- A **Passport widget** visible at that URL showing your ERC-8004 identity+- An **on-chain identity card** visible at that URL showing your ERC-8004 registration-Open your agent's URL in a new tab. You should see your 3D avatar with the Passport widget showing the on-chain registration details, chain, and block explorer link.+Open your agent's URL in a new tab. You should see your 3D avatar with the identity card showing the agent's name, on-chain ID, and chain.---@@ -194,17 +194,30 @@ Your on-chain URL works anywhere. Try these:Share `https://three.ws/a/8453/42` on Twitter/X, Farcaster, or Lens. Anyone who clicks it sees your verified agent — no account required.**Add to your website:**-Drop the Passport widget in anywhere HTML is accepted:+Drop the agent's embed iframe in anywhere HTML is accepted:++```html+<iframe+ src="https://three.ws/a/8453/42/embed"+ width="360"+ height="480"+ frameborder="0"+ allow="microphone"+ style="border-radius: 16px;"+></iframe>+```++Or embed the interactive agent with the web component, addressing it by its on-chain ID:```html<script type="module" src="https://three.ws/agent-3d/latest/agent-3d.js"></script>-<agent-3d widget="passport" agent-id="8453:0xRegistryAddress:42"></agent-3d>+<agent-3d agent-id="42" chain-id="8453"></agent-3d>```-Replace `0xRegistryAddress` with the Identity Registry contract address shown on Basescan, and `42` with your agent ID.+For a standalone identity card (the Passport widget: registration JSON, reputation, validation), open the [Widget Studio](https://three.ws/studio), pick the **Passport** widget type, enter your chain and agent ID, and copy the generated snippet.**Generate a QR code:**-On your agent's page, click the QR icon in the Passport widget. A scannable code appears — save it or screenshot it for physical printouts, conference badges, or business cards.+Your agent URL is a plain link, so any QR generator turns it into a scannable code — handy for physical printouts, conference badges, or business cards.**Include it in a README or profile:**A Markdown link works: `[My three.ws](https://three.ws/a/8453/42)`@@ -213,13 +226,13 @@ A Markdown link works: `[My three.ws](https://three.ws/a/8453/42)`## Step 10: Build your reputation-Your agent's page at `https://three.ws/a/8453/42` has a **Reputation** section. Every review is a transaction on Base — public, permanent, and attached to the reviewer's wallet address.+Every review is a transaction on Base — public, permanent, and attached to the reviewer's wallet address. The public review surface is [three.ws/reputation](https://three.ws/reputation), where anyone can view and submit on-chain reviews for any agent.**Ask others to leave a review:**-1. Send them your agent URL-2. They scroll to the Reputation section-3. They connect their wallet and click **Leave a review**+1. Send them your agent's chain and ID (or just your agent URL)+2. They open [three.ws/reputation](https://three.ws/reputation) and look up your agent+3. They connect their wallet4. They pick a score (1–5 stars, stored on-chain as a signed −100..+100 value) and optionally add a comment5. They confirm the transaction (~$0.05 gas)@@ -263,8 +276,7 @@ If you own an ENS name like `yourname.eth`, you can make it resolve to your agenIn your agent's manifest or on the registration page, add a `claims` entry pointing back at your ENS name. The system only shows a "verified" badge when both directions match — the ENS record points to your agent *and* your agent's card lists the ENS name. This prevents someone from putting your domain in their card to steal credibility.-Once set, your agent is accessible at:-`https://three.ws/agent/ens/yourname.eth`+Once set, resolvers can look up `yourname.eth` and get your agent's CAIP-10 identifier, and the platform API at `https://three.ws/api/agents/ens/yourname.eth` lists the agents registered to the address your name resolves to.---@@ -321,3 +333,10 @@ Now that your agent has an on-chain identity, you can:- **Transfer the token** to a hardware wallet for safer long-term custodyYour agent's URL will keep working as long as Base exists and IPFS gateways serve the pinned content — which is designed to be indefinite.++## Related++- [ERC-8004 reference](/docs/erc8004) — the full spec walkthrough: contracts, registration JSON, ENS/DNS binding+- [Agent reputation tutorial](/docs/tutorials/agent-reputation) — reading and submitting on-chain reviews in depth+- [Solana agent reputation](/docs/tutorials/solana-agent-reputation) — the same trust primitives on the home chain+- [Reputation reference](/docs/reputation) — score encoding, staking, and the reputation APIdiff --git a/docs/tutorials/text-to-3d.md b/docs/tutorials/text-to-3d.mdindex 2f01e09a1..84b08085f 100644--- a/docs/tutorials/text-to-3d.md+++ b/docs/tutorials/text-to-3d.md@@ -34,7 +34,7 @@ Three habits that make prompts work dramatically better:Want more recipes? There's a whole cookbook: [Prompt Recipes for 3D Generation](/tutorials/prompts-for-3d).-**Prefer to talk?** Click the mic button next to the prompt box and describe the object out loud — the transcript drops straight into the same field, ready to edit before you generate. It uses your browser's built-in speech recognition where available, with a free cross-browser fallback (NVIDIA Riva) for browsers that don't have one (mainly Firefox). Nothing is written to disk on either path — the browser path never leaves your device, and the fallback path transcribes in memory and discards the audio once it replies. If neither is available the mic button simply doesn't appear — type instead.+**Prefer to talk?** The Forge Studio variant at [three.ws/forge-studio](/forge-studio) has a mic button next to each prompt box: describe the object out loud and the transcript drops straight into the field, ready to edit before you generate. It uses your browser's built-in speech recognition where available, with a free cross-browser fallback (NVIDIA Riva) for browsers that don't have one (mainly Firefox). Nothing is written to disk on either path: the browser path never leaves your device, and the fallback path transcribes in memory and discards the audio once it replies. If neither is available the mic button simply doesn't appear.---@@ -44,12 +44,14 @@ Below the prompt are three quality buttons:| Tier | What you get | When to use it ||------|-------------|----------------|-| **Draft** | Fast, low-poly (~12k triangles), no textures | Trying ideas. Generate five drafts, keep the best shape. |+| **Draft** | Fast, low-poly (~12k triangles) | Trying ideas. Generate five drafts, keep the best shape. || **Standard** | Balanced detail (~30k triangles) | The default. Right for most assets. || **High** | Maximum detail (~200k triangles) + PBR materials (metallic, roughness, normals) | The final version, once the prompt is dialed in. Slower. |**Start with Draft or Standard.** The pro workflow is: iterate cheap and fast, then re-run your winning prompt on High.+**High is the premium tier.** Draft and Standard are free for everyone. High unlocks for $THREE holders (Bronze tier, $25 held) and shows a lock otherwise; a non-holder can pay for a single High generation, or spend prepaid credits, right from the tier picker. If you bring your own Meshy or Tripo key, High is not gated (you pay the vendor directly).+You can leave the **Engine** selector alone — the Forge picks a sensible default. (If you have your own [Meshy](https://meshy.ai) or [Tripo](https://www.tripo3d.ai) API key, you can select those engines and paste your key into the field that appears — it stays in your browser and is never stored. Skip this entirely for now.)---@@ -102,7 +104,7 @@ This is normal — prompt, generate, adjust, repeat is the workflow, not a failu| Surface looks flat or plasticky | Name the material explicitly, or switch to the **High** tier for PBR textures || Extra junk attached to the model | Your prompt described a scene. Cut it down to just the object || Shape is mushy or vague | Be more specific: "a four-legged armchair with a tall back" beats "a chair" |-| "Generation limit reached" | The Forge is rate-limited per visitor. Wait a minute and try again |+| "Generation limit reached" | The free lane allows about 60 generations per hour per visitor ($THREE holders get more). Wait a bit and try again || Model never finishes | Refresh the page — your job keeps running and your creations gallery keeps the result |---diff --git a/docs/tutorials/view-in-ar.md b/docs/tutorials/view-in-ar.mdindex 54f433227..d6f236843 100644--- a/docs/tutorials/view-in-ar.md+++ b/docs/tutorials/view-in-ar.md@@ -19,7 +19,7 @@ You need a model before you can place it in AR. The fastest way is to generate o1. Go to [three.ws/forge](https://three.ws/forge)2. Type a description — something concrete works best: **a ceramic coffee mug with a handle** or **a low-poly red fox sitting down**-3. Hit **Forge** and wait 30–90 seconds for the model to generate+3. Hit **Generate** and wait 30–90 seconds for the model to generateYou can also use any existing avatar from [three.ws/gallery](https://three.ws/gallery) — the AR tab exists on every avatar and Forge model page.@@ -28,10 +28,10 @@ You can also use any existing avatar from [three.ws/gallery](https://three.ws/ga## Step 2 — Open the model on your phone**If you're already on your phone:**-The Forge result screen has a **View in AR** button in the toolbar. Tap it.+The Forge result screen has a **View in AR** button in the toolbar. Tap it and AR launches straight from the page.**If you're on desktop:**-After the model generates, switch to the **AR** tab in the model viewer. A QR code appears. Scan it with your phone's camera. On iPhone it opens Safari; on Android it opens Chrome. The AR experience opens automatically — no extra taps required.+Click the same **View in AR** button. A **See it in your space** panel opens with a QR code. Scan it with your phone's camera: the model opens in the phone's browser with a big **View in AR** launcher, one tap from AR.---@@ -72,20 +72,28 @@ If the above methods aren't available, three.ws starts a **WebXR immersive-ar se## Step 5 — Add AR to your own embed-If you've embedded a three.ws agent on your website, enabling AR takes one attribute:+There are three ways to offer AR from your own page, depending on how you embed.++**Lightweight model viewer (`<three-ws-viewer>`).** The [`@three-ws/avatar`](https://www.npmjs.com/package/@three-ws/avatar) SDK's viewer element takes a boolean `ar` attribute:```html-<script type="module"- src="https://three.ws/agent-3d/latest/agent-3d.js"-></script>+<script type="module">+ import '@three-ws/avatar/viewer';+</script>-<agent-3d- id="your-agent-id"+<three-ws-viewer+ src="https://three.ws/cdn/your-model.glb"ar-></agent-3d>+></three-ws-viewer>```-The `ar` attribute is all you need. The AR button appears automatically on mobile devices that support it. On desktop, it's hidden — no desktop browser supports `immersive-ar`.+With `ar` present, a **View in AR** button appears on the viewer. Clicking it opens the platform's device-aware launcher (`https://three.ws/api/ar?src=...`) in a new tab: Android gets Scene Viewer, iOS gets Quick Look, desktop falls back to the interactive web viewer.++**Full agent embed (`<agent-3d>`).** The talking-agent web component does not take an `ar` attribute. To offer AR next to it, link to the avatar's dedicated full-screen AR page, which picks the right method per device automatically:++```html+<a href="https://three.ws/avatars/YOUR_AVATAR_ID/ar">See it in your room</a>+```### Iframe embed + ARdiff --git a/docs/validation.md b/docs/validation.mdindex 56872724b..4dbe0a94b 100644--- a/docs/validation.md+++ b/docs/validation.md@@ -12,8 +12,8 @@ The validator measures conformance against the glTF 2.0 specification and report|----------|------|---------|| Error | 0 | Spec violation. Fix before publishing — some renderers will refuse to load the file. || Warning | 1 | Non-conformant but likely to load. Behavior in different renderers may differ. |-| Hint | 2 | Best-practice suggestion. Not a problem, but worth addressing. |-| Info | 3 | Informational only. No action needed. |+| Info | 2 | Informational only. No action needed. |+| Hint | 3 | Best-practice suggestion. Not a problem, but worth addressing. |A model passes validation when `numErrors === 0`. Warnings, hints, and infos are allowed for a pass verdict.@@ -37,7 +37,7 @@ Every validation produces a structured report. Here is what each field means.}```-`maxSeverity` is the code of the most severe non-empty bucket (`0` = errors present, `1` = warnings only, `3` = hints only, `-1` = completely clean).+`maxSeverity` is the code of the most severe non-empty bucket (`0` = errors present, `1` = warnings only, `2` = infos, `3` = hints only, `-1` = completely clean).### Individual messages@@ -91,6 +91,7 @@ Validation runs automatically after every model load. The result appears in the- `N errors.` — errors found; click to expand the full report- `N warnings.` — warnings only- `N hints.` — hints only+- `N notes.`: infos only- `Model details` — clean; no issuesClicking the bar opens the full **ValidatorReport** panel, which shows the model metadata, a summary banner, and per-severity tables of messages.@@ -151,7 +152,7 @@ Validation results can be attested on-chain through two complementary mechanisms### ValidationRegistry (ERC-8004)-For registered agents, a validation record can be written to the `ValidationRegistry` smart contract on Base (chain ID 8453):+For registered agents, a validation record can be written to the `ValidationRegistry` smart contract. The registry is currently deployed on the testnets only (e.g. Base Sepolia, chain ID 84532); mainnet deployment is pending, so use a testnet chain ID:```jsimport { recordValidation, hashReport, reportPassed } from './src/erc8004/validation-recorder.js';@@ -164,7 +165,7 @@ const { txHash, proofHash, proofURI } = await recordValidation({agentId: 42,report: validationReport,signer: connectedWallet, // must be an allow-listed validator address- chainId: 8453,+ chainId: 84532, // Base Sepolia (ValidationRegistry is testnet-only for now)apiToken: IPFS_API_TOKEN, // for pinningpin: true,});@@ -276,11 +277,11 @@ The signing message binds together the agent ID, a SHA-256 hash of the GLB bytesimport { getLatestValidation } from './src/erc8004/validation-recorder.js';import { ethers } from 'ethers';-const provider = new ethers.JsonRpcProvider('https://mainnet.base.org');+const provider = new ethers.JsonRpcProvider('https://sepolia.base.org');const record = await getLatestValidation({agentId: 42,runner: provider,- chainId: 8453,+ chainId: 84532, // ValidationRegistry is testnet-only for nowkind: 'glb-schema',});@@ -339,3 +340,12 @@ Three components render validation state in the browser:| `ValidatorTable` | `src/components/validator-table.jsx` | Tabular view of messages for one severity level (Code / Message / Pointer columns). |The toggle's CSS class reflects the highest severity: `level-0` (errors), `level-1` (warnings), `level-2` (infos), `level-3` (hints), or no class (clean). Style these classes to match your embedding context.++---++## Related++- [ERC-8004 identity](/docs/erc8004): the registry contracts validation records attach to+- [Reputation](/docs/reputation): the human-feedback counterpart to validation+- [3D asset pipeline](/docs/3d-asset-pipeline): formats, optimization, and export guidance+- [Provenance](/docs/provenance): signed content credentials for generated modelsdiff --git a/docs/viewer.md b/docs/viewer.mdindex 906cb1c5e..2eab4807e 100644--- a/docs/viewer.md+++ b/docs/viewer.md@@ -1,16 +1,18 @@# 3D Viewer-The viewer is the rendering layer of three.ws — a full-featured three.js WebGL scene manager. It handles model loading, camera control, animation playback, lighting, and more. You interact with it directly via the `<agent-3d>` web component or programmatically through the `Viewer` class.+The viewer is the rendering layer of three.ws: a full-featured three.js WebGL scene manager. It handles model loading, camera control, animation playback, lighting, and more. If you are new, the fastest way to see it is [three.ws/app](https://three.ws/app), where you can drag and drop any GLB file into the browser. Developers interact with the same engine via the `<agent-3d>` web component or programmatically through the `Viewer` class (`src/viewer.js`).++Note: [three.ws/viewer](https://three.ws/viewer) is a separate, lightweight share page built on `<model-viewer>` that opens a model from a `?src=<url>` query parameter. This document covers the full three.js viewer that powers `/app` and every `<agent-3d>` embed.## OverviewCore capabilities:- **Model loading** — glTF 2.0 and GLB files, including Draco-compressed meshes and KTX2 textures-- **Interactive camera** — orbit, pan, zoom, reset, named camera support-- **Animation playback** — per-clip play/pause, speed control, loop toggle, blend via AnimationMixer-- **HDR environments** — three built-in environments for realistic image-based lighting-- **Material inspection** — per-mesh metalness, roughness, texture maps via dat.gui+- **Interactive camera**: orbit, pan, zoom, frame, named camera support+- **Animation playback**: per-clip play/pause, speed control, blend via AnimationMixer, plus an external clip-library panel for rigged avatars+- **HDR environments**: built-in environments for realistic image-based lighting+- **Material inspection and editing**: via the editor layer (see [Editor Guide](/docs/editor))- **Morph targets** — per-target sliders, used by the avatar emotion system for facial animation- **Skeleton visualization** — colored bone overlay for animation rig debugging- **Screenshot capture** — PNG download via keyboard or API@@ -29,20 +31,22 @@ The `src` attribute (or `body` for direct GLB URIs) on `<agent-3d>` loads a mode<agent-3d src="https://example.com/avatar.glb"></agent-3d>```-For a standalone viewer page, pass the model via URL hash:+For the standalone viewer page, pass the model via URL hash:```-https://your-app.com/viewer#model=https://example.com/avatar.glb+https://three.ws/app#model=https://example.com/avatar.glb```### Programmatically+Set the `src` (or `body`) attribute on the element; a change to either triggers a reload:+```jsconst el = document.querySelector('agent-3d');-await el.loadGLB('https://example.com/new-model.glb');+el.setAttribute('src', 'https://example.com/new-model.glb');```-The `load(url, rootPath, assetMap)` method on the underlying `Viewer` instance accepts HTTPS URLs, blob URLs, and data URIs.+Or drive the underlying `Viewer` instance directly. Its `load(url, rootPath, assetMap, onProgress)` method accepts HTTPS URLs, blob URLs, and data URIs.### Compressed assets@@ -72,7 +76,10 @@ The viewer uses `OrbitControls` for interactive navigation:| **Orbit** | Left drag | One-finger drag || **Pan** | Right drag | Two-finger drag || **Zoom** | Scroll wheel | Pinch |-| **Reset / Frame** | Double-click on model | Double-tap |+| **Frame model (animated)** | Double-click | Double-tap |+| **Frame model (instant)** | `F` key | (keyboard only) |++Keyboard-only orbit is also supported when the canvas has focus: arrow keys rotate, `+`/`-` and PageUp/PageDown dolly.### Camera state@@ -103,7 +110,7 @@ The `assetgenerator` preset uses a hemisphere light instead of the default ambie### Auto-rotate-Enable continuous rotation via `viewer.state.autoRotate = true` (or toggle in the **Display** GUI folder). Rotation pauses on user interaction and resumes after a short idle.+Enable continuous rotation via `viewer.state.autoRotate = true` followed by `viewer.updateDisplay()` (or toggle **autoRotate** in the **Display** GUI folder). Rotation pauses while you drag and resumes when you release (standard OrbitControls behavior).---@@ -113,10 +120,9 @@ Enable continuous rotation via `viewer.state.autoRotate = true` (or toggle in thWhen a GLB contains animation clips, the **Animation** folder appears in the dat.gui panel with:-- A list of all clips — each has a play/pause toggle-- **Play All** — sequences all clips in order-- **Speed** slider — 0.1× to 3×-- **Loop** toggle per clip+- A checkbox per clip that starts or stops that clip (the first clip autoplays on load)+- **playAll**: activates every clip at once+- **playbackSpeed** slider: 0 to 1, applied as the mixer's `timeScale`### Keyboard shortcut@@ -138,7 +144,7 @@ await el.play('wave');await el.play('dance', { loop: false });```-For agent-controlled playback, the `SceneController` bridge (`src/runtime/scene.js`) exposes `play_clip` as an agent tool.+For agent-controlled playback, the runtime tool layer (`src/runtime/tools.js`) exposes `play_clip` as an agent tool, executed through the `SceneController` bridge (`src/runtime/scene.js`).### External animation panel@@ -148,28 +154,36 @@ When the viewer is embedded inside `<agent-3d>` with animation definitions regis## Environment and Lighting-### Built-in HDR environments+### Built-in environments++Defined in `src/environments.js`:| Name | Description ||---|---|-| `venice-sunset` | Warm golden-hour outdoor lighting |-| `footprint-court` | Neutral studio lighting |-| `neutral` | Soft indoor room environment (RoomEnvironment) |+| `None` | No environment map |+| `Neutral` | Soft indoor room environment (three.js RoomEnvironment). The default. |+| `Venice Sunset` | Warm golden-hour outdoor HDR |+| `Footprint Court (HDR Labs)` | Neutral studio HDR |-Switch via the **Lighting** GUI folder or set `viewer.state.environment` programmatically, then call `viewer.updateEnvironment()`.+Switch via the **Lighting** GUI folder or set `viewer.state.environment` to one of the display names above, then call `viewer.updateEnvironment()`.### Lighting controls (GUI → Lighting folder)+The default rig is a studio three-point setup (key + fill + rim) over an ambient base, tone-mapped with the Khronos PBR Neutral mapper.+| Control | State key | Range ||---|---|---|| Environment | `environment` | dropdown |-| Exposure | `exposure` | −10 to 10 |-| Tone mapping | `toneMapping` | Linear / ACES Filmic |+| Exposure | `exposure` | -10 to 10 |+| Tone mapping | `toneMapping` | Neutral / Linear / ACES Filmic || Punctual lights | `punctualLights` | boolean |-| Ambient intensity | `ambientIntensity` | 0–2 |+| IBL intensity | `environmentIntensity` | 0-3 |+| Ambient intensity | `ambientIntensity` | 0-2 || Ambient color | `ambientColor` | hex color |-| Directional intensity | `directIntensity` | 0–4 |+| Directional intensity | `directIntensity` | 0-4 || Directional color | `directColor` | hex color |+| Fill ratio + color | `fillRatio`, `fillColor` | 0-1 |+| Rim ratio + color | `rimRatio`, `rimColor` | 0-1.5 |### Background@@ -181,17 +195,11 @@ Call `viewer.updateBackground()` after changing these values programmatically.## Material and Texture Inspection-The dat.gui panel exposes per-material properties for every mesh in the scene:+The viewer itself exposes a scene-wide **wireframe** toggle (Display folder). Per-material inspection and editing (metalness, roughness, base color, emissive, texture maps) lives in the editor layer: when the `Editor` class is active, a dat.gui folder per material appears, plus the Texture Inspector panel. See the [Editor Guide](/docs/editor) for the full workflow.-- **Metalness** and **roughness** sliders-- **Base color** picker-- Texture map listing: baseColor, normal, metalness/roughness, emissive, occlusion-- **Transparency** and **double-sided** toggles-- **Wireframe** toggle (also available at the top-level in Display folder)+Material traversal helpers are deduplicated by UUID (via `traverseMaterials` in `src/viewer/internal.js`), so shared materials are only processed once.-Material traversal is deduplicated by UUID (via `traverseMaterials` in `src/viewer/internal.js`), so shared materials are only listed once.--**Note:** The GUI panel is read-only in viewer mode. Editing material properties in a persistent way requires the Editor workflow. Changes made via the GUI are lost on model reload.+**Note:** Edits made in the plain viewer are session-only and lost on model reload. Persisting material changes requires the Editor's save or publish flow.---@@ -201,18 +209,21 @@ If the loaded GLB includes morph targets, the **Morph Targets** folder appears i### Avatar expression targets-The built-in avatar uses morph targets to drive facial expressions. The emotion system sets these targets automatically during speech and in response to conversation context. The targets available on the default avatar are:+The built-in avatar uses morph targets to drive facial expressions. The emotion system (`src/agent-avatar.js`) sets these targets automatically during speech and in response to conversation context. The target names it drives are ARKit-style blendshape identifiers (paired targets have `Left`/`Right` variants):| Target | Effect ||---|---|| `mouthSmile` | Corners of mouth up || `mouthFrown` | Corners of mouth down |-| `mouthOpen` | Jaw open |+| `mouthOpen`, `jawOpen` | Mouth and jaw open |+| `mouthPressLeft` / `mouthPressRight` | Lips pressed || `cheekPuff` | Cheek inflation |+| `cheekSquintLeft` / `cheekSquintRight` | Cheek raise || `browInnerUp` | Inner brow raise |-| `browOuterUp` | Outer brow raise |-| `noseSneer` | Nostril flare |-| `eyeSquint` | Eye squint |+| `browOuterUpLeft` / `browOuterUpRight` | Outer brow raise |+| `noseSneerLeft` / `noseSneerRight` | Nostril flare |+| `eyeSquintLeft` / `eyeSquintRight` | Eye squint |+| `eyeWideLeft` / `eyeWideRight` | Eyes widen || `eyesClosed` | Eye close |These are directly useful for facial animation preview or testing custom expressions before encoding them into an animation clip.@@ -272,7 +283,7 @@ The implementation in `src/viewer/screenshot.js` renders one frame, encodes the## Stats Panel-Toggle the performance overlay with the `S` key or via the **Performance** folder in the dat.gui panel.+The performance overlay lives in the **Performance** folder of the dat.gui panel (open the panel with the Controls toggle button in the viewer corner).The overlay shows three panels (provided by `stats.js`):@@ -288,21 +299,23 @@ The stats panel updates every frame. Keep it disabled in production embeds — i## URL Hash Routing-The viewer page reads hash parameters on load to pre-configure the scene:+The `/app` viewer page reads hash parameters on load to pre-configure the scene (parsed in `src/app.js`):| Parameter | Effect ||---|---|| `#model=<url>` | Auto-load this GLB on page load || `#preset=<name>` | Apply environment/lighting preset (`assetgenerator`) || `#cameraPosition=x,y,z` | Set initial camera position |-| `#register=1` | Open registration modal immediately || `#kiosk=true` | Hide GUI, chat, and input |-| `#agent=<id>` | Load agent by ID (embed mode) |+| `#agent=<id>` | Load agent by ID (legacy embed mode) |+| `#noChat=1`, `#noControls=1`, `#noAnimations=1` | Hide individual UI surfaces |++A `?agent=<id>` query parameter (not hash) opens the same page in editing mode with save-back.-Example — load a specific model with a fixed camera position:+Example: load a specific model with a fixed camera position:```-https://your-app.com/viewer#model=https://cdn.example.com/robot.glb&cameraPosition=0,1.2,2.5+https://three.ws/app#model=https://cdn.example.com/robot.glb&cameraPosition=0,1.2,2.5```---@@ -329,7 +342,7 @@ For FBX conversion, the script at `scripts/convert-fbx-to-glb.py` uses Blender's- **Use KTX2 textures** for GPU-native compressed formats (BC7, ETC2, ASTC). The browser uploads them directly to GPU without CPU decompression, saving memory and load time.- **Keep polygon count under 100k** for smooth mobile performance. The default avatar is around 15k triangles.- **Disable the stats panel** in production embeds — it triggers continuous layout reads.-- **Use LOD** if targeting mobile WebXR. three.js `LOD` objects are supported in the glTF 2.0 extension `MSFT_lod`.+- **Reduce detail for mobile WebXR.** Prefer a lower-poly export for embeds that target phones; the loader does not implement the `MSFT_lod` extension, so level-of-detail switching must be baked into the asset you ship.- **Transparent backgrounds** (`viewer.state.transparentBg = true`) disable some GPU optimizations. Only use when compositing the canvas over page content.- **Auto-rotate** triggers a continuous `requestAnimationFrame` loop even when nothing is changing. Disable it for idle embeds to reduce CPU/battery usage.@@ -341,23 +354,34 @@ The `viewer.state` object is the source of truth for all viewer settings. Readin| Key | Type | Default | Update method ||---|---|---|---|-| `environment` | string | `'venice-sunset'` | `updateEnvironment()` |+| `environment` | string | `'Neutral'` (display name) | `updateEnvironment()` || `background` | boolean | `false` | `updateBackground()` || `bgColor` | hex string | `'#000000'` | `updateBackground()` || `transparentBg` | boolean | `false` | `updateBackground()` |-| `playbackSpeed` | number | `1.0` | — (applied per frame) |+| `playbackSpeed` | number | `1.0` | applied to the mixer's `timeScale` || `actionStates` | object | `{}` | `setClips()` || `wireframe` | boolean | `false` | `updateDisplay()` || `skeleton` | boolean | `false` | `updateDisplay()` || `grid` | boolean | `false` | `updateDisplay()` || `autoRotate` | boolean | `false` | `updateDisplay()` || `exposure` | number | `0` | `updateLights()` |-| `ambientIntensity` | number | `0.3` | `updateLights()` |+| `environmentIntensity` | number | `1.15` | `updateEnvironment()` |+| `ambientIntensity` | number | `0.45` | `updateLights()` || `ambientColor` | hex string | `'#FFFFFF'` | `updateLights()` |-| `directIntensity` | number | `0.8` | `updateLights()` |+| `directIntensity` | number | `0.8 * Math.PI` (about 2.51) | `updateLights()` || `directColor` | hex string | `'#FFFFFF'` | `updateLights()` |+| `fillRatio` / `rimRatio` | number | `0.4` / `0.55` | `updateLights()` || `punctualLights` | boolean | `true` | `updateLights()` || `camera` | string | `'[default]'` | `setCamera()` |-| `followMode` | string | `'none'` | — |+| `followMode` | string | `'mouse'` | applied per frame |++This table covers the commonly used keys; see the `state` object in the `Viewer` constructor (`src/viewer.js`) for the full set, including cinematic FX and light-probe settings.++A subset of state (background, transparency, background color, auto-rotate, exposure, environment, cinematic preset) is persisted to `localStorage` per agent ID when `attachScenePrefs(agentId)` is called. Controllers call `notifyScenePrefChange()` after a state change to persist the latest values.++## Related-State is persisted to `localStorage` per agent ID when `attachScenePrefs(agentId)` is called. Changes are broadcast via `notifyScenePrefChange()`.+- [Editor Guide](/docs/editor): inspect and modify models, then publish+- [Animations](/docs/animations): the clip library and agent gesture slots+- [Embedding](/docs/embedding): put the `<agent-3d>` component on your own site+- [AR](/docs/ar): view the same models in augmented realitydiff --git a/docs/web-component.md b/docs/web-component.mdindex 0adf0817c..75717f410 100644--- a/docs/web-component.md+++ b/docs/web-component.md@@ -87,7 +87,7 @@ Lighting, camera orbit, and environment are managed by the built-in viewer; they| Attribute | Type | Default | Description ||-----------|------|---------|-------------|| `skills` | comma-separated URIs | — | Additional skill URIs to install on top of manifest skills. |-| `skill-trust` | `any` \| `whitelist` \| `owned-only` | from manifest | Controls which skill URIs are allowed to install. `owned-only` allows only skills whose author matches the agent's `ownerAddress`. |+| `skill-trust` | `any` \| `whitelist` \| `owned-only` | `owned-only` | Controls which skill URIs are allowed to install. `owned-only` allows only skills whose author matches the agent's `ownerAddress`. || `memory` | `local` \| `ipfs` \| `encrypted-ipfs` \| `none` | from manifest | Memory storage mode. || `memory-key` | string | agent ID or name | Namespace under which memory is persisted. Useful when embedding the same agent in multiple contexts. |@@ -809,7 +809,7 @@ el.addEventListener('agent:ready', async () => {### UMD (no ES modules)```html-<script src="https://three.ws/agent-3d/1.5.1/agent-3d.umd.cjs"></script>+<script src="https://three.ws/agent-3d/1.5.2/agent-3d.umd.cjs"></script>```---@@ -906,3 +906,12 @@ defineElement('my-agent');- iOS Safari — WebXR is not supported. AR falls back to Quick Look (USDZ).- Browsers without `IntersectionObserver` (very old) boot immediately rather than lazily.- Browsers without `SpeechRecognition` (`window.SpeechRecognition || window.webkitSpeechRecognition`) — mic/STT silently no-ops. Voice output (TTS) still works.++---++## Related++- [SDK & Library](/docs/sdk): installing the bundle, building from source, programmatic imports+- [JavaScript API](/docs/js-api): the viewer and validator classes under the hood+- [Embedding guide](/docs/embedding): iframe patterns, CSP, and platform-specific embeds+- [Widgets](/docs/widgets): the no-code alternative to hand-writing this elementdiff --git a/docs/widget-api.md b/docs/widget-api.mdindex 42f16018a..4c23ef9fe 100644--- a/docs/widget-api.md+++ b/docs/widget-api.md@@ -1,5 +1,7 @@# Widget API+This page is for developers who want to control an embedded three.ws widget from their own page: move the camera, play animations, capture screenshots, or swap models at runtime. Widgets are created in [Widget Studio](https://three.ws/studio) and embedded via `/widget` or the one-line `embed.js` script below.+The slim widget shell (`/widget`) is an embeddable 3D viewer. It supports:- **URL parameters** — declarative configuration (model, type, brand, poster, reveal mode).@@ -189,3 +191,10 @@ If you have multiple widgets and want to coordinate them (sync camera, broadcast- The client validates `event.origin` against the iframe's `src` origin. Pass `{ origin: '*' }` to `attach()` to opt out (e.g. for cross-origin embed-in-embed scenarios), but you give up the guarantee that the response came from us.- `screenshot.capture` returns the rendered canvas, so the parent gets exactly what the visitor sees. Nothing private leaks across the boundary.- `model.load` accepts any URL the iframe can fetch — same-origin policy still applies to the GLB itself. If you need a private model, gate it behind a cookie/header at the GLB host.++## Related++- [Widget types](/docs/widgets): every widget type, config schema, and postMessage event+- [Widget Studio guide](/docs/widget-studio): building widgets with the no-code Studio+- [REST API Reference](/docs/api-reference): the `/api/widgets` CRUD endpoints+- [Embedding guide](/docs/embedding): advanced embedding patterns and iframe optionsdiff --git a/docs/widget-studio.md b/docs/widget-studio.mdindex 63097255f..447d368ae 100644--- a/docs/widget-studio.md+++ b/docs/widget-studio.md@@ -55,7 +55,7 @@ The Studio has three columns: **Pick avatar + widget type** (left), **Live previThe left column shows your saved avatars as thumbnail cards. Click any card to select it — a highlight appears and the live preview updates immediately.-> *See the screenshot below: the avatar list shows thumbnail cards; the selected avatar has a purple outline.*+The avatar list renders as thumbnail cards; the selected avatar is outlined so you always know which model the preview is showing.If you have no avatars yet, you'll see a link to upload one from the Dashboard. Avatars are GLB files stored in your account.@@ -75,7 +75,7 @@ The right column has a **Brand** panel with a form. Changes here update the live- **Name** — internal label for your widget (shown in the Dashboard). Required.- **Background** — canvas background color (color picker, default `#0a0a0a`)-- **Accent** — used for buttons and interactive highlights (default `#8b5cf6`, purple)+- **Accent**: used for buttons and interactive highlights (default `#ffffff`)- **Caption** — optional short text shown beneath the widget (up to 280 characters)- **Show controls** — toggle the orbit/rotate controls visible to visitors- **Auto-rotate** — whether the model spins automatically on load@@ -117,9 +117,7 @@ If something is wrong with your form (e.g. the Name field is empty), an error meAfter clicking **Generate embed**, a modal slides up titled "Your widget is live."-> *See the screenshot below: the modal shows a live preview iframe, a shareable URL field, and two embed snippet text areas.*--The modal contains:+The modal shows a live preview iframe, a shareable URL field, and two embed snippet text areas:**Shareable URL** — a `/w/<id>` link you can paste anywhere. Social platforms and CMSes render a rich preview card from this URL.diff --git a/docs/widgets.md b/docs/widgets.mdindex fd37afea1..6cb97028c 100644--- a/docs/widgets.md+++ b/docs/widgets.md@@ -35,7 +35,7 @@ Every widget also inherits a set of **brand options** that apply to all types:| Option | Type | Default | Description ||--------|------|---------|-------------|| `background` | hex color | `#0a0a0a` | Canvas background color |-| `accent` | hex color | `#8b5cf6` | UI accent color (buttons, highlights) |+| `accent` | hex color | `#ffffff` | UI accent color (buttons, highlights) || `caption` | string (max 280 chars) | — | Overlay text displayed on the canvas || `showControls` | boolean | `true` | Show orbit/pan controls || `autoRotate` | boolean | `true` | Auto-rotate the model |@@ -105,11 +105,11 @@ All brand options apply.const iframe = document.querySelector('iframe');iframe.contentWindow.postMessage({ type: 'widget:command', command: 'play_clip', args: { name: 'Wave' } },- 'https://three.ws/'+ 'https://three.ws');```-**What it looks like:** The 3D avatar fills the canvas (auto-rotating if `autoRotate` is on). In the top-right corner, a frosted-glass panel labeled "Clips (N)" lists every animation name. The active clip is highlighted with a purple left-border accent. On mobile, the panel slides to the bottom of the screen.+**What it looks like:** The 3D avatar fills the canvas (auto-rotating if `autoRotate` is on). In the top-right corner, a frosted-glass panel labeled "Clips (N)" lists every animation name. The active clip is highlighted with an accent-colored left border. On mobile, the panel slides to the bottom of the screen.**Best for:** Animation portfolios, character demo reels, rigging showcases, game asset storefronts.@@ -419,7 +419,7 @@ Widgets communicate with the embedding page using `window.postMessage`. Always v```jswindow.addEventListener('message', (e) => {- if (e.origin !== 'https://three.ws/') return;+ if (e.origin !== 'https://three.ws') return;switch (e.data?.type) {case 'widget:ready':@@ -449,13 +449,13 @@ const iframe = document.querySelector('iframe');// Live-update brand config (same options as the config object above)iframe.contentWindow.postMessage({ type: 'widget:config', config: { background: '#ff00aa', accent: '#ffffff' } },- 'https://three.ws/'+ 'https://three.ws');// Trigger a runtime action (animation-gallery and talking-agent)iframe.contentWindow.postMessage({ type: 'widget:command', command: 'play_clip', args: { name: 'Wave' } },- 'https://three.ws/'+ 'https://three.ws');```@@ -500,3 +500,12 @@ No IP addresses, no user-agent strings, no cookies, no chat message content. The## Programmatic controlNeed to drive a widget from the parent page — change the camera, play an animation, grab a screenshot? See the [Widget API (JSON-RPC)](./widget-api.md) reference. The `ThreeWidget` SDK lives at `/widget-client.js` and works with any iframe pointing at `/widget`.++---++## Related++- [Widget Studio guide](/docs/widget-studio): the no-code builder, step by step+- [Widget API (JSON-RPC)](/docs/widget-api): programmatic control of an embedded widget+- [REST API Reference](/docs/api-reference): the `/api/widgets` CRUD endpoints in full+- [Web Component](/docs/web-component): the `<agent-3d>` element for deeper integrationsdiff --git a/docs/x402-buyer.md b/docs/x402-buyer.mdindex c4dfb83cc..146fb932e 100644--- a/docs/x402-buyer.md+++ b/docs/x402-buyer.md@@ -66,8 +66,8 @@ Caps are enforced as a reserve → commit / rollback transaction init fails — caps hold even across concurrent calls. The store is Redis-backed whenavailable. If a call would exceed any window, `buyerFetch` returns`{ ok: false, abort: true, reason }` **without paying**. The platform-wide ceiling-defaults live in env (`X402_MAX_PER_CALL_ATOMIC`, `_PER_HOUR_`, `_PER_DAY_`; see-[Configuration](configuration.md)).+defaults live in env (`X402_MAX_PER_CALL_ATOMIC`, `X402_MAX_PER_HOUR_ATOMIC`,+`X402_MAX_PER_DAY_ATOMIC`; see [Configuration](configuration.md)).## Axios variantdiff --git a/docs/x402-dev-tools.md b/docs/x402-dev-tools.mdindex 63f275b13..6b4bab8ee 100644--- a/docs/x402-dev-tools.md+++ b/docs/x402-dev-tools.md@@ -1,12 +1,13 @@# x402 Developer ToolsA free test bench for building and debugging x402 integrations against a live-server. Six tools — three new free diagnostics plus three pre-existing probe-endpoints — that let you inspect what the server sees, understand why a payment-was rejected, and confirm a receipt, all without spending anything.+server. Six tools (three free diagnostics plus three paid probe endpoints)+that let you inspect what the server sees, understand why a payment was+rejected, and confirm a receipt.-Every tool here is **free and keyless** except the two paid probes noted below.-The three new diagnostic tools are rate-limited to **30 requests/minute per IP**.+The three diagnostic tools are **free and keyless**, rate-limited to+**30 requests/minute per IP**. The three probe endpoints are paid+($0.001 USDC each).Base URL: `https://three.ws`@@ -102,7 +103,7 @@ Two independent checks; supply either or both. The response says exactly whatwas and wasn't verifiable.**Attestation integrity** — pass a three.ws paid response carrying a-`sha256:…` attestation (e.g. from [`/api/x402/fact-check`](./x402-endpoints.md)).+`sha256:…` attestation (e.g. from [`/api/x402/fact-check`](/docs/x402-endpoints)).The digest is recomputed over the committed fields; if any was altered aftersigning, the recomputed digest won't match.@@ -159,7 +160,7 @@ endpoint today before hitting its daily USDC spend cap — `remaining_calls`,curl -s https://three.ws/api/x402/rate-limit-probe -d '{ "endpoint": "/api/x402/forge" }'```-### Permit2 paid demo — `GET /api/x402/permit2-paid-demo` *(paid)*+### Permit2 paid demo: `GET /api/x402/permit2-paid-demo` *(paid, $0.001 USDC)*A target that advertises **only** the Permit2 + EIP-2612 gas-sponsoring accept(no EIP-3009 fallback), so you can prove a wallet with USDC but zero native gas@@ -181,7 +182,7 @@ implementation against a live server.## Related-- [x402 Protocol](./x402.md) — the challenge / verify / settle mechanics.-- [x402 Paid Endpoints](./x402-endpoints.md) — the full catalog and pricing.-- [x402 Buyer Client](./x402-buyer.md) — how to settle a challenge from code.-- [x402 Revenue & Receipts](./x402-revenue.md) — how signed receipts are recorded.+- [x402 Protocol](/docs/x402) - the challenge / verify / settle mechanics.+- [x402 Paid Endpoints](/docs/x402-endpoints) - the full catalog and pricing.+- [x402 Buyer Client](/docs/x402-buyer) - how to settle a challenge from code.+- [x402 Revenue & Receipts](/docs/x402-revenue) - how signed receipts are recorded.diff --git a/docs/x402-endpoints.md b/docs/x402-endpoints.mdindex bb182ac85..ac423ceec 100644--- a/docs/x402-endpoints.md+++ b/docs/x402-endpoints.md@@ -34,7 +34,10 @@ should tune them to real unit economics.Endpoints advertise the networks they accept in the 402 challenge. The platformsettles **USDC on Solana** (primary, always-on via the self-hosted facilitator)-and, when configured, **USDC on Base** (EVM). The relevant config (see+and, when configured, **USDC on Base** (EVM) and a **BSC leg** (contract-mediated+`direct` scheme, advertised only when `X402_PAY_TO_BSC` is set). On the Solana+rail, `X402_ACCEPT_THREE_SOLANA` optionally advertises **$THREE** alongside USDC+as a second accept entry on the same challenge. The relevant config (see[Configuration](configuration.md)):| Key | Meaning |@@ -102,7 +105,7 @@ for to feed the oracle and sniper.| `/api/x402/token-intel` | $0.01 | Live market intel for any token (price, 24h change, market cap, liquidity, volume, signal). || `/api/x402/crypto-intel` | $0.01 | Agent-readable crypto market signal (bullish/bearish/neutral) + rationale. || `/api/x402/three-intel` | $0.01 | Intel focused on $THREE. |-| `/api/x402/fact-check` | per source | Claim fact-check with cited evidence. |+| `/api/x402/fact-check` | $0.10 | Claim fact-check with cited sources, authority weights, and a SHA-256 attestation. A free daily quota per IP runs first; over-quota checks pay the x402 price. || `/api/x402/symbol-availability` | $0.001 | Whether a ticker symbol is taken; `-batch` variant $0.005. || `/api/x402/bazaar-feed` | $0.001 | x402 bazaar service listings feed. |@@ -151,6 +154,11 @@ named in its description:| `/api/x402/market-hacks` | $0.001 | Full DeFiLlama hack history — amount stolen, technique, chains, funds returned; searchable, with all-time/12mo loss stats. || `/api/x402/market-pulse` | $0.005 | Flagship one-call market bundle: global stats, Fear & Greed, top-10 coins, trending, ETH gas, DeFi TVL, stablecoin supply, DEX volume, protocol fees — each section degrades independently. |+Beneath the named endpoints sits the **datapoint fabric**: `/api/x402/d/<family>/…`+(one route, `api/x402/d/[...path].js`) serves 1,000,000+ individually priced+datapoints at **$0.0005** USDC each by default, overridable per family with+`X402_PRICE_DATAPOINT_<FAMILY>`. See [Market data API](market-data-api.md#the-datapoint-fabric).+## Agent & reputation endpoints| Endpoint | Default | Returns |@@ -174,9 +182,8 @@ named in its description:| `/api/x402/pipeline-gameready` | $0.03 | **Pipeline — Game-Ready.** Retopologize to a poly budget + PBR re-bake for real-time engines. GLB in → engine-ready GLB out. See [3D pipeline](3d-pipeline.md). || `/api/x402/pipeline-stylize` | $0.03 | **Pipeline — Stylize.** Geometric restyle (voxel/brick/voronoi/lowpoly) that rebuilds the mesh. GLB in → GLB out. See [3D pipeline](3d-pipeline.md). || `/api/x402/pipeline-rembg` | $0.01 | **Pipeline — Background Removal.** Image in → transparent PNG out (clean reference view for image→3D). See [3D pipeline](3d-pipeline.md). |-| `/api/x402/mint-to-mesh`, `/api/x402/mint-to-mesh-batch` | per call | Token/mint → 3D mesh; `mint-to-mesh-batch` runs a set at $0.05. |-| `/api/x402/model-check`, `/api/x402/model-validation-sweep` | $0.001 | Validate a GLB / sweep a batch. |-| `/api/x402/glb-optimization-report` | per call | GLB size/optimization analysis. |+| `/api/x402/mint-to-mesh`, `/api/x402/mint-to-mesh-batch` | $0.001 | Token/mint → 3D mesh; `mint-to-mesh-batch` runs a set at $0.05. |+| `/api/x402/model-check`, `/api/x402/model-validation-sweep` | $0.001 | Validate a GLB / sweep a batch. (`model-check` is kept as a paid convenience; the same inspection is free at `/api/3d/inspect`.) || `/api/x402/avatar-optimize-batch` | $0.001 | Batch optimization pass over the top N avatars. || `/api/x402/animation-download`, `/api/x402/asset-download` | per asset | Paid asset/animation delivery. |@@ -188,22 +195,23 @@ named in its description:| [`/api/x402/vanity`](vanity.md) | $0.01–$0.50 (≤3) · $2.50–$10 (4–5, inventory-only) | **Vanity Grinder** — get a brand-new Solana address that starts with your ticker/prefix and/or ends with a suffix, for a branded token mint or agent/treasury wallet. Checks the pre-ground warehouse first for **instant delivery** (`source: "inventory"`); falls back to a live grind (`source: "ground"`) up to 3 chars. Keypair or importable BIP-39 mnemonic; nothing stored; optional `sealTo` ECIES. Full doc: [vanity.md](vanity.md). || [`/api/x402/vanity-verifiable`](vanity.md#tier-2--provably-fair-grinder) | $0.02–$0.40 | **Provably-fair grinder** — same grind with a signed commit–reveal receipt proving the key was ground fresh and never kept. Spec: [PROTOCOL-vanity.md](PROTOCOL-vanity.md). || [`/api/x402/vanity-premium`](vanity.md#tier-3--premium-inventory) | $1–$50 by rarity | **Premium inventory** — buy a pre-ground 4–5+ char brandable address from stock. GET lists available patterns + prices (free); `?address=…` buys via x402 and delivers the key **once** (ciphertext destroyed on delivery). Browsable at `/vanity/premium`. |-| `/api/x402/pay-by-name` | per call | Resolve and pay an SNS/ENS name (see [Agent wallets](agent-wallets.md)). |-| `/api/x402/did` | per call | Decentralized identifier resolution. |+| `/api/x402/pay-by-name` | $0.001 | Resolve and pay a `@username` / `.sol` name / raw address (see [Agent wallets](agent-wallets.md)); the paid resolve toll is $0.001, the transfer amount itself is buyer-specified. |+| `/api/x402/did` | $0.001 | Decentralized identifier resolution. |+| `/api/x402/three-buy` | $0.001 | Micro-buy service: one settled toll payment triggers one small, real on-chain USDC to $THREE buy funded by the micro-buy wallet (driven by the `three-buy-loop` cron). || `/api/x402/billboard` | $0.05 | Post to the on-platform billboard. || `/api/x402/dance-tip` | $0.001 | Tip a club performer. || `/api/x402/club-cover` | $0.01 | Pole-club door cover charge; a paid wallet re-enters free for the pass window. || `/api/x402/cosmetic-purchase` | per item | Buy a cosmetic. || `/api/x402/tutor` | $0.01 / answer | Paid tutoring; a session accumulates a running tab across answers. || `/api/x402/spend-session` | $0.01 | Open a metered spend session. |-| `/api/x402/llm-proxy` | per call | Paid LLM proxy. |+| `/api/x402/llm-proxy` | $0.005 | Paid LLM proxy. || `/api/x402/notify` | $0.001 | Notification gateway (Telegram + the autonomous loop's `canary` heartbeat lane). || `/api/x402/wallet-connect` | $0.001 | Wallet-bridge connect probe. || `/api/x402/permit2-paid-demo` | $0.001 | Reference endpoint for the Permit2 / EIP-2612 gasless-approval scheme. || `/api/x402/remix-asset` | $0.25 | Paid remix of a published, remixable 3D asset — generates a new anchored model and routes the source creator's royalty (≤20%) on-chain. |-| `/api/x402/cross-chain`, `/api/x402/network-cost` | per call | Cross-chain cost comparison. |+| `/api/x402/cross-chain` | $0.005 | Cross-chain bridge status monitor. (`/api/x402/network-cost` is the free read of the cross-chain cost snapshots the autonomous loop settles hourly.) || `/api/x402/rate-limit-probe`, `/api/x402/schema-check` | $0.001 | Paid diagnostic probes used by the autonomous loop. |-| `/api/x402/auth-health`, `/api/x402/api-key-health`, `/api/x402/feed-health`, `/api/x402/granite-health`, `/api/x402/telegram-health`, `/api/x402/solana-register-health` | $0.001 | Paid SLA/health probes for each backend dependency (auth, API keys, the live feed, IBM Granite, Telegram, Solana register). |+| `/api/x402/auth-health`, `/api/x402/api-key-health`, `/api/x402/feed-health`, `/api/x402/telegram-health`, `/api/x402/solana-register-health` | $0.001 | Paid SLA/health probes for each backend dependency (auth, API keys, the live feed, Telegram, Solana register). |> Prices above marked "per call / per tier / per source" are computed by the> handler rather than a flat default; check the handler and any@@ -224,11 +232,14 @@ directory.| Endpoint | Default | Returns || ---------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- || `/api/x402/analytics` | $0.005 | Platform reports — pick `report=revenue` for the x402 endpoint-revenue summary (see [x402 revenue & receipts](x402-revenue.md)), plus club and listing analytics. |-| `/api/x402/mcp-tool-catalog` | per call | Snapshot of every MCP tool — name, paid/free, price, input shape — and a diff vs the last snapshot (added / removed / re-priced tools). |+| `/api/x402/mcp-tool-catalog` | $0.001 | Snapshot of every MCP tool — name, paid/free, price, input shape — and a diff vs the last snapshot (added / removed / re-priced tools). || **Free read surfaces** | — | — || `/api/x402/my-receipts` | free | A buyer's own settled receipts, gated by a wallet signature (SIWX) rather than a payment. || `/api/x402/mcp-perf` | free | MCP tool latency dashboard data. || `/api/x402/service-pricing-report` | free | Tracked upstream-dependency price catalog + active price-increase/-drop alerts. |+| `/api/x402/granite-health` | free | IBM Granite inference SLA feed, read from the verdicts the autonomous loop's paid 6-hourly probe writes. |+| `/api/x402/glb-optimization-report`| free | GLB Size Optimizer catalog feed: what the `glb-size-optimizer` autonomous-loop entry has measured. |+| `/api/x402/network-cost` | free | Cross-chain payment-cost recommendation feed from the hourly cross-chain-cost pipeline snapshots. || `/api/x402/echo` | free | httpbin for x402 — decodes your `X-PAYMENT` header (signatures redacted) and returns a local verify verdict without settling. See [x402 dev tools](x402-dev-tools.md). || `/api/x402/debug` | free | Diagnoses a failed 402 exchange (`{challenge, payment, response}`) into an ordered `{severity, field, problem, fix}` list. See [x402 dev tools](x402-dev-tools.md). || `/api/x402/verify-receipt` | free | Recomputes a paid response's SHA-256 attestation and confirms a settlement tx on-chain. See [x402 dev tools](x402-dev-tools.md). |diff --git a/docs/x402-revenue.md b/docs/x402-revenue.mdindex 5cb41ccd4..b8f744d47 100644--- a/docs/x402-revenue.md+++ b/docs/x402-revenue.md@@ -128,13 +128,15 @@ LIMIT 10;## The revenue report — `/api/x402/analytics`You don't have to query SQL. The `analytics` endpoint serves the same numbers,-pre-aggregated. It is itself a [paid endpoint](x402-endpoints.md) ($0.005 default)-— pass `report=revenue` and a `period`:+pre-aggregated. It is itself a [paid endpoint](x402-endpoints.md) ($0.005 default).+It is a `POST` endpoint: pass `report` and `period` in the JSON body:```bash# After settling the 402 challenge (see the x402 buyer client doc), retry with:-curl -s "https://three.ws/api/x402/analytics?report=revenue&period=24h" \- -H "X-PAYMENT: <settled-payment-header>"+curl -s -X POST https://three.ws/api/x402/analytics \+ -H 'content-type: application/json' \+ -H "X-PAYMENT: <settled-payment-header>" \+ -d '{"report":"revenue","period":"24h"}'````report` accepts: `revenue`, `x402_volume`, `clubs`, `marketplace`,@@ -142,7 +144,8 @@ curl -s "https://three.ws/api/x402/analytics?report=revenue&period=24h" \`6h`, `24h`, `7d`, `30d`, `all`.The `revenue` report shape-([`revenue-analytics.js`](../api/_lib/x402/revenue-analytics.js)):+([`revenue-analytics.js`](../api/_lib/x402/revenue-analytics.js)); money fields+are serialized as fixed 6-decimal strings:```json{@@ -151,26 +154,26 @@ The `revenue` report shape"since": "2026-06-29T00:00:00.000Z","generated_at": "2026-06-30T00:00:00.000Z","totals": {- "gross_usd": 12.34,- "net_platform_usd": 11.9,- "settlement_fee_usd": 0.44,+ "gross_usd": "12.340000",+ "net_platform_usd": "11.900000",+ "settlement_fee_usd": "0.440000","total_payments": 247,"failed_payments": 3,"unique_payers": 18,- "avg_payment_usd": 0.05+ "avg_payment_usd": "0.050000"},"fee_splits": {- "gross_usd": 12.34,- "settlement_fee_usd": 0.44,- "net_platform_usd": 11.9,+ "gross_usd": "12.340000",+ "settlement_fee_usd": "0.440000",+ "net_platform_usd": "11.900000","effective_fee_rate": 0.0357,- "fee_per_settlement_usd": 0.0018,+ "fee_per_settlement_usd": "0.001800","fee_source": "..."},"by_endpoint": [- { "endpoint": "/api/x402/token-intel", "count": 120, "gross_usd": 1.2, "share": 0.097 }+ { "endpoint": "/api/x402/token-intel", "count": 120, "gross_usd": "1.200000", "share": 0.097 }],- "top_endpoint": { "endpoint": "/api/x402/token-intel", "gross_usd": 1.2 }+ "top_endpoint": { "endpoint": "/api/x402/token-intel", "count": 120, "gross_usd": "1.200000" }}```diff --git a/docs/x402-ring-economy.md b/docs/x402-ring-economy.mdindex bd539d2bd..353432fc0 100644--- a/docs/x402-ring-economy.md+++ b/docs/x402-ring-economy.md@@ -195,14 +195,14 @@ then kept in a verified, watched, auto-fundable state:non-role ATAs to reclaim their rent. Audit + reclaim only — never a spend.- **Endpoint catalog** —[api/_lib/x402/ring-catalog.js](../api/_lib/x402/ring-catalog.js) is the single- source of truth for **every** paid x402 endpoint on the platform (46 entries:- tips, services, intel, health checks, settlement). Each entry declares the exact- `method`, `query`/`body()` request contract, and default price the handler- actually validates — derived by reading the handler, so a ring call never spends- money on a request the endpoint would reject. **35 are `autobuy`** (safe to- purchase on the loop); the **11 `autobuy:false`** entries (real coin mints, real- LLM spend, dynamic third-party payouts) are covered by one-time verification, not- the loop, each with a justification in the source. Adding a new paid endpoint+ source of truth for **every** paid x402 endpoint on the platform (84 entries as+ of July 2026: tips, services, intel, health checks, settlement). Each entry+ declares the exact `method`, `query`/`body()` request contract, and default+ price the handler actually validates (derived by reading the handler), so a+ ring call never spends money on a request the endpoint would reject. **45 are+ `autobuy`** (safe to purchase on the loop); the **39 `autobuy:false`** entries+ (real coin mints, real LLM spend, dynamic third-party payouts) are covered by+ one-time verification, not the loop, each with a justification in the source. Adding a new paid endpointwithout cataloging it fails `tests/x402-ring-catalog.test.js` (it greps every`paidEndpoint(` construction site and asserts each is cataloged).- **Volume engine** — the existing autonomous loop@@ -212,8 +212,9 @@ then kept in a verified, watched, auto-fundable state:rotation (`rotationPlan()`), mapped into the shared driver in[volume-shared.js](../api/_lib/x402/pipelines/volume-shared.js). The rotation isweighted so **every autobuy endpoint is exercised at least once per hour** at the- stock 5-minute cadence (12 ticks × 4 = 48 selections/hour ≥ the 38-entry- rotation) — test-proven, not asserted.+ stock 5-minute cadence (12 ticks × 6 selections = 72/hour ≥ the 48-entry+ weighted rotation over the 45 autobuy endpoints), test-proven in+ `tests/x402-ring-catalog.test.js`, not asserted.- **Coverage proof** —[scripts/x402-ring-coverage-sweep.js](../scripts/x402-ring-coverage-sweep.js)pays every catalog entry once and records the facilitator settle signature +diff --git a/docs/x402-studio.md b/docs/x402-studio.mdindex 17bc435bb..9b9cb3f6a 100644--- a/docs/x402-studio.md+++ b/docs/x402-studio.md@@ -34,7 +34,7 @@ The page (`public/x402/studio.js`) is a dependency-free vanilla-JS single-page a<buttondata-x402-endpoint="https://your-api.example.com/paid"data-x402-method="GET"- data-x402-merchant="<merchant-id>"+ data-x402-merchant="Your merchant name"data-x402-action="Summarize article"style="...">Pay · Summarize article</button>```diff --git a/docs/x402.md b/docs/x402.mdindex b47fd13fa..e2cfb8c57 100644--- a/docs/x402.md+++ b/docs/x402.md@@ -1,9 +1,14 @@# x402 — paid agent skills-This codebase implements [x402](https://x402.org) `HTTP 402 Payment Required`-on top of Pump.fun agent payments. Callers pay an agent in any SPL token to-invoke a skill; the agent verifies the on-chain payment and dispatches the-call.+x402 is how machines pay for web requests: a paid endpoint answers+`HTTP 402 Payment Required` with a price, the caller settles a small on-chain+payment, and the retried request goes through. This page documents three.ws's+implementation of [x402](https://x402.org) for **agent skills**, built on top+of Pump.fun agent payments: callers pay an agent in any SPL token to invoke a+skill, and the agent verifies the on-chain payment before dispatching the+call. It is written for developers wiring paid skills (server side) or paying+for them (client side); the platform's own catalog of paid endpoints lives at+[x402 paid endpoints](x402-endpoints.md).**Live activity:** [x402scan dashboard](https://www.x402scan.com/server/17cbd874-52ac-4920-a020-b22ff2489a07)— browse paid calls, revenue, and per-skill pricing for this server.@@ -46,7 +51,8 @@ Reference implementation: `api/agents/x402/[action].js` (the consolidated"amount": "10000","currency": "<mint base58>","recipient": "<owner wallet base58>",- "memo": "<u64 invoice nonce>",+ "recipient_name": "<resolved receiver label, when known>",+ "memo": "<unix-seconds nonce string>","valid_until": <unix>,"intent_url": "/api/agents/payments/pay-prep","verify_url": "/api/agents/payments/pay-confirm",@@ -59,8 +65,9 @@ Discovery:- `GET /.well-known/x402` — site-level resource list.- `GET /api/agents/x402/manifest?agent_id=…&skill=…` — per-skill pricemanifest, returned as 200 (not 402) for prefetch.-- The 402 response includes a `Link: <…>; rel="payment-manifest"` header- pointing at the manifest URL.+- The 402 response includes a `Link` header with `rel="payment-config"`+ (pointing at `/.well-known/x402`) and `rel="payment-manifest"` (pointing at+ the per-skill manifest URL).## Pricingdiff --git a/examples/minimal.html b/examples/minimal.htmlindex 3c773b4f6..a822a3127 100644--- a/examples/minimal.html+++ b/examples/minimal.html@@ -72,7 +72,7 @@instructions="You are a friendly 3D guide."width="100%"height="320px"- brain="claude-opus-4-8"+ brain="claude-opus-4-7"></agent-3d></div><div class="card">diff --git a/pages/create/video.html b/pages/create/video.htmlindex 6a0f3dd5a..2587baade 100644--- a/pages/create/video.html+++ b/pages/create/video.html@@ -657,15 +657,15 @@</style><script src="/model-viewer-meshopt.js"></script>- <meta name="description" content="Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip." data-i18n-attr="content:create_video.meta_description">+ <meta name="description" content="Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip." data-i18n-attr="content:create_video.meta_description"><link rel="canonical" href="https://three.ws/create/video"><meta property="og:type" content="website"><meta property="og:site_name" content="three.ws"><meta property="og:locale" content="en_US"><meta property="og:title" content="Talking Avatar Video · three.ws" data-i18n-attr="content:create_video.meta_og_title">- <meta property="og:description" content="Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip." data-i18n-attr="content:create_video.meta_og_description">+ <meta property="og:description" content="Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip." data-i18n-attr="content:create_video.meta_og_description"><meta property="og:url" content="https://three.ws/create/video">- <meta property="og:image" content="https://three.ws/api/page-og?s=main&t=Talking+Avatar+Video&d=Turn+a+three.ws+avatar+into+a+talking-head+video%3A+type+a+script%2C+pick+a+voice%2C+and+export+a+lip-synced+clip.&p=%2Fcreate%2Fvideo">+ <meta property="og:image" content="https://three.ws/api/page-og?s=main&t=Talking+Avatar+Video&d=Turn+a+three.ws+avatar+into+a+talking-head+video%3A+upload+your+audio+and+export+a+lip-synced+clip.&p=%2Fcreate%2Fvideo"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630"><meta property="og:image:type" content="image/png">@@ -673,9 +673,9 @@<meta name="twitter:card" content="summary_large_image"><meta name="twitter:site" content="@trythreews"><meta name="twitter:title" content="Talking Avatar Video · three.ws" data-i18n-attr="content:create_video.meta_twitter_title">- <meta name="twitter:description" content="Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip." data-i18n-attr="content:create_video.meta_twitter_description">- <meta name="twitter:image" content="https://three.ws/api/page-og?s=main&t=Talking+Avatar+Video&d=Turn+a+three.ws+avatar+into+a+talking-head+video%3A+type+a+script%2C+pick+a+voice%2C+and+export+a+lip-synced+clip.&p=%2Fcreate%2Fvideo">- <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Talking Avatar Video","description":"Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip.","url":"https://three.ws/create/video","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=main&t=Talking+Avatar+Video&d=Turn+a+three.ws+avatar+into+a+talking-head+video%3A+type+a+script%2C+pick+a+voice%2C+and+export+a+lip-synced+clip.&p=%2Fcreate%2Fvideo"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://three.ws/"},{"@type":"ListItem","position":2,"name":"Create","item":"https://three.ws/create"},{"@type":"ListItem","position":3,"name":"Video","item":"https://three.ws/create/video"}]}]}</script>+ <meta name="twitter:description" content="Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip." data-i18n-attr="content:create_video.meta_twitter_description">+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=main&t=Talking+Avatar+Video&d=Turn+a+three.ws+avatar+into+a+talking-head+video%3A+upload+your+audio+and+export+a+lip-synced+clip.&p=%2Fcreate%2Fvideo">+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Talking Avatar Video","description":"Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip.","url":"https://three.ws/create/video","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=main&t=Talking+Avatar+Video&d=Turn+a+three.ws+avatar+into+a+talking-head+video%3A+upload+your+audio+and+export+a+lip-synced+clip.&p=%2Fcreate%2Fvideo"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://three.ws/"},{"@type":"ListItem","position":2,"name":"Create","item":"https://three.ws/create"},{"@type":"ListItem","position":3,"name":"Video","item":"https://three.ws/create/video"}]}]}</script></head><body><a href="#main-content" class="skip-link" data-i18n="create_video.skip_to_main_content">Skip to main content</a>diff --git a/pages/integrations.html b/pages/integrations.htmlindex 7abab3e4f..2b1a39105 100644--- a/pages/integrations.html+++ b/pages/integrations.html@@ -1140,7 +1140,7 @@<span class="a">"mcpServers"</span>: {<span class="a">"threews-avatar"</span>: {<span class="a">"command"</span>: <span class="s">"npx"</span>,- <span class="a">"args"</span>: [<span class="s">"-y"</span>, <span class="s">"@three-ws/avatar-agent-mcp"</span>],+ <span class="a">"args"</span>: [<span class="s">"-y"</span>, <span class="s">"@three-ws/avatar-agent"</span>],<span class="a">"env"</span>: {<span class="a">"THREEWS_API_KEY"</span>: <span class="s">"your-key-here"</span>}diff --git a/public/.well-known/agent.json b/public/.well-known/agent.jsonnew file mode 100644index 000000000..ee8984152--- /dev/null+++ b/public/.well-known/agent.json@@ -0,0 +1,195 @@+{+ "name": "three.ws",+ "description": "three.ws — the 3D agent economy. Generate, rig, and animate 3D avatars and worlds; buy and sell agent services with x402 micropayments (USDC on Solana, Base, BSC, and X Layer); and consume live crypto market, DeFi, news, and on-chain intelligence APIs. Machine-readable paid-service catalog at https://three.ws/.well-known/x402.json.",+ "url": "https://three.ws/",+ "provider": {+ "organization": "three.ws",+ "url": "https://three.ws/"+ },+ "version": "1.5.1",+ "capabilities": {+ "streaming": false,+ "pushNotifications": false,+ "stateTransitionHistory": false,+ "extensions": [+ {+ "uri": "https://github.com/google-a2a/a2a-x402/v0.1",+ "description": "Supports payments using the x402 protocol for on-chain settlement.",+ "required": true+ }+ ]+ },+ "authentication": {+ "schemes": [+ "bearer"+ ],+ "credentials": null+ },+ "defaultInputModes": [+ "text/plain",+ "application/json"+ ],+ "defaultOutputModes": [+ "text/plain",+ "application/json"+ ],+ "skills": [+ {+ "id": "list-avatars",+ "name": "List Avatars",+ "description": "List all avatars owned by the authenticated user",+ "tags": [+ "avatar",+ "list"+ ],+ "examples": [+ "Show me my avatars",+ "List all my 3D models"+ ]+ },+ {+ "id": "get-avatar",+ "name": "Get Avatar",+ "description": "Retrieve details of a specific avatar by ID or slug",+ "tags": [+ "avatar",+ "inspect"+ ],+ "examples": [+ "Get avatar details for cz",+ "Show avatar info"+ ]+ },+ {+ "id": "search-avatars",+ "name": "Search Public Avatars",+ "description": "Search public avatar gallery by query",+ "tags": [+ "avatar",+ "search"+ ],+ "examples": [+ "Find avatars matching 'robot'",+ "Search public models"+ ]+ },+ {+ "id": "render-avatar",+ "name": "Render Avatar",+ "description": "Get an embeddable HTML model-viewer snippet that renders the given avatar in 3D",+ "tags": [+ "avatar",+ "render",+ "preview"+ ],+ "examples": [+ "Render my avatar in the viewer",+ "Preview this model"+ ]+ },+ {+ "id": "delete-avatar",+ "name": "Delete Avatar",+ "description": "Delete an avatar owned by the authenticated user",+ "tags": [+ "avatar",+ "delete"+ ],+ "examples": [+ "Delete my old avatar",+ "Remove avatar abc123"+ ]+ },+ {+ "id": "validate-model",+ "name": "Validate glTF/GLB Model",+ "description": "Run the Khronos glTF-Validator against a remote model URL and return a structured error/warning/info/hint report",+ "tags": [+ "model",+ "validation",+ "gltf",+ "glb"+ ],+ "examples": [+ "Validate https://example.com/model.glb",+ "Is this GLB spec-compliant?",+ "Check my model for errors"+ ]+ },+ {+ "id": "inspect-model",+ "name": "Inspect glTF/GLB Model",+ "description": "Parse a remote model and return structural stats: scene/node/mesh counts, vertex and triangle totals, material and texture summaries, extensions used",+ "tags": [+ "model",+ "inspect",+ "stats",+ "gltf",+ "glb"+ ],+ "examples": [+ "How many triangles are in this model?",+ "Inspect https://example.com/scene.glb",+ "Show texture stats for this GLB"+ ]+ },+ {+ "id": "optimize-model",+ "name": "Suggest Optimizations",+ "description": "Inspect a remote model and return actionable suggestions for reducing size and draw-call overhead (Draco/Meshopt, KTX2, texture resize, reindexing, material merging)",+ "tags": [+ "model",+ "optimize",+ "suggestions",+ "performance"+ ],+ "examples": [+ "How can I make this model smaller?",+ "Optimize this GLB for web delivery",+ "Suggest compression for https://example.com/avatar.glb"+ ]+ },+ {+ "id": "inspect-glb-a2a",+ "name": "Inspect glTF/GLB (A2A)",+ "description": "Pay-per-call glTF/GLB inspector exposed over the Agent-to-Agent (A2A) protocol with x402 settlement. Send a JSON-RPC message/send to the URL below — the first call returns payment requirements, the retry with a signed PaymentPayload settles on-chain and returns the inspection report as a task artifact.",+ "tags": [+ "model",+ "gltf",+ "glb",+ "inspect",+ "a2a",+ "x402",+ "paid"+ ],+ "examples": [+ "Inspect https://example.com/model.glb (A2A x402)",+ "Vet this GLB before I mint it"+ ],+ "inputModes": [+ "application/json",+ "text/plain"+ ],+ "outputModes": [+ "application/json"+ ],+ "url": "https://three.ws/api/agents/a2a-paid"+ },+ {+ "id": "x402-service-catalog",+ "name": "Paid x402 Service Catalog",+ "description": "75 pay-per-call services settled via x402 (USDC on Solana and Base): market-data (27), 3d (18), agent-infra (17), launch (5), trust (4), payments (4). Every service is listed with price, input schema, and output example in the machine-readable discovery document — fetch it, pick a service, and pay the 402 challenge.",+ "tags": [+ "x402",+ "paid",+ "catalog",+ "discovery"+ ],+ "examples": [+ "Fetch https://three.ws/.well-known/x402.json and list the market-data services",+ "Pay the 402 challenge on /api/x402/token-intel to get a token signal"+ ],+ "url": "https://three.ws/.well-known/x402.json"+ }+ ]+}diff --git a/public/animations/registry.json b/public/animations/registry.jsonindex 233be0836..93f3348a5 100644--- a/public/animations/registry.json+++ b/public/animations/registry.json@@ -20,7 +20,7 @@{ "name": "kiss", "label": "Kiss", "icon": "💋", "loop": false, "clip": "public/animations/clips/kiss.json", "source_fbx": "public/animations/Kiss.fbx", "agent_slots": [] },{ "name": "pray", "label": "Pray", "icon": "🙏", "loop": false, "clip": "public/animations/clips/pray.json", "source_fbx": "public/animations/Praying.fbx", "agent_slots": ["think"] },{ "name": "reaction", "label": "Reaction", "icon": "😲", "loop": false, "clip": "public/animations/clips/reaction.json", "source_fbx": "public/animations/Reaction.fbx", "agent_slots": ["wave", "nod", "point"] },- { "name": "rumba", "label": "Rumba", "icon": "🕺", "loop": true, "clip": "public/animations/clips/rumba.json", "source_fbx": "public/animations/Rumba Dancing.fbx", "agent_slots": [] },+ { "name": "rumba", "label": "Rumba", "icon": "🕺", "loop": true, "clip": "public/animations/clips/rumba.json", "source_fbx": "public/animations/Rumba Dancing.fbx", "agent_slots": ["dance"] },{ "name": "silly", "label": "Silly Dance","icon": "🤪", "loop": true, "clip": "public/animations/clips/silly.json", "source_fbx": "public/animations/Silly Dancing.fbx", "agent_slots": [] },{ "name": "sitclap", "label": "Sit Clap", "icon": "👏", "loop": false, "clip": "public/animations/clips/sitclap.json", "source_fbx": "public/animations/Sitting Clap.fbx", "agent_slots": ["bow"] },{ "name": "sitlaugh", "label": "Sit Laugh", "icon": "😂", "loop": false, "clip": "public/animations/clips/sitlaugh.json", "source_fbx": "public/animations/Sitting Laughing.fbx", "agent_slots": [] },diff --git a/public/locales/ar.json b/public/locales/ar.jsonindex 9d06a0a57..31da06cd2 100644--- a/public/locales/ar.json+++ b/public/locales/ar.json@@ -1509,8 +1509,8 @@"generating": "جاري الإنشاء…","generation_failed_please_try_again": "فشل الإنشاء. يرجى المحاولة مرة أخرى.","loading_avatars": "جاري تحميل الأفاتار…",- "meta_description": "حوّل أفاتار three.ws إلى فيديو برأس متحدث: اكتب نصًا، اختر صوتًا، وصدر مقطعًا متزامن الشفاه.",- "meta_og_description": "حوّل أفاتار three.ws إلى فيديو برأس متحدث: اكتب نصًا، اختر صوتًا، وصدر مقطعًا متزامن الشفاه.",+ "meta_description": "حوّل صورة three.ws الرمزية إلى فيديو ناطق: ارفع الصوت وصدّر مقطعًا متزامنًا مع حركة الشفاه.",+ "meta_og_description": "حوّل صورة three.ws الرمزية إلى فيديو ناطق: ارفع الصوت وصدّر مقطعًا متزامنًا مع حركة الشفاه.","meta_og_title": "فيديو أفاتار متحدث · three.ws","meta_title": "فيديو أفاتار متحدث · three.ws","meta_twitter_description": "حوّل أفاتار three.ws إلى فيديو متحدث: اكتب نصًا، اختر صوتًا، وصدر مقطعًا متزامن الشفاه.",diff --git a/public/locales/de.json b/public/locales/de.jsonindex dc6423de1..f511f040d 100644--- a/public/locales/de.json+++ b/public/locales/de.json@@ -1509,8 +1509,8 @@"generating": "Generiere…","generation_failed_please_try_again": "Generierung fehlgeschlagen. Bitte versuche es erneut.","loading_avatars": "Avatare werden geladen…",- "meta_description": "Verwandle einen three.ws Avatar in ein Talking-Head-Video: Gib ein Skript ein, wähle eine Stimme und exportiere einen lippensynchronen Clip.",- "meta_og_description": "Verwandle einen three.ws Avatar in ein Talking-Head-Video: Gib ein Skript ein, wähle eine Stimme und exportiere einen lippensynchronen Clip.",+ "meta_description": "Verwandle einen three.ws-Avatar in ein Talking-Head-Video: Lade dein Audio hoch und exportiere einen lippensynchronen Clip.",+ "meta_og_description": "Verwandle einen three.ws-Avatar in ein Talking-Head-Video: Lade dein Audio hoch und exportiere einen lippensynchronen Clip.","meta_og_title": "Sprechendes Avatar-Video · three.ws","meta_title": "Sprechendes Avatar-Video · three.ws","meta_twitter_description": "Verwandle einen three.ws-Avatar in ein Talking-Head-Video: Gib ein Skript ein, wähle eine Stimme und exportiere einen lippensynchronen Clip.",diff --git a/public/locales/en.json b/public/locales/en.jsonindex 57c96e991..da2bf1a89 100644--- a/public/locales/en.json+++ b/public/locales/en.json@@ -1509,11 +1509,11 @@"generating": "Generating…","generation_failed_please_try_again": "Generation failed. Please try again.","loading_avatars": "Loading avatars…",- "meta_description": "Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip.",- "meta_og_description": "Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip.",+ "meta_description": "Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip.",+ "meta_og_description": "Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip.","meta_og_title": "Talking Avatar Video · three.ws","meta_title": "Talking avatar video · three.ws",- "meta_twitter_description": "Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip.",+ "meta_twitter_description": "Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip.","meta_twitter_title": "Talking Avatar Video · three.ws","pick_your_avatar_upload_audio_and_generate": "Pick your avatar, upload audio, and generate a lip-synced video.","remove_audio_arialabel": "Remove audio",diff --git a/public/locales/es.json b/public/locales/es.jsonindex 8fe3edc6b..e313234ed 100644--- a/public/locales/es.json+++ b/public/locales/es.json@@ -1509,8 +1509,8 @@"generating": "Generando…","generation_failed_please_try_again": "Error al generar. Por favor, inténtalo de nuevo.","loading_avatars": "Cargando avatares…",- "meta_description": "Convierte un avatar three.ws en un vídeo de cabeza parlante: escribe un guion, elige una voz y exporta un clip sincronizado con los labios.",- "meta_og_description": "Convierte un avatar three.ws en un vídeo de cabeza parlante: escribe un guion, elige una voz y exporta un clip sincronizado con los labios.",+ "meta_description": "Convierte un avatar three.ws en un vídeo de cabeza parlante: sube tu audio y exporta un clip sincronizado con los labios.",+ "meta_og_description": "Convierte un avatar three.ws en un vídeo de cabeza parlante: sube tu audio y exporta un clip sincronizado con los labios.","meta_og_title": "Video de avatar parlante · three.ws","meta_title": "Video de avatar parlante · three.ws","meta_twitter_description": "Convierte un avatar de three.ws en un video con presentador virtual: escribe un guion, elige una voz y exporta un clip con sincronización labial.",diff --git a/public/locales/fr.json b/public/locales/fr.jsonindex 8a6b47e70..be89e8fdf 100644--- a/public/locales/fr.json+++ b/public/locales/fr.json@@ -1509,8 +1509,8 @@"generating": "Génération en cours…","generation_failed_please_try_again": "Échec de la génération. Veuillez réessayer.","loading_avatars": "Chargement des avatars…",- "meta_description": "Transformez un avatar three.ws en vidéo parlante : saisissez un script, choisissez une voix et exportez un clip synchronisé avec les lèvres.",- "meta_og_description": "Transformez un avatar three.ws en vidéo parlante : saisissez un script, choisissez une voix et exportez un clip synchronisé avec les lèvres.",+ "meta_description": "Transformez un avatar three.ws en vidéo de présentateur : téléversez votre audio et exportez un clip synchronisé sur les lèvres.",+ "meta_og_description": "Transformez un avatar three.ws en vidéo de présentateur : téléversez votre audio et exportez un clip synchronisé sur les lèvres.","meta_og_title": "Vidéo d'avatar parlant · three.ws","meta_title": "Vidéo d'avatar parlant · three.ws","meta_twitter_description": "Transformez un avatar three.ws en vidéo parlante : saisissez un script, choisissez une voix et exportez un clip avec synchronisation labiale.",diff --git a/public/locales/hi.json b/public/locales/hi.jsonindex 8c5dfc99e..69c1b0db6 100644--- a/public/locales/hi.json+++ b/public/locales/hi.json@@ -1509,8 +1509,8 @@"generating": "जनरेट हो रहा है…","generation_failed_please_try_again": "जनरेशन विफल रहा। कृपया पुनः प्रयास करें।","loading_avatars": "अवतार लोड हो रहे हैं…",- "meta_description": "एक three.ws अवतार को टॉकिंग-हेड वीडियो में बदलें: एक स्क्रिप्ट टाइप करें, एक आवाज़ चुनें, और एक लिप-सिंक्ड क्लिप एक्सपोर्ट करें।",- "meta_og_description": "एक three.ws अवतार को टॉकिंग-हेड वीडियो में बदलें: एक स्क्रिप्ट टाइप करें, एक आवाज़ चुनें, और एक लिप-सिंक्ड क्लिप एक्सपोर्ट करें।",+ "meta_description": "three.ws अवतार को टॉकिंग-हेड वीडियो में बदलें: अपना ऑडियो अपलोड करें और लिप-सिंक क्लिप एक्सपोर्ट करें।",+ "meta_og_description": "three.ws अवतार को टॉकिंग-हेड वीडियो में बदलें: अपना ऑडियो अपलोड करें और लिप-सिंक क्लिप एक्सपोर्ट करें।","meta_og_title": "बात करने वाला अवतार वीडियो · three.ws","meta_title": "बात करने वाला अवतार वीडियो · three.ws","meta_twitter_description": "एक three.ws अवतार को बोलती हुई वीडियो में बदलें: स्क्रिप्ट लिखें, आवाज़ चुनें, और लिप-सिंक किया हुआ क्लिप एक्सपोर्ट करें।",diff --git a/public/locales/ja.json b/public/locales/ja.jsonindex edd7a74f4..92ef55f0d 100644--- a/public/locales/ja.json+++ b/public/locales/ja.json@@ -1509,8 +1509,8 @@"generating": "生成中…","generation_failed_please_try_again": "生成に失敗しました。もう一度お試しください。","loading_avatars": "アバターを読み込み中…",- "meta_description": "three.wsアバターをトーキングヘッドビデオに変換:スクリプトを入力し、ボイスを選び、リップシンクされたクリップをエクスポートします。",- "meta_og_description": "three.wsアバターをトーキングヘッドビデオに変換:スクリプトを入力し、ボイスを選び、リップシンクされたクリップをエクスポートします。",+ "meta_description": "three.wsのアバターをトーキングヘッド動画に。音声をアップロードして、リップシンクされたクリップを書き出せます。",+ "meta_og_description": "three.wsのアバターをトーキングヘッド動画に。音声をアップロードして、リップシンクされたクリップを書き出せます。","meta_og_title": "トーキングアバター動画・ three.ws","meta_title": "トーキングアバター動画・ three.ws","meta_twitter_description": "three.wsアバターをトーキングヘッド動画に変換。スクリプトを入力し、声を選び、リップシンクされたクリップをエクスポート。",diff --git a/public/locales/ko.json b/public/locales/ko.jsonindex 098f39de8..3d440a406 100644--- a/public/locales/ko.json+++ b/public/locales/ko.json@@ -1509,8 +1509,8 @@"generating": "생성 중…","generation_failed_please_try_again": "생성 실패. 다시 시도해주세요.","loading_avatars": "아바타 로드 중…",- "meta_description": "three.ws 아바타를 토킹 헤드 비디오로 전환하세요. 스크립트를 입력하고, 음성을 선택하고, 립싱크된 클립을 내보내세요.",- "meta_og_description": "three.ws 아바타를 토킹 헤드 비디오로 전환하세요. 스크립트를 입력하고, 음성을 선택하고, 립싱크된 클립을 내보내세요.",+ "meta_description": "three.ws 아바타를 토킹 헤드 영상으로 만드세요. 오디오를 업로드하고 립싱크된 클립을 내보낼 수 있습니다.",+ "meta_og_description": "three.ws 아바타를 토킹 헤드 영상으로 만드세요. 오디오를 업로드하고 립싱크된 클립을 내보낼 수 있습니다.","meta_og_title": "말하는 아바타 비디오 · three.ws","meta_title": "말하는 아바타 비디오 · three.ws","meta_twitter_description": "three.ws 아바타를 말하는 비디오로 전환하세요: 스크립트를 입력하고, 음성을 선택한 다음, 립싱크 클립을 내보내세요.",diff --git a/public/locales/pt-BR.json b/public/locales/pt-BR.jsonindex 0a7b2f8e4..29255f072 100644--- a/public/locales/pt-BR.json+++ b/public/locales/pt-BR.json@@ -1509,8 +1509,8 @@"generating": "Gerando…","generation_failed_please_try_again": "Falha na geração. Tente novamente.","loading_avatars": "Carregando avatares…",- "meta_description": "Transforme um avatar three.ws em um vídeo de talking-head: digite um roteiro, escolha uma voz e exporte um clipe com sincronia labial.",- "meta_og_description": "Transforme um avatar three.ws em um vídeo de talking-head: digite um roteiro, escolha uma voz e exporte um clipe com sincronia labial.",+ "meta_description": "Transforme um avatar three.ws em um vídeo de cabeça falante: envie seu áudio e exporte um clipe com sincronia labial.",+ "meta_og_description": "Transforme um avatar three.ws em um vídeo de cabeça falante: envie seu áudio e exporte um clipe com sincronia labial.","meta_og_title": "Vídeo de Avatar Falante · three.ws","meta_title": "Vídeo de avatar falante · three.ws","meta_twitter_description": "Transforme um avatar three.ws em um vídeo falante: digite um roteiro, escolha uma voz e exporte um clipe com sincronia labial.",diff --git a/public/locales/ru.json b/public/locales/ru.jsonindex 07bc1b48c..6f00cb3cd 100644--- a/public/locales/ru.json+++ b/public/locales/ru.json@@ -1509,11 +1509,11 @@"generating": "Генерация…","generation_failed_please_try_again": "Ошибка генерации. Повторите попытку.","loading_avatars": "Загрузка аватаров…",- "meta_description": "Превратите аватар three.ws в видео с говорящей головой: напишите сценарий, выберите голос и экспортируйте клип с синхронизацией губ.",- "meta_og_description": "Превратите аватар three.ws в видео с говорящей головой: напишите сценарий, выберите голос и экспортируйте клип с синхронизацией губ.",+ "meta_description": "Превратите аватар three.ws в говорящее видео: загрузите свой звук и экспортируйте клип с синхронизацией губ.",+ "meta_og_description": "Превратите аватар three.ws в говорящее видео: загрузите свой звук и экспортируйте клип с синхронизацией губ.","meta_og_title": "Видео с говорящим аватаром · three.ws","meta_title": "Видео с говорящим аватаром · three.ws",- "meta_twitter_description": "Превратите аватар three.ws в видео с говорящей головой: напишите сценарий, выберите голос и экспортируйте клип с синхронизацией губ.",+ "meta_twitter_description": "Превратите аватар three.ws в говорящее видео: загрузите свой звук и экспортируйте клип с синхронизацией губ.","meta_twitter_title": "Видео с говорящим аватаром · three.ws","pick_your_avatar_upload_audio_and_generate": "Выберите аватар, загрузите аудио и сгенерируйте видео с синхронизацией губ.","remove_audio_arialabel": "Удалить аудио",diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.jsonindex d1a6bf098..a2510b193 100644--- a/public/locales/zh-CN.json+++ b/public/locales/zh-CN.json@@ -1509,8 +1509,8 @@"generating": "正在生成…","generation_failed_please_try_again": "生成失败。请重试。","loading_avatars": "正在加载形象…",- "meta_description": "将 three.ws 形象转换为口播视频:输入脚本,选择声音,并导出唇形同步的片段。",- "meta_og_description": "将 three.ws 形象转换为口播视频:输入脚本,选择声音,并导出唇形同步的片段。",+ "meta_description": "把 three.ws 头像变成会说话的视频:上传音频,导出口型同步的片段。",+ "meta_og_description": "把 three.ws 头像变成会说话的视频:上传音频,导出口型同步的片段。","meta_og_title": "AI虚拟形象视频 · three.ws","meta_title": "AI虚拟形象视频 · three.ws","meta_twitter_description": "将 three.ws 虚拟形象制作成口播视频:输入脚本、选择声音,并导出唇形同步的片段。",diff --git a/public/tour/curriculum.json b/public/tour/curriculum.jsonindex 4c6201cae..e2ee147a7 100644--- a/public/tour/curriculum.json+++ b/public/tour/curriculum.json@@ -162,7 +162,7 @@"path": "/create/video","section": "main","title": "Talking Avatar Video",- "narration": "Check out Talking Avatar Video. Turn a three.ws avatar into a talking-head video: type a script, pick a voice, and export a lip-synced clip.",+ "narration": "Check out Talking Avatar Video. Turn a three.ws avatar into a talking-head video: upload your audio and export a lip-synced clip.","highlight": false},{diff --git a/src/animations-gallery.js b/src/animations-gallery.jsindex 2c39049fc..6d0a39cea 100644--- a/src/animations-gallery.js+++ b/src/animations-gallery.js@@ -6,7 +6,7 @@// • The built-in three.ws motion library (/animations/manifest.json) — the// same curated clips the /pose studio ships with. Always present.// • The full motion library (GET /api/animations/library) — the complete-// Mixamo-sourced catalog (~2,000 clips) hosted on the R2 CDN.+// Mixamo-sourced catalog (2,800+ clips) hosted on the R2 CDN.//// All are normalized to one card shape — poster thumbnail, derived category// (src/animation-categories.js), duration, loop mode — then filtered (search +