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.

Wire embed wizard into agent/avatar pages and dashboard

nirholase1a0dfea7d07
diff --git a/data/changelog.json b/data/changelog.json
index d7c369e53..f69694853 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -2738,6 +2738,15 @@
"improvement"
],
"link": "/irl"
+ },
+ {
+ "date": "2026-06-16",
+ "title": "Embed wizard now reachable from every agent and avatar page",
+ "summary": "The full-featured embed wizard (/embed) is now one click away from any agent detail page, avatar page, and the dashboard agents list. Open it to configure size, environment, mode, and controls, see a live preview, and copy platform-specific instructions for plain HTML, React, WordPress, Webflow, or Shopify. When the wizard is opened from an agent page it pre-loads the agent and defaults to chat mode.",
+ "tags": [
+ "improvement"
+ ],
+ "link": "/embed"
}
]
}
diff --git a/pages/avatar-page.html b/pages/avatar-page.html
index 8375b4049..c19f01fb0 100644
--- a/pages/avatar-page.html
+++ b/pages/avatar-page.html
@@ -1396,6 +1396,25 @@
color: var(--success);
border-color: var(--success);
}
+ .av-embed-wizard {
+ display: inline-flex;
+ align-items: center;
+ gap: 4px;
+ padding: 5px 12px;
+ font-size: 12px;
+ font-weight: 500;
+ color: var(--text);
+ background: var(--panel-2);
+ border: 1px solid var(--border);
+ border-radius: 6px;
+ text-decoration: none;
+ white-space: nowrap;
+ transition: border-color 0.15s, background 0.15s;
+ }
+ .av-embed-wizard:hover {
+ border-color: var(--border-2);
+ background: var(--panel-3);
+ }
/* ── Related row ─────────────────────────────────── */
.av-related {
diff --git a/pages/marketplace.html b/pages/marketplace.html
index 4b6ad9453..05a7a3f08 100644
--- a/pages/marketplace.html
+++ b/pages/marketplace.html
@@ -3095,13 +3095,19 @@
</div>
<div data-panel="embed" class="market-panel">
- <h2>Embed this Agent</h2>
+ <div style="display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:4px">
+ <h2 style="margin:0">Embed this Agent</h2>
+ <a id="d-embed-wizard-link" href="/embed" class="btn-secondary" style="font-size:12px;padding:5px 12px;white-space:nowrap" target="_blank" rel="noopener">
+ Configure in wizard ↗
+ </a>
+ </div>
<p
class="market-prose"
style="font-size: 13px; color: var(--ink-dim); margin: 0 0 18px"
>
Drop the agent anywhere — as a web component, iframe, or direct
- link.
+ link. Use the wizard for a live preview, size controls, and
+ platform-specific instructions.
</p>
<div class="d-embed-section">
<div class="d-embed-label">
diff --git a/src/avatar-page.js b/src/avatar-page.js
index f905a6a95..e6f214bf7 100644
--- a/src/avatar-page.js
+++ b/src/avatar-page.js
@@ -617,7 +617,12 @@ function renderEmbedPanel(glbUrl) {
allow="autoplay; xr-spatial-tracking"
></iframe>`;
const linkSnippet = fullUrl;
+ const wizardUrl = `/embed?${new URLSearchParams({ avatar: avatar.id || avatarId })}`;
return `
+ <div style="display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px">
+ <p class="av-embed-intro" style="margin:0;font-size:13px;color:var(--ink-dim)">Drop this avatar on any website. Use the wizard for a live preview and platform instructions.</p>
+ <a href="${esc(wizardUrl)}" class="av-embed-wizard" target="_blank" rel="noopener">Configure in wizard ↗</a>
+ </div>
<div class="av-embed-section">
<div class="av-embed-label">
<span>Web component</span>
diff --git a/src/dashboard-next/pages/agents.js b/src/dashboard-next/pages/agents.js
index 985c7a095..d0956cc6e 100644
--- a/src/dashboard-next/pages/agents.js
+++ b/src/dashboard-next/pages/agents.js
@@ -476,6 +476,7 @@ function agentCard(a, avatars) {
<div class="dn-agent-actions-primary">
${a.avatar_id ? `<a class="dn-btn" href="/avatars/${encodeURIComponent(a.avatar_id)}" target="_blank" rel="noopener" style="padding:5px 10px;font-size:12px">Live page ↗</a>` : ''}
<a class="dn-btn" href="/app?agent=${encodeURIComponent(a.id)}" target="_blank" rel="noopener" style="padding:5px 10px;font-size:12px">3D Studio ↗</a>
+ <a class="dn-btn" href="/embed?avatar=${encodeURIComponent(a.id)}&mode=chat" target="_blank" rel="noopener" style="padding:5px 10px;font-size:12px">Embed wizard ↗</a>
</div>
<div class="dn-agent-actions-secondary">
<button class="dn-btn ghost" data-action="edit-agent" data-id="${esc(a.id)}" style="padding:5px 10px;font-size:12px">Edit</button>
diff --git a/src/editor/embed-editor.js b/src/editor/embed-editor.js
index 11e815681..96b4deb40 100644
--- a/src/editor/embed-editor.js
+++ b/src/editor/embed-editor.js
@@ -190,6 +190,8 @@ function mountEmbedEditor(root, opts = {}) {
// Resolve name + thumbnail for a deep-linked or pasted ID so the trigger
// shows a real chip instead of a bare UUID. Token guards against races.
+ // Tries avatar first; falls back to agent (marketplace) so chat-mode deep
+ // links from agent pages show the agent name/thumbnail instead of a bare ID.
let _metaToken = 0;
async function resolveAvatarMeta(id) {
const token = ++_metaToken;
@@ -202,14 +204,28 @@ function mountEmbedEditor(root, opts = {}) {
}
try {
const res = await fetch(`/api/avatars/${encodeURIComponent(id)}`, { credentials: 'include' });
+ if (res.ok) {
+ const { avatar } = await res.json();
+ if (token !== _metaToken || cfg.avatar !== id || !avatar) return;
+ cfg.avatarMeta = { name: avatar.name, thumbnail_url: avatar.thumbnail_url };
+ renderTrigger();
+ return;
+ }
+ } catch { /* fall through to agent lookup */ }
+ // Avatar lookup failed — try resolving as an agent identity
+ try {
+ const res = await fetch(`/api/marketplace/agents/${encodeURIComponent(id)}`, { credentials: 'include' });
if (!res.ok) return;
- const { avatar } = await res.json();
- if (token !== _metaToken || cfg.avatar !== id || !avatar) return;
- cfg.avatarMeta = { name: avatar.name, thumbnail_url: avatar.thumbnail_url };
+ const { agent } = await res.json();
+ if (token !== _metaToken || cfg.avatar !== id || !agent) return;
+ cfg.avatarMeta = { name: agent.name, thumbnail_url: agent.avatar_thumbnail_url || null };
+ // Agent IDs default to chat mode if no mode was pre-set
+ if (!opts.mode && cfg.mode !== 'chat') {
+ cfg.mode = 'chat';
+ sync(); // updates mode buttons, snippet, and preview
+ }
renderTrigger();
- } catch {
- // Non-fatal: the chip just falls back to showing the raw ID.
- }
+ } catch { /* Non-fatal: chip falls back to the raw ID */ }
}
// Controls (walking only)
diff --git a/src/marketplace.js b/src/marketplace.js
index 3982d0b45..880ebbcb4 100644
--- a/src/marketplace.js
+++ b/src/marketplace.js
@@ -4782,6 +4782,13 @@ function renderEmbedTab(a) {
if (wc) wc.textContent = wcSnippet;
if (iframe) iframe.textContent = iframeSnippet;
if (link) link.textContent = embedPageUrl;
+
+ // "Configure in wizard" — pre-loads this agent into the full embed editor
+ const wizardLink = $('d-embed-wizard-link');
+ if (wizardLink) {
+ const p = new URLSearchParams({ avatar: agentId, mode: 'chat' });
+ wizardLink.href = `/embed?${p}`;
+ }
}
function renderTokenCard(a) {