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.

add xspace-agent/public/admin.html

oversteppingd0cc3566f613
diff --git a/xspace-agent/public/admin.html b/xspace-agent/public/admin.html
new file mode 100644
index 000000000..7bf423201
--- /dev/null
+++ b/xspace-agent/public/admin.html
@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>X Space Agent — Admin</title>
+ <link rel="icon" href="/assets/logo.svg" type="image/svg+xml">
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
+ <link rel="stylesheet" href="/css/admin.css">
+ <link rel="stylesheet" href="/css/components.css">
+ <link rel="stylesheet" href="/css/responsive.css">
+</head>
+<body>
+ <div class="app">
+ <!-- Header -->
+ <header class="header">
+ <div class="header-left">
+ <div class="header-logo">
+ <img src="/assets/logo.svg" alt="Logo" width="28" height="28">
+ <span>X Space Agent</span>
+ <span class="version">v1.0</span>
+ </div>
+ </div>
+ <div class="header-right">
+ <a href="/" style="font-size:12px;color:#888;text-decoration:none;padding:4px 10px;border:1px solid #2a2a34;border-radius:6px;margin-right:4px;">Home</a>
+ <a href="/bob" style="font-size:12px;color:#888;text-decoration:none;padding:4px 10px;border:1px solid #2a2a34;border-radius:6px;margin-right:4px;">Bob</a>
+ <a href="/alice" style="font-size:12px;color:#888;text-decoration:none;padding:4px 10px;border:1px solid #2a2a34;border-radius:6px;margin-right:4px;">Alice</a>
+ <a href="/builder" style="font-size:12px;color:#888;text-decoration:none;padding:4px 10px;border:1px solid #2a2a34;border-radius:6px;margin-right:4px;">Builder</a>
+ <span class="badge badge-neutral" id="agent-status-badge">Offline</span>
+ <div class="connection-badge">
+ <span class="dot" id="conn-dot"></span>
+ <span id="conn-text">Connecting...</span>
+ </div>
+ <button class="sign-out-btn" id="sign-out-btn" style="display:none;background:none;border:1px solid #3a3a4a;color:#aaa;padding:4px 12px;border-radius:6px;font-size:12px;cursor:pointer;margin-left:8px;font-family:inherit;">Sign Out</button>
+ </div>
+ </header>
+
+ <!-- Sidebar -->
+ <nav class="sidebar">
+ <div class="nav-section">
+ <div class="nav-section-label">Main</div>
+ <a class="nav-item active" data-route="#/" href="#/">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-4 0a1 1 0 01-1-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 01-1 1h-2z"/>
+ </svg>
+ Dashboard
+ </a>
+ <a class="nav-item" data-route="#/agents" href="#/agents">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
+ </svg>
+ Agents
+ </a>
+ <a class="nav-item" data-route="#/knowledge" href="#/knowledge">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"/>
+ </svg>
+ Knowledge
+ </a>
+ </div>
+
+ <div class="nav-section">
+ <div class="nav-section-label">System</div>
+ <a class="nav-item" data-route="#/history" href="#/history">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
+ </svg>
+ History
+ </a>
+ <a class="nav-item" data-route="#/settings" href="#/settings">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.573-1.066z"/>
+ <path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
+ </svg>
+ Settings
+ </a>
+ </div>
+ </nav>
+
+ <!-- Main Content -->
+ <main class="main" id="main-content">
+ <!-- Pages render here -->
+ </main>
+
+ <!-- Bottom Nav (mobile) -->
+ <div class="bottom-nav">
+ <div class="bottom-nav-items">
+ <a class="bottom-nav-item active" data-route="#/" href="#/">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-4 0a1 1 0 01-1-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 01-1 1h-2z"/>
+ </svg>
+ Home
+ </a>
+ <a class="bottom-nav-item" data-route="#/agents" href="#/agents">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
+ </svg>
+ Agents
+ </a>
+ <a class="bottom-nav-item" data-route="#/history" href="#/history">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
+ </svg>
+ History
+ </a>
+ <a class="bottom-nav-item" data-route="#/settings" href="#/settings">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
+ <path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.573-1.066z"/>
+ <path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
+ </svg>
+ Settings
+ </a>
+ </div>
+ </div>
+ </div>
+
+ <script src="/socket.io/socket.io.js"></script>
+ <script>
+ // Auth gate: if ADMIN_API_KEY is enforced, redirect to login unless we have a key
+ (function() {
+ var apiKey = sessionStorage.getItem('apiKey')
+ // Try fetching /state to check if auth is required
+ fetch('/state', apiKey ? { headers: { 'Authorization': 'Bearer ' + apiKey } } : {})
+ .then(function(res) {
+ if (res.status === 401) {
+ sessionStorage.removeItem('apiKey')
+ window.location.href = '/login.html?error=invalid'
+ }
+ })
+ .catch(function() {})
+ })()
+ </script>
+ <script type="module" src="/js/admin.js"></script>
+</body>
+</html>
+
+