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(validation-ui): add URL parameter handling for agent and chain inputs fix(pumpfun-ws-feed): change error logging from error to warning refactor(home): remove hydrate menu item from navigation feat(index): enhance feature descriptions for 3D Viewer and LLM Agent Runtime

nirholas99a0c3b1904e
diff --git a/api/_lib/migrations/2026-05-01-dca-and-subscriptions.sql b/api/_lib/migrations/2026-05-01-dca-and-subscriptions.sql
new file mode 100644
index 000000000..7f51faf66
--- /dev/null
+++ b/api/_lib/migrations/2026-05-01-dca-and-subscriptions.sql
@@ -0,0 +1,100 @@
+-- Migration: DCA strategies, subscription schedules, and pump.fun signals.
+-- Apply: psql "$DATABASE_URL" -f api/_lib/migrations/2026-05-01-dca-and-subscriptions.sql
+-- Idempotent.
+
+begin;
+
+-- ── agent_subscriptions — recurring on-chain payment schedules ──────────────
+create table if not exists agent_subscriptions (
+ id uuid primary key default gen_random_uuid(),
+ user_id uuid not null references users(id) on delete cascade,
+ agent_id uuid not null references agent_identities(id) on delete cascade,
+ delegation_id uuid not null references agent_delegations(id) on delete cascade,
+ period_seconds integer not null,
+ amount_per_period text not null,
+ next_charge_at timestamptz not null,
+ last_charge_at timestamptz,
+ status text not null default 'active',
+ last_error text,
+ created_at timestamptz not null default now(),
+ canceled_at timestamptz,
+
+ constraint agent_subscriptions_status_check
+ check (status in ('active', 'canceled', 'paused')),
+ constraint agent_subscriptions_period_seconds_check
+ check (period_seconds > 0)
+);
+
+create index if not exists idx_subscriptions_due on agent_subscriptions(next_charge_at) where status = 'active';
+create index if not exists idx_subscriptions_user on agent_subscriptions(user_id);
+create index if not exists idx_subscriptions_agent on agent_subscriptions(agent_id);
+
+-- ── dca_strategies — DCA schedule configs ───────────────────────────────────
+create table if not exists dca_strategies (
+ id uuid primary key default gen_random_uuid(),
+ agent_id uuid not null,
+ delegation_id uuid not null,
+ chain_id integer not null default 84532,
+ token_in text not null,
+ token_out text not null,
+ token_out_symbol text not null default 'WETH',
+ amount_per_execution text not null,
+ period_seconds integer not null,
+ slippage_bps integer not null default 50,
+ status text not null default 'active',
+ next_execution_at timestamptz not null,
+ last_execution_at timestamptz,
+ created_at timestamptz not null default now(),
+ cancelled_at timestamptz,
+
+ constraint dca_strategies_status_check
+ check (status in ('active', 'paused', 'expired', 'cancelled')),
+ constraint dca_strategies_chain_id_check
+ check (chain_id > 0),
+ constraint dca_strategies_slippage_check
+ check (slippage_bps between 1 and 500),
+ constraint dca_strategies_period_check
+ check (period_seconds in (86400, 604800))
+);
+
+create index if not exists idx_dca_strategies_agent on dca_strategies(agent_id);
+create index if not exists idx_dca_strategies_next_exec on dca_strategies(next_execution_at) where status = 'active';
+
+-- ── dca_executions — per-cron swap attempt log ───────────────────────────────
+create table if not exists dca_executions (
+ id uuid primary key default gen_random_uuid(),
+ strategy_id uuid not null references dca_strategies(id) on delete cascade,
+ chain_id integer not null,
+ tx_hash text,
+ amount_in text not null,
+ quote_amount_out text,
+ amount_out text,
+ slippage_bps_used integer,
+ quote_divergence_bps integer,
+ status text not null default 'pending',
+ error text,
+ executed_at timestamptz not null default now(),
+
+ constraint dca_executions_status_check
+ check (status in ('pending', 'success', 'failed', 'aborted'))
+);
+
+create index if not exists idx_dca_executions_strategy on dca_executions(strategy_id);
+
+-- ── pumpfun_signals — off-chain pump.fun activity signals ────────────────────
+create table if not exists pumpfun_signals (
+ id bigserial primary key,
+ wallet text not null,
+ agent_asset text,
+ kind text not null,
+ weight real not null default 0,
+ payload jsonb not null default '{}'::jsonb,
+ tx_signature text unique,
+ seen_at timestamptz not null default now()
+);
+
+create index if not exists pumpfun_signals_wallet on pumpfun_signals(wallet, seen_at desc);
+create index if not exists pumpfun_signals_agent on pumpfun_signals(agent_asset, seen_at desc) where agent_asset is not null;
+create index if not exists pumpfun_signals_kind on pumpfun_signals(kind, seen_at desc);
+
+commit;
diff --git a/api/_lib/pumpfun-ws-feed.js b/api/_lib/pumpfun-ws-feed.js
index a22216790..bba1549b8 100644
--- a/api/_lib/pumpfun-ws-feed.js
+++ b/api/_lib/pumpfun-ws-feed.js
@@ -101,7 +101,7 @@ export function connectPumpFunFeed({ onEvent, signal, kind = 'all' }) {
}
});
- ws.on('error', (err) => console.error('[pumpportal-ws] error:', err?.message));
+ ws.on('error', (err) => console.warn('[pumpportal-ws] error:', err?.message));
ws.on('close', () => {
if (!active || reconnects >= MAX_RECONNECTS) return;
diff --git a/api/agents/solana/_handlers.js b/api/agents/solana/_handlers.js
index 66475c6f6..18ae713c6 100644
--- a/api/agents/solana/_handlers.js
+++ b/api/agents/solana/_handlers.js
@@ -462,7 +462,10 @@ export const handleReputation = wrap(async (req, res) => {
limit 5
`;
- const pumpfunRows = await sql`select kind, count(*)::int as n, coalesce(sum(weight), 0)::float as w from pumpfun_signals where agent_asset = ${asset} group by kind`;
+ let pumpfunRows = [];
+ try {
+ pumpfunRows = await sql`select kind, count(*)::int as n, coalesce(sum(weight), 0)::float as w from pumpfun_signals where agent_asset = ${asset} group by kind`;
+ } catch {}
const pumpfunByKind = {};
let pumpfunTotal = 0, pumpfunWeight = 0;
for (const r of pumpfunRows) {
diff --git a/api/cron/[name].js b/api/cron/[name].js
index 7c5f08dff..b3b400070 100644
--- a/api/cron/[name].js
+++ b/api/cron/[name].js
@@ -1268,6 +1268,10 @@ const DCA_RELAYER_TIMEOUT_MS = 30_000;
const DCA_RELAYER_MAX_RETRIES = 1;
const DCA_RELAYER_RETRY_BACKOFF_MS = 1_500;
+function isTableMissing(err) {
+ return String(err?.message || '').includes('does not exist');
+}
+
function dcaLog(level, event, fields = {}) {
const line = JSON.stringify({
level,
@@ -1538,6 +1542,10 @@ async function handleRunDca(req, res) {
LIMIT 50
`;
} catch (err) {
+ if (isTableMissing(err)) {
+ dcaLog('info', 'tick_skip', { run_id: runId, reason: 'dca_strategies table not yet created' });
+ return json(res, 200, { ok: true, skipped: true, reason: 'table_not_ready' });
+ }
dcaLog('error', 'fetch_due_failed', { run_id: runId, message: err?.message });
throw err;
}
@@ -1928,6 +1936,10 @@ async function handleRunSubscriptions(req, res) {
AND s.next_charge_at <= NOW()
`;
} catch (err) {
+ if (isTableMissing(err)) {
+ subLog('subscription_cron.skip', { runId, reason: 'agent_subscriptions table not yet created' });
+ return json(res, 200, { ok: true, skipped: true, reason: 'table_not_ready' });
+ }
subLogError('subscription_cron.select_failed', { runId, message: err.message });
return error(res, 500, 'internal_error', 'failed to load subscriptions');
}
diff --git a/home.html b/home.html
index 54fae99dc..beea3c96b 100644
--- a/home.html
+++ b/home.html
@@ -96,12 +96,6 @@
><span class="nav-mi-sub">Khronos spec check</span></a
>
</li>
- <li role="none">
- <a href="/hydrate" role="menuitem"
- ><span class="nav-mi-title">Hydrate</span
- ><span class="nav-mi-sub">Import on-chain agent</span></a
- >
- </li>
</ul>
</li>
<li class="nav-item nav-has-menu" role="none">
diff --git a/public/features/index.html b/public/features/index.html
index 3b3d09a0a..e32e55167 100644
--- a/public/features/index.html
+++ b/public/features/index.html
@@ -411,31 +411,100 @@
<h3 id="outro-title">Everything an agent needs.</h3>
<ul class="outro-grid">
<li>
- <h4>Identity Registry</h4>
+ <h4>3D Viewer</h4>
+ <p>
+ WebGL 2.0 via three.js r176. Drag-drop any <code>.glb</code> — instant
+ rendering with Draco, KTX2, Meshopt, HDR environments, PBR materials,
+ and Khronos-spec glTF validation.
+ </p>
+ </li>
+ <li>
+ <h4>LLM Agent Runtime</h4>
+ <p>
+ Claude-powered brain with a structured tool-loop — up to 8 iterations
+ per turn. Built-in tools: <code>wave</code>, <code>lookAt</code>,
+ <code>play_clip</code>, <code>setExpression</code>, <code>speak</code>,
+ <code>remember</code>.
+ </p>
+ </li>
+ <li>
+ <h4>Empathy Layer</h4>
+ <p>
+ Six emotions (celebration, concern, curiosity, empathy, patience,
+ neutral) blended continuously via morph-target weights. Reacts to
+ protocol events — not a finite-state machine.
+ </p>
+ </li>
+ <li>
+ <h4>Voice — TTS &amp; STT</h4>
+ <p>
+ Web Speech API out of the box. ElevenLabs integration for
+ production-quality voice cloning. Microphone input with live transcript
+ streamed back to the agent.
+ </p>
+ </li>
+ <li>
+ <h4>Widget Studio</h4>
<p>
- ERC-721 based. Each agent has an <code>agentId</code> and a URI that
- resolves to its registration JSON.
+ Five widget types: turntable, animation gallery, talking agent,
+ ERC-8004 passport card, hotspot tour. Point-and-click builder at
+ <code>/studio</code> — copy an iframe snippet and embed anywhere.
</p>
</li>
<li>
- <h4>Reputation Registry</h4>
+ <h4><code>&lt;agent-3d&gt;</code> Web Component</h4>
<p>
- Signed feedback on quality, uptime, and response time. On-chain
- composability + off-chain aggregation.
+ Drop one script tag and one element — no framework needed. Versioned
+ CDN bundles, lazy-boot via IntersectionObserver, postMessage API for
+ host-page communication, Open Graph + oEmbed support.
</p>
</li>
<li>
- <h4>Validation Registry</h4>
+ <h4>Composable Skills</h4>
+ <p>
+ Self-contained skill bundles (SKILL.md + tools.json + handlers.js)
+ installed from IPFS, Arweave, or HTTP. Three trust modes: any,
+ owned-only, whitelist. Skills can define new LLM tools.
+ </p>
+ </li>
+ <li>
+ <h4>Persistent Memory</h4>
+ <p>
+ Frontmatter-<code>.md</code> memory files indexed by a <code>MEMORY.md</code>
+ manifest. Four storage modes: local, IPFS, encrypted-IPFS, none.
+ High-salience entries injected into the system prompt each turn.
+ </p>
+ </li>
+ <li>
+ <h4>MCP Server</h4>
+ <p>
+ Model Context Protocol 2025-06-18 over HTTP, JSON-RPC 2.0. Listed on
+ the official MCP Registry as <code>io.github.nirholas/three.ws</code>.
+ External AI systems can drive avatars and call tools programmatically.
+ </p>
+ </li>
+ <li>
+ <h4>OAuth 2.1 + API Keys</h4>
+ <p>
+ Full RFC 6749 + PKCE authorization server with dynamic client
+ registration, token revocation, and introspection. Developer API keys
+ with scope and expiry for server-to-server integrations.
+ </p>
+ </li>
+ <li>
+ <h4>Identity Registry</h4>
<p>
- Stake-secured re-execution, zkML proofs, TEE attestations. Trust
- proportional to value at risk.
+ ERC-721 based. Each agent has an <code>agentId</code>, delegated signer
+ (EIP-712), and an IPFS-pinned manifest. Discoverable by any A2A or MCP
+ client across 20+ EVM chains and Solana.
</p>
</li>
<li>
- <h4>Memory + skills</h4>
+ <h4>Reputation &amp; Validation</h4>
<p>
- Frontmatter-`.md` memory, recursive skill bundles, signed action
- history. Portable across hosts.
+ Signed on-chain feedback scores via <code>ReputationRegistry.sol</code>.
+ Validator attestations (glTF audits, security reviews, zkML proofs) via
+ <code>ValidationRegistry.sol</code>. Trust proportional to value at risk.
</p>
</li>
</ul>
diff --git a/public/reputation/index.html b/public/reputation/index.html
index f7d3f69b4..50c69e577 100644
--- a/public/reputation/index.html
+++ b/public/reputation/index.html
@@ -400,6 +400,6 @@
}
}
</script>
- <script type="module" src="./reputation.js"></script>
+ <script type="module" src="/reputation/reputation.js"></script>
</body>
</html>
diff --git a/public/strategy-lab.html b/public/strategy-lab.html
index b15eca751..988fb7f37 100644
--- a/public/strategy-lab.html
+++ b/public/strategy-lab.html
@@ -241,15 +241,15 @@
// ── Agent + wallet bootstrap ───────────────────────────────────────
async function loadAgents() {
const r = await fetch('/api/agents', { credentials: 'include' }).then((r) => r.json()).catch(() => null);
- if (!r?.data) {
+ if (!r?.agents) {
agentSel.innerHTML = '<option value="">— sign in to load agents —</option>';
return;
}
agentSel.innerHTML = '<option value="">— select agent —</option>' +
- r.data.map((a) => `<option value="${a.id}">${escapeHtml(a.name || a.id)}</option>`).join('');
+ r.agents.map((a) => `<option value="${a.id}">${escapeHtml(a.name || a.id)}</option>`).join('');
// Auto-select last used.
const saved = localStorage.getItem('strategy-lab:agentId');
- if (saved && r.data.some((a) => a.id === saved)) { agentSel.value = saved; await onAgentChange(); }
+ if (saved && r.agents.some((a) => a.id === saved)) { agentSel.value = saved; await onAgentChange(); }
}
function escapeHtml(s) { return String(s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]); }
diff --git a/public/validation/index.html b/public/validation/index.html
index d4e81403e..e0dcf6d23 100644
--- a/public/validation/index.html
+++ b/public/validation/index.html
@@ -269,6 +269,52 @@
border-radius: 14px;
color: #888;
}
+ .empty-title {
+ font-size: 15px;
+ font-weight: 600;
+ color: #aaa;
+ margin-bottom: 8px;
+ }
+ .empty-sub {
+ font-size: 13px;
+ margin-bottom: 18px;
+ }
+ .how-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 12px;
+ margin-bottom: 28px;
+ }
+ .how-card {
+ background: var(--panel);
+ border: 1px solid var(--border);
+ border-radius: 10px;
+ padding: 14px 16px;
+ }
+ .how-card-icon {
+ font-size: 18px;
+ margin-bottom: 8px;
+ }
+ .how-card-title {
+ font-size: 13px;
+ font-weight: 600;
+ color: #ddd;
+ margin-bottom: 4px;
+ }
+ .how-card-desc {
+ font-size: 12px;
+ color: #888;
+ line-height: 1.5;
+ }
+ .record-notes {
+ font-size: 13px;
+ color: #aaa;
+ margin: 8px 0 4px;
+ padding: 8px 10px;
+ background: rgba(106, 92, 255, 0.06);
+ border-left: 2px solid var(--accent);
+ border-radius: 0 6px 6px 0;
+ }
.modal-overlay {
position: fixed;
inset: 0;
@@ -411,21 +457,39 @@
<main id="main">
<h1>Validation Records</h1>
<p class="sub">
- Browse validation reports for this agent to verify trust and integrity.
+ On-chain proof that an agent's GLB model, metadata, and skills have been audited. Each record is signed by a validator's wallet and stored immutably.
</p>
+ <div class="how-grid">
+ <div class="how-card">
+ <div class="how-card-icon">◈</div>
+ <div class="how-card-title">GLB Schema</div>
+ <div class="how-card-desc">Validates glTF 2.0 file structure — required chunks, mesh data, extensions.</div>
+ </div>
+ <div class="how-card">
+ <div class="how-card-icon">◆</div>
+ <div class="how-card-title">Manifest Integrity</div>
+ <div class="how-card-desc">Checks on-chain metadata — agent ID, chain ID, registry address consistency.</div>
+ </div>
+ <div class="how-card">
+ <div class="how-card-icon">◇</div>
+ <div class="how-card-title">Skill Handlers</div>
+ <div class="how-card-desc">Verifies declared skills initialize without errors or missing dependencies.</div>
+ </div>
+ </div>
+
<div class="toolbar">
<input
type="text"
id="agent-input"
placeholder="Agent ID (e.g., 1)"
- style="width: 200px"
+ style="width: 180px"
/>
<input
type="text"
id="chain-input"
placeholder="Chain ID (e.g., 84532)"
- style="width: 200px"
+ style="width: 190px"
/>
<button class="btn" id="load-btn">Load Records</button>
<button class="btn sec" id="submit-btn">Submit Validation</button>
@@ -434,7 +498,11 @@
<div id="error" class="err" style="display: none"></div>
<div id="info" class="info" style="display: none"></div>
<div id="records" class="records"></div>
- <div id="empty" class="empty" style="display: none">No validation records yet.</div>
+ <div id="empty" class="empty" style="display: none">
+ <div class="empty-title">No validation records found</div>
+ <div class="empty-sub">This agent hasn't been validated yet, or the agent ID / chain ID is incorrect.</div>
+ <button class="btn" id="empty-submit-btn">Submit a Validation</button>
+ </div>
</main>
<!-- Submit Modal -->
@@ -516,8 +584,11 @@
submitReportBtn: document.getElementById('submit-report-btn'),
});
+ window.valDash = dashboard;
window.closeSubmitModal = () => dashboard.closeModal();
window.submitModal = () => dashboard.submitReport();
+
+ document.getElementById('empty-submit-btn').addEventListener('click', () => dashboard.openModal());
</script>
</body>
</html>
diff --git a/src/validation-ui.js b/src/validation-ui.js
index ccee51f34..a48a1e443 100644
--- a/src/validation-ui.js
+++ b/src/validation-ui.js
@@ -27,6 +27,32 @@ export class ValidationDashboard {
this.signer = null;
this.setupEventListeners();
+ this._loadFromUrlParams();
+ }
+
+ _loadFromUrlParams() {
+ const p = new URLSearchParams(location.search);
+ const agent = p.get('agent');
+ const chain = p.get('chain');
+ if (agent) this.els.agentInput.value = agent;
+ if (chain) this.els.chainInput.value = chain;
+ if (agent && chain) this.loadRecords();
+ }
+
+ _syncUrl() {
+ if (!this.currentAgentId || !this.currentChainId) return;
+ const url = new URL(location.href);
+ url.searchParams.set('agent', String(this.currentAgentId));
+ url.searchParams.set('chain', String(this.currentChainId));
+ history.replaceState(null, '', url);
+ }
+
+ _copyHash(hash) {
+ navigator.clipboard.writeText(hash).then(() => this.showToast('Hash copied'));
+ }
+
+ _copyAddr(addr) {
+ navigator.clipboard.writeText(addr).then(() => this.showToast('Address copied'));
}
setupEventListeners() {
@@ -106,6 +132,7 @@ export class ValidationDashboard {
this.hideInfo();
this.renderRecords(result);
+ this._syncUrl();
} catch (err) {
this.showError(`Failed to load records: ${err.message}`);
this.els.recordsContainer.innerHTML = '';
@@ -128,6 +155,15 @@ export class ValidationDashboard {
this.els.recordsContainer.innerHTML = recordArray.map((r) => this.renderRecord(r)).join('');
}
+ _kindLabel(kind) {
+ const map = {
+ 'glb-schema': 'GLB Schema',
+ 'manifest-integrity': 'Manifest Integrity',
+ 'skill-handlers-load': 'Skill Handlers',
+ };
+ return map[kind] || kind;
+ }
+
renderRecord(record) {
const verdict = record.verdict || (record.passed ? 'pass' : 'fail');
const timestamp = record.timestamp
@@ -137,34 +173,36 @@ export class ValidationDashboard {
const reportUri = record.reportUri || record.proofURI || '';
const reportHash = record.reportHash || record.proofHash || '';
const validator = record.validator || 'Unknown';
+ const kind = record.kind || 'glb-schema';
+ const notes = record.notes || '';
+
+ const validatorShort = validator !== 'Unknown'
+ ? `${validator.substring(0, 6)}…${validator.substring(validator.length - 4)}`
+ : 'Unknown';
return `
<div class="record">
<div class="record-header">
<div class="record-title">
- <h3>${this.escapeHtml(record.kind || 'glb-schema')} Validation</h3>
+ <h3>${this.escapeHtml(this._kindLabel(kind))}</h3>
<span class="badge ${verdict}">${verdict.toUpperCase()}</span>
</div>
+ <div style="font-size:12px;color:#666">${timestamp}</div>
</div>
<div class="record-meta">
<div class="record-meta-item">
<div class="record-meta-label">Validator</div>
- <div class="record-meta-value">${this.escapeHtml(validator.substring(0, 10))}…${this.escapeHtml(validator.substring(validator.length - 8))}</div>
+ <div class="record-meta-value" title="${this.escapeHtml(validator)}" style="cursor:pointer" onclick="valDash._copyAddr('${this.escapeHtml(validator)}')">${this.escapeHtml(validatorShort)}</div>
</div>
- <div class="record-meta-item">
- <div class="record-meta-label">Timestamp</div>
- <div class="record-meta-value">${timestamp}</div>
- </div>
- </div>
- <div class="record-meta">
- <div class="record-meta-item" style="flex: 1">
+ <div class="record-meta-item" style="flex:1">
<div class="record-meta-label">Report Hash</div>
- <div class="record-meta-value">${this.escapeHtml(reportHash.substring(0, 20))}…</div>
+ <div class="record-meta-value">${reportHash ? this.escapeHtml(reportHash.substring(0, 18)) + '…' : '—'}</div>
</div>
</div>
+ ${notes ? `<div class="record-notes">${this.escapeHtml(notes)}</div>` : ''}
<div class="record-actions">
- ${reportUri ? `<a href="${this.resolveIPFS(reportUri)}" target="_blank" class="btn">View Report ↗</a>` : ''}
- <button class="btn sec" onclick="navigator.clipboard.writeText('${this.escapeHtml(reportHash)}').then(() => alert('Copied!'))">Copy Hash</button>
+ ${reportUri ? `<a href="${this.resolveIPFS(this.escapeHtml(reportUri))}" target="_blank">View Report ↗</a>` : ''}
+ ${reportHash ? `<button onclick="valDash._copyHash('${this.escapeHtml(reportHash)}')">Copy Hash</button>` : ''}
</div>
</div>
`;
diff --git a/vercel.json b/vercel.json
index b65f98110..d11d2e3ca 100644
--- a/vercel.json
+++ b/vercel.json
@@ -3,6 +3,9 @@
"outputDirectory": "dist",
"public": true,
"installCommand": "npm ci --prefer-offline --no-audit --no-fund",
+ "env": {
+ "NODE_OPTIONS": "--no-deprecation"
+ },
"functions": {
"api/**/*.js": {
"includeFiles": "node_modules/@zauthx402/sdk/dist/**"