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.

Update README.md

nich5a8a9a82efeb
diff --git a/README.md b/README.md
index e8a87f9f4..309ff3d39 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,9 @@
-# three.ws
+# three.ws
https://github.com/user-attachments/assets/d52515d1-cb04-4dd6-98bd-fef233312dc4
**Give your AI a body.** three.ws is an open-source, browser-native 3D AI agent platform. Drop a GLB file, add an LLM brain, register on-chain, and embed anywhere — no plugins, no server uploads, no installs required.
-![three.ws skills demo](https://github.com/nirholas/3D-Agent/raw/refs/heads/main/.github/assets/skills.gif)
-
---
## Table of Contents
@@ -25,11 +23,11 @@ https://github.com/user-attachments/assets/d52515d1-cb04-4dd6-98bd-fef233312dc4
- [Tutorials](#tutorials)
- [Project Structure](#project-structure)
- [The Agent System](#the-agent-system)
- - [Event Bus (Agent Protocol)](#event-bus-agent-protocol)
- - [LLM Runtime](#llm-runtime)
- - [Empathy Layer](#empathy-layer)
- - [Skills](#skills)
- - [Memory](#memory)
+ - [Event Bus (Agent Protocol)](#event-bus-agent-protocol)
+ - [LLM Runtime](#llm-runtime)
+ - [Empathy Layer](#empathy-layer)
+ - [Skills](#skills)
+ - [Memory](#memory)
- [Web Component & Embedding](#web-component--embedding)
- [Widget System](#widget-system)
- [Embed Editor](#embed-editor)
@@ -102,17 +100,17 @@ This is the direction three.ws is heading: **photo → avatar → agent → onch
three.ws ships in four phases. Each phase closes a specific gap between the current platform and the end-state vision: **anyone can mint a 3D agent of themselves, own it onchain, and embed it anywhere on the internet.**
-| Phase | Theme | Status |
-|---|---|---|
-| **0** | Platform foundations (viewer, runtime, ERC-8004, embed layer) | ✅ Shipped |
-| **1** | Selfie → Avatar engine (3-photo capture, hosted inference) | 🟡 In progress — capture UX + quality gates shipped; GPU reconstruction backend wiring |
-| **2** | Agent personalization + voice cloning | 🟡 In progress — voice clone, persona, memory seeds shipped behind `/demos`; main-flow integration next |
+| Phase | Theme | Status |
+| ----- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
+| **0** | Platform foundations (viewer, runtime, ERC-8004, embed layer) | ✅ Shipped |
+| **1** | Selfie → Avatar engine (3-photo capture, hosted inference) | 🟡 In progress — capture UX + quality gates shipped; GPU reconstruction backend wiring |
+| **2** | Agent personalization + voice cloning | 🟡 In progress — voice clone, persona, memory seeds shipped behind `/demos`; main-flow integration next |
| **3** | Onchain economy (agent tokens, reputation markets, royalties) | 🟡 Scaffolding — bonding-curve sim, EAS-reputation viewer, 0xsplits + EAS SDKs landed; contracts + audits next |
-| **4** | Open inference network (decentralized GPU layer) | 🔮 Future — livepeer dep landed for early experimentation |
+| **4** | Open inference network (decentralized GPU layer) | 🔮 Future — livepeer dep landed for early experimentation |
---
-### Phase 0 — Foundations *(Shipped)*
+### Phase 0 — Foundations _(Shipped)_
The full stack is live at [three.ws](https://three.ws): WebGL viewer, LLM agent runtime, ERC-8004 identity contracts, OAuth 2.1 server, MCP endpoint, and the `<agent-3d>` web component. Anyone can register an agent today — but the avatar still has to come from a 3D artist or a third-party tool.
@@ -126,12 +124,14 @@ The full stack is live at [three.ws](https://three.ws): WebGL viewer, LLM agent
**Goal:** any user takes 3 selfies (left, center, right) and receives a rigged, animatable 3D avatar in under 60 seconds.
**Deliverables**
+
- Mobile-first capture UX with realtime quality gates (lighting, framing, blur)
- Multi-view face reconstruction pipeline (FLAME / 3DMM fitting on top of a base body mesh)
- Hosted inference workers (GPU-backed) for sub-minute generation
- Output written directly to R2 + minted as a draft ERC-8004 token
**Compute requirements**
+
- A100/H100-class GPUs for inference, sized to ~10k avatars/day at launch
- Training budget for fine-tuning a stylized face-fitter on a curated dataset
- CDN egress scaling for high-res GLB delivery
@@ -142,9 +142,10 @@ The full stack is live at [three.ws](https://three.ws): WebGL viewer, LLM agent
### Phase 2 — Agent Personalization
-**Goal:** the avatar isn't just *you* — the agent *acts* like you.
+**Goal:** the avatar isn't just _you_ — the agent _acts_ like you.
**Deliverables**
+
- Voice cloning (3–10 seconds of speech → ElevenLabs custom voice bound to the agent)
- Persona extraction from a short onboarding interview (tone, vocabulary, interests)
- Memory seeding from connected accounts (X, GitHub, Farcaster) with explicit user consent
@@ -159,6 +160,7 @@ The full stack is live at [three.ws](https://three.ws): WebGL viewer, LLM agent
**Goal:** agents are real economic objects on EVM and Solana, not just collectibles.
**Deliverables**
+
- **Agent tokens** — ERC-8004 mints with bonding-curve pricing or fair launch options
- **Reputation markets** — stake on agents, earn from their action history (extends `ReputationRegistry.sol`)
- **Skill royalties** — skill authors earn per-call fees through EIP-7710 delegated permissions
@@ -166,6 +168,7 @@ The full stack is live at [three.ws](https://three.ws): WebGL viewer, LLM agent
- **Subscriptions & DCA** — recurring onchain payments to creators (cron infra already in place)
**Funding requirements**
+
- Smart contract audits (multi-firm) for the reputation, royalty, and delegation contracts
- Liquidity for agent token launches
- Indexer infrastructure across Base, Solana, and additional EVM chains
@@ -179,12 +182,14 @@ The full stack is live at [three.ws](https://three.ws): WebGL viewer, LLM agent
**Goal:** decouple agent inference from any single provider. Anyone can run a node; agents pay nodes onchain for compute.
**Deliverables**
+
- Open protocol for agent inference (model weights, GPU runtime, signed responses)
- Node operator client (Docker + GPU drivers) with onchain registration
- Onchain settlement for inference jobs — pay-per-token with cryptographic receipts
- Federation with existing decentralized compute networks where appropriate
**Compute requirements**
+
- Bootstrap GPU credits for early node operators
- Cryptoeconomic security model (slashing, validator set) — research + audit budget
@@ -194,17 +199,17 @@ The full stack is live at [three.ws](https://three.ws): WebGL viewer, LLM agent
### What we need
-| Resource | Used for | Phase |
-|---|---|---|
-| **Inference GPUs** | Avatar generation, agent conversations | 1, 2 |
-| **Training compute** | Fine-tuned face-fitter, voice models | 1, 2 |
-| **Smart contract audits** | Reputation, royalty, delegation contracts | 3 |
-| **Token launch liquidity** | Agent token markets | 3 |
-| **Indexer infrastructure** | Multi-chain crawl + reputation aggregation | 3 |
-| **Node operator credits** | Bootstrap the open inference network | 4 |
-| **Engineering headcount** | Capture pipeline, contracts, indexer, ops | 1–4 |
+| Resource | Used for | Phase |
+| -------------------------- | ------------------------------------------ | ----- |
+| **Inference GPUs** | Avatar generation, agent conversations | 1, 2 |
+| **Training compute** | Fine-tuned face-fitter, voice models | 1, 2 |
+| **Smart contract audits** | Reputation, royalty, delegation contracts | 3 |
+| **Token launch liquidity** | Agent token markets | 3 |
+| **Indexer infrastructure** | Multi-chain crawl + reputation aggregation | 3 |
+| **Node operator credits** | Bootstrap the open inference network | 4 |
+| **Engineering headcount** | Capture pipeline, contracts, indexer, ops | 1–4 |
-Phases 1 and 2 unblock the consumer story — *anyone gets an agent of themselves*. Phases 3 and 4 unblock the onchain story — *those agents are real economic actors that don't depend on any one company to keep running*. Both are required for the vision; neither is funded yet.
+Phases 1 and 2 unblock the consumer story — _anyone gets an agent of themselves_. Phases 3 and 4 unblock the onchain story — _those agents are real economic actors that don't depend on any one company to keep running_. Both are required for the vision; neither is funded yet.
If you want to support the project — compute credits, grants, partnerships, or contributions — open an issue or reach out via [three.ws](https://three.ws).
@@ -213,6 +218,7 @@ If you want to support the project — compute credits, grants, partnerships, or
## Key Features
**3D Viewer**
+
- WebGL 2.0 rendering via three.js r176
- glTF 2.0 and GLB with Draco geometry compression, KTX2 texture compression, and Meshopt mesh optimization
- Khronos-spec glTF validation with line-level error reporting
@@ -221,6 +227,7 @@ If you want to support the project — compute credits, grants, partnerships, or
- Real-time parameter tweaking (lights, exposure, morph weights) via dat.GUI
**Agent Runtime**
+
- LLM brain powered by Claude (Anthropic API) with a structured tool-loop architecture
- Up to 8 tool iterations per turn before returning final output
- Built-in tools: `wave`, `lookAt`, `play_clip`, `setExpression`, `speak`, `remember`
@@ -231,6 +238,7 @@ If you want to support the project — compute credits, grants, partnerships, or
- Anonymous Groq-powered chat for unauthenticated visitors; owner-card gating when an agent has a paying author
**x402 Payments & Bazaar**
+
- Native [x402](https://x402.org) paid endpoints on Base, BSC, and Solana — agents pay other agents in USDC for API calls, asset downloads, and skill royalties
- Coinbase CDP facilitator on Base mainnet; direct-scheme payments on BSC
- Permit2 gas-sponsoring siblings on every CDP-settled endpoint (buyer signs, relayer pays gas)
@@ -240,10 +248,12 @@ If you want to support the project — compute credits, grants, partnerships, or
- Listed on [x402scan](https://www.x402scan.com/server/17cbd874-52ac-4920-a020-b22ff2489a07) and the [MCP Registry](https://registry.modelcontextprotocol.io/?q=three.ws)
**A2A — Agent-to-Agent Protocol**
+
- A2A client + server, MCP bridge, DID resolution, spending ledger, receipts storage
- Agents transact autonomously via their delegated signer wallets and EIP-7710 permissions
**Identity & On-Chain**
+
- ERC-8004 smart contracts (IdentityRegistry, ReputationRegistry, ValidationRegistry) deployable on any EVM chain
- Each agent is an ERC-721 token with a stable `agentId`, owner wallet, delegated signer (EIP-712), and IPFS-pinned manifest
- Signed action log — every `speak`, `remember`, `skill-done`, and `validate` event is recorded on-chain-optionally or in the database with a cryptographic signature
@@ -251,6 +261,7 @@ If you want to support the project — compute credits, grants, partnerships, or
- Solana support (SIWS sign-in, Solana wallet linking, Metaplex NFT option)
**Embedding & Distribution**
+
- `<agent-3d>` custom element — drop it anywhere with no framework dependency
- Five widget variants: turntable, animation gallery, talking agent, ERC-8004 passport card, hotspot tour
- Widget Studio + WYSIWYG **Embed Editor** at `/embed-editor` — pick an avatar, animation, framing, and background, copy the snippet
@@ -259,11 +270,13 @@ If you want to support the project — compute credits, grants, partnerships, or
- Versioned CDN bundles at `/agent-3d/x.y.z/agent-3d.js`
**Multi-User 3D**
+
- **The Club** at `/club` — multiplayer venue with rigged dancers, audio tracks, tips, leaderboard, payouts cron, perf-aware renderer that auto-downgrades on slow frames
- **Walk** at `/walk` — authoritative multiplayer walk scene backed by a Colyseus server in `multiplayer/` (deployable on Fly.io)
- **Pose Studio** at `/pose-studio` — author and export reusable avatar poses
**Backend & Integrations**
+
- OAuth 2.1 server (RFC 6749 + PKCE, RFC 7591 dynamic registration, RFC 7009 revocation, RFC 7662 introspection, RFC 8414 discovery)
- Developer API keys with scope and expiry
- MCP (Model Context Protocol) over HTTP with JSON-RPC 2.0 for tool-calling from external AI systems; A2A bridge exposes paid tools as x402 endpoints
@@ -282,35 +295,35 @@ If you want to support the project — compute credits, grants, partnerships, or
A map of every user-facing route. Full detail (source files, feature descriptions, hash-routes) is in [docs/internal/PAGES.md](docs/internal/PAGES.md).
-| Section | Key URLs | What it does |
-|---|---|---|
-| **Landing** | `/`, `/features`, `/discover` | Marketing, public agent directory |
-| **App / Core** | `/app`, `/create`, `/first-meet` | 3D viewer, agent creation wizard, onboarding |
-| **Marketplace** | `/marketplace`, `/marketplace/agents/[id]` | Browsable agent marketplace |
-| **Chat SPA** | `/chat` | Full Svelte AI chat with model selector, tools, artifacts, wallet |
-| **Chat — Marketing** | `/chat#solutions/*`, `/chat#business/*` | Per-team and enterprise landing pages |
-| **Chat — Features** | `/chat#features/*` | Feature detail pages (web-app, mobile-app, ai-design, ai-slides, browser-operator, wide-research, mail, skills) |
-| **Chat — Resources** | `/chat#resources/*` | Blog, docs, trust center, updates, use cases |
-| **Auth** | `/login`, `/register`, `/forgot-password`, `/reset-password` | Email + wallet sign-in/up |
-| **Agent (Platform)** | `/agent/[id]`, `/agent/[id]/embed`, `/agent/[id]/edit` | Agent chat, chromeless embed, manifest editor |
-| **Agent (On-Chain)** | `/a/[chain]/[id]`, `/a/sol/[asset]` | ERC-8004 and Metaplex Core passports |
-| **Profile** | `/profile`, `/u/[username]`, `/avatars/[id]` | User and avatar public pages |
-| **Dashboard** | `/dashboard`, `/dashboard/actions`, `/dashboard/wallets`, `/dashboard/usage`, `/dashboard/x402` | Account management, settings, and x402 receipts/payouts |
-| **Studio / Tools** | `/studio`, `/embed-editor`, `/pose-studio`, `/hydrate`, `/validation`, `/strategy-lab` | Widget Studio, WYSIWYG embed editor, pose authoring, on-chain import, glTF validator, DCA |
-| **Widgets** | `/widgets`, `/w/[id]` | Widget gallery and public widget pages (OG + oEmbed) |
-| **Launchpad** | `/launchpad`, `/p/[slug]` | Launchpad Studio + hosted launch pages (token, agent, drop campaigns) |
-| **Club** | `/club` | Multiplayer 3D venue — tips, leaderboard, audio tracks, perf-aware renderer |
-| **Walk** | `/walk` | Authoritative multiplayer walk scene (Colyseus on Fly.io) |
-| **Bazaar (x402)** | `/x402`, `/x402-discover`, `/x402-pay` | Paid-API marketplace, discovery, Stripe-style checkout |
-| **Artifacts** | `/artifact`, `/artifact/snippet`, `/artifact-example` | Claude Artifact viewer |
-| **Solana / DeFi** | `/pumpfun`, `/pump-visualizer`, `/vanity-wallet` | pump.fun launcher, live token visualizer, WASM vanity grinder |
-| **Mobile (Seeker)** | Solana Mobile dApp Store | MWA wallet wired into the web app + Seeker release pipeline |
-| **News / Blog** | `/news`, `/admin/news` | News feed + local-only CMS, syndicated via WebSub / Dev.to / Medium / HackerNoon |
-| **Admin / Rep** | `/admin`, `/reputation` | Staff admin, reputation registry |
-| **Experiments** | `/rider` | A-Frame WebVR music visualization |
-| **Integrations** | `/cz`, `/lobehub/iframe` | CZ demo, LobeHub plugin |
-| **Docs** | `/docs`, `/docs/widgets` | Developer documentation |
-| **Legal** | `/legal/privacy`, `/legal/tos` | Privacy policy and terms |
+| Section | Key URLs | What it does |
+| -------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
+| **Landing** | `/`, `/features`, `/discover` | Marketing, public agent directory |
+| **App / Core** | `/app`, `/create`, `/first-meet` | 3D viewer, agent creation wizard, onboarding |
+| **Marketplace** | `/marketplace`, `/marketplace/agents/[id]` | Browsable agent marketplace |
+| **Chat SPA** | `/chat` | Full Svelte AI chat with model selector, tools, artifacts, wallet |
+| **Chat — Marketing** | `/chat#solutions/*`, `/chat#business/*` | Per-team and enterprise landing pages |
+| **Chat — Features** | `/chat#features/*` | Feature detail pages (web-app, mobile-app, ai-design, ai-slides, browser-operator, wide-research, mail, skills) |
+| **Chat — Resources** | `/chat#resources/*` | Blog, docs, trust center, updates, use cases |
+| **Auth** | `/login`, `/register`, `/forgot-password`, `/reset-password` | Email + wallet sign-in/up |
+| **Agent (Platform)** | `/agent/[id]`, `/agent/[id]/embed`, `/agent/[id]/edit` | Agent chat, chromeless embed, manifest editor |
+| **Agent (On-Chain)** | `/a/[chain]/[id]`, `/a/sol/[asset]` | ERC-8004 and Metaplex Core passports |
+| **Profile** | `/profile`, `/u/[username]`, `/avatars/[id]` | User and avatar public pages |
+| **Dashboard** | `/dashboard`, `/dashboard/actions`, `/dashboard/wallets`, `/dashboard/usage`, `/dashboard/x402` | Account management, settings, and x402 receipts/payouts |
+| **Studio / Tools** | `/studio`, `/embed-editor`, `/pose-studio`, `/hydrate`, `/validation`, `/strategy-lab` | Widget Studio, WYSIWYG embed editor, pose authoring, on-chain import, glTF validator, DCA |
+| **Widgets** | `/widgets`, `/w/[id]` | Widget gallery and public widget pages (OG + oEmbed) |
+| **Launchpad** | `/launchpad`, `/p/[slug]` | Launchpad Studio + hosted launch pages (token, agent, drop campaigns) |
+| **Club** | `/club` | Multiplayer 3D venue — tips, leaderboard, audio tracks, perf-aware renderer |
+| **Walk** | `/walk` | Authoritative multiplayer walk scene (Colyseus on Fly.io) |
+| **Bazaar (x402)** | `/x402`, `/x402-discover`, `/x402-pay` | Paid-API marketplace, discovery, Stripe-style checkout |
+| **Artifacts** | `/artifact`, `/artifact/snippet`, `/artifact-example` | Claude Artifact viewer |
+| **Solana / DeFi** | `/pumpfun`, `/pump-visualizer`, `/vanity-wallet` | pump.fun launcher, live token visualizer, WASM vanity grinder |
+| **Mobile (Seeker)** | Solana Mobile dApp Store | MWA wallet wired into the web app + Seeker release pipeline |
+| **News / Blog** | `/news`, `/admin/news` | News feed + local-only CMS, syndicated via WebSub / Dev.to / Medium / HackerNoon |
+| **Admin / Rep** | `/admin`, `/reputation` | Staff admin, reputation registry |
+| **Experiments** | `/rider` | A-Frame WebVR music visualization |
+| **Integrations** | `/cz`, `/lobehub/iframe` | CZ demo, LobeHub plugin |
+| **Docs** | `/docs`, `/docs/widgets` | Developer documentation |
+| **Legal** | `/legal/privacy`, `/legal/tos` | Privacy policy and terms |
---
@@ -318,29 +331,29 @@ A map of every user-facing route. Full detail (source files, feature description
three.ws is available on major cloud marketplaces and open to infrastructure partnerships.
-| Cloud | Status |
-|---|---|
+| Cloud | Status |
+| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Alibaba Cloud** | Live: [product listing →](https://marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html) · [storefront →](https://marketplace.alibabacloud.com/store/3247293.html) |
-| **Google Cloud** | three.ws runs on WebGL, Vercel edge, and EVM — a natural fit for GCP's AI infrastructure, Vertex AI, and global CDN. Open to co-listing, credits, and joint GTM. |
+| **Google Cloud** | three.ws runs on WebGL, Vercel edge, and EVM — a natural fit for GCP's AI infrastructure, Vertex AI, and global CDN. Open to co-listing, credits, and joint GTM. |
## Ecosystem Directories
three.ws is indexed in chain-ecosystem dApp directories so the community can discover, vet, and rank it.
-| Directory | Status |
-|---|---|
+| Directory | Status |
+| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **BNB Chain · Dappbay** | Live: [dappbay.bnbchain.org/detail/three →](https://dappbay.bnbchain.org/detail/three) — categories: AI Agent Launchpad · AI Data · AI Infra |
---
## Screenshots
-| Viewer | Widget Studio |
-|--------|--------------|
+| Viewer | Widget Studio |
+| ---------------------------------------- | ----------------------------------------------- |
| ![Viewer](public/screenshots/viewer.png) | ![Widget Studio](public/screenshots/studio.png) |
-| Agent Discovery | Avatar Creation |
-|----------------|----------------|
+| Agent Discovery | Avatar Creation |
+| -------------------------------------------- | ---------------------------------------- |
| ![Discover](public/screenshots/discover.png) | ![Create](public/screenshots/create.png) |
---
@@ -384,27 +397,31 @@ The backend is stateless serverless functions. All persistent state lives in Pos
## Tech Stack
**Frontend**
-- **Main UI**: The core application, including the 3D viewer, agent creation, and marketplace, is built with vanilla JavaScript modules and Vite.
-- **Chat**: The chat interface is a standalone Svelte application located in the `chat/` directory.
-- **3D Rendering**: three.js (r176) is used for WebGL 2.0 rendering.
+
+- **Main UI**: The core application, including the 3D viewer, agent creation, and marketplace, is built with vanilla JavaScript modules and Vite.
+- **Chat**: The chat interface is a standalone Svelte application located in the `chat/` directory.
+- **3D Rendering**: three.js (r176) is used for WebGL 2.0 rendering.
**Backend (Vercel Serverless)**
-- **Runtime**: Node.js
-- **Database**: Neon Postgres (serverless)
-- **Storage**: Cloudflare R2 for model and avatar storage.
-- **Rate Limiting**: Upstash Redis.
-- **LLM**: The agent's brain is powered by the Anthropic (Claude) SDK.
+
+- **Runtime**: Node.js
+- **Database**: Neon Postgres (serverless)
+- **Storage**: Cloudflare R2 for model and avatar storage.
+- **Rate Limiting**: Upstash Redis.
+- **LLM**: The agent's brain is powered by the Anthropic (Claude) SDK.
**Smart Contracts**
-- **Language**: Solidity 0.8+
-- **Framework**: Foundry for compiling, testing, and deploying the ERC-8004 contracts.
-- **Standards**: ERC-721, EIP-712, EIP-7710.
+
+- **Language**: Solidity 0.8+
+- **Framework**: Foundry for compiling, testing, and deploying the ERC-8004 contracts.
+- **Standards**: ERC-721, EIP-712, EIP-7710.
---
## Getting Started
### Prerequisites
+
- Node.js 24+ (the project pins `"engines.node": "24.x"` in `package.json`; earlier majors are not tested)
- npm 10+
- A Neon Postgres database
@@ -412,6 +429,7 @@ The backend is stateless serverless functions. All persistent state lives in Pos
- An Anthropic API key
### Installation and Setup
+
1. **Clone the repository**:
```bash
git clone https://github.com/nirholas/3D-Agent.git
@@ -435,7 +453,7 @@ The backend is stateless serverless functions. All persistent state lives in Pos
```bash
npm run dev
```
-The application will be available at `http://localhost:3000`.
+ The application will be available at `http://localhost:3000`.
---
@@ -450,18 +468,29 @@ The simplest possible setup — one script tag, one element, zero build step.
```html
<!doctype html>
<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>3D Viewer</title>
- <style>
- body { margin: 0; background: #0a0a0a; display: flex; align-items: center; justify-content: center; height: 100vh; }
- agent-3d { width: 400px; height: 560px; display: block; }
- </style>
-</head>
-<body>
- <script type="module" src="https://three.ws/agent-3d/1.5.1/agent-3d.js"></script>
- <agent-3d body="https://cdn.three.ws/models/sample-avatar.glb"></agent-3d>
-</body>
+ <head>
+ <meta charset="utf-8" />
+ <title>3D Viewer</title>
+ <style>
+ body {
+ margin: 0;
+ background: #0a0a0a;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100vh;
+ }
+ agent-3d {
+ width: 400px;
+ height: 560px;
+ display: block;
+ }
+ </style>
+ </head>
+ <body>
+ <script type="module" src="https://three.ws/agent-3d/1.5.1/agent-3d.js"></script>
+ <agent-3d body="https://cdn.three.ws/models/sample-avatar.glb"></agent-3d>
+ </body>
</html>
```
@@ -477,14 +506,14 @@ Add `brain=` and `instructions=` to turn the viewer into a conversational agent.
<script type="module" src="https://three.ws/agent-3d/1.5.1/agent-3d.js"></script>
<agent-3d
- body="https://cdn.three.ws/models/sample-avatar.glb"
- brain="claude-sonnet-4-6"
- name="Aria"
- instructions="You are Aria, a friendly AI guide. Be warm, concise, and occasionally playful.
+ body="https://cdn.three.ws/models/sample-avatar.glb"
+ brain="claude-sonnet-4-6"
+ name="Aria"
+ instructions="You are Aria, a friendly AI guide. Be warm, concise, and occasionally playful.
When someone greets you, wave at them. Keep replies to 2–3 sentences."
- mode="inline"
- width="400px"
- height="560px"
+ mode="inline"
+ width="400px"
+ height="560px"
></agent-3d>
```
@@ -500,13 +529,13 @@ Pin the agent to a corner of the page so it persists as users scroll.
<script type="module" src="https://three.ws/agent-3d/1.5.1/agent-3d.js"></script>
<agent-3d
- body="https://cdn.three.ws/models/sample-avatar.glb"
- brain="claude-sonnet-4-6"
- instructions="You are a helpful product assistant. Answer questions about our features."
- mode="floating"
- position="bottom-right"
- width="320px"
- height="420px"
+ body="https://cdn.three.ws/models/sample-avatar.glb"
+ brain="claude-sonnet-4-6"
+ instructions="You are a helpful product assistant. Answer questions about our features."
+ mode="floating"
+ position="bottom-right"
+ width="320px"
+ height="420px"
></agent-3d>
```
@@ -537,48 +566,55 @@ Hide the built-in chrome and wire in your own input using the element's JS API.
```html
<script type="module" src="https://three.ws/agent-3d/1.5.1/agent-3d.js"></script>
-<agent-3d id="agent" body="./avatar.glb" brain="claude-sonnet-4-6" kiosk
- style="width:400px;height:560px;display:block"></agent-3d>
+<agent-3d
+ id="agent"
+ body="./avatar.glb"
+ brain="claude-sonnet-4-6"
+ kiosk
+ style="width:400px;height:560px;display:block"
+></agent-3d>
-<input id="msg" type="text" placeholder="Ask something…">
+<input id="msg" type="text" placeholder="Ask something…" />
<button onclick="send()">Send</button>
<script>
- const agent = document.getElementById('agent');
- const input = document.getElementById('msg');
-
- async function send() {
- const text = input.value.trim();
- if (!text) return;
- input.value = '';
- await agent.say(text);
- }
-
- input.addEventListener('keydown', e => { if (e.key === 'Enter') send(); });
-
- // Auto-greet on load
- agent.addEventListener('agent:ready', () => {
- setTimeout(() => agent.say('Hello! How can I help you today?'), 1200);
- });
-
- // Listen to replies
- agent.addEventListener('brain:message', e => {
- if (e.detail.role === 'assistant') console.log('Agent:', e.detail.content);
- });
+ const agent = document.getElementById('agent');
+ const input = document.getElementById('msg');
+
+ async function send() {
+ const text = input.value.trim();
+ if (!text) return;
+ input.value = '';
+ await agent.say(text);
+ }
+
+ input.addEventListener('keydown', (e) => {
+ if (e.key === 'Enter') send();
+ });
+
+ // Auto-greet on load
+ agent.addEventListener('agent:ready', () => {
+ setTimeout(() => agent.say('Hello! How can I help you today?'), 1200);
+ });
+
+ // Listen to replies
+ agent.addEventListener('brain:message', (e) => {
+ if (e.detail.role === 'assistant') console.log('Agent:', e.detail.content);
+ });
</script>
```
**Full JS API:**
-| Method | Description |
-|---|---|
-| `agent.say(text)` | Send a message; agent speaks and animates the reply |
-| `agent.ask(text)` | Same as `say()`, returns reply text as a string |
-| `agent.wave()` | Trigger the wave gesture directly |
-| `agent.lookAt(target)` | `'camera'`, `'model'`, or `'user'` |
-| `agent.play(clipName)` | Play a named animation clip |
-| `agent.clearConversation()` | Reset conversation history |
-| `agent.expressEmotion(trigger, weight)` | Manually inject an emotion blend |
+| Method | Description |
+| --------------------------------------- | --------------------------------------------------- |
+| `agent.say(text)` | Send a message; agent speaks and animates the reply |
+| `agent.ask(text)` | Same as `say()`, returns reply text as a string |
+| `agent.wave()` | Trigger the wave gesture directly |
+| `agent.lookAt(target)` | `'camera'`, `'model'`, or `'user'` |
+| `agent.play(clipName)` | Play a named animation clip |
+| `agent.clearConversation()` | Reset conversation history |
+| `agent.expressEmotion(trigger, weight)` | Manually inject an emotion blend |
**Key events:** `agent:ready`, `brain:message`, `brain:thinking`, `skill:tool-called`, `voice:transcript`
@@ -590,12 +626,12 @@ Use a widget URL directly — no script tag needed.
```html
<iframe
- src="https://three.ws/a/8453/42/embed"
- width="400"
- height="560"
- frameborder="0"
- allow="microphone"
- style="border-radius:16px;"
+ src="https://three.ws/a/8453/42/embed"
+ width="400"
+ height="560"
+ frameborder="0"
+ allow="microphone"
+ style="border-radius:16px;"
></iframe>
```
@@ -608,30 +644,29 @@ Generate the `src` URL from [Widget Studio](https://three.ws/studio) — pick an
For anything beyond a quick one-liner, define the agent in a manifest file and reference it with `manifest=`.
**agent.json:**
+
```json
{
- "spec": "agent-manifest/0.2",
- "name": "Aria",
- "description": "A friendly AI guide",
- "body": {
- "uri": "./avatar.glb",
- "format": "gltf-binary"
- },
- "brain": {
- "provider": "anthropic",
- "model": "claude-sonnet-4-6",
- "instructions": "You are Aria, a warm and curious AI guide. Wave when greeted.",
- "temperature": 0.8,
- "maxTokens": 1024
- },
- "voice": {
- "tts": { "provider": "browser", "rate": 1.05 },
- "stt": { "provider": "browser", "language": "en-US" }
- },
- "memory": { "mode": "local" },
- "skills": [
- { "uri": "https://cdn.three.ws/skills/wave/" }
- ]
+ "spec": "agent-manifest/0.2",
+ "name": "Aria",
+ "description": "A friendly AI guide",
+ "body": {
+ "uri": "./avatar.glb",
+ "format": "gltf-binary"
+ },
+ "brain": {
+ "provider": "anthropic",
+ "model": "claude-sonnet-4-6",
+ "instructions": "You are Aria, a warm and curious AI guide. Wave when greeted.",
+ "temperature": 0.8,
+ "maxTokens": 1024
+ },
+ "voice": {
+ "tts": { "provider": "browser", "rate": 1.05 },
+ "stt": { "provider": "browser", "language": "en-US" }
+ },
+ "memory": { "mode": "local" },
+ "skills": [{ "uri": "https://cdn.three.ws/skills/wave/" }]
}
```
@@ -646,16 +681,17 @@ For anything beyond a quick one-liner, define the agent in a manifest file and r
For the absolute simplest way to embed an agent, use this snippet. It requires no build tools or imports. Just copy and paste it into your HTML.
```html
-<div class="threews-widget"
- data-agent-id="YOUR_AGENT_ID"
- data-background="transparent"
- data-nameplate="true"
- style="width: 400px; height: 500px;">
-</div>
+<div
+ class="threews-widget"
+ data-agent-id="YOUR_AGENT_ID"
+ data-background="transparent"
+ data-nameplate="true"
+ style="width: 400px; height: 500px;"
+></div>
<script src="https://3d-agent.vercel.app/dist/widget.js" defer></script>
```
-You can find your agent ID in the agent's settings page. This method is great for quick integrations on platforms like WordPress, Ghost, or any static HTML site. Customize the appearance with `data-background` and `data-nameplate`.
+You can find your agent ID in the agent's settings page. This method is great for quick integrations on platforms like WordPress, Ghost, or any static HTML site. Customize the appearance with `data-background` and `data-nameplate`.
---
@@ -663,19 +699,20 @@ You can find your agent ID in the agent's settings page. This method is great fo
Step-by-step guides in [`docs/tutorials/`](docs/tutorials/):
-| Tutorial | What you'll build | Time |
-|---|---|---|
-| [Build Your First Agent](docs/tutorials/first-agent.md) | A talking 3D character on a shareable page, from zero | ~20 min |
-| [Embed on Your Website](docs/tutorials/embed-on-website.md) | Add an agent to any page — plain HTML, React, Webflow, WordPress | ~15 min |
-| [Write a Custom Skill](docs/tutorials/custom-skill.md) | A new tool the agent can call (e.g., fetch live weather data) | ~30 min |
-| [Register On-Chain](docs/tutorials/register-onchain.md) | Mint your agent as an ERC-8004 token with permanent identity | ~20 min |
-| [Build a Personal AI Site](docs/tutorials/personal-ai-site.md) | A full personal site with an embedded AI version of yourself | ~45 min |
+| Tutorial | What you'll build | Time |
+| -------------------------------------------------------------- | ---------------------------------------------------------------- | ------- |
+| [Build Your First Agent](docs/tutorials/first-agent.md) | A talking 3D character on a shareable page, from zero | ~20 min |
+| [Embed on Your Website](docs/tutorials/embed-on-website.md) | Add an agent to any page — plain HTML, React, Webflow, WordPress | ~15 min |
+| [Write a Custom Skill](docs/tutorials/custom-skill.md) | A new tool the agent can call (e.g., fetch live weather data) | ~30 min |
+| [Register On-Chain](docs/tutorials/register-onchain.md) | Mint your agent as an ERC-8004 token with permanent identity | ~20 min |
+| [Build a Personal AI Site](docs/tutorials/personal-ai-site.md) | A full personal site with an embedded AI version of yourself | ~45 min |
### Common gotchas
**CORS** — if your GLB is hosted on a different domain, the server must send `Access-Control-Allow-Origin: *`. Without it the fetch is blocked and the canvas stays blank. Uploading via the platform's storage sets this automatically.
**File size** — models over ~50 MB load slowly. Compress with Draco:
+
```bash
npx gltf-transform draco input.glb output.glb
```
@@ -683,33 +720,35 @@ npx gltf-transform draco input.glb output.glb
**Voice on HTTPS** — `getUserMedia` (microphone) requires HTTPS. Localhost is exempt; any remote deployment needs TLS. Vercel and Netlify both provide it automatically.
**CSP** — if your page has a strict Content Security Policy, add:
+
```
script-src 'self' https://three.ws;
```
+
For sandboxed iframes use the widget embed path instead — it runs in its own browsing context.
---
## Project Structure
-- `src/`: The core frontend JavaScript for the main application, including the 3D viewer, agent protocol, custom element, and feature modules (`club-*.js`, `walk*.js`, `pose-*.js`, `voice/`, `selfie-*.js`).
-- `api/`: Vercel serverless functions that form the backend API. Subdirectories include `x402/`, `a2a/`, `club/`, `pump/`, `persona/`, `news/`, `admin/`, `agents/`, `auth/`, `oauth/`, `cron/`.
-- `public/`: Static assets and various sub-applications (`club/`, `seeker/`, `news/`, `persona/`, `vanity-wallet.html`, `pumpfun.html`).
-- `chat/`: A standalone Svelte application for the chat interface.
-- `character-studio/`: A sub-project for in-browser character creation; also serves the rebranded **Avatar Studio** marketplace.
-- `rider/`: A-Frame WebVR music visualization experiment.
-- `contracts/`: Solidity smart contracts for on-chain identity (ERC-8004) and the multichain payment factory.
-- `multiplayer/`: Colyseus WebSocket server for `/walk` and other realtime rooms; deployable on Fly.io.
-- `sdk/`: `@nirholas/agent-kit` and the Avatar SDK (`sdk/agent-sdk/`).
-- `agent-payments-sdk/`: EVM agent payments SDK.
-- `solana-agent-sdk/`: SDK for Solana blockchain interactions (Metaplex Core mints, SIWS, attestations).
-- `pump-fun-skills/`: Skills related to the pump.fun integration.
-- `scripts/`: Node.js scripts for development, build, deployment, and pump.fun launch automation.
-- `workers/`: Code for background workers — includes the Cloudflare Worker mirror of the pump.fun MCP read API in [`workers/pump-fun-mcp/`](workers/pump-fun-mcp/).
-- `docs/`: Public-facing developer docs.
-- `docs/internal/`: Working docs (PLAN, STATUS, TODO, NEXT, PROGRESS, RELEASE_CHECKLIST) — not part of the published docs surface.
-- `docs/club/`: Pole-club venue design, performance notes, and release checklist.
-- `tests/`: Vitest unit tests (`tests/api/`, `tests/src/`, `tests/workers/`) and Playwright end-to-end smokes (`tests/e2e/`).
+- `src/`: The core frontend JavaScript for the main application, including the 3D viewer, agent protocol, custom element, and feature modules (`club-*.js`, `walk*.js`, `pose-*.js`, `voice/`, `selfie-*.js`).
+- `api/`: Vercel serverless functions that form the backend API. Subdirectories include `x402/`, `a2a/`, `club/`, `pump/`, `persona/`, `news/`, `admin/`, `agents/`, `auth/`, `oauth/`, `cron/`.
+- `public/`: Static assets and various sub-applications (`club/`, `seeker/`, `news/`, `persona/`, `vanity-wallet.html`, `pumpfun.html`).
+- `chat/`: A standalone Svelte application for the chat interface.
+- `character-studio/`: A sub-project for in-browser character creation; also serves the rebranded **Avatar Studio** marketplace.
+- `rider/`: A-Frame WebVR music visualization experiment.
+- `contracts/`: Solidity smart contracts for on-chain identity (ERC-8004) and the multichain payment factory.
+- `multiplayer/`: Colyseus WebSocket server for `/walk` and other realtime rooms; deployable on Fly.io.
+- `sdk/`: `@nirholas/agent-kit` and the Avatar SDK (`sdk/agent-sdk/`).
+- `agent-payments-sdk/`: EVM agent payments SDK.
+- `solana-agent-sdk/`: SDK for Solana blockchain interactions (Metaplex Core mints, SIWS, attestations).
+- `pump-fun-skills/`: Skills related to the pump.fun integration.
+- `scripts/`: Node.js scripts for development, build, deployment, and pump.fun launch automation.
+- `workers/`: Code for background workers — includes the Cloudflare Worker mirror of the pump.fun MCP read API in [`workers/pump-fun-mcp/`](workers/pump-fun-mcp/).
+- `docs/`: Public-facing developer docs.
+- `docs/internal/`: Working docs (PLAN, STATUS, TODO, NEXT, PROGRESS, RELEASE_CHECKLIST) — not part of the published docs surface.
+- `docs/club/`: Pole-club venue design, performance notes, and release checklist.
+- `tests/`: Vitest unit tests (`tests/api/`, `tests/src/`, `tests/workers/`) and Playwright end-to-end smokes (`tests/e2e/`).
---
@@ -723,20 +762,20 @@ The bus maintains a 200-action ring buffer for debugging and replay. Embed varia
**Core event types:**
-| Event | Payload | Who emits | Who listens |
-|---|---|---|---|
-| `speak` | `{ text, sentiment: -1..1 }` | runtime, skills | avatar (emotion), identity (log), chat UI |
-| `think` | `{ thought }` | runtime | home (timeline), avatar |
-| `gesture` | `{ name, duration }` | avatar, skills | avatar (one-shot clip) |
-| `emote` | `{ trigger, weight: 0..1 }` | avatar | avatar (emotion inject) |
-| `look-at` | `{ target: 'user'\|'camera'\|'center' }` | skills | scene controller |
-| `perform-skill` | `{ skill, args, animationHint }` | runtime | skill registry |
-| `skill-done` | `{ skill, result }` | skills | avatar, identity |
-| `skill-error` | `{ skill, error }` | skills | avatar, identity |
-| `remember` | `{ type, content, ... }` | skills, runtime | memory, identity |
-| `load-start` / `load-end` | `{ uri, error? }` | viewer | avatar (emotion) |
-| `validate` | `{ errors, warnings }` | validator | avatar, identity |
-| `presence` | `{ state }` | element | home UI |
+| Event | Payload | Who emits | Who listens |
+| ------------------------- | ---------------------------------------- | --------------- | ----------------------------------------- |
+| `speak` | `{ text, sentiment: -1..1 }` | runtime, skills | avatar (emotion), identity (log), chat UI |
+| `think` | `{ thought }` | runtime | home (timeline), avatar |
+| `gesture` | `{ name, duration }` | avatar, skills | avatar (one-shot clip) |
+| `emote` | `{ trigger, weight: 0..1 }` | avatar | avatar (emotion inject) |
+| `look-at` | `{ target: 'user'\|'camera'\|'center' }` | skills | scene controller |
+| `perform-skill` | `{ skill, args, animationHint }` | runtime | skill registry |
+| `skill-done` | `{ skill, result }` | skills | avatar, identity |
+| `skill-error` | `{ skill, error }` | skills | avatar, identity |
+| `remember` | `{ type, content, ... }` | skills, runtime | memory, identity |
+| `load-start` / `load-end` | `{ uri, error? }` | viewer | avatar (emotion) |
+| `validate` | `{ errors, warnings }` | validator | avatar, identity |
+| `presence` | `{ state }` | element | home UI |
Identity-relevant events (`speak`, `remember`, `sign`, `skill-done`, `validate`, `load-end`) are fire-and-forwarded to `POST /api/agent-actions` for durable logging.
@@ -750,27 +789,41 @@ Identity-relevant events (`speak`, `remember`, `sign`, `skill-done`, `validate`,
2. System prompt is assembled: manifest instructions + recalled memory + skill descriptions
3. Claude is called with the conversation history and all available tools
4. Tool calls are dispatched in order — each built-in tool or skill handler receives a rich context object:
- ```js
- { viewer, memory, llm, speak, listen, fetch, loadGLB, loadClip, loadJSON, call, stage, agentId }
- ```
+ ```js
+ {
+ viewer,
+ memory,
+ llm,
+ speak,
+ listen,
+ fetch,
+ loadGLB,
+ loadClip,
+ loadJSON,
+ call,
+ stage,
+ agentId;
+ }
+ ```
5. Tool results are appended to conversation history as `tool_result` messages
6. Steps 3–5 repeat until Claude returns with no tool calls, or the iteration limit (8) is hit
7. Final text response is optionally spoken via TTS
**Providers** (`src/runtime/providers.js`):
+
- `AnthropicProvider` — connects to the Anthropic API, supports streaming
- `NullProvider` — no-op for testing and offline mode
**Built-in tools** (`src/runtime/tools.js`):
-| Tool | Description |
-|---|---|
-| `wave` | Play a wave gesture animation |
-| `lookAt` | Direct the agent's gaze (user, camera, or scene center) |
-| `play_clip` | Play a named animation clip from the model or animation library |
-| `setExpression` | Set a named morph target weight directly |
-| `speak` | Emit text through TTS and the protocol bus |
-| `remember` | Write a memory entry (user, feedback, project, or reference type) |
+| Tool | Description |
+| --------------- | ----------------------------------------------------------------- |
+| `wave` | Play a wave gesture animation |
+| `lookAt` | Direct the agent's gaze (user, camera, or scene center) |
+| `play_clip` | Play a named animation clip from the model or animation library |
+| `setExpression` | Set a named morph target weight directly |
+| `speak` | Emit text through TTS and the protocol bus |
+| `remember` | Write a memory entry (user, feedback, project, or reference type) |
Skills can define additional tools that override or augment the built-ins. The skill registry is loaded from the agent manifest before each conversation turn.
@@ -780,16 +833,17 @@ Skills can define additional tools that override or augment the built-ins. The s
Emotions are not a finite-state machine. Each emotion is a float (0..1) that decays linearly per frame at a different rate. Protocol events inject spikes:
-| Trigger | Emotion | Spike |
-|---|---|---|
-| `speak` (positive sentiment) | celebration | +0.7 |
-| `speak` (negative sentiment) | concern | +0.5 |
-| `skill-error` | concern + empathy | +0.6 / +0.5 |
-| `load-start` | patience + curiosity | +0.4 / +0.3 |
-| `validate` (clean) | celebration | +0.5 |
-| `validate` (errors) | concern | +0.6 |
+| Trigger | Emotion | Spike |
+| ---------------------------- | -------------------- | ----------- |
+| `speak` (positive sentiment) | celebration | +0.7 |
+| `speak` (negative sentiment) | concern | +0.5 |
+| `skill-error` | concern + empathy | +0.6 / +0.5 |
+| `load-start` | patience + curiosity | +0.4 / +0.3 |
+| `validate` (clean) | celebration | +0.5 |
+| `validate` (errors) | concern | +0.6 |
Decay half-lives (approximate):
+
- Patience: ~20s — persists during long operations
- Empathy: ~13s — lingers after emotional events
- Concern: ~12s — sustained worry
@@ -797,6 +851,7 @@ Decay half-lives (approximate):
- Celebration: ~6s — brief, upbeat
The blended emotion mix drives morph target values each frame. For example:
+
- Celebration → `mouthSmile 0.85`, `mouthOpen 0.2`
- Concern → `mouthFrown 0.55`, `browInnerUp 0.6`
- Empathy → `eyeSquint 0.4`, `browInnerUp 0.5`
@@ -817,33 +872,36 @@ skills/wave/
```
**tools.json example:**
+
```json
[
- {
- "name": "wave",
- "description": "Plays a waving gesture on the avatar for the specified duration.",
- "inputSchema": {
- "type": "object",
- "properties": {
- "duration_ms": { "type": "integer", "minimum": 500, "maximum": 5000 }
- }
- }
- }
+ {
+ "name": "wave",
+ "description": "Plays a waving gesture on the avatar for the specified duration.",
+ "inputSchema": {
+ "type": "object",
+ "properties": {
+ "duration_ms": { "type": "integer", "minimum": 500, "maximum": 5000 }
+ }
+ }
+ }
]
```
**handlers.js example:**
+
```js
export default {
- async wave(args, ctx) {
- const { viewer, speak } = ctx;
- await viewer.playClipByName('wave');
- return { ok: true, output: 'Waved!' };
- }
+ async wave(args, ctx) {
+ const { viewer, speak } = ctx;
+ await viewer.playClipByName('wave');
+ return { ok: true, output: 'Waved!' };
+ },
};
```
Skills are loaded from the agent manifest at runtime. The `SkillRegistry` supports three trust modes:
+
- `any` — install skills from any source (development only)
- `owned-only` — only skills the agent owner has registered
- `whitelist` — only approved skill URIs
@@ -869,6 +927,7 @@ User is a game developer interested in character animation.
A `MEMORY.md` index file is auto-maintained. At the start of each conversation turn, the memory store is scanned and high-salience entries are injected into the system prompt.
**Storage modes:**
+
- `local` — stored in the browser's local storage (default for development)
- `ipfs` — pinned to IPFS via Pinata or Web3.Storage
- `encrypted-ipfs` — encrypted before pinning (user holds the key)
@@ -883,31 +942,33 @@ Memory types (`user`, `feedback`, `project`, `reference`) follow the same taxono
The `<agent-3d>` custom element (`src/element.js`) is the primary distribution mechanism. It lazy-boots on intersection (IntersectionObserver), so off-screen agents don't load until visible.
**Basic usage:**
+
```html
<script src="https://three.ws/agent-3d/latest/agent-3d.js"></script>
<agent-3d
- body="https://example.com/my-avatar.glb"
- brain="https://example.com/manifest.json"
- mode="chat"
+ body="https://example.com/my-avatar.glb"
+ brain="https://example.com/manifest.json"
+ mode="chat"
></agent-3d>
```
**Key attributes:**
-| Attribute | Type | Description |
-|---|---|---|
-| `body` | URL | GLB model URL |
-| `brain` | URL | Agent manifest JSON URL |
-| `agent-id` | string | Registered agent ID (resolves manifest automatically) |
-| `mode` | `view` \| `chat` \| `embed` | Interaction mode |
-| `eager` | boolean | Load immediately without intersection check |
-| `sandbox` | boolean | Disable network calls (offline mode) |
-| `width` / `height` | number | iframe dimensions when generating embed code |
+| Attribute | Type | Description |
+| ------------------ | --------------------------- | ----------------------------------------------------- |
+| `body` | URL | GLB model URL |
+| `brain` | URL | Agent manifest JSON URL |
+| `agent-id` | string | Registered agent ID (resolves manifest automatically) |
+| `mode` | `view` \| `chat` \| `embed` | Interaction mode |
+| `eager` | boolean | Load immediately without intersection check |
+| `sandbox` | boolean | Disable network calls (offline mode) |
+| `width` / `height` | number | iframe dimensions when generating embed code |
The element fires a `postMessage` API for host-page communication (documented in `specs/EMBED_HOST_PROTOCOL.md`). Hosts can send events to the agent and receive `speak`, `think`, and `skill-done` events back.
**Versioned CDN bundles** are published at `/agent-3d/x.y.z/agent-3d.js`. Use `latest` for auto-updates or pin to a version for stability:
+
```html
<script src="https://three.ws/agent-3d/1.5.1/agent-3d.js"></script>
```
@@ -917,19 +978,23 @@ The element fires a `postMessage` API for host-page communication (documented in
For when you want a chromeless iframe that you control from the parent page (rather than the `<agent-3d>` web component), drop in the embed SDK:
```html
-<iframe id="agent" src="https://three.ws/agent/abc123/embed" style="width:480px;height:600px;border:0"></iframe>
+<iframe
+ id="agent"
+ src="https://three.ws/agent/abc123/embed"
+ style="width:480px;height:600px;border:0"
+></iframe>
<script src="https://three.ws/embed-sdk.js"></script>
<script>
- const bridge = Agent3D.connect(document.getElementById('agent'), {
- agentId: 'abc123',
- onReady: ({ name }) => console.log('agent ready:', name),
- onAction: (action) => console.log('agent action:', action),
- onError: (err) => console.error('embed error:', err),
- });
-
- // Drive the agent
- bridge.send({ type: 'speak', payload: { text: 'Hello!' } });
- bridge.ping().then(rttMs => console.log('rtt', rttMs, 'ms'));
+ const bridge = Agent3D.connect(document.getElementById('agent'), {
+ agentId: 'abc123',
+ onReady: ({ name }) => console.log('agent ready:', name),
+ onAction: (action) => console.log('agent action:', action),
+ onError: (err) => console.error('embed error:', err),
+ });
+
+ // Drive the agent
+ bridge.send({ type: 'speak', payload: { text: 'Hello!' } });
+ bridge.ping().then((rttMs) => console.log('rtt', rttMs, 'ms'));
</script>
```
@@ -944,14 +1009,14 @@ import { EmbedHostBridge } from 'three-ws/embed-host-bridge';
const iframe = document.getElementById('agent');
const bridge = new EmbedHostBridge({
- iframe,
- agentId: 'abc123',
- allowedOrigin: new URL(iframe.src).origin, // required, never '*'
+ iframe,
+ agentId: 'abc123',
+ allowedOrigin: new URL(iframe.src).origin, // required, never '*'
});
await bridge.ready;
await bridge.speak('Hello world');
-const off = bridge.on('action', a => console.log(a));
+const off = bridge.on('action', (a) => console.log(a));
// Clean up when done.
off();
@@ -968,15 +1033,16 @@ The Widget Studio (`/studio`) lets anyone build a shareable, embeddable 3D exper
**Five widget types:**
-| Widget | Description |
-|---|---|
-| **Turntable** | Auto-rotating model showcase with configurable background, lighting, and camera |
-| **Animation Gallery** | Paginated grid of named clips; click any to play it on the model |
-| **Talking Agent** | Full chat interface with the LLM brain; embed a conversational agent anywhere |
+| Widget | Description |
+| --------------------- | ------------------------------------------------------------------------------------------ |
+| **Turntable** | Auto-rotating model showcase with configurable background, lighting, and camera |
+| **Animation Gallery** | Paginated grid of named clips; click any to play it on the model |
+| **Talking Agent** | Full chat interface with the LLM brain; embed a conversational agent anywhere |
| **ERC-8004 Passport** | On-chain identity card — shows agent name, owner, reputation score, and verification badge |
-| **Hotspot Tour** | 3D hotspots pinned to world-space coordinates; click to reveal text annotations |
+| **Hotspot Tour** | 3D hotspots pinned to world-space coordinates; click to reveal text annotations |
Each widget has:
+
- A public URL at `/w/<id>` with server-rendered Open Graph metadata for rich link previews
- An oEmbed endpoint at `/api/widgets/oembed` for WordPress, Ghost, Notion embedding
- An iframe embed URL at `/api/widgets/<id>/view`
@@ -991,16 +1057,16 @@ Widgets are stored as JSON config in Postgres, pointing at an avatar in R2.
The **Embed Editor** at `/embed-editor` is a WYSIWYG configurator for the `<agent-3d>` element. Pick an avatar from a modal grid with lazy-loaded 3D thumbnails, choose an animation from the dock, frame the camera with face-camera mode, set a background (transparent, glow, solid), and copy a ready-to-paste snippet.
-| Feature | Description |
-|---|---|
-| **Avatar picker** | Modal with lazy 3D thumbnails — no full page rerender on selection |
-| **Animation dock** | All clips visible at once; click to preview live on the model |
-| **Kiosk default** | Chrome-free preview surface — what you see is what gets embedded |
-| **Face-camera** | One-click camera framing aligned to the avatar's face |
-| **Lock toggle** | Freezes the wrap and avatar motion so you can author screenshots / video |
-| **Device frame** | Preview the embed inside phone / tablet / desktop chrome |
-| **Backdrop glow** | Optional radial glow behind the avatar (opt-in, off by default) |
-| **Snippet UX** | One-click copy of `<agent-3d>` HTML or the iframe URL — versioned CDN reference |
+| Feature | Description |
+| ------------------ | ------------------------------------------------------------------------------- |
+| **Avatar picker** | Modal with lazy 3D thumbnails — no full page rerender on selection |
+| **Animation dock** | All clips visible at once; click to preview live on the model |
+| **Kiosk default** | Chrome-free preview surface — what you see is what gets embedded |
+| **Face-camera** | One-click camera framing aligned to the avatar's face |
+| **Lock toggle** | Freezes the wrap and avatar motion so you can author screenshots / video |
+| **Device frame** | Preview the embed inside phone / tablet / desktop chrome |
+| **Backdrop glow** | Optional radial glow behind the avatar (opt-in, off by default) |
+| **Snippet UX** | One-click copy of `<agent-3d>` HTML or the iframe URL — versioned CDN reference |
The editor produces video-ready output for marketing assets and a copy-paste snippet for production use. Built as a single Vite-compiled bundle, no separate framework runtime.
@@ -1010,11 +1076,11 @@ The editor produces video-ready output for marketing assets and a copy-paste sni
`/pose-studio` is a 3D pose-reference tool inspired by setpose.com. It builds a Three.js scene with an articulated mannequin, orbit camera, ground + grid, and a control panel that lets you pick presets, drag joints to pose them, fine-tune with sliders, swap body type, add floor props, change lighting and FOV, and export a PNG screenshot.
-| Module | Path | Role |
-|---|---|---|
-| Mannequin | [src/pose-mannequin.js](src/pose-mannequin.js) | Articulated rig with named joints + IK |
-| Preset library | [src/pose-presets.js](src/pose-presets.js) | Standing, sitting, action, idle, expressive |
-| Studio shell | [src/pose-studio.js](src/pose-studio.js) | Scene, controls, export, props, lighting |
+| Module | Path | Role |
+| -------------- | ---------------------------------------------- | ------------------------------------------- |
+| Mannequin | [src/pose-mannequin.js](src/pose-mannequin.js) | Articulated rig with named joints + IK |
+| Preset library | [src/pose-presets.js](src/pose-presets.js) | Standing, sitting, action, idle, expressive |
+| Studio shell | [src/pose-studio.js](src/pose-studio.js) | Scene, controls, export, props, lighting |
Poses author cleanly into the avatar runtime via the `play_clip` tool — the agent can adopt any saved pose on demand. Exported PNGs are useful as marketing renders or as reference frames for downstream image/video pipelines.
@@ -1024,11 +1090,11 @@ Poses author cleanly into the avatar runtime via the `play_clip` tool — the ag
The **Launchpad** at `/launchpad` is a hosted-page builder for token launches, agent debuts, and drop campaigns. Each published page lives at a public URL like `/p/<slug>` with full Open Graph metadata for sharing.
-| Surface | Path | Purpose |
-|---|---|---|
-| Studio | `/launchpad` | Authoring UI — pick a template, configure copy, avatar, mint targets |
-| Public page | `/p/[slug]` | Hosted landing page rendered server-side with OG card |
-| Publish API | `POST /api/launchpad/...` | Versioned publish + revert for the page bundle |
+| Surface | Path | Purpose |
+| ----------- | ------------------------- | -------------------------------------------------------------------- |
+| Studio | `/launchpad` | Authoring UI — pick a template, configure copy, avatar, mint targets |
+| Public page | `/p/[slug]` | Hosted landing page rendered server-side with OG card |
+| Publish API | `POST /api/launchpad/...` | Versioned publish + revert for the page bundle |
Launchpad templates are JSON-configured and can embed any combination of `<agent-3d>` widget, x402 paid endpoint, or pump.fun launch button. Pages are stored in Postgres and served as static HTML with hydration for interactive elements.
@@ -1039,6 +1105,7 @@ Launchpad templates are JSON-configured and can embed any combination of `<agent
`/club` is a multiplayer 3D venue — a pole-club scene with rigged dancers, audio tracks, spotlights, mirror-ball cube cam, and on-chain tips.
**Stack:**
+
- Venue GLB + HDRI lit by four spotlights; bloom + chromatic aberration on the high tier
- Audio tracks streamed from R2 with synchronized playback across clients
- Camera state machine — DJ booth, overhead, dance-floor, follow-cam — sequenced per track
@@ -1046,6 +1113,7 @@ Launchpad templates are JSON-configured and can embed any combination of `<agent
- Frame-budget watchdog auto-downgrades the profile if sustained slow frames are detected
**Economics:**
+
- Tips API at `/api/club/tips` — viewers tip dancers in USDC via x402 (CDP-settled, Permit2-gasless sibling available)
- Leaderboard at `/api/club/leaderboard` with windowed top-tipper rankings
- Hourly payouts cron sweeps the tips ledger into the dancers' treasury wallets
@@ -1075,43 +1143,43 @@ three.ws is a first-class [x402](https://x402.org) host. Agents can both **pay f
### Payment rails
-| Chain | Settlement | Permit2 sibling | Status |
-|---|---|---|---|
-| **Base mainnet** | Coinbase CDP facilitator | Gasless via relayer | Live |
-| **Base sepolia** | CDP facilitator | Yes | Live |
-| **BSC** | Direct-scheme (no facilitator) | — | Live |
-| **Solana (devnet)** | x402-solana direct | — | Live |
+| Chain | Settlement | Permit2 sibling | Status |
+| ------------------- | ------------------------------ | ------------------- | ------ |
+| **Base mainnet** | Coinbase CDP facilitator | Gasless via relayer | Live |
+| **Base sepolia** | CDP facilitator | Yes | Live |
+| **BSC** | Direct-scheme (no facilitator) | — | Live |
+| **Solana (devnet)** | x402-solana direct | — | Live |
Every CDP-settled endpoint ships a Permit2 sibling that accepts an EIP-2612 permit instead of an upfront approval — the buyer signs once, and the relayer pays gas. Wire-level checks live in `tests/e2e/` and exercise the buyer/seller flow end-to-end.
### Paid endpoints
-| Route | What you get |
-|---|---|
-| `POST /api/x402/mint-to-mesh` | Mint an avatar's mesh as an NFT |
-| `POST /api/x402/mint-to-mesh-batch` | Batch mint up to N meshes |
-| `POST /api/x402/dance-tip` | Tip a club dancer in USDC |
-| `POST /api/x402/model-check` | Run Khronos glTF validation as a paid service |
-| `POST /api/x402/pump-agent-audit` | Audit a pump.fun token's creator history |
-| `POST /api/x402/agent-reputation` | Compute on-chain reputation snapshot |
-| `POST /api/x402/onchain-identity-verify` | Verify ERC-8004 identity for a wallet |
-| `POST /api/x402/symbol-availability` | Check token symbol availability across chains |
-| `POST /api/x402/skill-marketplace` | Paid skill marketplace listing |
-| `POST /api/x402/asset-download` | Pay-per-download for gated R2 assets |
-| `POST /api/x402/did` | DID resolution as a service |
-| `GET /api/x402/my-receipts` | Buyer-side receipts ledger |
+| Route | What you get |
+| ---------------------------------------- | --------------------------------------------- |
+| `POST /api/x402/mint-to-mesh` | Mint an avatar's mesh as an NFT |
+| `POST /api/x402/mint-to-mesh-batch` | Batch mint up to N meshes |
+| `POST /api/x402/dance-tip` | Tip a club dancer in USDC |
+| `POST /api/x402/model-check` | Run Khronos glTF validation as a paid service |
+| `POST /api/x402/pump-agent-audit` | Audit a pump.fun token's creator history |
+| `POST /api/x402/agent-reputation` | Compute on-chain reputation snapshot |
+| `POST /api/x402/onchain-identity-verify` | Verify ERC-8004 identity for a wallet |
+| `POST /api/x402/symbol-availability` | Check token symbol availability across chains |
+| `POST /api/x402/skill-marketplace` | Paid skill marketplace listing |
+| `POST /api/x402/asset-download` | Pay-per-download for gated R2 assets |
+| `POST /api/x402/did` | DID resolution as a service |
+| `GET /api/x402/my-receipts` | Buyer-side receipts ledger |
### Bazaar, SKUs, and subscriptions
-| Surface | Path | Purpose |
-|---|---|---|
-| Bazaar | `/x402` | Browsable marketplace of paid endpoints |
-| Discovery | `/x402-discover` | Search by tag, price, chain |
-| Checkout | `/x402-pay`, `/api/x402-checkout` | Stripe-style one-shot purchase |
-| SKU catalog | `/api/x402-skus` | Server-defined SKUs with per-row pricing |
-| Dashboard | `/dashboard/x402` | Seller + buyer dashboard, receipts, payouts |
-| Subscriptions | `/api/x402/subscriptions` | Recurring x402 charges on cron |
-| Status | `/api/x402-status` | Health and chain reachability checks |
+| Surface | Path | Purpose |
+| ------------- | --------------------------------- | ------------------------------------------- |
+| Bazaar | `/x402` | Browsable marketplace of paid endpoints |
+| Discovery | `/x402-discover` | Search by tag, price, chain |
+| Checkout | `/x402-pay`, `/api/x402-checkout` | Stripe-style one-shot purchase |
+| SKU catalog | `/api/x402-skus` | Server-defined SKUs with per-row pricing |
+| Dashboard | `/dashboard/x402` | Seller + buyer dashboard, receipts, payouts |
+| Subscriptions | `/api/x402/subscriptions` | Recurring x402 charges on cron |
+| Status | `/api/x402-status` | Health and chain reachability checks |
### How to expose a paid endpoint
@@ -1119,24 +1187,24 @@ Every CDP-settled endpoint ships a Permit2 sibling that accepts an EIP-2612 perm
import { paidEndpoint } from './_lib/x402-paid-endpoint.js';
export default paidEndpoint({
- price: '0.10', // USDC
- chain: 'base', // base | bsc | solana
- network: 'mainnet',
- resource: 'https://three.ws/api/your-endpoint',
- description: 'What the buyer is paying for',
- handler: async (req, res, { payer }) => {
- // payer is verified — settle the request
- res.json({ ok: true, payer });
- },
+ price: '0.10', // USDC
+ chain: 'base', // base | bsc | solana
+ network: 'mainnet',
+ resource: 'https://three.ws/api/your-endpoint',
+ description: 'What the buyer is paying for',
+ handler: async (req, res, { payer }) => {
+ // payer is verified — settle the request
+ res.json({ ok: true, payer });
+ },
});
```
-The helper handles the 402 challenge, Permit2 sibling, receipt write-back, idempotency-token enforcement, and CSRF/SSRF guards. See [api/_lib/x402-paid-endpoint.js](api/_lib/x402-paid-endpoint.js).
+The helper handles the 402 challenge, Permit2 sibling, receipt write-back, idempotency-token enforcement, and CSRF/SSRF guards. See [api/\_lib/x402-paid-endpoint.js](api/_lib/x402-paid-endpoint.js).
### Wire checks
- Wire-level CORS, CDP, and Permit2 sibling checks: `tests/e2e/`
-- Offer receipts schema + buyer fetch: [api/_lib/x402-buyer-fetch.js](api/_lib/x402-buyer-fetch.js)
+- Offer receipts schema + buyer fetch: [api/\_lib/x402-buyer-fetch.js](api/_lib/x402-buyer-fetch.js)
- Error envelope: full 402 body returned in the `PAYMENT-REQUIRED` header
---
@@ -1145,14 +1213,14 @@ The helper handles the 402 challenge, Permit2 sibling, receipt write-back, idemp
Agents transact with each other directly through an A2A bridge that sits on top of the MCP server and x402 payments.
-| Surface | Path | Purpose |
-|---|---|---|
-| A2A client | `sdk/a2a/` | Outbound calls — pay another agent, settle the response |
-| A2A server | `api/a2a/` | Inbound paid tools, exposed via MCP bridge |
-| MCP bridge | `api/mcp.js` | Wraps paid tools as MCP `tools/call` with auto-402 retry |
-| Spending ledger | `api/a2a/spending` | Per-agent spend caps and authorization gates |
-| Receipts store | `api/a2a/receipts` | Signed receipts written on every paid call |
-| DID resolution | `POST /api/x402/did` | Resolve a counterparty DID to wallet + endpoints |
+| Surface | Path | Purpose |
+| --------------- | -------------------- | -------------------------------------------------------- |
+| A2A client | `sdk/a2a/` | Outbound calls — pay another agent, settle the response |
+| A2A server | `api/a2a/` | Inbound paid tools, exposed via MCP bridge |
+| MCP bridge | `api/mcp.js` | Wraps paid tools as MCP `tools/call` with auto-402 retry |
+| Spending ledger | `api/a2a/spending` | Per-agent spend caps and authorization gates |
+| Receipts store | `api/a2a/receipts` | Signed receipts written on every paid call |
+| DID resolution | `POST /api/x402/did` | Resolve a counterparty DID to wallet + endpoints |
**SIWX (Sign-In with X-chain)** brokers cross-chain identity for paid sessions: an agent on Base proves ownership of a Solana wallet (or vice versa) to unlock chain-specific paid endpoints.
@@ -1181,12 +1249,12 @@ three.ws ships with Mobile Wallet Adapter (MWA) wired into the web app and a rel
Anyone takes 3 selfies (left, center, right) and receives a rigged, animatable 3D avatar in under a minute. The pipeline ships native — no third-party black box.
-| Module | Path | Role |
-|---|---|---|
-| Capture UX | [src/selfie-capture.js](src/selfie-capture.js) | Mobile-first 3-shot capture with real-time quality gates (lighting, framing, blur) |
-| Pipeline | [src/selfie-pipeline.js](src/selfie-pipeline.js) | Multi-view fit → FLAME / 3DMM face → base body mesh → rigged GLB |
-| Sandbox route | `/creating` | Isolated reconstruction test bench, decoupled from the main flow |
-| Output | Cloudflare R2 | Meshopt-compressed GLB pinned to IPFS and minted as a draft ERC-8004 token |
+| Module | Path | Role |
+| ------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------- |
+| Capture UX | [src/selfie-capture.js](src/selfie-capture.js) | Mobile-first 3-shot capture with real-time quality gates (lighting, framing, blur) |
+| Pipeline | [src/selfie-pipeline.js](src/selfie-pipeline.js) | Multi-view fit → FLAME / 3DMM face → base body mesh → rigged GLB |
+| Sandbox route | `/creating` | Isolated reconstruction test bench, decoupled from the main flow |
+| Output | Cloudflare R2 | Meshopt-compressed GLB pinned to IPFS and minted as a draft ERC-8004 token |
Reconstruction inference runs against the same Anthropic-token-billed Vercel function pool as the agent runtime, with optional offload to the **Livepeer Inference Network** (see below) for GPU-heavy steps.
@@ -1207,20 +1275,20 @@ The Livepeer dependency landed early so the Phase 1 selfie pipeline can switch i
## Voice & Persona Hub (Phase 2)
-The avatar isn't just *you* — the agent *acts* like you. The Voice & Persona Hub captures the inputs that turn a body into a personality.
-
-| Surface | Path | Purpose |
-|---|---|---|
-| Persona extraction | [api/persona/extract.js](api/persona/extract.js) | Short onboarding interview → tone, vocabulary, interests profile |
-| Persona preview | [api/persona/preview.js](api/persona/preview.js) | Try the extracted persona against test prompts before saving |
-| Persona keys | `scripts/generate-persona-key.mjs` | Per-agent signing key + persona SSO setup |
-| Voice clone modal | [src/voice/voice-clone-modal.js](src/voice/voice-clone-modal.js) | 3–10s recording → ElevenLabs custom voice bound to the agent |
-| Talk controller | [src/voice/talk-controller.js](src/voice/talk-controller.js) | Push-to-talk and continuous talk modes |
-| ARKit blendshapes | [src/voice/arkit-blendshapes.js](src/voice/arkit-blendshapes.js) | Standard ARKit-52 morph table |
-| Lip-sync driver | [src/voice/lipsync-driver.js](src/voice/lipsync-driver.js) | Web Audio analyser → blendshape weights per frame |
-| Avatar morph target | [src/voice/avatar-morph-target.js](src/voice/avatar-morph-target.js) | Per-rig binding of ARKit blendshapes to the loaded GLB |
-| Avatar snapshot | [src/voice/avatar-snapshot.js](src/voice/avatar-snapshot.js) | Render-time pose capture for thumbnails and OG cards |
-| Persona docs | [docs/persona-hub.md](docs/persona-hub.md) | Full design + onboarding flow |
+The avatar isn't just _you_ — the agent _acts_ like you. The Voice & Persona Hub captures the inputs that turn a body into a personality.
+
+| Surface | Path | Purpose |
+| ------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------- |
+| Persona extraction | [api/persona/extract.js](api/persona/extract.js) | Short onboarding interview → tone, vocabulary, interests profile |
+| Persona preview | [api/persona/preview.js](api/persona/preview.js) | Try the extracted persona against test prompts before saving |
+| Persona keys | `scripts/generate-persona-key.mjs` | Per-agent signing key + persona SSO setup |
+| Voice clone modal | [src/voice/voice-clone-modal.js](src/voice/voice-clone-modal.js) | 3–10s recording → ElevenLabs custom voice bound to the agent |
+| Talk controller | [src/voice/talk-controller.js](src/voice/talk-controller.js) | Push-to-talk and continuous talk modes |
+| ARKit blendshapes | [src/voice/arkit-blendshapes.js](src/voice/arkit-blendshapes.js) | Standard ARKit-52 morph table |
+| Lip-sync driver | [src/voice/lipsync-driver.js](src/voice/lipsync-driver.js) | Web Audio analyser → blendshape weights per frame |
+| Avatar morph target | [src/voice/avatar-morph-target.js](src/voice/avatar-morph-target.js) | Per-rig binding of ARKit blendshapes to the loaded GLB |
+| Avatar snapshot | [src/voice/avatar-snapshot.js](src/voice/avatar-snapshot.js) | Render-time pose capture for thumbnails and OG cards |
+| Persona docs | [docs/persona-hub.md](docs/persona-hub.md) | Full design + onboarding flow |
Memory seed extensions (X, GitHub, Farcaster) feed the agent's memory store at creation time with explicit user consent — see [docs/persona-hub.md](docs/persona-hub.md).
@@ -1232,9 +1300,9 @@ The per-agent fine-tuned system prompt is stored in the manifest, signed, and pi
`/vanity-wallet` is a browser-based vanity-address grinder compiled to WebAssembly. Generate EVM addresses with a prefix (`0xBEEF…`) or pattern in seconds, fully client-side, without leaking the private key to any server.
-| Module | Path | Role |
-|---|---|---|
-| WASM grinder | `public/vanity-wallet.html` | Multi-threaded secp256k1 keygen via WebWorkers |
+| Module | Path | Role |
+| -------------- | ------------------------------- | ------------------------------------------------------ |
+| WASM grinder | `public/vanity-wallet.html` | Multi-threaded secp256k1 keygen via WebWorkers |
| Solana variant | `scripts/pump-vanity-grind.mjs` | Server-side grinder for pump.fun mint vanity addresses |
Common use cases on the platform: branded agent wallet addresses (e.g. an agent named `agent.eth` getting an address starting with `0xA6EF…`), or pump.fun token mint vanity (e.g. ending in `pump`).
@@ -1247,17 +1315,17 @@ The Solana grinder backs the platform's pump.fun launches — the inaugural USDC
A local-only news/blog CMS at `/admin/news` produces signed posts that auto-syndicate to multiple destinations.
-| Surface | Path | Purpose |
-|---|---|---|
-| CMS | `/admin/news` | Local-only editor — drafts, images, scheduled posts |
-| Public listing | `/news` | Cover-image grid with permalinks |
-| Article | `/news/<slug>` | Server-rendered article with OG card |
-| RSS / Atom | `/api/news/rss` | Standards-compliant feed for HackerNoon auto-import |
-| WebSub hub | `/api/news/websub` | Push notifications to subscribed hubs on publish |
-| Dev.to | syndication adapter | Cross-posts with canonical URL pointing back |
-| Medium | syndication adapter | Same, with format-aware re-render |
-| CMC handoff | syndication adapter | Coinmarketcap article + announcement listing |
-| Newsletter | [api/newsletter-subscribe.js](api/newsletter-subscribe.js) | Resend-backed double-opt-in newsletter |
+| Surface | Path | Purpose |
+| -------------- | ---------------------------------------------------------- | --------------------------------------------------- |
+| CMS | `/admin/news` | Local-only editor — drafts, images, scheduled posts |
+| Public listing | `/news` | Cover-image grid with permalinks |
+| Article | `/news/<slug>` | Server-rendered article with OG card |
+| RSS / Atom | `/api/news/rss` | Standards-compliant feed for HackerNoon auto-import |
+| WebSub hub | `/api/news/websub` | Push notifications to subscribed hubs on publish |
+| Dev.to | syndication adapter | Cross-posts with canonical URL pointing back |
+| Medium | syndication adapter | Same, with format-aware re-render |
+| CMC handoff | syndication adapter | Coinmarketcap article + announcement listing |
+| Newsletter | [api/newsletter-subscribe.js](api/newsletter-subscribe.js) | Resend-backed double-opt-in newsletter |
Each article is a static HTML file in `public/news/` with metadata in Postgres. The CMS supports a cover-image convention for listing thumbnails and OG previews. Articles can be published once and reach HackerNoon, Dev.to, and Medium readers without manual cross-posting.
@@ -1267,18 +1335,18 @@ Each article is a static HTML file in `public/news/` with metadata in Postgres.
The platform has been hardened against the OWASP top-10 plus a set of issues specific to agent payments and cross-chain identity.
-| Control | Where |
-|---|---|
-| **SSRF guard** | All outbound `fetch()` from agent runtime + skills goes through an SSRF allow-list filter (`api/_lib/safe-fetch.js`) |
-| **CSRF gates** | State-changing endpoints require an Origin + Sec-Fetch-Site check; bearer-only paths exempt |
+| Control | Where |
+| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
+| **SSRF guard** | All outbound `fetch()` from agent runtime + skills goes through an SSRF allow-list filter (`api/_lib/safe-fetch.js`) |
+| **CSRF gates** | State-changing endpoints require an Origin + Sec-Fetch-Site check; bearer-only paths exempt |
| **Header-origin pinning** | The iframe bridge locks onto the parent's origin from the first authenticated message and ignores later messages from a different origin |
-| **Fail-closed crons** | Cron endpoints fail closed if their auth token is missing — no silent skips |
-| **Idempotency tokens** | x402 paid endpoints require an idempotency key to prevent double-charge on retry |
-| **Embed policy** | Per-agent iframe origin allow-list (`/api/agents/:id/embed-policy`) gates the chromeless embed |
-| **Rate limiting** | Upstash Redis per-user + per-API-key + per-IP buckets at every public endpoint |
-| **JWT key rotation** | `JWT_KID` lets you rotate signing keys without invalidating in-flight sessions |
-| **Bcrypt cost** | Tunable via `PASSWORD_ROUNDS` (default 11) |
-| **Audit signing** | Every agent action is signed with the delegated signer key and chained into a per-agent action log |
+| **Fail-closed crons** | Cron endpoints fail closed if their auth token is missing — no silent skips |
+| **Idempotency tokens** | x402 paid endpoints require an idempotency key to prevent double-charge on retry |
+| **Embed policy** | Per-agent iframe origin allow-list (`/api/agents/:id/embed-policy`) gates the chromeless embed |
+| **Rate limiting** | Upstash Redis per-user + per-API-key + per-IP buckets at every public endpoint |
+| **JWT key rotation** | `JWT_KID` lets you rotate signing keys without invalidating in-flight sessions |
+| **Bcrypt cost** | Tunable via `PASSWORD_ROUNDS` (default 11) |
+| **Audit signing** | Every agent action is signed with the delegated signer key and chained into a per-agent action log |
---
@@ -1286,12 +1354,12 @@ The platform has been hardened against the OWASP top-10 plus a set of issues spe
Three npm-publishable SDKs ship from this repo. They share types and helpers but target different surfaces.
-| SDK | Path | What it does |
-|---|---|---|
-| **`@nirholas/agent-kit`** | [sdk/](sdk/) | One-line agent embed for any site — chat panel, voice I/O, ERC-8004 register, Solana attestations |
-| **`@pump-fun/agent-payments-sdk`** | [agent-payments-sdk/](agent-payments-sdk/) | EVM agent payments — wallet, signing, EIP-7710 delegation |
-| **`solana-agent-sdk`** | [solana-agent-sdk/](solana-agent-sdk/) | Solana-native agent ops — Metaplex Core mints, SIWS, attestations, transfer hooks |
-| **Avatar SDK** | [sdk/agent-sdk/](sdk/agent-sdk/) | Avatar load + manipulation helpers — pose, animation, snapshot |
+| SDK | Path | What it does |
+| ---------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------- |
+| **`@nirholas/agent-kit`** | [sdk/](sdk/) | One-line agent embed for any site — chat panel, voice I/O, ERC-8004 register, Solana attestations |
+| **`@pump-fun/agent-payments-sdk`** | [agent-payments-sdk/](agent-payments-sdk/) | EVM agent payments — wallet, signing, EIP-7710 delegation |
+| **`solana-agent-sdk`** | [solana-agent-sdk/](solana-agent-sdk/) | Solana-native agent ops — Metaplex Core mints, SIWS, attestations, transfer hooks |
+| **Avatar SDK** | [sdk/agent-sdk/](sdk/agent-sdk/) | Avatar load + manipulation helpers — pose, animation, snapshot |
**`@nirholas/agent-kit` quickstart:**
@@ -1300,10 +1368,10 @@ import { AgentKit, loadAvatar } from '@nirholas/agent-kit';
import '@nirholas/agent-kit/styles';
const agent = new AgentKit({
- name: 'My Agent',
- description: 'Does cool stuff',
- endpoint: 'https://myapp.com',
- onMessage: async (text) => `You said: ${text}`,
+ name: 'My Agent',
+ description: 'Does cool stuff',
+ endpoint: 'https://myapp.com',
+ onMessage: async (text) => `You said: ${text}`,
});
agent.mount(document.body);
@@ -1319,31 +1387,31 @@ The agent-kit also exposes `attestFeedback`, `attestValidation`, and `listAttest
`/demos` is a curated index of sandbox pages that exercise individual platform capabilities in isolation. Each demo is a single HTML file in [`public/demos/`](public/demos/) — perfect for screen recordings, bug reproductions, or showing off one feature without the rest of the app.
-| Demo | Path | What it shows |
-|---|---|---|
-| **USDZ & AR Quick Look** | `/demos/usdz-ar.html` | iOS USDZ export + AR Quick Look on a real device |
-| **Half-body XR** | `/demos/halfbody-xr.html` | Upper-body avatar in WebXR (Meta Quest, Vision Pro) |
-| **Avatar SDK** | `/demos/avatar-sdk.html` | `@three-ws/avatar` SDK loading + animating an avatar |
-| **React SDK** | `/demos/react-sdk.html` | React wrapper around the `<agent-3d>` element |
-| **Audio-driven lipsync (mic)** | `/lipsync/mic` | Live microphone → ARKit-52 lip-sync |
-| **Audio-driven lipsync (TTS)** | `/lipsync` | ElevenLabs TTS → ARKit-52 lip-sync |
-| **Multi-LLM brain** | `/brain` | Side-by-side comparison of Claude / GPT / Groq / Gemini |
-| **3D walkaround** | `/walkaround` | Single-player walking + camera controls |
-| **ERC-8004 registry browser** | `/demos/erc8004.html` | Browse all registered agents across chains |
-| **Button jump** | `/demos/button-jump.html` | Avatar reacts to a 2D button press |
-| **Tactile button (Gemini concept)** | `/demos/gemini-jump.html` | Tactile button demo with avatar |
-| **Create v2** | `/demos/create-v2.html` | Next-generation agent creation flow |
-| **3D home** | `/demos/3d-home.html` | Home page with overlay canvas + transparent-bg viewer |
-| **Selfie fit** | `/demos/selfie-fit.html` | Selfie reconstruction pipeline (Phase 1) |
-| **Persona extract** | `/demos/persona-extract.html` | Voice & Persona Hub onboarding interview |
-| **Memory seed** | `/demos/memory-seed.html` | Memory seeding from X/GitHub/Farcaster |
-| **Voice clone** | `/demos/voice-clone.html` | 3–10s recording → ElevenLabs custom voice |
-| **Livepeer inference** | `/demos/livepeer-inference.html` | Decentralized GPU inference end-to-end |
-| **Skill royalty** | `/demos/skill-royalty.html` | Per-call royalty payouts to skill authors |
-| **EAS reputation** | `/demos/eas-reputation.html` | EAS-attested reputation viewer |
-| **Bonding curve** | `/demos/bonding-curve.html` | Pre-launch bonding-curve pricing simulator |
-| **Gallery picker** | `/demos/gallery-picker.html` | Lazy 3D-thumbnail avatar picker (Embed Editor primitive) |
-| **Button** | `/demos/button.html` | Minimal `<agent-3d>` embed reaction test |
+| Demo | Path | What it shows |
+| ----------------------------------- | -------------------------------- | -------------------------------------------------------- |
+| **USDZ & AR Quick Look** | `/demos/usdz-ar.html` | iOS USDZ export + AR Quick Look on a real device |
+| **Half-body XR** | `/demos/halfbody-xr.html` | Upper-body avatar in WebXR (Meta Quest, Vision Pro) |
+| **Avatar SDK** | `/demos/avatar-sdk.html` | `@three-ws/avatar` SDK loading + animating an avatar |
+| **React SDK** | `/demos/react-sdk.html` | React wrapper around the `<agent-3d>` element |
+| **Audio-driven lipsync (mic)** | `/lipsync/mic` | Live microphone → ARKit-52 lip-sync |
+| **Audio-driven lipsync (TTS)** | `/lipsync` | ElevenLabs TTS → ARKit-52 lip-sync |
+| **Multi-LLM brain** | `/brain` | Side-by-side comparison of Claude / GPT / Groq / Gemini |
+| **3D walkaround** | `/walkaround` | Single-player walking + camera controls |
+| **ERC-8004 registry browser** | `/demos/erc8004.html` | Browse all registered agents across chains |
+| **Button jump** | `/demos/button-jump.html` | Avatar reacts to a 2D button press |
+| **Tactile button (Gemini concept)** | `/demos/gemini-jump.html` | Tactile button demo with avatar |
+| **Create v2** | `/demos/create-v2.html` | Next-generation agent creation flow |
+| **3D home** | `/demos/3d-home.html` | Home page with overlay canvas + transparent-bg viewer |
+| **Selfie fit** | `/demos/selfie-fit.html` | Selfie reconstruction pipeline (Phase 1) |
+| **Persona extract** | `/demos/persona-extract.html` | Voice & Persona Hub onboarding interview |
+| **Memory seed** | `/demos/memory-seed.html` | Memory seeding from X/GitHub/Farcaster |
+| **Voice clone** | `/demos/voice-clone.html` | 3–10s recording → ElevenLabs custom voice |
+| **Livepeer inference** | `/demos/livepeer-inference.html` | Decentralized GPU inference end-to-end |
+| **Skill royalty** | `/demos/skill-royalty.html` | Per-call royalty payouts to skill authors |
+| **EAS reputation** | `/demos/eas-reputation.html` | EAS-attested reputation viewer |
+| **Bonding curve** | `/demos/bonding-curve.html` | Pre-launch bonding-curve pricing simulator |
+| **Gallery picker** | `/demos/gallery-picker.html` | Lazy 3D-thumbnail avatar picker (Embed Editor primitive) |
+| **Button** | `/demos/button.html` | Minimal `<agent-3d>` embed reaction test |
The demos are intentionally separate from production routes (`/create`, `/avatars/[id]`, etc.) so the production flow keeps working while we test new ideas.
@@ -1353,22 +1421,22 @@ The demos are intentionally separate from production routes (`/create`, `/avatar
The platform ships with a set of built-in agent skills, packaged in `src/agent-skills-*.js` and registered via [`public/skills-index.json`](public/skills-index.json).
-| Skill | Module | What it does |
-|---|---|---|
-| **Wave / scene** | `src/agent-skills-scene.js` | Built-in wave, lookAt, play_clip, setExpression handlers |
-| **Sentiment** | `src/agent-skills-sentiment.js` | Score incoming text 0–1, drive Empathy Layer spikes |
-| **Agent payments** | `src/agent-skills-agent-payments.js` | EVM A2A payments, EIP-7710 delegated signing |
-| **Solana Blinks** | `src/agent-skills-blinks.js` | Compose and broadcast Solana Action / Blink links |
-| **Jupiter** | `src/agent-skills-jupiter.js` | Quote + swap any SPL token via Jupiter v6 |
-| **NFTs** | `src/agent-skills-nfts.js` | Mint, transfer, and look up Metaplex Core / SPL-22 NFTs |
-| **Pumpfun watch** | `src/agent-skills-pumpfun-watch.js` | Subscribe to pump.fun events (`recent-claims`, `token-intel`, `watch-start`, `watch-stop`) |
-| **Pumpfun compose** | `src/agent-skills-pumpfun-compose.js` | Build a pump.fun launch transaction with creator-signer split |
-| **Pumpfun hooks** | `src/agent-skills-pumpfun-hooks.js` | React-style hooks for in-app pump.fun integrations |
-| **Pumpfun autonomous** | `src/agent-skills-pumpfun-autonomous.js` | Autonomous trade execution against signals + sentiment |
-| **Pumpfun core** | `src/agent-skills-pumpfun.js` | Shared pump.fun client utilities |
-| **Accessories** | `src/agent-accessories.js` | Hat / glasses / prop slot attachment to a rigged avatar |
-| **Memory** | `src/agent-memory.js` | File-based memory CRUD (see [Memory](#memory)) |
-| **Reputation** | `src/agent-reputation.js` | Read on-chain reputation, surface in the chat UI |
+| Skill | Module | What it does |
+| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------ |
+| **Wave / scene** | `src/agent-skills-scene.js` | Built-in wave, lookAt, play_clip, setExpression handlers |
+| **Sentiment** | `src/agent-skills-sentiment.js` | Score incoming text 0–1, drive Empathy Layer spikes |
+| **Agent payments** | `src/agent-skills-agent-payments.js` | EVM A2A payments, EIP-7710 delegated signing |
+| **Solana Blinks** | `src/agent-skills-blinks.js` | Compose and broadcast Solana Action / Blink links |
+| **Jupiter** | `src/agent-skills-jupiter.js` | Quote + swap any SPL token via Jupiter v6 |
+| **NFTs** | `src/agent-skills-nfts.js` | Mint, transfer, and look up Metaplex Core / SPL-22 NFTs |
+| **Pumpfun watch** | `src/agent-skills-pumpfun-watch.js` | Subscribe to pump.fun events (`recent-claims`, `token-intel`, `watch-start`, `watch-stop`) |
+| **Pumpfun compose** | `src/agent-skills-pumpfun-compose.js` | Build a pump.fun launch transaction with creator-signer split |
+| **Pumpfun hooks** | `src/agent-skills-pumpfun-hooks.js` | React-style hooks for in-app pump.fun integrations |
+| **Pumpfun autonomous** | `src/agent-skills-pumpfun-autonomous.js` | Autonomous trade execution against signals + sentiment |
+| **Pumpfun core** | `src/agent-skills-pumpfun.js` | Shared pump.fun client utilities |
+| **Accessories** | `src/agent-accessories.js` | Hat / glasses / prop slot attachment to a rigged avatar |
+| **Memory** | `src/agent-memory.js` | File-based memory CRUD (see [Memory](#memory)) |
+| **Reputation** | `src/agent-reputation.js` | Read on-chain reputation, surface in the chat UI |
Third-party skills are distributed over IPFS / Arweave / HTTP. See [docs/skills.md](docs/skills.md) for the full skill manifest spec and authoring guide.
@@ -1378,13 +1446,13 @@ Third-party skills are distributed over IPFS / Arweave / HTTP. See [docs/skills.
The avatar runtime ships with a slot-based animation manager that decouples animation clips from rigs — a clip authored for one body can be retargeted to any other rig at load time.
-| Module | Path | Role |
-|---|---|---|
-| Manager | [src/animation-manager.js](src/animation-manager.js) | Load, blend, and crossfade clips per slot (idle, gesture, locomotion) |
-| State machine | [src/animation-state-machine.js](src/animation-state-machine.js) | Drives slot transitions from protocol events |
-| Idle library | [src/idle-animation.js](src/idle-animation.js) | Subtle breath / weight-shift loops that play under everything else |
-| Fetcher | `npm run fetch-animations` | Downloads the canonical clip library from R2 |
-| Builder | `scripts/build-animations.mjs` | Re-packs clip bundles into Meshopt + Draco-compressed GLB |
+| Module | Path | Role |
+| ------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------- |
+| Manager | [src/animation-manager.js](src/animation-manager.js) | Load, blend, and crossfade clips per slot (idle, gesture, locomotion) |
+| State machine | [src/animation-state-machine.js](src/animation-state-machine.js) | Drives slot transitions from protocol events |
+| Idle library | [src/idle-animation.js](src/idle-animation.js) | Subtle breath / weight-shift loops that play under everything else |
+| Fetcher | `npm run fetch-animations` | Downloads the canonical clip library from R2 |
+| Builder | `scripts/build-animations.mjs` | Re-packs clip bundles into Meshopt + Draco-compressed GLB |
A new clip can be authored against any rig in Blender, exported as a GLB, and dropped into the animation library — the manager picks it up automatically and the agent runtime can invoke it via the `play_clip` tool.
@@ -1406,13 +1474,13 @@ Avatars are not just GLB files — they're composable rigs that the runtime can
Every agent can mint a coin alongside its avatar — turning the agent into a tradeable economic object.
-| Surface | Path | Purpose |
-|---|---|---|
-| Launchpad Studio | `/launchpad` | Configure coin name, ticker, supply, fee shares |
-| Hosted page | `/p/[slug]` | Public launch page with `<agent-3d>` widget + buy button |
-| Avatar coin drop | `public/demo/coin/` | Demo flow — connect wallet → mint avatar + coin in one transaction |
-| Pump.fun bridge | `POST /api/pump/launch-prep` | Route the launch through pump.fun's bonding curve |
-| Direct mint | `contracts/script/` | Deploy a standalone ERC-20 / SPL-22 alongside the agent |
+| Surface | Path | Purpose |
+| ---------------- | ---------------------------- | ------------------------------------------------------------------ |
+| Launchpad Studio | `/launchpad` | Configure coin name, ticker, supply, fee shares |
+| Hosted page | `/p/[slug]` | Public launch page with `<agent-3d>` widget + buy button |
+| Avatar coin drop | `public/demo/coin/` | Demo flow — connect wallet → mint avatar + coin in one transaction |
+| Pump.fun bridge | `POST /api/pump/launch-prep` | Route the launch through pump.fun's bonding curve |
+| Direct mint | `contracts/script/` | Deploy a standalone ERC-20 / SPL-22 alongside the agent |
The coin's metadata points back at the agent's ERC-8004 token, and the agent's manifest references the coin — a two-way binding that the bazaar, marketplace, and reputation registry all read from.
@@ -1422,13 +1490,13 @@ The coin's metadata points back at the agent's ERC-8004 token, and the agent's m
three.ws supports multiple LLM providers behind a single `brain` interface. The runtime is provider-agnostic — switch from Claude to GPT to Gemini to a local model with a one-line change.
-| Provider | Path | Use case |
-|---|---|---|
-| **Anthropic (Claude)** | `POST /api/llm/anthropic` | Default — tool-loop, streaming, sentiment-tagged speak |
-| **Groq** | (anonymous) | Free fast-mode chat for unauthenticated visitors on `/chat` |
-| **Multi-LLM brain** | `/brain`, `POST /api/brain/chat` | Side-by-side compare Claude / GPT / Gemini / Groq for the same prompt |
-| **OpenRouter** | proxied via brain | Fallback when the primary provider is rate-limited |
-| **Null provider** | `src/runtime/providers.js` | No-op for tests and offline mode |
+| Provider | Path | Use case |
+| ---------------------- | -------------------------------- | --------------------------------------------------------------------- |
+| **Anthropic (Claude)** | `POST /api/llm/anthropic` | Default — tool-loop, streaming, sentiment-tagged speak |
+| **Groq** | (anonymous) | Free fast-mode chat for unauthenticated visitors on `/chat` |
+| **Multi-LLM brain** | `/brain`, `POST /api/brain/chat` | Side-by-side compare Claude / GPT / Gemini / Groq for the same prompt |
+| **OpenRouter** | proxied via brain | Fallback when the primary provider is rate-limited |
+| **Null provider** | `src/runtime/providers.js` | No-op for tests and offline mode |
**Owner-card gating** — when an agent has a paying owner (paid by ERC-8004 mint or x402 subscription), the embed shows an owner-attribution card and unlocks longer context windows + higher-tier models. Anonymous visitors get Groq-powered chat with a smaller window.
@@ -1440,33 +1508,34 @@ The full OpenAPI 3.1 spec is available at `/openapi.json`. The key API surface i
### Agent API
-| Method | Route | Auth | Description |
-|---|---|---|---|
-| GET | `/api/agents` | session | List your agents |
-| POST | `/api/agents` | session | Create an agent |
-| GET | `/api/agents/:id` | — | Get agent detail |
-| PATCH | `/api/agents/:id` | session | Update agent |
-| DELETE | `/api/agents/:id` | session | Delete agent |
-| GET | `/api/agents/:id/manifest` | — | Download manifest JSON |
-| POST | `/api/agents/:id/sign` | session | Sign a message with agent wallet |
-| GET/POST | `/api/agents/:id/embed-policy` | session | Manage iframe origin allowlist |
-| POST | `/api/agents/register-prep` | session | Prep EVM on-chain registration |
-| POST | `/api/agents/register-confirm` | session | Confirm EVM registration |
-| POST | `/api/agent-actions` | session | Record signed agent action |
+| Method | Route | Auth | Description |
+| -------- | ------------------------------ | ------- | -------------------------------- |
+| GET | `/api/agents` | session | List your agents |
+| POST | `/api/agents` | session | Create an agent |
+| GET | `/api/agents/:id` | — | Get agent detail |
+| PATCH | `/api/agents/:id` | session | Update agent |
+| DELETE | `/api/agents/:id` | session | Delete agent |
+| GET | `/api/agents/:id/manifest` | — | Download manifest JSON |
+| POST | `/api/agents/:id/sign` | session | Sign a message with agent wallet |
+| GET/POST | `/api/agents/:id/embed-policy` | session | Manage iframe origin allowlist |
+| POST | `/api/agents/register-prep` | session | Prep EVM on-chain registration |
+| POST | `/api/agents/register-confirm` | session | Confirm EVM registration |
+| POST | `/api/agent-actions` | session | Record signed agent action |
### Avatar API
-| Method | Route | Auth | Description |
-|---|---|---|---|
-| GET | `/api/avatars` | — | List public avatars |
-| POST | `/api/avatars` | session | Create avatar record |
-| GET | `/api/avatars/:id` | — | Get avatar detail |
-| PATCH | `/api/avatars/:id` | session | Update metadata |
-| DELETE | `/api/avatars/:id` | session | Soft-delete avatar |
-| POST | `/api/avatars/:id/presign` | session | Get presigned R2 upload URL |
-| POST | `/api/avatars/:id/pin-ipfs` | session | Pin to IPFS |
+| Method | Route | Auth | Description |
+| ------ | --------------------------- | ------- | --------------------------- |
+| GET | `/api/avatars` | — | List public avatars |
+| POST | `/api/avatars` | session | Create avatar record |
+| GET | `/api/avatars/:id` | — | Get avatar detail |
+| PATCH | `/api/avatars/:id` | session | Update metadata |
+| DELETE | `/api/avatars/:id` | session | Soft-delete avatar |
+| POST | `/api/avatars/:id/presign` | session | Get presigned R2 upload URL |
+| POST | `/api/avatars/:id/pin-ipfs` | session | Pin to IPFS |
**Three-step upload flow:**
+
```
1. POST /api/avatars/:id/presign → { url, storage_key }
2. PUT <presigned_url> ← raw GLB bytes
@@ -1475,30 +1544,30 @@ The full OpenAPI 3.1 spec is available at `/openapi.json`. The key API surface i
### Widget API
-| Method | Route | Auth | Description |
-|---|---|---|---|
-| GET | `/api/widgets` | session | List your widgets |
-| POST | `/api/widgets` | session | Create widget |
-| PATCH | `/api/widgets/:id` | session | Update widget |
-| DELETE | `/api/widgets/:id` | session | Delete widget |
-| POST | `/api/widgets/:id/duplicate` | session | Clone widget |
-| GET | `/api/widgets/:id/stats` | — | View stats |
-| GET | `/api/widgets/oembed` | — | oEmbed card |
+| Method | Route | Auth | Description |
+| ------ | ---------------------------- | ------- | ----------------- |
+| GET | `/api/widgets` | session | List your widgets |
+| POST | `/api/widgets` | session | Create widget |
+| PATCH | `/api/widgets/:id` | session | Update widget |
+| DELETE | `/api/widgets/:id` | session | Delete widget |
+| POST | `/api/widgets/:id/duplicate` | session | Clone widget |
+| GET | `/api/widgets/:id/stats` | — | View stats |
+| GET | `/api/widgets/oembed` | — | oEmbed card |
### Memory API
-| Method | Route | Auth | Description |
-|---|---|---|---|
-| GET | `/api/agent-memory/:id` | session | Fetch agent memory store |
-| POST | `/api/agent-memory/:id` | session | Append memory entries |
-| PUT | `/api/agent-memory/:id` | session | Replace memory store |
+| Method | Route | Auth | Description |
+| ------ | ----------------------- | ------- | ------------------------ |
+| GET | `/api/agent-memory/:id` | session | Fetch agent memory store |
+| POST | `/api/agent-memory/:id` | session | Append memory entries |
+| PUT | `/api/agent-memory/:id` | session | Replace memory store |
### Chat & LLM
-| Method | Route | Auth | Description |
-|---|---|---|---|
-| POST | `/api/chat` | session \| api-key | Chat with agent (Claude backend) |
-| POST | `/api/llm/anthropic` | session | Anthropic API proxy |
+| Method | Route | Auth | Description |
+| ------ | -------------------- | ------------------ | -------------------------------- |
+| POST | `/api/chat` | session \| api-key | Chat with agent (Claude backend) |
+| POST | `/api/llm/anthropic` | session | Anthropic API proxy |
### Cron Jobs
@@ -1506,30 +1575,30 @@ Scheduled via `vercel.json`, these run automatically in production. All cron end
All 22 crons in `vercel.json` are routed through a single dynamic handler at [`api/cron/[name].js`](api/cron/[name].js); the `name` segment selects the handler function. Schedules below match `vercel.json` verbatim.
-| Schedule | Endpoint | Purpose |
-|---|---|---|
-| Every minute | `/api/cron/run-x-scheduled-posts` | Publish queued X (Twitter) posts |
-| Every 3 min | `/api/cron/pumpfun-monitor` | Watch for new pump.fun token creates |
-| Every 5 min | `/api/cron/expire-pending-purchases` | Clear stale x402 pending purchases |
-| Every 5 min | `/api/cron/solana-attestations-crawl` | Index new Solana feedback / validation memos |
-| Every 5 min | `/api/cron/index-delegations` | Index EIP-7710 delegations |
-| Every 5 min | `/api/cron/run-x-triggers` | Trigger-based X posts (mentions, milestones) |
-| Every 5 min | `/api/cron/run-coin-cycle` | Unified coin-launch tick: holder snapshots, vault claims, lottery draws, reflections |
-| Every 5 min (offset) | `/api/cron/run-coin-payouts` | Drain the coin-payouts queue; runs on a different minute from `run-coin-cycle` so a stuck payout never blocks the next cycle |
-| Every 5 min (offset) | `/api/cron/club-payouts` | Sweep unpaid Pole Club tips to each dancer's wallet |
-| Every 10 min | `/api/cron/pump-agent-stats` | Refresh pump-agent dashboard stats |
-| Every 10 min | `/api/cron/solana-attest-event-cleanup` | Prune Solana attestation events older than ~1 hour |
-| Every 15 min | `/api/cron/erc8004-crawl` | Index new ERC-8004 mints on indexed chains |
-| Every 15 min | `/api/cron/pumpfun-signals` | Sweep pump.fun signals into the `pumpfun_signals` table |
-| Hourly | `/api/cron/cleanup-csrf-tokens` | Expire used / stale CSRF tokens |
-| Hourly | `/api/cron/process-withdrawals` | Sweep creator withdrawals (pump.fun, club tips) |
-| Hourly | `/api/cron/run-dca` | Execute DCA strategy orders |
-| Hourly | `/api/cron/run-subscriptions` | Execute recurring x402 subscriptions |
-| Hourly | `/api/cron/siwx-gc` | Prune SIWX nonces (10-min replay window) and expired payment grants |
-| Every 6h | `/api/cron/fetch-x-metrics` | Pull X engagement metrics for owned accounts |
-| Every 6h | `/api/cron/process-subscriptions` | Charge creator subscriptions whose period is about to end |
-| Daily 03:00 UTC | `/api/cron/settle-royalties` | Settle creator and skill royalties owed |
-| Daily 04:00 UTC | `/api/cron/audit-log-cleanup` | Rotate audit logs past the retention window |
+| Schedule | Endpoint | Purpose |
+| -------------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
+| Every minute | `/api/cron/run-x-scheduled-posts` | Publish queued X (Twitter) posts |
+| Every 3 min | `/api/cron/pumpfun-monitor` | Watch for new pump.fun token creates |
+| Every 5 min | `/api/cron/expire-pending-purchases` | Clear stale x402 pending purchases |
+| Every 5 min | `/api/cron/solana-attestations-crawl` | Index new Solana feedback / validation memos |
+| Every 5 min | `/api/cron/index-delegations` | Index EIP-7710 delegations |
+| Every 5 min | `/api/cron/run-x-triggers` | Trigger-based X posts (mentions, milestones) |
+| Every 5 min | `/api/cron/run-coin-cycle` | Unified coin-launch tick: holder snapshots, vault claims, lottery draws, reflections |
+| Every 5 min (offset) | `/api/cron/run-coin-payouts` | Drain the coin-payouts queue; runs on a different minute from `run-coin-cycle` so a stuck payout never blocks the next cycle |
+| Every 5 min (offset) | `/api/cron/club-payouts` | Sweep unpaid Pole Club tips to each dancer's wallet |
+| Every 10 min | `/api/cron/pump-agent-stats` | Refresh pump-agent dashboard stats |
+| Every 10 min | `/api/cron/solana-attest-event-cleanup` | Prune Solana attestation events older than ~1 hour |
+| Every 15 min | `/api/cron/erc8004-crawl` | Index new ERC-8004 mints on indexed chains |
+| Every 15 min | `/api/cron/pumpfun-signals` | Sweep pump.fun signals into the `pumpfun_signals` table |
+| Hourly | `/api/cron/cleanup-csrf-tokens` | Expire used / stale CSRF tokens |
+| Hourly | `/api/cron/process-withdrawals` | Sweep creator withdrawals (pump.fun, club tips) |
+| Hourly | `/api/cron/run-dca` | Execute DCA strategy orders |
+| Hourly | `/api/cron/run-subscriptions` | Execute recurring x402 subscriptions |
+| Hourly | `/api/cron/siwx-gc` | Prune SIWX nonces (10-min replay window) and expired payment grants |
+| Every 6h | `/api/cron/fetch-x-metrics` | Pull X engagement metrics for owned accounts |
+| Every 6h | `/api/cron/process-subscriptions` | Charge creator subscriptions whose period is about to end |
+| Daily 03:00 UTC | `/api/cron/settle-royalties` | Settle creator and skill royalties owed |
+| Daily 04:00 UTC | `/api/cron/audit-log-cleanup` | Rotate audit logs past the retention window |
---
@@ -1538,6 +1607,7 @@ All 22 crons in `vercel.json` are routed through a single dynamic handler at [`a
three.ws supports three authentication methods:
**1. Email + Password (Session cookie)**
+
```
POST /api/auth/register → create account
POST /api/auth/login → JWT session cookie
@@ -1546,6 +1616,7 @@ POST /api/auth/logout → revoke session
```
**2. Wallet (SIWE / SIWS)**
+
```
POST /api/auth/siwe → get nonce challenge
POST /api/auth/siwe/verify → verify EIP-4361 signed message → session
@@ -1553,6 +1624,7 @@ POST /api/auth/siws → Solana equivalent
```
**3. Developer API Keys**
+
```
POST /api/api-keys → create key (set scope + expiry)
DELETE /api/api-keys/:id → revoke key
@@ -1593,40 +1665,40 @@ Access tokens are short-lived JWTs (1 hour). Refresh tokens are opaque strings s
The catalog is assembled dynamically at request time from the per-category tool modules. Current tools:
-*Avatars* ([`api/_mcp/tools/avatars.js`](api/_mcp/tools/avatars.js))
+_Avatars_ ([`api/_mcp/tools/avatars.js`](api/_mcp/tools/avatars.js))
-| Tool | Description |
-|---|---|
-| `list_my_avatars` | List the authenticated user's avatars with id, name, slug, size, visibility, and (when permitted) direct `model_url`. |
-| `get_avatar` | Fetch a single avatar by id or owner+slug; returns metadata plus a public `model_url` or short-lived signed URL for private avatars. |
-| `search_public_avatars` | Free-text + tag search across the public avatar gallery; useful for finding characters to render without prior knowledge of an id. |
-| `render_avatar` | Produce an HTML `<model-viewer>` snippet that renders the given avatar, with configurable background, camera orbit, poster, and AR button. |
-| `delete_avatar` | Soft-delete an avatar you own. Requires the `avatars:delete` scope. |
+| Tool | Description |
+| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
+| `list_my_avatars` | List the authenticated user's avatars with id, name, slug, size, visibility, and (when permitted) direct `model_url`. |
+| `get_avatar` | Fetch a single avatar by id or owner+slug; returns metadata plus a public `model_url` or short-lived signed URL for private avatars. |
+| `search_public_avatars` | Free-text + tag search across the public avatar gallery; useful for finding characters to render without prior knowledge of an id. |
+| `render_avatar` | Produce an HTML `<model-viewer>` snippet that renders the given avatar, with configurable background, camera orbit, poster, and AR button. |
+| `delete_avatar` | Soft-delete an avatar you own. Requires the `avatars:delete` scope. |
-*Models* ([`api/_mcp/tools/models.js`](api/_mcp/tools/models.js))
+_Models_ ([`api/_mcp/tools/models.js`](api/_mcp/tools/models.js))
-| Tool | Description |
-|---|---|
-| `validate_model` | Run the Khronos glTF-Validator against a public https GLB/glTF URL; returns a structured report of errors, warnings, infos, and hints. SSRF-hardened. |
-| `inspect_model` | Parse a GLB/glTF and return structural stats: scene/node/mesh counts, vertex and triangle totals, material and texture summaries, and extensions used. Pure inspection — no advice. |
+| Tool | Description |
+| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `validate_model` | Run the Khronos glTF-Validator against a public https GLB/glTF URL; returns a structured report of errors, warnings, infos, and hints. SSRF-hardened. |
+| `inspect_model` | Parse a GLB/glTF and return structural stats: scene/node/mesh counts, vertex and triangle totals, material and texture summaries, and extensions used. Pure inspection — no advice. |
| `optimize_model` | Inspect the model and return actionable suggestions for reducing size and draw-call overhead: triangle budget, Draco/Meshopt, oversized textures, KTX2 transcoding, non-indexed primitives, redundant materials, and more. |
-*Solana* ([`api/_mcp/tools/solana.js`](api/_mcp/tools/solana.js)) — all public, no auth required
+_Solana_ ([`api/_mcp/tools/solana.js`](api/_mcp/tools/solana.js)) — all public, no auth required
-| Tool | Description |
-|---|---|
-| `solana_agent_reputation` | Computed reputation summary for a Solana-registered agent: total/verified feedback counts, raw + verified-only score averages, validation pass/fail, task-acceptance, and dispute counts. |
-| `solana_agent_attestations` | List recent on-chain attestations (feedback, validation, task offers, acceptances, disputes) about a Solana agent; each row includes verified/disputed/revoked flags. |
-| `solana_agent_passport` | Full discovery card for a Solana agent: identity, owner wallet, reputation summary, latest validation result, and attestation schema endpoint — the Solana equivalent of an ERC-8004 passport. |
+| Tool | Description |
+| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `solana_agent_reputation` | Computed reputation summary for a Solana-registered agent: total/verified feedback counts, raw + verified-only score averages, validation pass/fail, task-acceptance, and dispute counts. |
+| `solana_agent_attestations` | List recent on-chain attestations (feedback, validation, task offers, acceptances, disputes) about a Solana agent; each row includes verified/disputed/revoked flags. |
+| `solana_agent_passport` | Full discovery card for a Solana agent: identity, owner wallet, reputation summary, latest validation result, and attestation schema endpoint — the Solana equivalent of an ERC-8004 passport. |
-*Pump.fun* ([`api/_mcp/tools/pumpfun.js`](api/_mcp/tools/pumpfun.js))
+_Pump.fun_ ([`api/_mcp/tools/pumpfun.js`](api/_mcp/tools/pumpfun.js))
-| Tool | Description |
-|---|---|
-| `pumpfun_recent_claims` | Most recent pump.fun GitHub social-fee claim events with full enrichment: GitHub profile, X/Twitter follower data, influencer tier, first-time-claim flag, fake-claim detection, and AI summary. |
-| `pumpfun_recent_graduations` | Tokens that recently graduated from the bonding curve to PumpAMM, with creator and holder analysis. |
-| `pumpfun_token_intel` | Full intel on a pump.fun token: graduation status, bonding-curve progress, creator profile, top holders, volume, bundle detection, and trust signals. |
-| `pumpfun_creator_intel` | Reputation profile for a pump.fun creator wallet: prior launches, graduation rate, claim activity, and behavioural trust signals. |
+| Tool | Description |
+| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `pumpfun_recent_claims` | Most recent pump.fun GitHub social-fee claim events with full enrichment: GitHub profile, X/Twitter follower data, influencer tier, first-time-claim flag, fake-claim detection, and AI summary. |
+| `pumpfun_recent_graduations` | Tokens that recently graduated from the bonding curve to PumpAMM, with creator and holder analysis. |
+| `pumpfun_token_intel` | Full intel on a pump.fun token: graduation status, bonding-curve progress, creator profile, top holders, volume, bundle detection, and trust signals. |
+| `pumpfun_creator_intel` | Reputation profile for a pump.fun creator wallet: prior launches, graduation rate, claim activity, and behavioural trust signals. |
**MCP discovery:** configured in `.mcp.json` at the repo root for Claude Desktop integration.
@@ -1641,6 +1713,7 @@ ERC-8004 is a draft standard for verifiable 3D agent identity. The `contracts/`
### Contracts
**IdentityRegistry.sol** — the primary contract. Each agent is an ERC-721 token with:
+
- `agentId` — stable numeric ID (the token ID)
- `owner` — EVM address of the agent's owner
- `delegatedSigner` — optional secondary address for runtime signing (EIP-712 typed signature)
@@ -1657,17 +1730,17 @@ See [`contracts/DEPLOYMENTS.md`](contracts/DEPLOYMENTS.md) for current mainnet a
**Mainnet (across Ethereum, Optimism, BSC, Gnosis, Polygon, Fantom, zkSync Era, Moonbeam, Mantle, Base, Arbitrum One, Celo, Avalanche, Linea, Scroll):**
-| Contract | Address |
-|---|---|
-| IdentityRegistry | `0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` |
+| Contract | Address |
+| ------------------ | -------------------------------------------- |
+| IdentityRegistry | `0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` |
| ReputationRegistry | `0x8004BAa17C55a88189AE136b182e5fdA19dE9b63` |
-| ValidationRegistry | *(same address on all chains)* |
+| ValidationRegistry | _(same address on all chains)_ |
**Testnet (BSC Testnet, Ethereum Sepolia, Base Sepolia, Arbitrum Sepolia, Optimism Sepolia, Polygon Amoy, Avalanche Fuji):**
-| Contract | Address |
-|---|---|
-| IdentityRegistry | `0x8004A818BFB912233c491871b3d84c89A494BD9e` |
+| Contract | Address |
+| ------------------ | -------------------------------------------- |
+| IdentityRegistry | `0x8004A818BFB912233c491871b3d84c89A494BD9e` |
| ReputationRegistry | `0x8004B663056A597Dffe9eCcC1965A193B7388713` |
| ValidationRegistry | `0x8004Cb1BF31DAf7788923b405b754f57acEB4272` |
@@ -1724,16 +1797,16 @@ Demo page: [sdk/example/solana-attest.html](sdk/example/solana-attest.html).
Solana agents can ingest live pump.fun activity (GitHub social-fee claims, token graduations) as off-chain trust signals that feed into the agent's Solana reputation score and surface through the Empathy Layer in real time.
-| Surface | Path | Purpose |
-|---|---|---|
-| MCP client | [api/_lib/pumpfun-mcp.js](api/_lib/pumpfun-mcp.js) | Cached JSON-RPC client to upstream `pumpfun-claims-bot` |
-| Read API | [api/agents/pumpfun.js](api/agents/pumpfun.js) | `GET ?op=claims\|graduations\|token\|creator`, plus `?_handler=feed` for the SSE event stream and `?_handler=metadata` for token metadata. Auth: session or bearer (`mcp`/`profile` scope). |
-| Write actions | [api/agents/pumpfun/[action].js](api/agents/pumpfun/[action].js) | Dynamic dispatcher for `buy`, `sell`, `swap`, `launch`, `pay`, `portfolio`, `balances`, and buyback lifecycle (`create`, `accept`, `withdraw`, `distribute`, `extend_account`, `update_authority`, `update_buyback`). |
-| Cron crawler | [api/cron/[name].js](api/cron/[name].js) (`name=pumpfun-signals`) | 15-min sweep that writes the `pumpfun_signals` table; routed through the dynamic cron handler. |
-| Skills | [src/agent-skills-pumpfun-watch.js](src/agent-skills-pumpfun-watch.js) | `recent-claims`, `token-intel`, `watch-start`, `watch-stop` |
-| Widget | [src/widgets/pumpfun-feed.js](src/widgets/pumpfun-feed.js) | Live cards overlay |
-| Reputation | [api/agents/solana/[action].js](api/agents/solana/[action].js) (`action=reputation`) | Reputation summary with the `pumpfun_signals` block included in the response |
-| Passport | [api/agents/solana/[action].js](api/agents/solana/[action].js) (`action=card`) | Public passport card with the `pumpfun` block on the agent card |
+| Surface | Path | Purpose |
+| ------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| MCP client | [api/\_lib/pumpfun-mcp.js](api/_lib/pumpfun-mcp.js) | Cached JSON-RPC client to upstream `pumpfun-claims-bot` |
+| Read API | [api/agents/pumpfun.js](api/agents/pumpfun.js) | `GET ?op=claims\|graduations\|token\|creator`, plus `?_handler=feed` for the SSE event stream and `?_handler=metadata` for token metadata. Auth: session or bearer (`mcp`/`profile` scope). |
+| Write actions | [api/agents/pumpfun/[action].js](api/agents/pumpfun/[action].js) | Dynamic dispatcher for `buy`, `sell`, `swap`, `launch`, `pay`, `portfolio`, `balances`, and buyback lifecycle (`create`, `accept`, `withdraw`, `distribute`, `extend_account`, `update_authority`, `update_buyback`). |
+| Cron crawler | [api/cron/[name].js](api/cron/[name].js) (`name=pumpfun-signals`) | 15-min sweep that writes the `pumpfun_signals` table; routed through the dynamic cron handler. |
+| Skills | [src/agent-skills-pumpfun-watch.js](src/agent-skills-pumpfun-watch.js) | `recent-claims`, `token-intel`, `watch-start`, `watch-stop` |
+| Widget | [src/widgets/pumpfun-feed.js](src/widgets/pumpfun-feed.js) | Live cards overlay |
+| Reputation | [api/agents/solana/[action].js](api/agents/solana/[action].js) (`action=reputation`) | Reputation summary with the `pumpfun_signals` block included in the response |
+| Passport | [api/agents/solana/[action].js](api/agents/solana/[action].js) (`action=card`) | Public passport card with the `pumpfun` block on the agent card |
The crawler runs on a `*/15 * * * *` schedule (see [vercel.json](vercel.json)) and writes into the `pumpfun_signals` table. Agents subscribed via `watch-start` react to incoming events through the existing protocol bus — no new event types required.
@@ -1753,16 +1826,16 @@ Beyond the Solana reputation signals described above, the platform also ships co
The launcher uses pump.fun's v2 USDC quote payload and supports a creator-signer split — the agent's owner can authorize a delegated signer to publish the token without exposing the root key.
-| Surface | Path | Purpose |
-|---|---|---|
-| Web UI | `/pumpfun` | One-page launcher (avatar, ticker, supply, fee shares) |
-| Prep | `POST /api/pump/launch-prep` | Build the launch transaction with creator + signer split |
-| Quote | `POST /api/pump/quote-sdk` | v2 USDC quote (replaces deprecated v1 path) |
-| Curve | `GET /api/pump/curve` | Bonding-curve sim for pre-launch pricing preview |
-| Dashboard | `GET /api/pump/dashboard` | Per-creator launch history + cumulative revenue |
-| Stats | `GET /api/pump/helius-stats` | Helius-backed per-token holder + trade counts |
-| Trades stream | `GET /api/pump/trades-stream` | SSE feed of trades for a token |
-| Inaugural launch | `scripts/pump-launch-usdc.mjs` | First-USDC launch flow used to mint platform tokens |
+| Surface | Path | Purpose |
+| ---------------- | ------------------------------ | -------------------------------------------------------- |
+| Web UI | `/pumpfun` | One-page launcher (avatar, ticker, supply, fee shares) |
+| Prep | `POST /api/pump/launch-prep` | Build the launch transaction with creator + signer split |
+| Quote | `POST /api/pump/quote-sdk` | v2 USDC quote (replaces deprecated v1 path) |
+| Curve | `GET /api/pump/curve` | Bonding-curve sim for pre-launch pricing preview |
+| Dashboard | `GET /api/pump/dashboard` | Per-creator launch history + cumulative revenue |
+| Stats | `GET /api/pump/helius-stats` | Helius-backed per-token holder + trade counts |
+| Trades stream | `GET /api/pump/trades-stream` | SSE feed of trades for a token |
+| Inaugural launch | `scripts/pump-launch-usdc.mjs` | First-USDC launch flow used to mint platform tokens |
### Pump-swap buyback
@@ -1772,11 +1845,11 @@ A buyback flow lets an agent route revenue from x402 paid endpoints into pump-sw
`/pump-visualizer` is a live view of pump.fun activity with three modes:
-| Mode | What it shows |
-|---|---|
-| **Feed** | Newest launches as they happen, with cover images and creator history |
-| **Migrations** | Tokens graduating from the curve to pump-swap pools |
-| **Pulses** | Real-time trade pulses overlaid on a graph |
+| Mode | What it shows |
+| -------------- | --------------------------------------------------------------------- |
+| **Feed** | Newest launches as they happen, with cover images and creator history |
+| **Migrations** | Tokens graduating from the curve to pump-swap pools |
+| **Pulses** | Real-time trade pulses overlaid on a graph |
The visualizer supports search, sort, live pulses, and auto-refresh. Backed by the same Helius webhooks and JSON-RPC client as the cron crawler.
@@ -1786,12 +1859,12 @@ For external agents that need pump.fun data with strict latency, a Cloudflare Wo
### Channel & Telegram bridge
-| Endpoint | Purpose |
-|---|---|
-| `GET /api/pump/channel-feed` | Per-creator activity feed for any agent's channel page |
-| `POST /api/pump/deliver-telegram` | Optional Telegram bridge for trade and migration alerts |
-| `POST /api/pump/accept-payment-prep` / `accept-payment-confirm` | Two-step USDC handoff for buyback flow |
-| `POST /api/pump/withdraw-prep` / `withdraw-confirm` | Creator fee withdrawal with signature verification |
+| Endpoint | Purpose |
+| --------------------------------------------------------------- | ------------------------------------------------------- |
+| `GET /api/pump/channel-feed` | Per-creator activity feed for any agent's channel page |
+| `POST /api/pump/deliver-telegram` | Optional Telegram bridge for trade and migration alerts |
+| `POST /api/pump/accept-payment-prep` / `accept-payment-confirm` | Two-step USDC handoff for buyback flow |
+| `POST /api/pump/withdraw-prep` / `withdraw-confirm` | Creator fee withdrawal with signature verification |
### Vanity mint addresses
@@ -1801,58 +1874,115 @@ The platform's pump.fun launches pre-grind vanity mint addresses with the WASM g
## Database Schema
-The Postgres schema (`api/_lib/schema.sql`) is fully idempotent — all migrations use `CREATE TABLE IF NOT EXISTS` patterns. Safe to re-run on any environment.
+The Postgres schema ([`api/_lib/schema.sql`](api/_lib/schema.sql)) is fully idempotent — every `CREATE TABLE` uses `IF NOT EXISTS`, so the file is safe to re-run on any environment. Per-feature migrations live under [`api/_lib/migrations/`](api/_lib/migrations/) and are applied with `npm run db:migrate`.
+
+The schema currently defines ~53 tables grouped below. Columns shown are the most commonly queried ones; the source file is authoritative.
+
+**Core identity & content**
+
+```sql
+users (id, email, password_hash, display_name, avatar_url, plan, wallet_address, deleted_at)
+avatars (id, owner_id, slug, name, description, storage_key, visibility,
+ tags, checksum_sha256, version, deleted_at)
+sessions (id, user_id, token_hash, user_agent, ip, expires_at, revoked_at)
+api_keys (id, user_id, prefix, token_hash, scope, expires_at, revoked_at)
+user_prefs (user_id, key, value, updated_at)
+agent_identities (id, user_id, name, description, avatar_id, skills,
+ meta, wallet_address, erc8004_agent_id, deleted_at)
+agent_actions (id, agent_id, type, payload, source_skill,
+ signature, signer_address, created_at)
+agent_memories (id, agent_id, type, content, tags, context,
+ salience, expires_at, created_at)
+```
+
+**OAuth 2.1**
+
+```sql
+oauth_clients (client_id, client_secret_hash, redirect_uris, grant_types, scope, ...)
+oauth_auth_codes (code, client_id, user_id, code_challenge, expires_at, consumed_at)
+oauth_refresh_tokens (token_hash, client_id, user_id, scope, expires_at, revoked_at, ...)
+```
+
+**Wallet & signing**
-**Core tables:**
+```sql
+user_wallets (user_id, address, chain_type, chain_id, is_primary)
+siwe_nonces (nonce, address, issued_at, expires_at, consumed_at)
+siws_nonces (same shape for Solana)
+gate_nonces (nonce, scene_gate_id, issued_at, consumed_at)
+scene_gates (id, owner_id, scope, policy, created_at)
+csrf_tokens (token, user_id, issued_at, consumed_at)
+```
+
+**Authentication extras**
```sql
--- Users
-users (id, email, password_hash, display_name, avatar_url, plan, wallet_address, deleted_at)
+email_verifications (token_hash, user_id, expires_at, consumed_at)
+password_resets (token_hash, user_id, expires_at, consumed_at)
+social_connections (user_id, provider, provider_user_id, access_token_hash, ...)
+```
--- 3D model files
-avatars (id, owner_id, slug, name, description, storage_key, visibility,
- tags, checksum_sha256, version, deleted_at)
+**Widgets**
--- Sessions
-sessions (id, user_id, token_hash, user_agent, ip, expires_at, revoked_at)
+```sql
+widgets (id, owner_id, kind, config, public_slug, ...)
+widget_views (widget_id, ip_hash, user_agent_hash, viewed_at)
+```
--- Developer API keys
-api_keys (id, user_id, prefix, token_hash, scope, expires_at, revoked_at)
+**ERC-8004 / EVM indexing**
--- Agent identities
-agent_identities (id, user_id, name, description, avatar_id, skills,
- meta, wallet_address, erc8004_agent_id, deleted_at)
+```sql
+erc8004_agents_index (chain_id, agent_id, owner, token_uri, ...)
+erc8004_crawl_cursor (chain_id, last_block, updated_at)
+indexer_state (key, value, updated_at)
+agent_registrations_pending (id, user_id, chain_id, typed_data, signed_payload, status, ...)
+agent_delegations (agent_id, delegate, scope, expires_at, ...)
+```
--- Signed action log
-agent_actions (id, agent_id, type, payload, source_skill,
- signature, signer_address, created_at)
+**Solana attestations & registration**
--- Memory store
-agent_memories (id, agent_id, type, content, tags, context,
- salience, expires_at, created_at)
+```sql
+solana_attestations (asset_pubkey, kind, payload, signer, network, slot, sig)
+solana_attestations_cursor (network, last_slot, updated_at)
+solana_credentials (user_id, asset_pubkey, network, role)
+pumpfun_signals (asset_pubkey, signal_kind, payload, observed_at)
+pumpfun_graduations (mint, creator, graduated_at, amm_pool, ...)
```
-**OAuth tables:**
+**Marketplace, skills & royalties**
```sql
-oauth_clients (client_id, client_secret_hash, redirect_uris, grant_types, scope, ...)
-oauth_auth_codes (code, client_id, user_id, code_challenge, expires_at, consumed_at)
-oauth_refresh_tokens(token_hash, client_id, user_id, scope, expires_at, revoked_at, ...)
+marketplace_skills (id, skill_uri, owner_id, title, description, price_usdc, ...)
+skill_installs (skill_id, agent_id, installed_at)
+skill_purchases (skill_id, buyer_user_id, price_usdc, settled_at, tx_hash)
+skill_ratings (skill_id, rater_user_id, stars, comment, created_at)
+agent_skill_prices (agent_id, skill_id, override_price_usdc)
+royalty_ledger (id, owner_id, source, amount_usdc, settled_at, tx_hash)
+plugins (id, owner_id, manifest, public_slug, ...)
```
-**Wallet & signing:**
+**Subscriptions, DCA & payments**
```sql
-user_wallets (user_id, address, chain_type, chain_id, is_primary)
-siwe_nonces (nonce, address, issued_at, expires_at, consumed_at)
-siws_nonces (same shape for Solana)
+subscriptions (id, user_id, plan_id, status, current_period_end, ...)
+subscription_plans (id, owner_id, name, price_usd, cadence)
+subscription_payments (subscription_id, status, amount_usdc, tx_hash, attempted_at)
+creator_subscriptions (id, subscriber_user_id, plan_id, status, current_period_end, ...)
+agent_subscriptions (id, agent_id, subscriber_user_id, status, ...)
+agent_payments (id, agent_id, payer_user_id, amount_usdc, status, tx_hash)
+agent_payment_intents (id, agent_id, status, payload, created_at)
+plan_payment_intents (id, plan_id, status, payload, created_at)
+dca_strategies (id, owner_id, source_token, target_token, cadence, amount, status)
+dca_executions (strategy_id, status, amount, tx_hash, executed_at)
+purchase_events (id, kind, payload, observed_at)
+purchase_receipts (purchase_id, receipt_json, settled_at)
```
-**Usage & quotas:**
+**Usage & quotas**
```sql
-usage_events (user_id, api_key_id, client_id, avatar_id, kind, tool, status, bytes, latency_ms)
-plan_quotas (plan, max_avatars, max_bytes_per_avatar, max_total_bytes)
+usage_events (user_id, api_key_id, client_id, avatar_id, kind, tool, status, bytes, latency_ms)
+plan_quotas (plan, max_avatars, max_bytes_per_avatar, max_total_bytes)
```
---
@@ -1861,28 +1991,28 @@ plan_quotas (plan, max_avatars, max_bytes_per_avatar, max_total_bytes)
### npm Scripts
-| Command | Description |
-|---|---|
-| `npm run dev` | Vite dev server on port 3000 with HMR |
-| `npm run build` | Production build to `dist/` |
-| `npm run build:lib` | Build `<agent-3d>` web component library to `dist-lib/` |
-| `npm run build:artifact` | Build standalone Claude artifact viewer bundle |
-| `npm run build:all` | Chat build, then `build` + `build:lib` + `build:rider` in parallel |
-| `npm run publish:lib` | Publish versioned CDN bundles to `/agent-3d/` |
-| `npm run test` | Vitest unit suite + Playwright end-to-end suite |
-| `npm run test:e2e` | Playwright end-to-end suite only |
-| `npm run verify` | Prettier check + Vite build (pre-deploy gate) |
-| `npm run format` | Prettier write (entire repo) |
-| `npm run deploy` | `build:all` → `check:dist` → `vercel --prod` |
-| `npm run clean` | Remove `dist/` and `dist-lib/` |
-| `npm run fetch-animations` | Download animation clip assets |
-| `npm run generate-icons` | Generate PWA icon set |
-| `npm run db:migrate` | Apply Postgres migrations from `scripts/migrations/` |
-| `npm run db:status` | Show pending Postgres migrations |
-| `npm run seed:skills` | Seed the skills registry from `skills-manifest.js` |
-| `npm run install:sdk` | Install + build `agent-payments-sdk` and link it locally |
-| `npm run validate:cards` | Validate agent definition cards in `src/agents/` |
-| `npm run pump:smoke` | Run the pump.fun lifecycle smoke test |
+| Command | Description |
+| -------------------------- | ------------------------------------------------------------------ |
+| `npm run dev` | Vite dev server on port 3000 with HMR |
+| `npm run build` | Production build to `dist/` |
+| `npm run build:lib` | Build `<agent-3d>` web component library to `dist-lib/` |
+| `npm run build:artifact` | Build standalone Claude artifact viewer bundle |
+| `npm run build:all` | Chat build, then `build` + `build:lib` + `build:rider` in parallel |
+| `npm run publish:lib` | Publish versioned CDN bundles to `/agent-3d/` |
+| `npm run test` | Vitest unit suite + Playwright end-to-end suite |
+| `npm run test:e2e` | Playwright end-to-end suite only |
+| `npm run verify` | Prettier check + Vite build (pre-deploy gate) |
+| `npm run format` | Prettier write (entire repo) |
+| `npm run deploy` | `build:all` → `check:dist` → `vercel --prod` |
+| `npm run clean` | Remove `dist/` and `dist-lib/` |
+| `npm run fetch-animations` | Download animation clip assets |
+| `npm run generate-icons` | Generate PWA icon set |
+| `npm run db:migrate` | Apply Postgres migrations from `scripts/migrations/` |
+| `npm run db:status` | Show pending Postgres migrations |
+| `npm run seed:skills` | Seed the skills registry from `skills-manifest.js` |
+| `npm run install:sdk` | Install + build `agent-payments-sdk` and link it locally |
+| `npm run validate:cards` | Validate agent definition cards in `src/agents/` |
+| `npm run pump:smoke` | Run the pump.fun lifecycle smoke test |
### Claude CLI
@@ -1894,20 +2024,20 @@ npm run claude -- <command>
./scripts/claude.sh <command>
```
-| Command | Wraps |
-|---|---|
-| `install-sdk` | `npm run install:sdk` |
-| `validate-cards` | `npm run validate:cards` |
-| `db-migrate` | `npm run db:migrate` (with confirmation) |
-| `db-status` | `npm run db:status` |
-| `pump-smoke-test` | `npm run pump:smoke` |
-| `seed-skills` | `npm run seed:skills` |
-| `test` | `npm run test` |
-| `format` | `npm run format` |
-| `clean` | `npm run clean` |
-| `deploy` | `npm run deploy` (with confirmation) |
+| Command | Wraps |
+| --------------------- | ------------------------------------------ |
+| `install-sdk` | `npm run install:sdk` |
+| `validate-cards` | `npm run validate:cards` |
+| `db-migrate` | `npm run db:migrate` (with confirmation) |
+| `db-status` | `npm run db:status` |
+| `pump-smoke-test` | `npm run pump:smoke` |
+| `seed-skills` | `npm run seed:skills` |
+| `test` | `npm run test` |
+| `format` | `npm run format` |
+| `clean` | `npm run clean` |
+| `deploy` | `npm run deploy` (with confirmation) |
| `deploy-agent <name>` | Packages an agent into a distributable zip |
-| `help` | List all commands |
+| `help` | List all commands |
### Vercel Deployment
@@ -1935,6 +2065,7 @@ For a traditional server deployment:
6. Schedule cron jobs with node-cron or systemd timers
**Minimal nginx config:**
+
```nginx
server {
listen 80;
@@ -2030,59 +2161,65 @@ VITE_AVATURN_DEVELOPER_ID=...
## Testing
-The test suite uses Vitest. API tests mock the database and auth layer; frontend tests mock the viewer.
+`npm run test` runs Vitest (unit + integration) followed by Playwright (end-to-end). API tests stub the database and auth layer; frontend tests stub the viewer. The project currently has ~150 test files spread across `tests/`, `tests/api/`, `tests/src/`, and `tests/e2e/`.
```bash
-npm run test # All tests
-npm run test -- tests/api/agents # Specific file
-npm run verify # prettier check + vite build
+npm run test # Vitest then Playwright
+npx vitest run tests/api/agents.test.js # Single Vitest file
+npm run test:e2e # Playwright only
+npm run verify # Prettier check + Vite build
```
-**Test coverage:**
-
-| Area | Files |
-|---|---|
-| Agent CRUD | `tests/api/agents.test.js` |
-| Widget CRUD | `tests/api/widgets.test.js` |
-| OAuth flow | `tests/api/oauth-authorize.test.js`, `oauth-token.test.js` |
-| SIWE wallet auth | `tests/api/siwe.test.js` |
-| LLM proxy | `tests/api/llm-anthropic.test.js` |
-| Schema validation | `tests/api/validate.test.js` |
-| API keys | `tests/api/api-keys.test.js` |
-| Crypto utilities | `tests/api/crypto.test.js` |
-| Embed CORS policy | `tests/api/embed-policy.test.js` |
-| Animation slots | `tests/src/animation-slots.test.js` |
-| Widget types | `tests/src/widget-types.test.js` |
-| ARKit-52 morphs | `tests/src/arkit-morphs.test.js` |
-| Talk controller | `tests/src/talk-controller.test.js` |
-| Pose mannequin | `tests/src/pose-mannequin.test.js` |
-| x402 paid endpoint helper | `tests/api/x402-paid-endpoint.test.js` |
-| x402 buyer fetch | `tests/api/x402-buyer-fetch.test.js` |
-| Permit2 sibling | `tests/api/x402-permit2.test.js` |
-| Persona extraction | `tests/api/persona-extract.test.js` |
-| Pump.fun MCP edge | `tests/workers/pump-fun-mcp.test.js` |
-| News CMS | `tests/api/news.test.js` |
-| Selfie pipeline | `tests/src/selfie-pipeline.test.js` |
-| Deploy-page inspect | `scripts/deploy-page-inspect.mjs` |
+**Representative Vitest coverage** (full inventory under [tests/](tests/)):
+
+| Area | File |
+| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Agent CRUD | [tests/api/agents.test.js](tests/api/agents.test.js) |
+| Agent memory | [tests/api/agent-memory.test.js](tests/api/agent-memory.test.js), [tests/src/agent-memory.test.js](tests/src/agent-memory.test.js) |
+| Agent protocol bus | [tests/agent-protocol.test.js](tests/agent-protocol.test.js), [tests/src/agent-protocol.test.js](tests/src/agent-protocol.test.js) |
+| Widget CRUD | [tests/api/widgets.test.js](tests/api/widgets.test.js) |
+| Widget types | [tests/src/widget-types.test.js](tests/src/widget-types.test.js) |
+| OAuth flow | [tests/api/oauth-authorize.test.js](tests/api/oauth-authorize.test.js), [tests/api/oauth-token.test.js](tests/api/oauth-token.test.js), [tests/api/oauth-introspect.test.js](tests/api/oauth-introspect.test.js) |
+| SIWE / SIWS wallet auth | [tests/api/siwe.test.js](tests/api/siwe.test.js) |
+| Email + password auth | [tests/api/auth-email.test.js](tests/api/auth-email.test.js), [tests/api/auth-helpers.test.js](tests/api/auth-helpers.test.js) |
+| API keys | [tests/api/api-keys.test.js](tests/api/api-keys.test.js) |
+| LLM proxy | [tests/api/llm-anthropic.test.js](tests/api/llm-anthropic.test.js), [tests/api/chat-proxy-ratelimit.test.js](tests/api/chat-proxy-ratelimit.test.js) |
+| MCP server | [tests/api/mcp.test.js](tests/api/mcp.test.js) |
+| Schema validation | [tests/api-validate.test.js](tests/api-validate.test.js) |
+| Crypto utilities | [tests/api/crypto.test.js](tests/api/crypto.test.js) |
+| Embed CORS policy | [tests/api/embed-policy.test.js](tests/api/embed-policy.test.js) |
+| Embed bridge handshake | [tests/embed-bridge-origin.test.js](tests/embed-bridge-origin.test.js), [tests/embed-bridge-roundtrip.test.js](tests/embed-bridge-roundtrip.test.js) |
+| Animation slots / state | [tests/src/animation-slots.test.js](tests/src/animation-slots.test.js), [tests/animation-state-machine.test.js](tests/animation-state-machine.test.js), [tests/animations.test.js](tests/animations.test.js) |
+| ARKit-52 morphs / lipsync | [tests/arkit52.test.js](tests/arkit52.test.js), [tests/arkit-blendshapes.test.js](tests/arkit-blendshapes.test.js), [tests/agent-avatar-lipsync.test.js](tests/agent-avatar-lipsync.test.js), [tests/lipsync-driver.test.js](tests/lipsync-driver.test.js), [tests/src/lip-sync-analyser.test.js](tests/src/lip-sync-analyser.test.js) |
+| x402 protocol | [tests/api/x402.test.js](tests/api/x402.test.js), [tests/api/x402-spec.test.js](tests/api/x402-spec.test.js), [tests/api/x402-paid-endpoint-siwx.test.js](tests/api/x402-paid-endpoint-siwx.test.js), [tests/api/x402-gas-sponsoring.test.js](tests/api/x402-gas-sponsoring.test.js), [tests/api/x402-payment-identifier.test.js](tests/api/x402-payment-identifier.test.js) |
+| Persona | [tests/api/persona.test.js](tests/api/persona.test.js) |
+| Pump.fun MCP / skills | [tests/api/pump-fun-mcp.test.js](tests/api/pump-fun-mcp.test.js), [tests/pump-mcp-tools.test.js](tests/pump-mcp-tools.test.js), [tests/pumpfun-ported-skills.test.js](tests/pumpfun-ported-skills.test.js), [tests/src/pump-fun-skill.test.js](tests/src/pump-fun-skill.test.js) |
+| Pump.fun pricing / curves | [tests/api/pump-curve.test.js](tests/api/pump-curve.test.js), [tests/bonding-curve.test.js](tests/bonding-curve.test.js), [tests/pump-swap-ix.test.js](tests/pump-swap-ix.test.js) |
+| Pump.fun signals / live feed | [tests/pumpfun-signals.test.js](tests/pumpfun-signals.test.js), [tests/pumpfun-ws-feed.test.js](tests/pumpfun-ws-feed.test.js), [tests/pump-live-stream.test.js](tests/pump-live-stream.test.js), [tests/carbon-graduations.test.js](tests/carbon-graduations.test.js) |
+| Club tips / payouts | [tests/api/club-tips.test.js](tests/api/club-tips.test.js), [tests/api/club-tips-stream.test.js](tests/api/club-tips-stream.test.js), [tests/api/club-payouts-cron.test.js](tests/api/club-payouts-cron.test.js), [tests/api/dance-tip.test.js](tests/api/dance-tip.test.js) |
+| Club performance / venue | [tests/club-audio.test.js](tests/club-audio.test.js), [tests/club-camera.test.js](tests/club-camera.test.js), [tests/club-perf.test.js](tests/club-perf.test.js), [tests/club-venue-load.test.js](tests/club-venue-load.test.js), [tests/club-sequence.test.js](tests/club-sequence.test.js) |
+| Avatar bake / snapshot | [tests/avatar-bake.test.js](tests/avatar-bake.test.js), [tests/avatar-snapshot.test.js](tests/avatar-snapshot.test.js), [tests/api/avatar-og.test.js](tests/api/avatar-og.test.js) |
+| glTF canonicalize / extras | [tests/glb-canonicalize.test.js](tests/glb-canonicalize.test.js), [tests/src/gltf-extras.test.js](tests/src/gltf-extras.test.js), [tests/src/validator.test.js](tests/src/validator.test.js) |
+| Vanity (Solana + EVM) | [tests/vanity-wasm-grinder.test.js](tests/vanity-wasm-grinder.test.js), [tests/src/eth-vanity-derivation.test.js](tests/src/eth-vanity-derivation.test.js), [tests/src/eth-vanity-server-verify.test.js](tests/src/eth-vanity-server-verify.test.js), [tests/src/vanity-validation.test.js](tests/src/vanity-validation.test.js) |
+| Build asset paths | [tests/build-asset-paths.test.js](tests/build-asset-paths.test.js) |
+| Agent monetization | [tests/agent-monetization.test.js](tests/agent-monetization.test.js) |
+| Billing | [tests/billing.test.js](tests/billing.test.js) |
+| Branding / camera presets | [tests/branding.test.js](tests/branding.test.js), [tests/camera-presets.test.js](tests/camera-presets.test.js) |
### Playwright end-to-end smokes
-Browser-driven smokes live in `tests/e2e/` and run against a local Vite + Vercel dev stack. They cover the user-visible flows that don't fit in Vitest.
+Browser-driven smokes live in [tests/e2e/](tests/e2e/) and run against the local Vite + Vercel dev stack. They cover user-visible flows that don't fit in Vitest.
-| Smoke | What it exercises |
-|---|---|
-| `walk-scene.spec.ts` | `/walk` cold start, Colyseus connection, gesture broadcast |
-| `club-cold-start.spec.ts` | `/club` venue + HDRI load within 180s on a cold cache |
-| `pump-launch.spec.ts` | `/pumpfun` form → prep → quote → sign flow on devnet |
-| `embed-editor.spec.ts` | `/embed-editor` avatar picker → snippet copy |
-| `x402-paid.spec.ts` | Buyer-side 402 challenge → settlement → receipt write |
-| `permit2-sibling.spec.ts` | Permit2 gasless sibling end-to-end on Base sepolia |
+| Smoke | What it exercises |
+| ------------------------------------------------ | ------------------------------------------------------------------------ |
+| [tests/e2e/club.spec.js](tests/e2e/club.spec.js) | `/club` venue + HDRI load and audio session within the cold-start budget |
-Run with `npx playwright test`. Configuration in `playwright.config.js`; results in `test-results/` (gitignored).
+Run with `npx playwright test` (or `npm run test:e2e`). Configuration in [playwright.config.js](playwright.config.js); results in `test-results/` (gitignored).
### Smart contracts
Smart contract tests are in `contracts/test/` and run via Foundry:
+
```bash
cd contracts && forge test
```
@@ -2096,6 +2233,7 @@ CREATE2 vanity grinds for the multichain factory and payment contracts are recor
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor guide.
**Quick rules:**
+
- Match existing style — no reformatting adjacent code
- Every changed line should trace to the task
- Add tests for new API endpoints
@@ -2103,12 +2241,14 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor guide.
- Keep PRs focused — one concern per PR
**Branch conventions:**
+
- `feat/...` — new features
- `fix/...` — bug fixes
- `refactor/...` — structural changes without behavior changes
- `docs/...` — documentation only
**Development tips:**
+
- The viewer runs standalone at `/app` — no auth, no backend required
- Use `mode=view` in the `<agent-3d>` element to test rendering without a brain
- Set `CHAT_MODEL=claude-haiku-4-5-20251001` locally to keep API costs low during development
@@ -2132,4 +2272,4 @@ The three.js library (`node_modules/three`) is MIT licensed. The gltf-validator
---
-*Built with [three.js](https://threejs.org), [Claude](https://claude.ai), and a belief that AI deserves a body.*
+_Built with [three.js](https://threejs.org), [Claude](https://claude.ai), and a belief that AI deserves a body._