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: update changelog with new features and improvements, including live trading theater enhancements and avatar performance criteria

nrpo86fa54dcd323
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b49bc30de..ff6b2268a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,10 +6,12 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
## 2026-07-03
+- **Agents in the ring — platform agents now buy and sell services from each other** — The closed-loop x402 economy is no longer a scheduler paying itself: real platform agents with their own custodial wallets now do the buying. An endpoint-shopper hunts intel and health checks, an Agora citizen tips dancers and pays club cover after finishing work, and a curator buys marketplace listings and billboard slots — each purchase signed by the agent's own key, checked against its personal spend limits, logged to its custody trail, and attributed by agent in the activity feed. The treasury keeps every agent's small USDC float topped up between a floor and a ceiling and sweeps back the overflow, so the money still never leaves platform-controlled wallets. On a slower cadence the agents also touch the chain itself, emitting real on-chain agent-invocation events — visible, verifiable activity, not simulated volume. (`/docs/x402-ring-economy`) `[feature]`
- **Every paid endpoint now settles — full x402 catalog coverage** — The x402 ring economy now exercises every paid endpoint on the platform, not just a handful. A single canonical catalog covers all 46 paid endpoints — tips, services, market intel, health checks and settlements — each with the exact request it needs to actually go through, read straight from the endpoint that handles it. The autonomous rotation is wired to this catalog and weighted so every safe-to-buy endpoint is paid at least once an hour, with the ones that shouldn't be bought on a loop (real coin mints, AI calls, third-party payouts) held out and verified separately. Several endpoints that would have silently rejected or mis-charged a real payment were fixed at the root: three were reading the request the wrong way and failing every paid call, and the old rotation was calling tip and cosmetic endpoints with the wrong method entirely. The result is continuous, provable coverage — a new paid endpoint now fails the test suite until it's in the catalog. `[feature, improvement]`
- **Every ring settlement is now proven on-chain — reconciliation blind spot closed** — The closed-loop agent economy settles real USDC through the platform's own facilitator, and until now those settlements were trusted but never verified against the blockchain. A new reconciler runs every 30 minutes and holds the ring to the same standard the funding wallet already meets: every recorded settlement and every treasury→payer sweep from the last 72 hours is checked to exist and succeed on-chain, a sample of each is parsed to prove the exact dollar amount and recipient match the books, and the two internal ledgers are cross-checked so a settlement with no matching spend record — the tell-tale sign of value leaking through our own facilitator — is caught. It also runs a silence alarm: if the ring is switched on but goes quiet for 30 minutes, operators are paged, closing the gap where 'it was working, then it wasn't' used to pass unnoticed. Any missing, failed, or mismatched settlement raises an immediate alert; every finding lands on the finance-integrity board, tagged so ring issues stand apart from the rest. `[security, infra]`
- **Full audit trail + breach monitoring on the economy's funding wallet** — The master wallet that fuels the platform's autonomous economy now keeps a tamper-evident accounting book of every move it makes. Each SOL transfer is recorded with the engine it funded, the amount, the on-chain signature, the running balance, and the US-dollar value at the moment of the transfer — cryptographically hash-chained so no past entry can be altered or deleted without detection. A monitor runs every 30 minutes and checks three things: that the book hasn't been tampered with, that every transfer we recorded really happened on-chain, and — most importantly — that no SOL ever left the wallet without a matching record, which is the tell-tale sign of a stolen key. Anything off raises an immediate operator alert and lands on the finance-integrity board. There's also a one-command accounting export (CSV or JSON, with running balance and dollar totals) for bookkeeping and review. `[security, infra, docs]`
- **Leak-proofing the closed-loop economy: fail-closed spend guards + an on-chain leak scanner** — The rule behind the closed-loop agent economy is simple: no dollar and no SOL ever leaves the wallets the platform controls. Until now the safeguards that enforced it were passive — a couple of configuration switches that, if flipped or forgotten, could quietly re-open spending to the outside world, and nothing actually watched the blockchain to confirm money wasn't leaving. Both gaps are now closed. Before the economy spends anything, it re-checks the three switches that keep the loop sealed — external spending off, no charity split, settlements routed only through the platform's own settlement service — and if any of them is wrong it stops spending entirely and pages operators, naming the switch that changed. Separately, a new monitor reads the chain itself every ten minutes: for each ring wallet it inspects every recent transaction and flags anything that moved value to an address the platform doesn't control — a stablecoin payment to a stranger, any non-stablecoin token leaving, an unexplained SOL debit, or a permission grant that would let someone else move funds later. Any such finding pages operators within minutes with the transaction, the counterparty, the amount, and the exact recovery steps, and is filed on the same financial-integrity board as the rest of the platform's money checks. It also tallies the network fees the wallets actually paid and cross-checks them against the books, so fees paid outside the accounting get caught too. The monitor only ever reads the chain — it never moves funds or touches keys. `[security]`
+- **Live Trading Theater stages rigged avatars only** — The 3D trading stage now only casts avatars that can actually perform. Any agent whose model is a static forge prop, a non-humanoid mesh, or a broken rig is quietly swapped for the platform's rigged mannequin instead of being staged as-is — which fixes the stray blob of geometry that could sprawl across the floor. Every figure on stage can now idle and react to real on-chain events. (`/theater`) `[fix]`
- **Lowest fees always: self-pay settlement, a fee ceiling, and a nightly fee audit that reclaims rent** — The closed-loop agent economy now enforces its cheapest possible settlement everywhere. Payments inside the ring default to self-pay — the paying wallet covers its own one-signature network fee (about 5,000 lamports) instead of a two-signature sponsored payment (about 10,000), so the platform burns half the SOL per settlement. Sponsor mode is still available as a fallback for wallets that hold no SOL, but it is no longer the default. A hard per-payment fee ceiling now guards the floor from both sides: the payment builders are proven never to exceed it, and the payment client refuses at send time to broadcast anything whose fee configuration would cross it. A new nightly audit measures the real network fees the wallets actually paid — read straight from the blockchain, not estimated — and reports two plain numbers: the SOL burned per settlement and the SOL burned per $100 of volume moved. If either drifts above budget it pages operators. The same run reclaims the one-time account-rent deposits the ring locks up over time, safely closing only empty, non-active token accounts and returning the rent to the owner wallet. The live efficiency numbers are exposed on the ring's public net-position report. (`/api/x402-ring`) `[improvement, infra]`
- **Ring economy dashboard — watch the closed loop breathe** — The self-cycled x402 ring economy now has a live operator dashboard. A per-minute settlement pulse shows the heartbeat at a glance — a spark strip where any gap is instantly visible, plus a big “minutes since last settle” number that turns green, amber, then red as the tick slows or stops. A loop diagram traces payer → endpoint → treasury → sweep with live on-chain wallet balances and floor indicators; a streaming feed shows every paid call with the buying agent, endpoint, price, and its explorer link, and flags skips and failures with their exact reason instead of dropping them silently. Fee-burn efficiency, leak-scan and reconciliation integrity, and per-endpoint coverage each get a panel. It is admin-only and clearly labels all ring volume as internal dogfooding, not organic revenue — so “it stopped working” can never again go unnoticed for days. `[feature]`
- **Ring settlements stay in-house — routing made truthful, mis-config now caught** — The closed-loop agent economy is built so no third party ever touches a ring settlement — but the configuration used to say one thing while the code did another: the setup guide claimed the platform's own facilitator was 'always-on' while Solana payments still defaulted to an outside settlement service. That contradiction is gone. When the self-hosted facilitator is switched on, ring payments now settle through it by default, and an explicitly-set external facilitator is the only thing that overrides that — no other coin or user rail is affected. Just as important, a mis-configured deploy now says so loudly instead of silently sending volume elsewhere: the status and ring reports list every problem — facilitator disabled, settlement pointing at an outside service, a missing treasury or fee-payer key, a per-call price set above the per-run cap — so operators can confirm the whole envelope is correct before funding anything. A clean deploy shows an empty warnings list. `[fix, infra]`
diff --git a/data/changelog.json b/data/changelog.json
index 8355e4e90..e83b87194 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-07-03",
+ "title": "Live Trading Theater stages rigged avatars only",
+ "summary": "The 3D trading stage now only casts avatars that can actually perform. Any agent whose model is a static forge prop, a non-humanoid mesh, or a broken rig is quietly swapped for the platform's rigged mannequin instead of being staged as-is — which fixes the stray blob of geometry that could sprawl across the floor. Every figure on stage can now idle and react to real on-chain events.",
+ "tags": [
+ "fix"
+ ],
+ "link": "/theater"
+ },
{
"date": "2026-07-03",
"title": "Agents in the ring — platform agents now buy and sell services from each other",
diff --git a/packages/agent-sniper/runbooks/02-platform-native.md b/packages/agent-sniper/runbooks/02-platform-native.md
index 5ef6eaac6..a199c1a8b 100644
--- a/packages/agent-sniper/runbooks/02-platform-native.md
+++ b/packages/agent-sniper/runbooks/02-platform-native.md
@@ -34,7 +34,12 @@ as an operator action. Read [00-overview.md](00-overview.md) for shared economic
- **Appearing on `/play/arena` requires a `agent_sniper_positions` row**, not just an armed
strategy. Let the live worker open positions, or the arena stays empty for these agents.
- **Appearing on `/theater` requires `is_public = true`** and, for a real 3D body, an
- `avatar_id` linking to an `avatars` row with a `model_url` (else a mannequin fallback).
+ `avatar_id` linking to a public `avatars` row with a `storage_key` (the GLB in R2).
+ `/theater` reads the roster from `/api/agents/public` and resolves each body from
+ `GET /api/agents/:id → avatar_model_url`, which is `publicUrl(avatars.storage_key)`
+ for the linked `avatar_id` (mannequin fallback when absent). Note: the `avatars`
+ table has **no `model_url`/`is_public` columns** — the GLB is `storage_key` and
+ publicness is `visibility='public'`.
## Steps
@@ -47,7 +52,7 @@ psql "$DATABASE_URL" -f api/_lib/migrations/20260615020000_agent_sniper.sql #
### 2. Create 33 users + 33 public agent identities
Pick a public avatar with a 3D model so they render with a body in the theater:
```bash
-AVATAR_ID=$(psql "$DATABASE_URL" -tAc "select id from avatars where model_url is not null and is_public is not false order by created_at limit 1")
+AVATAR_ID=$(psql "$DATABASE_URL" -tAc "select id from avatars where storage_key is not null and visibility='public' and deleted_at is null and model_category='avatar' order by view_count desc nulls last limit 1")
echo "using avatar $AVATAR_ID"
psql "$DATABASE_URL" <<SQL
do \$\$
diff --git a/public/changelog.json b/public/changelog.json
index fcbe64efd..77f8ebd8b 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,11 +1,21 @@
{
- "generated_at": "2026-07-03T05:34:38.233Z",
+ "generated_at": "2026-07-03T07:27:33.557Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
"entries": [
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "Agents in the ring — platform agents now buy and sell services from each other",
+ "summary": "The closed-loop x402 economy is no longer a scheduler paying itself: real platform agents with their own custodial wallets now do the buying. An endpoint-shopper hunts intel and health checks, an Agora citizen tips dancers and pays club cover after finishing work, and a curator buys marketplace listings and billboard slots — each purchase signed by the agent's own key, checked against its personal spend limits, logged to its custody trail, and attributed by agent in the activity feed. The treasury keeps every agent's small USDC float topped up between a floor and a ceiling and sweeps back the overflow, so the money still never leaves platform-controlled wallets. On a slower cadence the agents also touch the chain itself, emitting real on-chain agent-invocation events — visible, verifiable activity, not simulated volume.",
+ "link": "/docs/x402-ring-economy",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
@@ -50,6 +60,16 @@
"security"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "Live Trading Theater stages rigged avatars only",
+ "summary": "The 3D trading stage now only casts avatars that can actually perform. Any agent whose model is a static forge prop, a non-humanoid mesh, or a broken rig is quietly swapped for the platform's rigged mannequin instead of being staged as-is — which fixes the stray blob of geometry that could sprawl across the floor. Every figure on stage can now idle and react to real on-chain events.",
+ "link": "/theater",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index a060df885..4b6f91844 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -6,6 +6,14 @@
<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/>
<description>What's new on three.ws — features, improvements, and releases, newest first.</description>
<language>en</language>
+ <item>
+ <title>Agents in the ring — platform agents now buy and sell services from each other</title>
+ <link>https://three.ws/docs/x402-ring-economy</link>
+ <guid isPermaLink="false">2026-07-03:Agents in the ring — platform agents now buy and sell services from each other</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>The closed-loop x402 economy is no longer a scheduler paying itself: real platform agents with their own custodial wallets now do the buying. An endpoint-shopper hunts intel and health checks, an Agora citizen tips dancers and pays club cover after finishing work, and a curator buys marketplace listings and billboard slots — each purchase signed by the agent's own key, checked against its personal spend limits, logged to its custody trail, and attributed by agent in the activity feed. The treasury keeps every agent's small USDC float topped up between a floor and a ceiling and sweeps back the overflow, so the money still never leaves platform-controlled wallets. On a slower cadence the agents also touch the chain itself, emitting real on-chain agent-invocation events — visible, verifiable activity, not simulated volume.</description>
+ </item>
<item>
<title>Every paid endpoint now settles — full x402 catalog coverage</title>
<link>https://three.ws/changelog</link>
@@ -38,6 +46,14 @@
<category>security</category>
<description>The rule behind the closed-loop agent economy is simple: no dollar and no SOL ever leaves the wallets the platform controls. Until now the safeguards that enforced it were passive — a couple of configuration switches that, if flipped or forgotten, could quietly re-open spending to the outside world, and nothing actually watched the blockchain to confirm money wasn't leaving. Both gaps are now closed. Before the economy spends anything, it re-checks the three switches that keep the loop sealed — external spending off, no charity split, settlements routed only through the platform's own settlement service — and if any of them is wrong it stops spending entirely and pages operators, naming the switch that changed. Separately, a new monitor reads the chain itself every ten minutes: for each ring wallet it inspects every recent transaction and flags anything that moved value to an address the platform doesn't control — a stablecoin payment to a stranger, any non-stablecoin token leaving, an unexplained SOL debit, or a permission grant that would let someone else move funds later. Any such finding pages operators within minutes with the transaction, the counterparty, the amount, and the exact recovery steps, and is filed on the same financial-integrity board as the rest of the platform's money checks. It also tallies the network fees the wallets actually paid and cross-checks them against the books, so fees paid outside the accounting get caught too. The monitor only ever reads the chain — it never moves funds or touches keys.</description>
</item>
+ <item>
+ <title>Live Trading Theater stages rigged avatars only</title>
+ <link>https://three.ws/theater</link>
+ <guid isPermaLink="false">2026-07-03:Live Trading Theater stages rigged avatars only</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The 3D trading stage now only casts avatars that can actually perform. Any agent whose model is a static forge prop, a non-humanoid mesh, or a broken rig is quietly swapped for the platform's rigged mannequin instead of being staged as-is — which fixes the stray blob of geometry that could sprawl across the floor. Every figure on stage can now idle and react to real on-chain events.</description>
+ </item>
<item>
<title>Lowest fees always: self-pay settlement, a fee ceiling, and a nightly fee audit that reclaims rent</title>
<link>https://three.ws/api/x402-ring</link>
diff --git a/public/features.json b/public/features.json
index ab925701e..48d26dc2a 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-03T05:34:38.218Z",
+ "generated_at": "2026-07-03T07:27:33.492Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/theater-stage.js b/src/theater-stage.js
index 3589668fa..c78e82d42 100644
--- a/src/theater-stage.js
+++ b/src/theater-stage.js
@@ -16,6 +16,13 @@
// • agentAvatarGlb(agent) — resolves a real GLB (custom or mannequin fallback)
// so a brand-new agent with no custom body still renders as a real figure, never a
// T-pose (CLAUDE.md: no rig allowlist, mannequin is the designed fallback).
+//
+// Rigged avatars only. The stage is a performance space — every body must be able
+// to act. A resolved avatar earns the stage only if it's a drivable humanoid rig
+// with sane proportions; a static forge prop, a non-humanoid mesh, or a broken rig
+// is swapped for the rigged mannequin at load time and never staged as-is. That's
+// what stops a forge blob from sprawling across the floor instead of standing as a
+// figure that can idle and react.
import {
Scene,
@@ -45,7 +52,7 @@ import {
import { clone as cloneSkinnedScene } from 'three/addons/utils/SkeletonUtils.js';
import { gltfLoader, disposeGltfLoader } from './loaders/gltf.js';
import { AnimationManager } from './animation-manager.js';
-import { agentAvatarGlb } from './shared/agent-3d.js';
+import { agentAvatarGlb, MANNEQUIN_GLB } from './shared/agent-3d.js';
import { log } from './shared/log.js';
// Reaction vocabulary mapped onto the real pre-baked clip library
@@ -195,21 +202,64 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false }
return p;
}
- async function addPerformer(agent, index, total) {
- if (disposed || performers.has(agent.id)) return;
- const url = agentAvatarGlb(agent);
+ // Build a candidate body from a GLB url: clone it, size it to the stage, and
+ // attach the canonical animation rig. Reports whether the result is a rigged,
+ // sanely-proportioned humanoid we can actually drive — the gate that keeps
+ // static forge props and exploded rigs off the stage. Returns null if the GLB
+ // has no usable scene. The returned body is not yet parented to the scene, so
+ // a rejected candidate can be disposed without any teardown of live state.
+ async function buildBody(url, slot) {
const tpl = await template(url);
- if (disposed || !tpl.scene || performers.has(agent.id)) return;
+ if (!tpl.scene) return null;
- const slot = arcSlot(index, total);
const model = cloneSkinnedScene(tpl.scene);
model.traverse((n) => { if (n.isMesh) n.frustumCulled = true; });
+ scaleToHeight(model, 1.74 * slot.scale);
+ groundFeet(model);
+
+ const anim = new AnimationManager();
+ let drivable = false;
+ try {
+ anim.attach(model, { avatarUrl: url });
+ anim.setAnimationDefs(CLIP_DEFS);
+ drivable = anim.supportsCanonicalClips();
+ } catch (err) {
+ log.warn('[theater] anim attach failed', url, err?.message);
+ }
+
+ // Proportion sanity: a rigged avatar occupies a tall, narrow box (even arms
+ // fully out, span ≈ height). A forge prop or a mesh exploded by a bad rig
+ // sprawls far wider — reject it so it can never reach the stage as a blob.
+ _box.setFromObject(model, true);
+ const h = _box.max.y - _box.min.y || 1;
+ const wide = Math.max(_box.max.x - _box.min.x, _box.max.z - _box.min.z);
+ const humanoid = Number.isFinite(wide) && wide / h <= 3;
+
+ return { model, anim, drivable: drivable && humanoid };
+ }
+
+ async function addPerformer(agent, index, total) {
+ if (disposed || performers.has(agent.id)) return;
+ const slot = arcSlot(index, total);
+
+ // Rigged avatars only. Try the agent's own model first; if it isn't a
+ // drivable humanoid, swap in the rigged mannequin (the platform's designed
+ // fallback) rather than staging forge geometry as-is.
+ const url = agentAvatarGlb(agent);
+ let body = await buildBody(url, slot);
+ if (disposed || performers.has(agent.id)) { body?.anim?.dispose?.(); return; }
+ if ((!body || !body.drivable) && url !== MANNEQUIN_GLB) {
+ body?.anim?.dispose?.();
+ body = await buildBody(MANNEQUIN_GLB, slot);
+ if (disposed || performers.has(agent.id)) { body?.anim?.dispose?.(); return; }
+ }
+ if (!body || !body.model) return;
+
+ const { model, anim, drivable } = body;
const group = new Group();
group.name = `performer:${agent.id}`;
group.add(model);
- scaleToHeight(model, 1.74 * slot.scale);
- groundFeet(model);
group.position.set(slot.x, 0, slot.z);
group.rotation.y = (Math.atan2(-group.position.x, 9 - group.position.z) || 0) * 0.35; // toward the audience
group.userData.agentId = agent.id;
@@ -224,17 +274,6 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false }
pad.position.set(slot.x, 0.02, slot.z);
cast.add(pad);
- const anim = new AnimationManager();
- const drivable = (() => {
- try {
- anim.attach(model, { avatarUrl: url });
- anim.setAnimationDefs(CLIP_DEFS);
- return anim.supportsCanonicalClips();
- } catch (err) {
- log.warn('[theater] anim attach failed', agent.id, err?.message);
- return false;
- }
- })();
if (drivable && !reducedMotion) anim.play('idle');
const rec = { agent, group, model, pad, anim, drivable, slot, busy: false, plate: null };