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: post-create redirect to editor; mount 3D body on public profile

nirholaseb25abdf3d69
diff --git a/agent-home.html b/agent-home.html
index eb56467c7..0f0fac6aa 100644
--- a/agent-home.html
+++ b/agent-home.html
@@ -18,6 +18,10 @@
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap"
rel="stylesheet"
/>
+ <script
+ type="module"
+ src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"
+ ></script>
<meta property="og:type" content="website" />
<meta property="og:title" content="Agent" id="og-title" />
@@ -131,9 +135,72 @@
color: rgba(255, 255, 255, 0.8);
}
+ .agent-stage {
+ max-width: 720px;
+ margin: 2.5rem auto 0;
+ padding: 0 1rem;
+ }
+
+ .agent-stage-viewer {
+ width: 100%;
+ height: clamp(360px, 55vh, 560px);
+ background: radial-gradient(
+ ellipse at center,
+ rgba(255, 215, 0, 0.04) 0%,
+ transparent 70%
+ );
+ border: 1px solid rgba(255, 255, 255, 0.06);
+ border-radius: 12px;
+ --poster-color: transparent;
+ }
+
+ .agent-stage-cta-row {
+ display: flex;
+ gap: 0.618rem;
+ justify-content: center;
+ margin-top: 1.25rem;
+ flex-wrap: wrap;
+ }
+
+ .agent-stage-cta {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.4em;
+ padding: 0.6em 1.1em;
+ border-radius: 8px;
+ font-size: 0.85rem;
+ font-family: inherit;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ border: 1px solid transparent;
+ transition:
+ background 0.15s,
+ border-color 0.15s,
+ color 0.15s;
+ }
+
+ .agent-stage-cta--primary {
+ background: rgba(255, 215, 0, 0.92);
+ color: #000;
+ }
+ .agent-stage-cta--primary:hover {
+ background: #ffd700;
+ }
+
+ .agent-stage-cta--ghost {
+ background: transparent;
+ color: rgba(255, 255, 255, 0.7);
+ border-color: rgba(255, 255, 255, 0.18);
+ }
+ .agent-stage-cta--ghost:hover {
+ color: #fff;
+ border-color: rgba(255, 255, 255, 0.4);
+ }
+
.agent-page-hero {
max-width: 520px;
- margin: 4rem auto 2rem;
+ margin: 2rem auto 2rem;
padding: 0 1rem;
text-align: center;
}
@@ -338,6 +405,34 @@
</header>
<main id="main">
+ <section class="agent-stage" aria-label="Agent body">
+ <model-viewer
+ id="agent-stage-viewer"
+ class="agent-stage-viewer"
+ camera-controls
+ auto-rotate
+ rotation-per-second="20deg"
+ exposure="0.9"
+ shadow-intensity="0.6"
+ interaction-prompt="none"
+ ar
+ ar-modes="webxr scene-viewer quick-look"
+ alt="Agent avatar"
+ ></model-viewer>
+ <div class="agent-stage-cta-row" id="agent-stage-ctas" hidden>
+ <a
+ class="agent-stage-cta agent-stage-cta--primary"
+ id="agent-stage-edit"
+ href="#"
+ hidden
+ >Open in editor →</a
+ >
+ <button class="agent-stage-cta agent-stage-cta--ghost" id="agent-stage-share">
+ Copy share link
+ </button>
+ </div>
+ </section>
+
<div class="agent-page-hero">
<h1 class="agent-page-title" id="page-agent-name">Agent</h1>
<p class="agent-page-subtitle" id="page-agent-desc">
@@ -455,6 +550,8 @@
document.getElementById('page-agent-desc').textContent = identity.description;
}
+ mountStage(identity);
+
const container = document.getElementById('agent-home-container');
container.innerHTML = '';
container.setAttribute('aria-busy', 'false');
@@ -551,6 +648,59 @@
window.dispatchEvent(new CustomEvent('agent:ready'));
}
+ async function mountStage(identity) {
+ const viewer = document.getElementById('agent-stage-viewer');
+ const ctaRow = document.getElementById('agent-stage-ctas');
+ const editLink = document.getElementById('agent-stage-edit');
+ const shareBtn = document.getElementById('agent-stage-share');
+ const agentUrl = `${location.origin}/agent/${identity.id}`;
+
+ ctaRow.hidden = false;
+
+ shareBtn.addEventListener('click', async () => {
+ try {
+ await navigator.clipboard.writeText(agentUrl);
+ const original = shareBtn.textContent;
+ shareBtn.textContent = 'Copied ✓';
+ setTimeout(() => {
+ shareBtn.textContent = original;
+ }, 1400);
+ } catch {}
+ });
+
+ try {
+ const me = await fetch('/api/auth/me', { credentials: 'include' });
+ if (me.ok) {
+ editLink.href = `/app?agent=${identity.id}`;
+ editLink.hidden = false;
+ }
+ } catch {}
+
+ const glbUrl = await resolveAgentGlb(identity);
+ if (glbUrl) viewer.src = glbUrl;
+ }
+
+ async function resolveAgentGlb(identity) {
+ try {
+ const agentResp = await fetch(`/api/agents/${identity.id}`, {
+ credentials: 'include',
+ });
+ if (!agentResp.ok) return null;
+ const { agent } = await agentResp.json();
+ const avatarId = agent?.avatar_id || identity.avatarId;
+ if (!avatarId) return null;
+
+ const avResp = await fetch(`/api/avatars/${avatarId}`, {
+ credentials: 'include',
+ });
+ if (!avResp.ok) return null;
+ const { avatar } = await avResp.json();
+ return avatar?.url || null;
+ } catch {
+ return null;
+ }
+ }
+
function populateUnfurlMeta(identity) {
const id = identity?.id;
if (!id) return;
diff --git a/app.html b/app.html
index 07057c9b6..89ad89317 100644
--- a/app.html
+++ b/app.html
@@ -110,6 +110,32 @@
</svg>
<span>Make this a widget</span>
</a>
+ <a
+ class="view-public-profile-btn"
+ id="view-public-profile-btn"
+ hidden
+ target="_blank"
+ rel="noopener"
+ title="Open this agent's public profile in a new tab"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="14"
+ height="14"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ aria-hidden="true"
+ >
+ <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
+ <polyline points="15 3 21 3 21 9" />
+ <line x1="10" y1="14" x2="21" y2="3" />
+ </svg>
+ <span>Public profile</span>
+ </a>
<a href="/dashboard" class="nav-dashboard">Dashboard</a>
<a href="/login" class="nav-sign-in" id="nav-sign-in">Sign in</a>
</nav>
diff --git a/AUTO_DRIVE_REPORT.md b/docs/AUTO_DRIVE_REPORT.md
similarity index 100%
rename from AUTO_DRIVE_REPORT.md
rename to docs/AUTO_DRIVE_REPORT.md
diff --git a/home.html b/home.html
index d2b09ec29..c264bfd43 100644
--- a/home.html
+++ b/home.html
@@ -307,14 +307,14 @@
// Auth-aware nav CTA
(function () {
try {
- const token =
- localStorage.getItem('auth_token') || sessionStorage.getItem('auth_token');
- if (token) {
- const cta = document.getElementById('home-nav-cta');
- if (cta) {
- cta.textContent = 'Dashboard';
- cta.href = '/dashboard';
- }
+ const raw = localStorage.getItem('3dagent:auth-hint');
+ if (!raw) return;
+ const { authed } = JSON.parse(raw);
+ if (!authed) return;
+ const cta = document.getElementById('home-nav-cta');
+ if (cta) {
+ cta.textContent = 'Dashboard';
+ cta.href = '/dashboard';
}
} catch (_) {}
})();
diff --git a/index.html b/index.html
index d7c290f5b..2eb81916f 100644
--- a/index.html
+++ b/index.html
@@ -489,11 +489,14 @@
</style>
</head>
<body class="features-page">
+ <a href="#main-content" class="skip-link">Skip to main content</a>
<header>
<h1>
- <a href="/"><span class="wordmark-dot" aria-hidden="true"></span>3D Agent</a>
+ <a href="/" aria-label="3D Agent home"
+ ><span class="wordmark-dot" aria-hidden="true"></span>3D Agent</a
+ >
</h1>
- <nav class="features-nav">
+ <nav class="features-nav" aria-label="Primary">
<a href="/app">Viewer</a>
<a href="/explore">Explore</a>
<a href="/features">Features</a>
@@ -504,7 +507,7 @@
</nav>
</header>
- <main class="features-main">
+ <main id="main-content" class="features-main">
<!-- ── Hero ── -->
<section class="hero" id="hero">
<div class="hero-bg" aria-hidden="true">
diff --git a/tmp-http-sweep.mjs b/scripts/tmp-http-sweep.mjs
similarity index 100%
rename from tmp-http-sweep.mjs
rename to scripts/tmp-http-sweep.mjs
diff --git a/tmp-page-sweep.mjs b/scripts/tmp-page-sweep.mjs
similarity index 100%
rename from tmp-page-sweep.mjs
rename to scripts/tmp-page-sweep.mjs
diff --git a/src/app.js b/src/app.js
index 818bcfb3e..e8be0072d 100644
--- a/src/app.js
+++ b/src/app.js
@@ -706,6 +706,13 @@ class App {
} else {
this._maybeResumeOrLoad(this.options);
}
+
+ const publicLink = document.getElementById('view-public-profile-btn');
+ if (publicLink) {
+ publicLink.href = `/agent/${agentId}`;
+ publicLink.hidden = false;
+ }
+
this._initAgentSystem();
this._initWidgetBridge();
}
diff --git a/src/create.js b/src/create.js
index 78c30a929..810c37bfa 100644
--- a/src/create.js
+++ b/src/create.js
@@ -86,7 +86,7 @@ async function saveAndRedirect(blob, meta = {}) {
try {
const avatar = await saveRemoteGlbToAccount(blob, meta);
const agent = await attachAvatarToAgent(avatar.id, meta.name);
- window.location.href = '/agent/' + agent.id;
+ window.location.href = '/app?agent=' + agent.id;
} catch (err) {
if (err.code === 'not_signed_in') {
sessionStorage.setItem('login_redirect', '/create');
diff --git a/style.css b/style.css
index 26a6e21df..0335fc387 100644
--- a/style.css
+++ b/style.css
@@ -2751,6 +2751,48 @@ footer .separator {
}
}
+.view-public-profile-btn {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-xs);
+ padding: var(--space-sm) var(--space-lg);
+ background: rgba(255, 215, 0, 0.1);
+ border: 1px solid rgba(255, 215, 0, 0.32);
+ border-radius: var(--radius-lg);
+ color: rgba(255, 255, 255, 0.9);
+ font-family: inherit;
+ font-size: var(--text-sm);
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ transition: all 0.25s ease;
+ letter-spacing: 0.02em;
+}
+.view-public-profile-btn:hover {
+ background: rgba(255, 215, 0, 0.2);
+ color: #fff;
+ border-color: rgba(255, 215, 0, 0.6);
+}
+.view-public-profile-btn:focus-visible {
+ outline: 2px solid rgba(255, 215, 0, 0.7);
+ outline-offset: 2px;
+}
+.view-public-profile-btn[hidden] {
+ display: none;
+}
+.view-public-profile-btn svg {
+ width: 1em;
+ height: 1em;
+}
+@media screen and (max-width: 700px) {
+ .view-public-profile-btn span {
+ display: none;
+ }
+ .view-public-profile-btn {
+ padding: var(--space-xs) var(--space-sm);
+ }
+}
+
/******************************************************************************
* Avatar Creator Modal
*/