Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
docs(ux-flows): record the fixed chat voice path and where its switch lives
nirholas84bd1f5dd725
diff --git a/docs/ux-flows/10-chat-brain-labs.md b/docs/ux-flows/10-chat-brain-labs.mdindex cc879ef7f..df9ec0d45 100644--- a/docs/ux-flows/10-chat-brain-labs.md+++ b/docs/ux-flows/10-chat-brain-labs.md@@ -13,13 +13,13 @@ modules. Routes resolved via `vercel.json` rewrites.- **Steps (6):**1. Open `/chat`; app boots, fetches the free model list from `/api/chat/models`, shows empty state with suggestion chips. `BUILTIN_MODELS` in `providers.js` is only a first-paint seed; `resolveDefaultModel()` prefers a model the server reports as live, so if the configured default has been retired upstream a new conversation opens on a live model instead of a dead one.2. (optional) Click the model selector and pick an LLM, or open `AgentPicker` to load a persona/agent (from `/api/agents`, `/api/marketplace/agents`, or the agent library JSON). Loading an agent mounts its live `<agent-3d>` avatar in the panel.- 3. (optional) Toggle voice output in settings.+ 3. (optional) Open Settings → Avatar and turn on "Speak replies aloud", optionally picking one of the browser's installed voices and previewing it. The sidebar holding the Settings button renders once a conversation has messages, so a first-time visitor reaches it after their first reply.4. Type a message in the composer and submit (or attach an image / file for multimodal).5. `convo.complete()` POSTs to the provider's completion URL (built-in → `/api/chat/proxy`; Anthropic → `/v1/messages`; others → `/v1/chat/completions`) and streams tokens back into the assistant bubble (markdown + KaTeX rendered live).6. On reply completion: if an agent is loaded, its `<agent-3d>` avatar plays the talk animation (`agentEl.speak(...)`) and expresses the classified emotion (`agentEl.expressEmotion(...)`); those two calls are animation only and carry no audio. With voice output enabled, browser `speechSynthesis` reads the reply aloud, agent or not. Payoff: a 3D agent that answers in voice with mood animation.- **Decision points / branches:** model/provider choice (free built-in vs keyed provider vs OpenRouter "all models" vs local Ollama); text vs voice output (agent-3d speech vs browser speechSynthesis vs silent); persona/agent loaded vs raw model; tool-calling on/off (16 curated tool packs in `tools.js` `curatedToolPacks`, surfaced via `ToolPackModal`: wallet-transactions, x402-pay, tradingview, price-chart-3d, token-price, token-ticker-3d, web-search, date-time, pump-launch, tx-explain, mint-scene-nft, nft-3d-import, forge-text-to-3d, forge-avatar, wallet-balances, token-gate-scene; the built-in wallet/agent/pump/payments tool schemas back them); every generated 3D model card carries "View in AR ↗" (`/ar?src=<glb>`), "Download GLB", and "Viewer ↗" actions; regenerate / edit / branch a message; share conversation (compressed link via `share.js`).- **External calls / dependencies:** `/api/chat/models` (free model list, OpenRouter-proxied), `/api/chat/proxy` (built-in completions), `/api/chat/config`, `/api/mcp` + `/api/pump-fun-mcp` (skills marketplace / pump tools), `/api/agents` + `/api/marketplace/agents` (agent picker), `/api/auth/{me,logout,siwe/nonce,siwe/verify,siws/nonce,siws/verify}` (wallet auth), agent-library `index.en-US.json`. Direct provider APIs (api.anthropic.com, api.openai.com, api.groq.com, api.mistral.ai, openrouter.ai, local Ollama) when a user key is set.-- **Success state:** Streamed assistant message rendered; if voice is enabled and an agent is loaded, the 3D avatar speaks with mood animation; conversation persisted to IndexedDB / optional E2E-encrypted sync.+- **Success state:** Streamed assistant message rendered; with voice enabled the reply is read aloud once per message (a repeated end-of-stream chunk cannot double-speak it), and a loaded agent mouths along with mood animation; conversation persisted to IndexedDB / optional E2E-encrypted sync.- **Empty / error states:** Empty state with brand tagline + suggestion chips when no messages. Provider/network errors surface as inline notices; abortable generation via `controller`. Missing API key → model marked unavailable in selector. Avatar GLB load failure falls back to default avatar; speech failure degrades silently to text.- **Step count:** 6 required (+4 optional)- **Voice path (resolved 2026-08-06):** there is exactly one speaker, browser `speechSynthesis`, gated on the voice-output toggle. The legacy standalone Talking Head component (a CDN build of met4citizen/TalkingHead pointed at the long-retired `/api/tts/google`) was imported but never rendered, and its dead `talkingHeadEnabled` flag suppressed `speechSynthesis` for anyone whose browser still carried the flag from an older build. Component, flag, and both dead branches are removed. `talkingHeadAvatarUrl` survives on purpose: it is the live store behind the Settings avatar picker, the sidebar logo, and the in-reply `<agent-3d>` viewer.