Skip to content

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.

feat(marketplace): update marketplace layout and add plugin management features feat(animations): introduce uncertainty bias for hip drift in idle animations feat(speech): add positional audio support to ElevenLabs TTS feat(animation-slots): add 'fidget' animation slot to animation vocabulary feat(suggestion-chips): update suggestion chips with new options and icons feat(docs): add Experiments section to PAGES.md with new route details

nirholasbb20f0a7ec9c
diff --git a/README.md b/README.md
index fe3c1bab6..be8cf6926 100644
--- a/README.md
+++ b/README.md
@@ -253,6 +253,7 @@ A map of every user-facing route. Full detail (source files, feature description
| **Artifacts** | `/artifact`, `/artifact/snippet`, `/artifact-example` | Claude Artifact viewer |
| **Solana / DeFi** | `/pumpfun`, `/vanity-wallet` | Token launcher, vanity address grinder |
| **Admin / Rep** | `/admin`, `/reputation` | Staff admin, reputation registry |
+| **Experiments** | `/rider` | A-Frame WebVR music visualization |
| **Integrations** | `/cz`, `/lobehub/iframe` | CZ demo, LobeHub plugin |
| **Docs** | `/docs`, `/docs/widgets` | Developer documentation |
| **Legal** | `/legal/privacy`, `/legal/tos` | Privacy policy and terms |
diff --git a/chat/src/manus/MoreDropdown.svelte b/chat/src/manus/MoreDropdown.svelte
index f8161fef5..e63a1c9cc 100644
--- a/chat/src/manus/MoreDropdown.svelte
+++ b/chat/src/manus/MoreDropdown.svelte
@@ -9,13 +9,13 @@
const dispatch = createEventDispatcher();
const items = [
- { id: 'pumpfun', label: 'Pump.fun live feed', icon: feZap },
- { id: 'curve', label: 'Bonding curve', icon: feBarChart2 },
- { id: 'wallet', label: 'Connect wallet', icon: feLink },
- { id: 'animate', label: 'Animate mascot', icon: feRotateCw },
- { id: 'embed', label: 'Embed on token site', icon: feCode },
- { id: 'ar', label: 'AR showcase', icon: feCamera },
- { id: 'emotions', label: 'Mascot emotions', icon: feSliders },
+ { id: 'pumpfun', label: 'Pump.fun live feed', icon: feZap },
+ { id: 'curve', label: 'Bonding curve', icon: feBarChart2 },
+ { id: 'wallet', label: 'Connect wallet', icon: feLink },
+ { id: 'whale', label: 'Wallet tracker', icon: feCamera },
+ { id: 'mascot', label: 'Build token mascot', icon: feRotateCw },
+ { id: 'embed', label: 'Embed on token site', icon: feCode },
+ { id: 'emotions', label: 'Mascot emotions', icon: feSliders },
];
function pick(item) {
diff --git a/chat/src/manus/SuggestionChips.svelte b/chat/src/manus/SuggestionChips.svelte
index 1393e45f6..fd50c6c77 100644
--- a/chat/src/manus/SuggestionChips.svelte
+++ b/chat/src/manus/SuggestionChips.svelte
@@ -1,16 +1,16 @@
<script>
import { mode } from '../stores.js';
import Icon from '../Icon.svelte';
- import { feTrendingUp, feBox, feActivity, feHexagon, feMoreHorizontal } from '../feather.js';
+ import { feTrendingUp, feBarChart2, feActivity, feAlertCircle, feMoreHorizontal } from '../feather.js';
import MoreDropdown from './MoreDropdown.svelte';
let moreOpen = false;
const chips = [
- { id: 'token', label: 'Launch a memecoin', icon: feTrendingUp },
- { id: 'mascot', label: 'Build token mascot', icon: feBox },
- { id: 'monitor', label: 'Monitor my coin', icon: feActivity },
- { id: 'onchain', label: 'Mint mascot as NFT', icon: feHexagon },
+ { id: 'gems', label: 'Find new gems', icon: feTrendingUp },
+ { id: 'track', label: 'Track a token', icon: feActivity },
+ { id: 'portfolio', label: 'Check my portfolio', icon: feBarChart2 },
+ { id: 'rugcheck', label: 'Rug check', icon: feAlertCircle },
];
function pick(id) {
diff --git a/docs/internal/PAGES.md b/docs/internal/PAGES.md
index e7880cfba..a6e6e445b 100644
--- a/docs/internal/PAGES.md
+++ b/docs/internal/PAGES.md
@@ -154,6 +154,12 @@ Route definitions are in [chat/src/App.svelte](../../chat/src/App.svelte). Marke
| `/admin`, `/admin/` | [public/admin/index.html](../../public/admin/index.html) |
| `/reputation`, `/reputation/` | [public/reputation/index.html](../../public/reputation/index.html) |
+## Experiments / Experiences
+
+| URL | Source |
+| :-- | :-- |
+| `/rider`, `/rider/` | [rider/index.html](../../rider/index.html) — A-Frame WebVR music visualization ("surf the musical road among the stars") |
+
## Integrations / Locales
| URL | Source |
@@ -275,6 +281,9 @@ A high-level map of what each page does, grouped by capability.
- **`/chat#resources/*`** — Resource hub (blog, docs, trust-center, updates, use-cases).
- **`/chat#dashboard/revenue`** — Revenue dashboard (authenticated users).
+### Experiments & Experiences
+- **`/rider`** — A-Frame WebVR music visualization; browser-native VR with Enter VR button.
+
### Integrations
- **`/cz`, `/cz/offline`** — CZ demo experience.
- **`/lobehub/iframe`** — LobeHub plugin iframe surface.
@@ -282,4 +291,4 @@ A high-level map of what each page does, grouped by capability.
---
-**Total:** ~100 unique URLs (excluding trailing-slash duplicates and dynamic param expansions; ~35 additional hash-routes inside `/chat`). For the OAuth + API + cron surface see [api-inventory.md](api-inventory.md).
+**Total:** ~100 unique URLs (excluding trailing-slash duplicates and dynamic param expansions; ~35 additional hash-routes inside `/chat`). For the OAuth 2.1 server and API surface see [api-inventory.md](api-inventory.md).
diff --git a/marketplace.html b/marketplace.html
index e1a350e50..b8ef4a4d5 100644
--- a/marketplace.html
+++ b/marketplace.html
@@ -165,54 +165,129 @@
</div>
</section>
- <!-- Tools tab -->
+ <!-- Plugins tab -->
<section class="market-tools" id="market-tools" hidden>
- <header class="market-topbar">
- <h2 class="market-tools-title">Tool Packs</h2>
+ <header class="market-topbar plugins-topbar">
+ <div class="plugins-header-row">
+ <h2 class="market-tools-title">Plugins</h2>
+ <button class="plugin-add-url-btn" id="plugin-add-url">+ Add by URL</button>
+ </div>
+ <input
+ id="plugin-search"
+ type="search"
+ placeholder="Search plugins…"
+ autocomplete="off"
+ />
</header>
- <div class="market-tools-grid">
- <div class="tool-pack-card">
- <div class="head">
- <div class="avatar">◈</div>
- <div style="min-width:0;flex:1">
- <div class="title">TradingView Charts</div>
- <div class="author">1 tool</div>
- </div>
+ <div class="market-body">
+ <aside class="market-cats" id="plugin-cats" aria-label="Plugin Categories"></aside>
+ <div style="flex:1;min-width:0">
+ <div class="plugin-grid" id="plugin-grid">
+ <div class="market-empty">Loading…</div>
</div>
- <div class="desc">Live candlestick charts for any crypto or stock symbol</div>
- <!-- TODO: wire up install handler in Svelte chat app -->
- <a class="tool-install-btn" href="/chat?install=tradingview">Add to chat</a>
- </div>
-
- <div class="tool-pack-card">
- <div class="head">
- <div class="avatar">⊕</div>
- <div style="min-width:0;flex:1">
- <div class="title">Web Search</div>
- <div class="author">1 tool</div>
- </div>
+ <div class="market-loadmore">
+ <button id="plugin-loadmore" hidden>Load more</button>
</div>
- <div class="desc">Search the web and return top results inline</div>
- <!-- TODO: wire up install handler in Svelte chat app -->
- <a class="tool-install-btn" href="/chat?install=web-search">Add to chat</a>
</div>
+ </div>
+ </section>
- <div class="tool-pack-card">
- <div class="head">
- <div class="avatar">◷</div>
- <div style="min-width:0;flex:1">
- <div class="title">Date &amp; Time</div>
- <div class="author">2 tools</div>
- </div>
- </div>
- <div class="desc">Get current time and timezone in any conversation</div>
- <!-- TODO: wire up install handler in Svelte chat app -->
- <a class="tool-install-btn" href="/chat?install=datetime">Add to chat</a>
+ <!-- Add by URL modal -->
+ <div class="plugin-modal-overlay" id="plugin-url-modal" hidden aria-modal="true" role="dialog">
+ <div class="plugin-modal">
+ <h3>Add Plugin by URL</h3>
+ <p class="plugin-modal-hint">
+ Paste the URL of a hosted <code>plugin/1.0</code> JSON manifest to add a custom plugin.
+ </p>
+ <input
+ type="url"
+ id="plugin-url-input"
+ class="plugin-url-input"
+ placeholder="https://example.com/my-plugin.json"
+ autocomplete="off"
+ />
+ <div id="plugin-url-error" class="plugin-url-error" hidden></div>
+ <div class="plugin-modal-preview" id="plugin-url-preview" hidden></div>
+ <div class="plugin-modal-actions">
+ <button id="plugin-url-cancel" class="plugin-modal-btn">Cancel</button>
+ <button id="plugin-url-fetch" class="plugin-modal-btn plugin-modal-btn-primary">Fetch &amp; Validate</button>
</div>
</div>
- </section>
+ </div>
</main>
- <script type="module" src="/src/marketplace.js"></script>
+ <!-- Submit Agent Modal -->
+ <div class="market-modal-overlay" id="market-submit-overlay" hidden aria-modal="true" role="dialog" aria-labelledby="market-submit-title">
+ <div class="market-modal">
+ <div class="market-modal-head">
+ <h2 id="market-submit-title">Submit an Agent</h2>
+ <button class="market-modal-close" id="market-submit-close" aria-label="Close">×</button>
+ </div>
+
+ <div class="market-modal-import">
+ <button type="button" id="market-import-toggle" class="market-import-btn">Import from JSON ↓</button>
+ <div id="market-import-area" hidden>
+ <textarea id="market-import-json" class="market-json-input" rows="5"
+ placeholder='Paste LobeHub-compatible agent JSON: { "config": { "systemRole": "…" }, "meta": { "title": "…" } }'></textarea>
+ <button type="button" id="market-import-apply" class="market-btn-sec" style="margin-top:6px">Apply JSON</button>
+ </div>
+ </div>
+
+ <form id="market-submit-form" class="market-submit-form" novalidate>
+ <div class="market-field">
+ <label for="sf-name">Name <span class="req">*</span></label>
+ <input id="sf-name" type="text" maxlength="100" placeholder="My Helpful Agent" autocomplete="off" />
+ </div>
+ <div class="market-field">
+ <label for="sf-description">Description <span class="req">*</span></label>
+ <input id="sf-description" type="text" maxlength="500" placeholder="A short description of what this agent does" />
+ </div>
+ <div class="market-field-row">
+ <div class="market-field">
+ <label for="sf-category">Category <span class="req">*</span></label>
+ <select id="sf-category">
+ <option value="">Select…</option>
+ <option value="academic">Academic</option>
+ <option value="career">Career</option>
+ <option value="copywriting">Copywriting</option>
+ <option value="design">Design</option>
+ <option value="education">Education</option>
+ <option value="emotions">Emotions</option>
+ <option value="entertainment">Entertainment</option>
+ <option value="games">Games</option>
+ <option value="general">General</option>
+ <option value="life">Life</option>
+ <option value="marketing">Marketing</option>
+ <option value="office">Office</option>
+ <option value="programming">Programming</option>
+ <option value="translation">Translation</option>
+ </select>
+ </div>
+ <div class="market-field">
+ <label for="sf-tags">Tags <span class="field-hint">(comma-separated)</span></label>
+ <input id="sf-tags" type="text" maxlength="200" placeholder="helpful, writing, code" />
+ </div>
+ </div>
+ <div class="market-field">
+ <label for="sf-prompt">System Prompt <span class="req">*</span></label>
+ <textarea id="sf-prompt" rows="6" maxlength="16000"
+ placeholder="You are a helpful AI assistant specialized in…"></textarea>
+ </div>
+ <div class="market-field">
+ <label for="sf-greeting">Greeting Message</label>
+ <input id="sf-greeting" type="text" maxlength="1000" placeholder="Hello! I'm here to help you with…" />
+ </div>
+
+ <div id="market-submit-error" class="market-form-error" hidden></div>
+
+ <div class="market-submit-actions">
+ <button type="button" id="sf-save-draft" class="market-btn-sec">Save Draft</button>
+ <button type="button" id="sf-publish" class="market-btn-pri">Publish</button>
+ </div>
+ </form>
+ </div>
+ </div>
+
+ <script type="module" src="/src/marketplace.js"></script>
</body>
</html>
diff --git a/src/idle-animation.js b/src/idle-animation.js
index 952cb9bbe..86188dc89 100644
--- a/src/idle-animation.js
+++ b/src/idle-animation.js
@@ -67,6 +67,7 @@ export class IdleAnimation {
// Per-avatar phase offsets — desync multiple instances on the same page.
this._breathPhase = this._rand() * TWO_PI;
this._weightPhase = this._rand() * TWO_PI;
+ this._uncertaintyBias = 0; // 0..1, increases hip drift amplitude
// ── Lazy bone / morph discovery ───────────────────────────────────────────
this._scannedRoot = null;
@@ -144,6 +145,15 @@ export class IdleAnimation {
this._saccPauseTimer = active ? 999 : 0;
}
+ /**
+ * Set uncertainty bias that modulates hip drift amplitude.
+ * Called each frame by AgentAvatar._applyEmotionToAvatar().
+ * @param {number} value — 0..1
+ */
+ setUncertainty(value) {
+ this._uncertaintyBias = Math.max(0, Math.min(1, value));
+ }
+
/** Remove protocol listeners. */
dispose() {
this._protocol.off(ACTION_TYPES.SPEAK, this._onSpeak);
@@ -349,7 +359,8 @@ export class IdleAnimation {
_tickWeightShift(dt) {
if (!this._hipBone) return;
this._weightPhase = (this._weightPhase + (dt * TWO_PI) / 8.0) % TWO_PI;
- this._hipBone.rotation.y = this._hipRestY + Math.sin(this._weightPhase) * 0.5 * DEG2RAD;
+ const amplitude = 0.018 + this._uncertaintyBias * 0.025;
+ this._hipBone.rotation.y = this._hipRestY + Math.sin(this._weightPhase) * amplitude;
}
// ── Utility ──────────────────────────────────────────────────────────────────
diff --git a/src/marketplace.js b/src/marketplace.js
index bdf098ec9..81b19fd5d 100644
--- a/src/marketplace.js
+++ b/src/marketplace.js
@@ -459,6 +459,7 @@ function render() {
els.detail.hidden = true;
els.discovery.hidden = true;
els.tools.hidden = false;
+ if (!pluginState.loaded) loadPlugins(true);
} else {
els.detail.hidden = true;
els.discovery.hidden = false;
@@ -470,6 +471,7 @@ function init() {
bindEvents();
loadCategories();
loadList(true);
+ initPlugins();
render();
}
diff --git a/src/runtime/animation-slots.js b/src/runtime/animation-slots.js
index 1fe1e5b74..80b161586 100644
--- a/src/runtime/animation-slots.js
+++ b/src/runtime/animation-slots.js
@@ -13,6 +13,7 @@ export const SLOTS = [
'bow',
'point',
'shrug',
+ 'fidget',
];
export const DEFAULT_ANIMATION_MAP = {
@@ -26,6 +27,7 @@ export const DEFAULT_ANIMATION_MAP = {
bow: 'sitclap',
point: 'reaction',
shrug: 'defeated',
+ fidget: 'Fidget',
};
/**
diff --git a/src/runtime/speech.js b/src/runtime/speech.js
index d339aa4ca..4f01f4c5f 100644
--- a/src/runtime/speech.js
+++ b/src/runtime/speech.js
@@ -197,6 +197,12 @@ export class ElevenLabsTTS {
this._mediaSourceURL = null; // for revocation
this._onEnd = null; // pending resolve
this._lipsync = null;
+ this._positionalAudio = null; // THREE.PositionalAudio, optional
+ }
+
+ /** @param {import('three').PositionalAudio|null} pa */
+ setPositionalAudio(pa) {
+ this._positionalAudio = pa;
}
async speak(text, { onStart, onEnd, scene } = {}) {
@@ -314,6 +320,21 @@ export class ElevenLabsTTS {
return this._speaking;
}
+ // ── Internal: spatial audio wiring ────────────────────────────────────
+
+ _connectPositionalAudio(audioEl) {
+ const pa = this._positionalAudio;
+ if (!pa) return;
+ // Disconnect any previous MediaElementSource from this PositionalAudio
+ try { pa.source?.disconnect(); } catch {}
+ // Wire the new element through the spatial panner already set up by Three.js:
+ // MediaElementSource → panner → audio.gain → listener.gain → context.destination
+ pa.source = pa.context.createMediaElementSource(audioEl);
+ pa.source.connect(pa.panner);
+ // Resume context if suspended — required until first user interaction
+ if (pa.context.state === 'suspended') pa.context.resume().catch(() => {});
+ }
+
// ── Internal: streaming via MediaSource ────────────────────────────────
_playStreamingMSE(stream, onStart, onError) {
@@ -327,6 +348,8 @@ export class ElevenLabsTTS {
audio.addEventListener('ended', () => this._onEnd?.(), { once: true });
audio.addEventListener('error', () => onError?.(), { once: true });
+ this._connectPositionalAudio(audio);
+
ms.addEventListener('sourceopen', async () => {
let sb;
try {
diff --git a/src/viewer.js b/src/viewer.js
index 447df4990..9fabf8794 100644
--- a/src/viewer.js
+++ b/src/viewer.js
@@ -1,4 +1,5 @@
import {
+ AudioListener,
AxesHelper,
Box3,
Cache,
@@ -110,6 +111,9 @@ export class Viewer {
this.activeCamera = this.defaultCamera;
this.scene.add(this.defaultCamera);
+ this.audioListener = new AudioListener();
+ this.defaultCamera.add(this.audioListener);
+
this.renderer = window.renderer = new WebGLRenderer({ antialias: true, alpha: true });
this.renderer.setClearColor(0x000000, 1);
this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
@@ -1527,6 +1531,11 @@ export class Viewer {
this.renderer = null;
}
+ if (this.audioListener) {
+ this.defaultCamera?.remove(this.audioListener);
+ this.audioListener = null;
+ }
+
this.scene = null;
this.content = null;
this.activeCamera = null;