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.

6.6 KB
Raw Blame

Agent Monitor

/monitor is the ops room for the three.ws agent fleet: eleven live panels on one screen, each one a real public endpoint polled on its own cadence.

Every other agent surface answers one question well. /agents lists who exists, /agents-live shows what a single agent is doing on its screen right now, /pulse streams money events, /status reports uptime. The monitor answers the question none of them can on their own: is the fleet healthy, busy, and earning, right now? It is the board you leave open on a second display.


What is on the board

Panel Endpoint Poll Shows
Fleet /api/agents/public?sort=live 60s Every agent ranked by its most recent real action, with action count, chat count, an ERC-8004 chip, and a recency stamp that turns green under 15 minutes
Spotlight <agent-3d> web component on select The selected agent's live 3D avatar, rendered in the page
On Air /api/agent-screen-active 30s Agents casting their screens in the last 120 seconds
Money Pulse /api/pulse?view=stats 60s 24h volume, trades, snipes, payments, tips, active wallets, skill trials and sales, plus a 7-day event sparkline
A2A Hires /api/agent-economy/volume 120s Volume, hire count, provider count and average hire for agents hiring each other, plus top providers
Live Wire /api/pulse (delta-polled) 15s Every settled on-chain event as it lands, kind-tagged, with a Solscan link per row
Leaders /api/pulse?view=stats 60s The 24h tip-earner board
Launches /api/pulse?view=stats 60s Coins agents minted recently, each linking to its mint on Solscan
Forge Feed /api/forge-gallery?scope=community 120s The newest finished community text-to-3D creations as thumbnails
Crews /api/crews/directory 180s Founded crews by size
Systems /api/status 120s Per-service uptime probes, latency, and the fleet uptime summary

The command bar across the top carries platform totals from /api/home-stats and /api/platform/stats, a UTC clock, a health dot driven by the same probe data as the Systems panel, and a refresh-all button.

Every endpoint above is public and unauthenticated. Nothing on this page needs a session, and nothing on it is admin-only. The authenticated operator view lives elsewhere: /api/ops/health behind an admin session or OPS_SECRET for subsystem probes.


Controls

The board is meant to be driven, not just watched.

Control Where What it does
Search Fleet Server-side search on name and description (q=), debounced
Sort Fleet live (default, labeled "recently active": ordered by most recent action), newest, popular, name
Prev / next / full Spotlight Cycle the roster without leaving the board; full opens the avatar fullscreen
main / dev Money Pulse Switch the whole pulse read between mainnet and devnet
7d / 30d / 90d A2A Hires Re-query the hire ledger
Kind chips Live Wire Filter the buffered stream to tips, trades, snipes, payments or launches
Pause Live Wire Freeze the stream so a row can be read or copied
Refresh Command bar Re-poll every panel at once

Keyboard: f focuses fleet search, r refreshes everything, [ and ] cycle the spotlight. (/ is deliberately left alone because the site-wide Cmd+K palette owns it.)


How it behaves

Polling pauses when the tab is hidden and every panel refreshes on the way back, so a board left open overnight does not burn requests against a screen nobody is reading.

The wire is delta-polled, not re-fetched. Each response carries a head_cursor; the next request passes it back as since=, so only genuinely new events arrive. New rows flash once and prepend. A poll that returns nothing new leaves the DOM untouched, which is what keeps your scroll position and your text selection alive in a panel that updates every 15 seconds.

A failed panel degrades alone. Each panel catches its own error, badges itself stale, and offers a retry button. A panel that already rendered good data keeps showing it rather than blanking, because last-known-good beats an empty box. One dead endpoint never takes the board down. A thumbnail that fails to load (fleet, On Air, Leaders and Forge Feed rows) swaps to the designed fallback tile rather than the browser's broken-image glyph.

Empty is a designed state, not a void. No crews yet, no casts running, no hires this window: each empty panel says what would fill it and links to the page where you would do that.

Nothing is simulated. There is no sample data, no placeholder row, and no fabricated number anywhere on this page. When the platform is quiet, the board shows zeroes and says so. /api/home-stats or /api/platform/stats returning available:false leaves the previous totals in place rather than rendering a made-up figure. Neither endpoint reports a zero it did not count: a read that fails answers available:false under a 15-second cache instead of shipping an all-zero payload behind the usual multi-minute one.


Adding a panel

Panels are plain functions in src/monitor.js, one per feed. To add one:

  1. Add the panel markup to pages/monitor.html: a <section class="panel span-N"> with a head, a badge, and a body holding skeleton rows.
  2. Write an async loader that fetches the endpoint, stamps its badge, and renders into the body. Handle the empty case with a .panel-empty that tells the reader what would fill it, and let the shared showError helper own the failure path.
  3. Register it in the JOBS table at the bottom of the file with a poll interval in seconds. The scheduler, the hidden-tab pause, and the refresh-all button pick it up automatically.

Pick the interval from how fast the data actually changes. A 15-second poll on a feed that updates hourly is waste; a 5-minute poll on a live wire makes the board a lie.


Related