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
Mirror copy-trade: surface the follower graph on every agent
nirholas5606da57ab14
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 11cd823a2..9d4d64b3c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -32,6 +32,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **New: your avatar comes alive in iOS AR — it breathes and idles in your room** — Placing an avatar in AR on iPhone or iPad used to drop a frozen mannequin into your space. Now it arrives animated — a gentle idle/breathing loop plays and repeats on its own, so the figure standing on your table actually feels alive. We do this without any extra app or converter: the avatar is driven through a real animation, sampled frame by frame, and written straight into the AR file that Apple's Quick Look plays. If a particular avatar can't be animated, it still places perfectly as a clean static pose — animation is a bonus, never a blocker. `[feature, improvement]`- **Prompt-to-avatar: a live progress bar you can cancel, plus motion and screen-reader polish** — Building an avatar from a text prompt now shows a progress bar that actually moves second-to-second (tied to real elapsed time) instead of sitting frozen between stages, a real elapsed clock, and a Cancel button (or Escape) so you're never stuck watching a spinner. Across the creator we now respect your 'reduce motion' setting (spinners and auto-spin previews hold still), the camera flow tells you exactly what to do if you deny permission instead of silently doing nothing, and progress, errors, and the bring-your-own-key form are announced properly to screen readers. Character Studio shows a loading silhouette and an actionable Retry if something fails to load. (`/create/prompt`) `[improvement]`- **Security: CSRF protection extended to sniper arming and trade limits** — Arming an autonomous sniper strategy and changing an agent's discretionary trade limits both commit or unlock real custodial funds, so both writes now require the same one-time CSRF token every other money-moving action already enforced (withdraw, vanity grind, spend limits, trade execution). Ownership was always re-checked server-side on these endpoints; this closes the remaining gap so a forged cross-site request can't arm a sniper or loosen a trade cap. No change to how you use them — the dashboard already sends the token. `[security]`+- **See who mirrors an agent — the copy-trade follower graph, with faces** — Copy Trading is a social graph, so now you can see it. Every agent's profile shows the real avatars of the agents that mirror it: a live pile of follower faces, each linking straight to that follower's own profile, plus a count of how many are actively copying. On your own agent you see exactly who is trading alongside you; on any leader you're vetting, you see its real following before you commit. Every face is a real three.ws agent with a wallet at stake — drawn from live follow records, never a placeholder. (`/mirror`) `[improvement]`- **Social recovery & inheritance — a funded agent that never dies with its owner** — Your agent's wallet is custodial and real-money funded, so "I lost access" or "the owner is gone" should never mean the funds are lost forever. You can now name guardians (real three.ws accounts you trust) and a beneficiary, and set how many guardians must agree. If you ever lose access, that threshold of guardians approving — plus a 48-hour safety window only you can cancel — hands control of the agent and its wallet back to you. An optional dead-man's switch passes the agent to your beneficiary if you go silent past a period you choose, but only after a generous, cancellable grace window and an explicit confirmation — and you abort the whole thing instantly just by showing up (a login, a trade, or tapping "I'm here"). Crucially, no private key is ever exported or exposed: recovery and inheritance only change who owns the agent, and the same encrypted, server-held key keeps signing for the new owner. Every step is time-locked, reversible until commit, and written to your custody trail; the wallet is frozen against autonomous spending during any contested process so it can never be drained out from under you. Guardians act from a new Guardian console — the agents you're trusted to protect, where you approve a recovery or confirm an inheritance without ever touching anyone's funds. (`/guardian`) `[feature, security]`- **Steadier 3D generation and token stats when free providers get busy** — Two backend reliability fixes. The free image step behind text→3D now shrugs off a brief blip from NVIDIA's gateway — if it answers with a fast, transient hiccup, we retry once before handing off, so fewer prompts have to fall through to a slower backup and fewer fail outright. (A real timeout still hands off immediately, so nothing waits twice.) Separately, live token stats lean on several market-data sources; when one hits its monthly quota we already pause it, but each fresh server instance used to re-discover that the hard way and waste another doomed call. That pause is now shared across the whole fleet, so the moment one instance sees a source is exhausted, none of the others retry it — quieter, faster, and no wasted quota. `[fix, infra]`- **Talk to your agent and it trades — the Conversational Wallet** — Your avatar's wallet now takes voice and text commands. Tell your agent "tip 0.1 SOL to vault.sol", "snipe that mint with half a SOL", "sell half my $THREE", or "withdraw 2 SOL to my Phantom" — it parses your intent with Claude, shows you exactly what it will do next to your own words (real quote, USD value, fees, network), and waits for an explicit "yes" or a tap before anything moves. Confirmed trades come back with a real on-chain signature and explorer link, and the avatar celebrates the moment it lands. Every action runs the same owner-only, spend-limit-gated, audited path as the rest of the wallet — visitors can chat but can never move funds, by any phrasing. A wrong hearing is caught at the read-back, "cancel" is always one word away, and there's a full keyboard path with no mic required. `[feature]`diff --git a/data/changelog.json b/data/changelog.jsonindex 5dba69249..2a3efd7ed 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-23",+ "title": "See who mirrors an agent — the copy-trade follower graph, with faces",+ "summary": "Copy Trading is a social graph, so now you can see it. Every agent's profile shows the real avatars of the agents that mirror it: a live pile of follower faces, each linking straight to that follower's own profile, plus a count of how many are actively copying. On your own agent you see exactly who is trading alongside you; on any leader you're vetting, you see its real following before you commit. Every face is a real three.ws agent with a wallet at stake — drawn from live follow records, never a placeholder.",+ "tags": [+ "improvement"+ ],+ "link": "/mirror"+ },{"date": "2026-06-23","title": "Mirror a proven agent and yours trades alongside it — Copy Trading, fully custodial",diff --git a/prompts/agent-wallets/09-mirror-copytrade-social.md b/prompts/agent-wallets/09-mirror-copytrade-social.mddeleted file mode 100644index f43d899a8..000000000--- a/prompts/agent-wallets/09-mirror-copytrade-social.md+++ /dev/null@@ -1,89 +0,0 @@-# Task 09 — Mirror / Copy-Trade Social Graph--> **Read [00-README-orchestration.md](./00-README-orchestration.md) first** —-> especially **The invention bar** and the safety rules. Builds on the trade engine-> + spend guards (**task 05**) and the wallet identity layer (**task 01**).-> Invention-layer.--## Why this is uniquely ours--Every agent wallet is attached to a **public, ownable, social 3D identity** with a-visible, real track record (holdings, P&L, lifetime volume — task 01). So we can do-what isolated wallets can't: make sniping **social**. Follow a winning agent and your-own agent **mirrors its moves** — within *your* spend limits, from *your* custodial-wallet. The platform becomes a live, on-chain copy-trading network of characters.--## Mission--Let an owner subscribe their agent to mirror another public agent's wallet activity,-so that when the followed agent trades, the follower's agent makes the proportional-move automatically — real execution, owner-scoped limits, fully audited.--## What to build--1. **Follow a wallet** — from any public agent's chip/HUD/profile, an owner can set- *their* agent to mirror *that* agent. Choose which of the owner's agents follows- (they may own several). Real relationship persisted server-side.-2. **Mirror policy** — the owner sets how mirroring works for them: allocation mode- (proportional to the leader, fixed size per trade, or % of own balance), a hard- max per trade and per day, asset allowlist/denylist, and slippage. This policy is- **bounded by and never exceeds** the agent's existing spend policy- (`agent-trade-guards.js`). The follower is always in control of their own risk.-3. **Real detection + execution** — when the followed agent makes a real trade- (detected from real on-chain activity / the trade engine's events, not a poll- guess), the follower's agent executes the corresponding real trade through task- 05's engine, sized by the mirror policy, gated by spend limits, signed with the- follower's custodial key. Real tx, real fill, real explorer link.-4. **Leaderboard of real performance** — rank public agents by **real, verifiable**- P&L / volume / win-rate computed from real activity (no vanity metrics, no fake- numbers). This is the discovery surface for who to copy. Honest, on-chain-derived.-5. **Follower graph** — show, on an agent, who it follows and who follows it (counts,- and the network). A real social-financial graph between avatars. Ties naturally- into the galaxy money-cam (task 12).-6. **Instant unfollow / pause** — one tap stops mirroring immediately. Always visible.--## Safety (non-negotiable)--- **Owner-only to configure; owner's funds only.** You can only set *your* agent to- follow; you never touch anyone else's wallet. Server-side ownership checks.-- **Spend policy is the ceiling.** Mirror sizing is clamped to the follower's spend- limits at execution time, server-side. A leader's huge buy never drains a follower- beyond their set caps.-- **Consent + transparency.** Following is an explicit opt-in with the policy spelled- out. The follower sees exactly what will be copied and the max exposure. Leaders- can opt out of being copyable if we offer that (respect a leader's setting).-- **Fully audited.** Every mirrored trade writes to the follower's custody trail with- the leader reference + trigger. Traceable end to end.-- **No leakage.** Mirroring uses only public trade signals; never expose a leader's- keys, balances beyond public, or anything private.--## Innovation mandate--- **Copy-trading with a face.** You're not following an address — you're following a- *character* with a persona, a voice, and a 3D presence. Lean into that: the leader- and follower avatars relate visibly.-- **Risk made legible.** The follower always sees worst-case exposure and live- attribution ("this fill came from copying @leader"). Trust through clarity.-- **Discovery that rewards real skill.** The leaderboard surfaces genuinely- performant agents from real data — a reason to *be* great, not just to copy.-- Invent past this — every mirrored trade is real and limit-bounded.--## States & edge cases--Following yourself (block/no-op); leader goes private/deleted (auto-pause + notify);-follower out of balance or over limit (skip that trade, log why, keep the-subscription); leader makes a trade in a denied asset (skip); rapid leader activity-(rate-limit/clamp to policy); circular follows; leader opts out mid-relationship;-session expiry. Each designed and honest.--## Definition of done--Per the orchestration README. Plus: an owner sets agent A to mirror public agent B;-a real trade by B triggers a real, correctly-sized, limit-gated, audited trade by A-(devnet acceptable) with explorer links on both; over-limit/denied cases are skipped-with logged reasons; the performance leaderboard reflects real on-chain numbers;-unfollow stops it instantly; owner-only enforced server-side. No console errors.--When done: self-review + improvement pass, changelog entry, commit (explicit paths-only), then **delete this file**-(`prompts/agent-wallets/09-mirror-copytrade-social.md`).diff --git a/public/changelog.json b/public/changelog.jsonindex f23807489..abd45b116 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-23T04:56:30.794Z",+ "generated_at": "2026-06-23T05:01:02.304Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -274,6 +274,16 @@"security"]},+ {+ "date": "2026-06-23",+ "type": "update",+ "title": "See who mirrors an agent — the copy-trade follower graph, with faces",+ "summary": "Copy Trading is a social graph, so now you can see it. Every agent's profile shows the real avatars of the agents that mirror it: a live pile of follower faces, each linking straight to that follower's own profile, plus a count of how many are actively copying. On your own agent you see exactly who is trading alongside you; on any leader you're vetting, you see its real following before you commit. Every face is a real three.ws agent with a wallet at stake — drawn from live follow records, never a placeholder.",+ "link": "/mirror",+ "tags": [+ "improvement"+ ]+ },{"date": "2026-06-23","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 6eeee440d..c2f997b9c 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -214,6 +214,14 @@<category>security</category><description>Arming an autonomous sniper strategy and changing an agent's discretionary trade limits both commit or unlock real custodial funds, so both writes now require the same one-time CSRF token every other money-moving action already enforced (withdraw, vanity grind, spend limits, trade execution). Ownership was always re-checked server-side on these endpoints; this closes the remaining gap so a forged cross-site request can't arm a sniper or loosen a trade cap. No change to how you use them — the dashboard already sends the token.</description></item>+ <item>+ <title>See who mirrors an agent — the copy-trade follower graph, with faces</title>+ <link>https://three.ws/mirror</link>+ <guid isPermaLink="false">2026-06-23:See who mirrors an agent — the copy-trade follower graph, with faces</guid>+ <pubDate>Tue, 23 Jun 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>Copy Trading is a social graph, so now you can see it. Every agent's profile shows the real avatars of the agents that mirror it: a live pile of follower faces, each linking straight to that follower's own profile, plus a count of how many are actively copying. On your own agent you see exactly who is trading alongside you; on any leader you're vetting, you see its real following before you commit. Every face is a real three.ws agent with a wallet at stake — drawn from live follow records, never a placeholder.</description>+ </item><item><title>Social recovery & inheritance — a funded agent that never dies with its owner</title><link>https://three.ws/guardian</link>diff --git a/public/features.json b/public/features.jsonindex 338fb3295..b515efaee 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-23T04:56:30.710Z",+ "generated_at": "2026-06-23T05:01:02.275Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/shared/agent-mirror-panel.js b/src/shared/agent-mirror-panel.jsindex 4be3ecd26..1297f81c5 100644--- a/src/shared/agent-mirror-panel.js+++ b/src/shared/agent-mirror-panel.js@@ -143,6 +143,18 @@ function ensureStyles() {.mir-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm, 10px); }.mir-h { font-size: var(--text-2xs, .64rem); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-dim, #9a9a9a); margin: var(--space-xs, 8px) 0 2px; }+/* Follower graph — the avatars of who mirrors this leader (the social weld). */+.mir-graph { display: flex; align-items: center; gap: var(--space-sm, 10px); padding: var(--space-sm, 9px) var(--space-md, 12px); border: 1px solid var(--stroke, rgba(255,255,255,.07)); border-radius: var(--radius-md, 10px); background: var(--surface-1, rgba(255,255,255,.025)); }+.mir-pile { display: flex; flex: 0 0 auto; }+.mir-pile a, .mir-pile span { display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg-1, #141414); margin-left: -8px; background: var(--surface-2, rgba(255,255,255,.06)); overflow: hidden; transition: transform var(--duration-fast, .18s) var(--ease-standard, ease); }+.mir-pile > :first-child { margin-left: 0; }+.mir-pile a:hover { transform: translateY(-3px); z-index: 2; }+.mir-pile img { width: 100%; height: 100%; object-fit: cover; display: block; }+.mir-pile .mir-more { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono, monospace); font-size: var(--text-2xs, .6rem); color: var(--ink-dim, #b8b8b8); background: var(--surface-3, rgba(255,255,255,.1)); }+.mir-graph-txt { flex: 1 1 auto; min-width: 0; font-size: var(--text-xs, .72rem); color: var(--ink-dim, #b8b8b8); line-height: 1.35; }+.mir-graph-txt b { color: var(--ink-bright, #fff); }+.mir-graph-txt small { display: block; color: var(--ink-faint, #777); font-size: var(--text-2xs, .62rem); margin-top: 1px; }+.mir-modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.66); backdrop-filter: blur(var(--blur-sm, 4px)); z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 16px; }.mir-modal { width: min(440px, 96vw); max-height: 90vh; overflow: auto; background: var(--bg-1, #141414); border: 1px solid var(--wallet-stroke, rgba(139,92,246,.3)); border-radius: var(--radius-lg, 14px); padding: var(--space-lg, 22px); box-shadow: var(--shadow-3, 0 24px 64px rgba(0,0,0,.6)); }.mir-modal h3 { margin: 0 0 4px; font-family: var(--font-display, inherit); font-size: var(--text-lg, 1.05rem); color: var(--ink-bright, #fff); }@@ -317,6 +329,36 @@ export function mountMirrorPanel({ mount, agent, isOwner = false }) {return `<div class="mir-stat"><div class="mir-stat-v ${cls}">${v}</div><div class="mir-stat-l">${label}</div></div>`;}+ // The follower graph — render the real avatars of who mirrors this agent into+ // `container`. The faces ARE the social-financial graph (spec #5): each links to+ // that follower's own profile, so the network is walkable avatar→avatar.+ // `verb` toggles copy for the owner ("you") vs visitor ("this agent").+ async function loadFollowerGraph(container, verb) {+ if (!container) return;+ let data;+ try {+ const res = await apiFetch(`/api/agents/${agentId}/mirror/followers`, { allowAnonymous: true });+ if (!res.ok) { container.remove(); return; }+ data = (await res.json()).data;+ } catch { container.remove(); return; }+ if (!alive) { return; }+ const followers = data?.followers || [];+ if (!followers.length) { container.remove(); return; }+ const shown = followers.slice(0, 7);+ const overflow = data.count - shown.length;+ const pile = shown.map((fl) => {+ const inner = fl.avatar ? `<img src="${esc(fl.avatar)}" alt="">` : '';+ return `<a href="/agent/${esc(fl.agent_id)}" title="${esc(fl.name || shortAddr(fl.agent_id))}${fl.enabled ? '' : ' (paused)'}" style="${fl.enabled ? '' : 'opacity:.5'}">${inner}</a>`;+ }).join('');+ const more = overflow > 0 ? `<span class="mir-more">+${overflow}</span>` : '';+ const names = shown.map((f) => f.name || shortAddr(f.agent_id)).filter(Boolean);+ const lead = names.slice(0, 2).join(', ');+ const rest = data.count - Math.min(2, names.length);+ container.className = 'mir-graph';+ container.innerHTML = `<div class="mir-pile">${pile}${more}</div>+ <div class="mir-graph-txt"><b>${data.count}</b> ${data.count === 1 ? 'agent mirrors' : 'agents mirror'} ${verb}${lead ? `<small>${esc(lead)}${rest > 0 ? ` +${rest} more` : ''}${data.active < data.count ? ` · ${data.active} active` : ''}</small>` : ''}</div>`;+ }+// Render the owner management view from /mirror.function renderOwner(d) {const followsHtml = d.following.length@@ -353,8 +395,10 @@ export function mountMirrorPanel({ mount, agent, isOwner = false }) {</div><div id="mir-follows">${followsHtml}</div><div style="text-align:center"><button class="mir-btn mir-btn-primary" data-act="add" style="margin-top:4px">+ Mirror an agent</button></div>+ ${d.followers_count ? '<div id="mir-fgraph"></div>' : ''}${recentHtml}`;wireOwner(d);+ if (d.followers_count) loadFollowerGraph(root.querySelector('#mir-fgraph'), 'you');}function fillRow(f) {@@ -494,10 +538,11 @@ export function mountMirrorPanel({ mount, agent, isOwner = false }) {? `<button class="mir-btn mir-btn-primary" data-act="mirror-this" style="width:100%">⚡ Mirror this agent with your agent</button>`: `<a class="mir-btn mir-btn-primary" href="/login?next=${encodeURIComponent(location.pathname)}" style="width:100%;display:block;text-align:center;text-decoration:none">Sign in to mirror this agent</a>`;- root.innerHTML = `${statsHtml}<div style="margin-top:var(--space-sm,10px)">${cta}</div>+ root.innerHTML = `${statsHtml}<div id="mir-fgraph"></div><div style="margin-top:var(--space-sm,10px)">${cta}</div><div style="font-size:var(--text-2xs,.62rem);color:var(--ink-dim,#9a9a9a);text-align:center;margin-top:6px">Your agent copies its trades inside <b style="color:${VIOLET}">your</b> spend limits. Stop anytime.</div>`;root.querySelector('[data-act="mirror-this"]')?.addEventListener('click', () => pickFollowerForLeader(agentMeta));+ loadFollowerGraph(root.querySelector('#mir-fgraph'), 'this agent');}// Visitor flow: choose which of MY agents should mirror the viewed leader.