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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: update changelog and improve agent ranking logic to reflect real chat activity
qrqka0a9adb0acdc
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 45d2f9c5e..425373889 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -33,6 +33,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **The Avatar Engines Atlas page is now reachable** — The link to the Avatar Engines Atlas — the curated rundown of the open-source and commercial engines behind high-quality, photoreal 3D human avatars — was returning a 404 because the page was never wired into routing. The route is now in place, so the page opens from navigation as intended. (`/avatar-engines`) `[fix]`- **The main menu is now organized — no more walls of links** — The top navigation kept everything but had become hard to scan: the Launch menu alone listed 25 features in one long single-column drop-down, and nearly every item shouted a "New" badge, so the badge meant nothing. Each menu — Build, Discover, Launch, Learn — is now split into clearly labelled columns grouped by what you're trying to do (Launch, for example, splits into Launch / Terminal & trade / Intelligence / Compete & earn). Every feature is still one click away, on desktop and in the mobile drawer; nothing was removed or moved off-platform. The only badge left is the green "Live" dot, which now genuinely means the page is running right now. `[improvement]`- **The Money Pulse now sits on a pure-black canvas** — The Money Pulse page (/pulse) now renders on a true black background in every theme, so the live feed of tips, launches, trades and agent-to-agent payments reads as one calm, high-contrast field. Previously the page could pick up a lighter surface or near-black tone depending on your theme; it's now consistently black with the monochrome ink ramp pinned for readability. (`/pulse`) `[improvement]`+- **Trending and the agent directory now actually show agents** — The Trending leaderboard (/trending) and the public agent directory were coming up empty no matter how busy the platform was — every list rendered "No trending agents yet." Both feeds ranked agents by chat activity using a column that doesn't exist in the database, so the query failed silently and returned nothing. They now count real chat activity (LLM usage events) the same way the rest of the site does, so the 24h, 7d, and all-time rankings — and the directory's "popular" sort — populate with the agents people are actually using. (`/trending`) `[fix]`- **User Activity Analytics — DAU, WAU, and top features now tracked every 6 hours via x402** — The platform now monitors its own engagement metrics automatically. Every six hours an autonomous agent pays the /api/x402/analytics endpoint for a live user_activity report — computing DAU, WAU, stickiness (DAU/WAU ratio), the top ten features by event volume, the platform error rate, and session-length distribution (average, median, and p90). All figures are read live from the real metered tables; an empty window returns zeros, never fabricated numbers. The extracted signal — dau, wau, top_feature — is recorded to x402_autonomous_log for the status surface to read, and every snapshot is persisted to a user_activity_snapshots time series for trend alerting and the engagement dashboard. The same report is available to any x402 agent on the bazaar for $0.005 per call. `[feature, infra]`- **x402 Volume Analytics — the platform measures its own payment economy every 30 minutes** — The autonomous loop now pays /api/x402/analytics every 30 minutes with { report: "x402_volume", period: "24h" } for a live read of x402 transaction volume across every paid endpoint. The report comes straight from the settled-payment ledger and returns the totals that prove ecosystem growth — total settled calls, total USDC paid, and unique paying wallets — alongside a per-endpoint breakdown and the least-active ("underused") endpoints, so the platform can see at a glance which services are thriving and which need a push or a rethink. The headline totals and the underused-endpoint list are recorded as an actionable signal, and the same report is available to any x402 agent on the bazaar for $0.005 per call. `[feature, infra]`- **Your agents now deploy themselves on-chain — no wallet popup** — The On-chain Deployments page (/deployments) tracks every agent that lands on the ERC-8004 Identity Registry. Until now three.ws only read other people's registrations; putting one of your own agents on-chain meant signing a transaction yourself in a browser wallet. Agents now register themselves: every public agent with a 3D body gets deployed to the Base Identity Registry from its own built-in wallet, with the platform covering the few cents of gas. The registration includes the agent's GLB avatar and x402 payment support, so it shows up immediately in the live feed counted as a 3D, payment-ready on-chain identity — no human in the loop. (`/deployments`) `[feature]`diff --git a/api/agents/public.js b/api/agents/public.jsindex 57def1ab4..1693f11fa 100644--- a/api/agents/public.js+++ b/api/agents/public.js@@ -45,7 +45,10 @@ export default wrap(async (req, res) => {i.description,i.skills,i.home_url,- i.chat_count,+ coalesce((+ select count(*)::int from usage_events ue+ where ue.agent_id = i.id and ue.kind = 'llm'+ ), 0) as chat_count,i.created_at,i.meta,i.erc8004_agent_id,@@ -69,7 +72,7 @@ export default wrap(async (req, res) => {order by${sort === 'newest' ? sql`i.created_at desc` :sort === 'name' ? sql`i.name asc` :- sql`i.chat_count desc nulls last, i.created_at desc`}+ sql`chat_count desc nulls last, i.created_at desc`}limit ${limit + 1}`.catch(() => []);diff --git a/api/trending.js b/api/trending.jsindex fd6d122a6..16f846544 100644--- a/api/trending.js+++ b/api/trending.js@@ -6,7 +6,11 @@** Agent ranking:* 24h / 7d — count of usage_events (kind='llm') in the window, per public agent- * all time — agent_identities.chat_count (pre-aggregated) + views_count+ * all time — total count of usage_events (kind='llm') per public agent+ *+ * `chat_count` is NOT a stored column on agent_identities — it is derived with a+ * correlated COUNT(*) over usage_events, the same pattern used by galaxy.js,+ * agents.js, and characters.js.** Coin ranking:* always — oracle_conviction.score desc, filtered to recent scored_at (<24h stale)@@ -36,37 +40,47 @@ export default wrap(async (req, res) => {// ── Agents ─────────────────────────────────────────────────────────────let agentRows;if (win === 'all') {- // Use pre-aggregated columns for all-time (fast, indexed)+ // Total real LLM usage events per public agent. chat_count is derived+ // (no stored column) so it is filtered/ordered via the outer alias.agentRows = await sql`- select- i.id,- i.name,- i.description,- i.chat_count,- i.meta,- a.thumbnail_key as avatar_thumbnail_key,- a.visibility as avatar_visibility- from agent_identities i- left join avatars a on a.id = i.avatar_id and a.deleted_at is null- where i.deleted_at is null- and i.is_public = true- and i.chat_count > 0- order by i.chat_count desc nulls last+ select * from (+ select+ i.id,+ i.name,+ i.description,+ i.meta,+ a.thumbnail_key as avatar_thumbnail_key,+ a.visibility as avatar_visibility,+ coalesce((+ select count(*)::int from usage_events ue+ where ue.agent_id = i.id and ue.kind = 'llm'+ ), 0) as chat_count+ from agent_identities i+ left join avatars a on a.id = i.avatar_id and a.deleted_at is null+ where i.deleted_at is null+ and i.is_public = true+ ) t+ where t.chat_count > 0+ order by t.chat_count desclimit ${limit}`.catch(() => []);} else {- // Count real LLM usage events in the time window per public agent+ // Count real LLM usage events in the time window per public agent. The+ // all-time chat_count is derived via a correlated subquery (no stored col).const interval = WINDOW_INTERVAL[win];agentRows = await sql`selecti.id,i.name,i.description,- i.chat_count,i.meta,a.thumbnail_key as avatar_thumbnail_key,a.visibility as avatar_visibility,- count(u.id)::int as window_chats+ count(u.id)::int as window_chats,+ coalesce((+ select count(*)::int from usage_events ue+ where ue.agent_id = i.id and ue.kind = 'llm'+ ), 0) as chat_countfrom usage_events ujoin agent_identities i on i.id = u.agent_idleft join avatars a on a.id = i.avatar_id and a.deleted_at is null@@ -74,7 +88,7 @@ export default wrap(async (req, res) => {and u.created_at >= now() - ${interval}::intervaland i.deleted_at is nulland i.is_public = true- group by i.id, i.name, i.description, i.chat_count, i.meta,+ group by i.id, i.name, i.description, i.meta,a.thumbnail_key, a.visibilityorder by window_chats desclimit ${limit}diff --git a/data/changelog.json b/data/changelog.jsonindex d59d5cc9e..70694ce4e 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,15 @@{"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-06-28",+ "title": "Trending and the agent directory now actually show agents",+ "summary": "The Trending leaderboard (/trending) and the public agent directory were coming up empty no matter how busy the platform was — every list rendered \"No trending agents yet.\" Both feeds ranked agents by chat activity using a column that doesn't exist in the database, so the query failed silently and returned nothing. They now count real chat activity (LLM usage events) the same way the rest of the site does, so the 24h, 7d, and all-time rankings — and the directory's \"popular\" sort — populate with the agents people are actually using.",+ "tags": [+ "fix"+ ],+ "link": "/trending"+ },{"date": "2026-06-28","title": "The main menu is now organized — no more walls of links",diff --git a/public/avatar-actions.js b/public/avatar-actions.jsindex e48550bf4..db6ea816a 100644--- a/public/avatar-actions.js+++ b/public/avatar-actions.js@@ -330,10 +330,34 @@ class AvatarActions extends HTMLElement {.querySelector('[data-act="create-wallet"]')?.addEventListener('click', () => this._createWallet());+ // Keep primary buttons (incl. "Save to my avatars") legible regardless of the+ // host's --accent: a light/white accent gets black text, a dark one keeps white.+ this._applyAccentContrast();+// Fill live balances after the addresses are on screen (owner + has wallet).if (this.isOwner && this._agent && root.querySelector('.bal')) this._loadBalances();}+ // Pick black or white button text from the *rendered* accent background so a+ // white/light accent never produces invisible white-on-white text. Reads the+ // resolved background color of each primary button (CSS vars already applied)+ // and sets the contrasting foreground inline.+ _applyAccentContrast() {+ const btns = this.shadowRoot.querySelectorAll('button.primary');+ if (!btns.length) return;+ for (const btn of btns) {+ const bg = getComputedStyle(btn).backgroundColor;+ const m = bg.match(/rgba?\(([^)]+)\)/);+ if (!m) continue;+ const [r, g, b, a = '1'] = m[1].split(',').map((v) => parseFloat(v));+ // Fully transparent backgrounds inherit the surface — leave default text.+ if (a === 0) continue;+ // Relative luminance (sRGB) → light backgrounds read black, dark read white.+ const lum = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;+ btn.style.color = lum > 0.6 ? '#000' : '#fff';+ }+ }+async _loadBalances() {const ag = this._agent;if (!ag) return;diff --git a/public/changelog.json b/public/changelog.jsonindex 926641170..2fa63780c 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-28T06:38:15.853Z",+ "generated_at": "2026-06-28T06:47:38.055Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -291,6 +291,16 @@"improvement"]},+ {+ "date": "2026-06-28",+ "type": "update",+ "title": "Trending and the agent directory now actually show agents",+ "summary": "The Trending leaderboard (/trending) and the public agent directory were coming up empty no matter how busy the platform was — every list rendered \"No trending agents yet.\" Both feeds ranked agents by chat activity using a column that doesn't exist in the database, so the query failed silently and returned nothing. They now count real chat activity (LLM usage events) the same way the rest of the site does, so the 24h, 7d, and all-time rankings — and the directory's \"popular\" sort — populate with the agents people are actually using.",+ "link": "/trending",+ "tags": [+ "fix"+ ]+ },{"date": "2026-06-28","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex f28c8965f..0c01cb0a0 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -222,6 +222,14 @@<category>improvement</category><description>The Money Pulse page (/pulse) now renders on a true black background in every theme, so the live feed of tips, launches, trades and agent-to-agent payments reads as one calm, high-contrast field. Previously the page could pick up a lighter surface or near-black tone depending on your theme; it's now consistently black with the monochrome ink ramp pinned for readability.</description></item>+ <item>+ <title>Trending and the agent directory now actually show agents</title>+ <link>https://three.ws/trending</link>+ <guid isPermaLink="false">2026-06-28:Trending and the agent directory now actually show agents</guid>+ <pubDate>Sun, 28 Jun 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>The Trending leaderboard (/trending) and the public agent directory were coming up empty no matter how busy the platform was — every list rendered "No trending agents yet." Both feeds ranked agents by chat activity using a column that doesn't exist in the database, so the query failed silently and returned nothing. They now count real chat activity (LLM usage events) the same way the rest of the site does, so the 24h, 7d, and all-time rankings — and the directory's "popular" sort — populate with the agents people are actually using.</description>+ </item><item><title>User Activity Analytics — DAU, WAU, and top features now tracked every 6 hours via x402</title><link>https://three.ws/changelog</link>diff --git a/public/features.json b/public/features.jsonindex 3c1724b0c..419e85496 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-28T06:38:15.837Z",+ "generated_at": "2026-06-28T06:47:38.022Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",