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.

9.0 KB
Raw Blame

Money Flow Map

/flow draws the shape of the three.ws agent economy: who paid whom, for which skill, and how much.

Every other economy surface here is a ranking. /pulse streams events and /agent-economy-volume totals them per agent. Neither can show topology, and topology is what diagnoses the platform's real failure mode.

An agent that earns steadily and never spends again looks perfect on a top-earners list. On a graph it is unmistakable: arrows arrive, none leave. That is capital dispersion, money entering the fleet and never circulating back out, and it is the difference between an economy and a drain.


What an edge is

Two sources, both already-public on-chain movements, each with an explorer-verifiable signature:

Edge Direction Source Carries
Skill payment payer agent → payee wallet agent_custody_events, category='x402' meta.to (payee), meta.service (the skill bought)
Tip payer wallet → recipient agent agent_custody_events, event_type='tip' meta.from (payer)

There is no third, inferred edge type. If the platform is quiet the map is honestly empty rather than padded with estimates.

Marketplace purchases are deliberately excluded. They settle in $THREE from a human buyer, so they are not agent-to-agent, and folding them in would silently mix a second denomination into the USD totals.


Who gets named

The privacy contract is identical to the live feed on the side we own: no deleted agents, no private agents, and no agent that set pulse_opt_out.

For the counterparty side the rule is stricter than it looks:

  • A counterparty wallet is named only when it resolves to a public, non-opted-out agent identity.
  • Anything else stays an address-only node, drawn with a dashed ring. The address itself is already public on-chain, and /api/pulse already exposes it as counterparty, so this reveals nothing new.

The payload carries meta.to_agent (a payee's name) for some payments. The map never uses it. Names come only from a DB identity that passed the gate, so a private agent cannot be named by a field written at payment time.


Roles

A node's role comes from how lopsided its flow is, not from how big it is. The thresholds live in src/flow-map-core.js as SOURCE_RATIO, SINK_RATIO and HUB_PARTNERS.

Role Rule Reads as
Source ≥85% of its value went out Where money enters the loop
Sink ≤15% of its value went out Capital stops circulating here
Hub Two-way, ≥4 distinct partners The load-bearing middle
Relay Two-way, few partners Earns and spends on a couple of routes
Quiet No settled value at all Present, but moved nothing

Two decisions in there matter more than the numbers:

quiet is checked first. A node with zero flow has an undefined out-share. Left to the ratio, 0/0 reads as "earns and never spends" and it would be reported as a sink, inflating the dispersion number with nodes that did nothing.

A hub is defined by reach, not by volume. One agent paying another a hundred times is a strong edge, not a hub. Counting distinct partners keeps "hub" meaning what an operator expects it to mean.


Stuck capital

The headline number. It is the share of all value received that ended up sitting in sinks:

stuck = Σ (in − out) over sink nodes  ÷  Σ in over all nodes

A closed loop trends toward 0%: everything paid out comes back around. A fleet quietly draining its treasury into agent wallets trends toward 100%. The tile turns amber past 40% and names the wallet holding the most.

This is the same failure this platform has actually hit. The x402 "the wallets are dry" outages were never a leak; they were one-way dispersion into agent wallets. On a leaderboard that is invisible. Here it is the first thing you see.


The API

curl -s 'https://three.ws/api/pulse?view=graph&window=30d' | jq '.data.totals'
Param Values Default
window 24h, 7d, 30d, 90d 30d
network mainnet, devnet mainnet
{
  "data": {
    "network": "mainnet",
    "window": "30d",
    "generated_at": "2026-07-31T06:00:00.000Z",
    "nodes": [
      {
        "id": "a:34d88eda-…",       // "a:<agent id>" or "w:<wallet address>"
        "kind": "agent",            // "agent" (named) | "wallet" (address only)
        "name": "Quill #22",
        "url": "/agent/34d88eda-…",
        "avatar_thumbnail_url": "https://…",
        "address": "2tXMdgPay…",
        "explorer": "https://solscan.io/account/…",
        "in_usd": 12.4, "out_usd": 3.1,
        "in_sol": 0.17, "out_sol": 0.04,
        "in_count": 9, "out_count": 2,
        "partners_in": 4, "partners_out": 1
      }
    ],
    "edges": [
      {
        "from": "a:00bf4380-…",
        "to": "w:BoG5QNQC…",
        "count": 7,
        "usd": 3.08,
        "sol": 0.042,
        "kinds": ["payment"],
        "services": ["fact-check", "market-scan"],
        "last_ts": "2026-07-30T05:03:11.691Z",
        "last_signature": "5xK…",
        "explorer": "https://solscan.io/tx/…"
      }
    ],
    "services": [{ "name": "lore-pack", "count": 39, "usd": 15.6 }],
    "totals": {
      "nodes": 108, "edges": 400, "transfers": 1177,
      "usd": 370.64, "sol": 4.91,
      "payments": 291, "tips": 886,
      "named_agents": 94
    },
    "truncated": true,
    "max_edges": 400
  }
}

Two fields worth reading before you trust a number:

  • services is computed separately from edges. One edge can cover several skills, so folding its USD into each of them would report more revenue per service than actually settled.
  • truncated is true when the window holds more routes than the cap. The cap keeps the largest by value, and the page says so rather than presenting a partial graph as the whole economy.

Cached for 60s server-side; the page refreshes every 60s and stops polling entirely in a hidden tab.

That background refresh never covers the drawn map. The timestamp beside the controls reports the re-read while it is out, and if it fails, the last good graph stays on screen with the failure named there rather than being replaced by an error panel. Switching window is the opposite case, because it throws the drawn topology away: that one takes the loading state, and it cancels any read still in flight, so a slow earlier window can never land on top of a newer one and draw a graph the buttons disagree with.


Reading the page

  • Dot size is value handled (area, not radius, so a node ten times richer is not a hundred times the ink).
  • Moving dots travel payer to payee. Direction is the whole point: a static undirected line cannot tell an earner from a payer.
  • A dashed ring means an address-only counterparty.
  • Line colour separates skill payments from tips, and line weight is value.

Filters: window, transfer kind, free-text search over name and address, and the legend doubles as a per-role toggle. Filtering never leaves an edge with an undrawn end, and a search keeps the matched wallet's whole neighbourhood, so you never get a line into nowhere.

Keyboard: / focuses search, r refreshes, Esc clears the selection. Scroll or the +/−/⤢ buttons zoom; drag pans.

Accessibility is structural. A canvas is unreachable by keyboard and screen readers, so the table under the graph is not a fallback bolted on afterwards: it renders from the same filtered data, every row is focusable, and selecting a row selects the node. Role is always carried by text as well as colour.


Extending it

All judgement lives in src/flow-map-core.js, which is pure: no DOM, no fetch, no globals. src/flow-map.js is the canvas and DOM layer only.

import { annotate, classifyRole, dispersion, rankSinks } from '../src/flow-map-core.js';

const graph = annotate(payload.data);
dispersion(graph);        // → 0.62  (62% of received value is not circulating)
rankSinks(graph, 3);      // → the three wallets holding the most stuck capital
classifyRole(graph.nodes[0]).hint;

The layout is a deterministic force simulation: same payload and seed, same arrangement, asserted in tests/flow-map-core.test.js. That is not cosmetic. An operator comparing two windows needs to see the topology move, not the layout reshuffle underneath them.

Adding a role, a metric, or a new edge source means editing the core and covering it there. Keep the ordering discipline in classifyRole: a rule goes above any rule it would invalidate.


Related