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
Remove deprecated prompts for social memory seeding from X (Twitter), agent token launch UI, and reputation staking UI.
nirholasff3d94a9b943
diff --git a/chat/scripts/ensure-deps.mjs b/chat/scripts/ensure-deps.mjsnew file mode 100644index 000000000..0d4e6a412--- /dev/null+++ b/chat/scripts/ensure-deps.mjs@@ -0,0 +1,21 @@+#!/usr/bin/env node+// Skips `npm ci` when package-lock.json hasn't changed since last install.+import { createHash } from 'crypto';+import { readFileSync, writeFileSync, existsSync } from 'fs';+import { execSync } from 'child_process';++const lockfile = 'package-lock.json';+const stamp = 'node_modules/.install-stamp';+const hash = createHash('sha256').update(readFileSync(lockfile)).digest('hex');++const needsInstall =+ !existsSync('node_modules') ||+ !existsSync(stamp) ||+ readFileSync(stamp, 'utf8').trim() !== hash;++if (needsInstall) {+ execSync('npm ci --prefer-offline --no-audit --no-fund', { stdio: 'inherit' });+ writeFileSync(stamp, hash);+} else {+ console.log('chat deps up-to-date, skipping npm ci');+}diff --git a/chat/src/App.svelte b/chat/src/App.svelteindex e81a1300a..f0bc49d63 100644--- a/chat/src/App.svelte+++ b/chat/src/App.svelte@@ -2451,31 +2451,6 @@/>{/each}- <!-- Inline avatar pinned right under the latest response -->- {#if (effectiveAgentId || $talkingHeadEnabled) && agentVisible}- <li- class="avatar-inline mx-auto mt-2 flex flex-col items-center gap-2 select-none list-none"- class:avatar-walking={generating || tokensFlowing}- >- {#if effectiveAgentId}- <!-- svelte-ignore custom-element-no-implicit-ns -->- <agent-3d- bind:this={agentEl}- agent-id={effectiveAgentId}- mode="inline"- width="420"- height="700"- background="transparent"- kiosk- avatar-chat="off"- name-plate="off"- style="width:min(420px, 60vw, calc((100vh - 240px) * 420 / 700)); aspect-ratio: 420 / 700;"- ></agent-3d>- {:else if $talkingHeadEnabled}- <TalkingHead bind:this={talkingHead} on:ready={onTalkingHeadReady} avatarUrl={$talkingHeadAvatarUrl || undefined} />- {/if}- </li>- {/if}</ul></div>diff --git a/chat/src/Message.svelte b/chat/src/Message.svelteindex 8c4674b12..3b3099507 100644--- a/chat/src/Message.svelte+++ b/chat/src/Message.svelte@@ -30,6 +30,8 @@const dispatch = createEventDispatcher();+ let agentEl;+function msgTransition(node, { style }) {if (style === 'snap') return { duration: 0 };if (style === 'elegant') return fly(node, { y: 6, duration: 180, easing: cubicOut });@@ -166,17 +168,24 @@<divclass="{message.role === 'user'? 'bg-[#EBE8E0] text-[#1A1A1A] rounded-2xl px-4 py-3 max-w-[78%] relative'- : 'relative flex w-full gap-x-3.5 self-start'}"+ : 'relative flex w-full gap-x-3.5 items-end'}">{#if message.role !== 'user'}- <div class="relative shrink-0">- {#if message.role === 'assistant' && hasLogo && message.thinking && message.thoughts}- <div- class="absolute bottom-full left-1/2 mb-2 -translate-x-1/2 w-56 max-h-32 overflow-hidden rounded-2xl bg-white border border-slate-200 shadow-md px-3 py-2 text-[11px] leading-snug text-slate-700 animate-pulse"- >- <div class="line-clamp-5 italic">{message.thoughts}</div>- <span class="absolute -bottom-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rotate-45 bg-white border-r border-b border-slate-200"></span>- </div>+ <div class="relative shrink-0 flex flex-col items-center">+ {#if message.role === 'assistant' && hasLogo && isLatestAssistant && effectiveAgentId}+ <!-- Thought bubble while thinking -->+ {#if message.thinking && message.thoughts}+ <div class="avatar-bubble avatar-bubble--thinking mb-2">+ <div class="line-clamp-4 italic text-slate-500">{message.thoughts}</div>+ <span class="avatar-bubble-tail"></span>+ </div>+ <!-- Chat bubble while streaming response -->+ {:else if generating && message.content}+ <div class="avatar-bubble mb-2">+ <div class="line-clamp-4">{message.content}</div>+ <span class="avatar-bubble-tail"></span>+ </div>+ {/if}{/if}<buttondisabled={message.role === 'system'}@@ -188,22 +197,23 @@message.role = 'user';}}}- class="shrink-0 rounded-md md:rounded-[6px] {message.role === 'assistant' && hasLogo && isLatestAssistant- ? 'flex h-[220px] w-[220px]'+ class="shrink-0 rounded-md md:rounded-[6px] {message.role === 'assistant' && hasLogo && isLatestAssistant && effectiveAgentId+ ? 'flex w-[140px] h-[280px]': 'flex h-8 w-8 md:h-9 md:w-9'} {message.role === 'system'? 'border border-teal-200 bg-teal-100': message.role === 'assistant' && (!hasLogo || !isLatestAssistant)? 'border border-teal-200 bg-teal-100 pb-px': ''}">- {#if message.role === 'assistant' && hasLogo && isLatestAssistant}+ {#if message.role === 'assistant' && hasLogo && isLatestAssistant && effectiveAgentId}<span class="w-full h-full overflow-hidden inline-block shrink-0 rounded-[inherit]"><!-- svelte-ignore custom-element-no-implicit-ns --><agent-3d- src="/avatars/cz.glb"+ bind:this={agentEl}+ agent-id={effectiveAgentId}mode="inline"- width="220"- height="220"+ width="140"+ height="280"background="transparent"kioskname-plate="off"@@ -659,3 +669,41 @@</button></li>{/if}++<style>+ .avatar-bubble {+ position: relative;+ width: 180px;+ padding: 8px 12px 10px;+ border-radius: 14px;+ background: #ffffff;+ border: 1px solid #E5E3DC;+ box-shadow: 0 4px 16px rgba(0,0,0,0.07);+ font-size: 12px;+ line-height: 1.45;+ color: #1A1A1A;+ animation: bubble-pop 200ms ease-out;+ }+ .avatar-bubble--thinking {+ background: #F8F7F4;+ color: #6B7280;+ }+ .avatar-bubble-tail {+ position: absolute;+ bottom: -6px;+ left: 50%;+ transform: translateX(-50%) rotate(45deg);+ width: 10px;+ height: 10px;+ background: #ffffff;+ border-right: 1px solid #E5E3DC;+ border-bottom: 1px solid #E5E3DC;+ }+ .avatar-bubble--thinking .avatar-bubble-tail {+ background: #F8F7F4;+ }+ @keyframes bubble-pop {+ from { opacity: 0; transform: translateY(4px) scale(0.97); }+ to { opacity: 1; transform: translateY(0) scale(1); }+ }+</style>diff --git a/package.json b/package.jsonindex 3763c8fc8..773fe8f58 100644--- a/package.json+++ b/package.json@@ -44,10 +44,11 @@"build:lib": "TARGET=lib vite build","build:artifact": "vite build --config vite.config.artifact.js","publish:lib": "node scripts/publish-lib.mjs",- "build:chat": "cd chat && npm ci --prefer-offline --no-audit --no-fund && npm run build",+ "build:chat": "cd chat && node scripts/ensure-deps.mjs && npm run build","build:rider": "mkdir -p dist/rider && cp rider/index.html dist/rider/ && cp -r rider/assets dist/rider/ && cp -r rider/build dist/rider/ && cp -r rider/vendor dist/rider/","build:rider:full": "cd rider && npm ci --prefer-offline --no-audit --no-fund --ignore-engines && npm run build && cd .. && npm run build:rider",- "build:all": "npm run build:chat && npm run build && npm run build:rider && npm run build:lib && npm run publish:lib",+ "build:fast": "npm run build",+ "build:all": "(npm run build:chat & npm run build & npm run build:lib & npm run build:rider & wait) && npm run publish:lib","clean": "rm -rf dist/* dist-lib/* || true","generate-icons": "node scripts/generate-pwa-icons.mjs","fetch-animations": "node scripts/download-animations.mjs",diff --git a/public/chat/index.html b/public/chat/index.htmlindex 7e922a28b..ae4310be7 100644--- a/public/chat/index.html+++ b/public/chat/index.html@@ -43,8 +43,8 @@}}</script>- <script type="module" crossorigin src="/chat/assets/index-DCOfwoOV.js"></script>- <link rel="stylesheet" crossorigin href="/chat/assets/index-Dcgl0FKC.css">+ <script type="module" crossorigin src="/chat/assets/index-CY-8d3mN.js"></script>+ <link rel="stylesheet" crossorigin href="/chat/assets/index-BvlQ9GOR.css"></head><body><div id="app"></div>