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.

docs: correct the examples and counts that no longer match what the code returns

nirholas2c1e9877cc66
diff --git a/api/_lib/service-catalog/services/embody.js b/api/_lib/service-catalog/services/embody.js
index abf2cc482..0963585a9 100644
--- a/api/_lib/service-catalog/services/embody.js
+++ b/api/_lib/service-catalog/services/embody.js
@@ -46,12 +46,12 @@ export default {
// Mirrors buildBundle()'s settled 200 in api/x402/embody.js — the durable
// persona id, its GLB + viewer/profile URLs, and the paste-anywhere embed tag.
outputExample: {
- agent_id: 'aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee',
+ agent_id: 'persona_8f2a1c9d4be6f70a1b2c',
glb_url: 'https://three.ws/cdn/personas/nova-scout/rigged.glb',
viewer_url: 'https://three.ws/viewer?src=https%3A%2F%2Fthree.ws%2Fcdn%2Fpersonas%2Fnova-scout%2Frigged.glb',
- profile_url: 'https://three.ws/embed/persona?persona=aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee&state=idle',
- embed_html: '<iframe src="https://three.ws/embed/persona?persona=aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee&state=idle" width="360" height="480" loading="lazy" style="border:0;border-radius:12px;max-width:100%" allow="autoplay; fullscreen; xr-spatial-tracking" allowfullscreen sandbox="allow-scripts allow-same-origin allow-popups"></iframe>',
- reload_url: 'https://three.ws/api/mcp3d/persona?id=aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee',
+ profile_url: 'https://three.ws/embodiment/embed?persona=persona_8f2a1c9d4be6f70a1b2c&state=idle',
+ embed_html: '<iframe src="https://three.ws/embodiment/embed?persona=persona_8f2a1c9d4be6f70a1b2c&state=idle" width="360" height="480" loading="lazy" style="border:0;border-radius:12px;max-width:100%" allow="autoplay; fullscreen; xr-spatial-tracking" allowfullscreen sandbox="allow-scripts allow-same-origin allow-popups"></iframe>',
+ reload_url: 'https://three.ws/api/mcp3d/persona?id=persona_8f2a1c9d4be6f70a1b2c',
voice: 'nova',
rigged: true,
name: 'Nova Scout',
diff --git a/data/pages.json b/data/pages.json
index 3e1e79b1b..150334a0d 100644
--- a/data/pages.json
+++ b/data/pages.json
@@ -4202,7 +4202,7 @@
{
"path": "/docs/onboarding-tier",
"title": "Docs · The onboarding tier",
- "description": "Why a first-time visitor sees around 20 navigation destinations instead of around 100, how the Simple and Everything switch works, and which tier a newly built page belongs in.",
+ "description": "Why a first-time visitor sees around 30 navigation destinations instead of around 120, how the Simple and Everything switch works, and which tier a newly built page belongs in.",
"priority": 0.6,
"changefreq": "monthly"
},
diff --git a/docs/irl.md b/docs/irl.md
index 2caa77cc2..3dac3221a 100644
--- a/docs/irl.md
+++ b/docs/irl.md
@@ -101,7 +101,7 @@ The user-facing summary lives at [/irl-privacy](/irl-privacy); the engineering a
## Analytics
-/irl now has a real usage baseline. `api/_lib/irl-analytics.js` logs four events into `irl_events`: `pin_created` (tagged with the placement method: `webxr`, `quicklook`, camera `pin`, or `map`), `nearby_fetch`, `share_created`, and `share_viewed`. It is an append-only table that never stores a raw coordinate or device token (only a ~150m geocell and a 16-char hashed device prefix, matching the same coarsening the rest of IRL already uses). Events age out after 90 days via the existing hourly reaper ([api/cron/irl-reap.js](/api/cron/irl-reap.js)), the same bounded-retention discipline as the interaction trail.
+/irl now has a real usage baseline. `api/_lib/irl-analytics.js` logs four events into `irl_events`: `pin_created` (tagged with the placement method: `webxr`, `quicklook`, camera `pin`, or `map`), `nearby_fetch`, `share_created`, and `share_viewed`. It is an append-only table that never stores a raw coordinate or device token (only a ~150m geocell and a 16-char hashed device prefix, matching the same coarsening the rest of IRL already uses). Events age out after 90 days via the existing hourly reaper ([`api/cron/irl-reap.js`](../api/cron/irl-reap.js)), the same bounded-retention discipline as the interaction trail.
The rollup is served at `GET /api/irl/analytics` (admin-gated via `x-ops-secret` or an admin session): pins placed and unique placers/browsers over 24h/7d/30d, a placement-method breakdown, the existing interaction (view/tap/message/pay) and confirmed Money Drop counts, share creation/view volume, and a 30-day daily series. Every number is a live query: nothing cached, sampled, or estimated.
diff --git a/docs/onboarding-tier.md b/docs/onboarding-tier.md
index 461026a11..03a0225c3 100644
--- a/docs/onboarding-tier.md
+++ b/docs/onboarding-tier.md
@@ -8,7 +8,7 @@ promise (make a 3D avatar, give it a brain, put it on your site) was competing f
attention with a trading terminal.
The onboarding tier fixes that without deleting anything. A first-time visitor gets
-the **lite** tier: the ~27 destinations and the handful of homepage sections that
+the **lite** tier: the ~28 destinations and the handful of homepage sections that
carry the core journey. Everything else is one click away behind a labelled control,
and once a visitor asks for it, it stays open on every page and every visit.
@@ -20,9 +20,9 @@ and once a visitor asks for it, it stays open on every page and every visit.
| Surface | Lite tier | Full tier |
| --- | --- | --- |
-| Nav menus | Build, Discover, Learn (~27 links) | + Launch (~115 links in all) |
+| Nav menus | Build, Discover, Learn (~28 links) | + Launch (~119 links in all) |
| Homepage | Hero, start path, Forge, embed demo, the three doors, community, pose, AR, showcase | + trading, capabilities grid, token economy, live economy, Oracle, pay-per-call, developer platform, the stack |
-| Mobile drawer | the same ~27 destinations in one flat list | all ~115 |
+| Mobile drawer | the same ~28 destinations in one flat list | all ~119 |
Directly under the homepage hero sits the **start path**: three steps, each with an
honest time estimate, in the order the product actually works.
diff --git a/docs/onchain-agents.md b/docs/onchain-agents.md
index 91833468a..d982f541e 100644
--- a/docs/onchain-agents.md
+++ b/docs/onchain-agents.md
@@ -1,6 +1,6 @@
# Deploying Agents On-Chain (Bulk)
-Give every three.ws agent a real on-chain identity: a **Metaplex Core NFT** minted into the **three.ws Agents collection** on Solana. This page is for platform admins and self-hosters; regular users register a single agent through the wallet-signed flow instead. It is the bulk/admin counterpart to the single-agent, user-signed flow in [Solana agents](solana.md): it deploys many agents server-side, with a live recording dashboard at `/admin/bulk-launch` and a CLI runner.
+Give every three.ws agent a real on-chain identity: a **Metaplex Core NFT** minted into the **three.ws Agents collection** on Solana. This page is for platform admins and self-hosters; regular users register a single agent through the wallet-signed flow instead. It is the bulk/admin counterpart to the single-agent, user-signed flow in [Solana agents](solana.md): it deploys many agents server-side through a CLI runner that reports every mint as it lands.
> Not pump.fun. These are NFTs (on-chain identity), not tokens. The only coin three.ws ever references is `$THREE`; it appears in each asset's metadata as a link, nothing more.
@@ -216,7 +216,7 @@ registration runs through the CLI runner only
`api/_lib/onchain-deploy.js` functions the dashboard did, so assets minted
before and after the removal are identical.
-## Tutorial 4 — The full fleet
+## Tutorial 3 — The full fleet
Once the canary checks out and the funder holds enough SOL (~0.004 × N):
@@ -226,7 +226,10 @@ node --env-file=.env scripts/deploy-agents-onchain.mjs --limit 500 --confirm
# …re-run until "Found 0 agent(s)". Re-runs are safe.
```
-…or set **Agents per run = 500** on the dashboard and click Deploy, repeating until none remain. Run on **production** if you want per-agent ownership for wallet-less agents (see [Custody model](#custody-model)).
+`--limit` is clamped to 500 per run, so a larger fleet is several runs of the
+same command; already-deployed agents are skipped, so re-running is safe and
+costs nothing extra. Run on **production** if you want per-agent ownership for
+wallet-less agents (see [Custody model](#custody-model)).
---
diff --git a/docs/permissions.md b/docs/permissions.md
index 22c81988d..0bdf084fb 100644
--- a/docs/permissions.md
+++ b/docs/permissions.md
@@ -222,7 +222,12 @@ await fetch('/api/permissions/revoke', {
## The permissions API
-All routes are under `/api/permissions/`. Responses use `{ ok: true, ... }` on success and `{ ok: false, error: '<code>', message: '...' }` on failure.
+All routes are under `/api/permissions/`. Responses use `{ ok: true, ... }` on success. Failures use the platform's standard error envelope, `{ error: '<code>', error_description: '...' }`:
+
+```sh
+curl -s 'https://three.ws/api/permissions/verify?hash=0x00&chainId=84532'
+# → {"error":"validation_error","error_description":"hash must be 0x + 64 hex chars"}
+```
| Method | Path | Auth | Description |
|--------|------|------|-------------|
@@ -307,7 +312,7 @@ The skill registry uses this declaration to show users what a skill needs before
## Error codes
-All error codes are OAuth-style strings returned as `error` in the `{ ok: false, error, message }` response shape:
+All error codes are OAuth-style strings. Over HTTP they arrive as `error` in the `{ error, error_description }` envelope above; from the browser helper `redeemFromSkill` they arrive as `code` in `{ ok: false, code, message }`:
| Code | When | Recovery |
|------|------|----------|
diff --git a/docs/provenance.md b/docs/provenance.md
index 60f91f75f..0adc79250 100644
--- a/docs/provenance.md
+++ b/docs/provenance.md
@@ -13,6 +13,22 @@ Every model three.ws generates can carry a **signed content credential** — cre
curl "https://three.ws/api/provenance?src=https://three.ws/avatars/default.glb"
```
+The endpoint always hashes the bytes it fetched, so it answers for any model, anchored or not. The stock avatar has never been anchored, so it comes back `unknown` with a real hash:
+
+```jsonc
+{
+ "status": "unknown",
+ "reason": "no provenance credential is on record for this asset",
+ "badge": "Unverified",
+ "glbSha256": "1ec0913a5093301a69a6c1f29e8ff9bed10d9e39708126e2ca2c9a4d3d7df35c",
+ "credential": null,
+ "issuer": null,
+ "anchor": null
+}
+```
+
+Point it at a model that *has* been anchored and the credential and its on-chain anchor come back with it:
+
```jsonc
{
"status": "verified", // verified | tampered | unknown
diff --git a/docs/x402-dev-tools.md b/docs/x402-dev-tools.md
index 6b4bab8ee..935615252 100644
--- a/docs/x402-dev-tools.md
+++ b/docs/x402-dev-tools.md
@@ -82,10 +82,11 @@ Response:
```json
{
"ok": false,
- "count": 4,
+ "count": 5,
"findings": [
{ "severity": "error", "field": "payment.x402Version", "problem": "payment declares x402Version 1; server requires 2", "fix": "Set x402Version: 2." },
{ "severity": "error", "field": "payment.network", "problem": "network \"base\" is a shorthand, not the CAIP-2 id the rail matches on", "fix": "Use \"eip155:8453\"." },
+ { "severity": "error", "field": "payment.network", "problem": "you signed for \"base\" but the challenge only offers [eip155:8453]", "fix": "Pick one of the offered networks and re-sign against that accepts[] entry." },
{ "severity": "error", "field": "payment.authorization.value", "problem": "value \"0.01\" contains a decimal point", "fix": "Authorization value is atomic units as an integer string (\"10000\"), not a decimal token amount." },
{ "severity": "info", "field": "response.error", "problem": "server returned \"invalid_payment\"", "fix": "The payload was structurally valid but failed a check — usually underpayment, wrong payTo, or a malformed authorization. Run /api/x402/echo on your header to see the decoded amount/recipient." }
]
diff --git a/tests/api/persona-identity-route.test.js b/tests/api/persona-identity-route.test.js
index b5009b4a4..dc394261f 100644
--- a/tests/api/persona-identity-route.test.js
+++ b/tests/api/persona-identity-route.test.js
@@ -164,6 +164,12 @@ describe('GET /api/mcp3d/persona-identity', () => {
expect(res.headers.allow).toBe('GET, HEAD, OPTIONS');
});
+ it('rejects an id shaped like a UUID, which is what the published examples used to show', async () => {
+ const { status, body } = await invoke('/api/mcp3d/persona-identity?id=aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee');
+ expect(status).toBe(400);
+ expect(body.error).toBe('invalid_id');
+ });
+
it('503 wallet_unavailable when no persona wallet secret is configured', async () => {
const keys = ['PERSONA_WALLET_SECRET', 'WALLET_ENCRYPTION_KEY', 'JWT_SECRET'];
const kept = Object.fromEntries(keys.map((k) => [k, process.env[k]]));
diff --git a/tests/api/persona-reload-examples.test.js b/tests/api/persona-reload-examples.test.js
new file mode 100644
index 000000000..fcf881bf6
--- /dev/null
+++ b/tests/api/persona-reload-examples.test.js
@@ -0,0 +1,56 @@
+// The published `reload_url` examples must actually resolve.
+//
+// Three surfaces advertise "reload the same body with GET /api/mcp3d/persona":
+// the x402 embody endpoint's OUTPUT_EXAMPLE, the service-catalog entry x402scan
+// renders, and docs/embody.md. All three used to print a persona id the route
+// rejects with 400 (a bare UUID, or a `persona_` id too short for the id
+// format), so anyone copying the example got an error instead of a body. These
+// tests pin every published example to the same validator the route uses, so
+// the next edit cannot silently reintroduce an id that will not resolve.
+
+import { describe, it, expect } from 'vitest';
+import { promises as fs } from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
+
+const { isPersonaId } = await import('../../api/_lib/persona-store.js');
+const { default: embodyService } = await import('../../api/_lib/service-catalog/services/embody.js');
+
+// Every `?id=` a doc or example hands to the reload route, wherever it appears.
+const RELOAD_ID_RE = /\/api\/mcp3d\/persona(?:-identity)?\?id=([^"'\s&)\\]+)/g;
+
+// Placeholders (`<agent_id>`, a `${...}` template hole) are prose, not examples.
+const isPlaceholder = (id) => id.startsWith('<') || id.startsWith('$') || id.includes('{');
+
+function reloadIdsIn(text) {
+ return [...text.matchAll(RELOAD_ID_RE)]
+ .map((m) => decodeURIComponent(m[1]))
+ .filter((id) => !isPlaceholder(id));
+}
+
+describe('published reload_url examples resolve against GET /api/mcp3d/persona', () => {
+ it('the service-catalog entry advertises an id the route accepts', () => {
+ const ex = embodyService.outputExample;
+ expect(isPersonaId(ex.agent_id)).toBe(true);
+ expect(reloadIdsIn(ex.reload_url)).toEqual([ex.agent_id]);
+ // The embed URLs point at the real embed route, not a path that 404s.
+ expect(ex.profile_url).toContain('/embodiment/embed?persona=');
+ expect(ex.embed_html).toContain('/embodiment/embed?persona=');
+ });
+
+ it('every reload id printed in api/x402/embody.js is a valid persona id', async () => {
+ const src = await fs.readFile(path.join(ROOT, 'api', 'x402', 'embody.js'), 'utf8');
+ const ids = reloadIdsIn(src);
+ expect(ids.length).toBeGreaterThan(0);
+ for (const id of ids) expect(isPersonaId(id)).toBe(true);
+ });
+
+ it('every reload id printed in docs/embody.md is a valid persona id', async () => {
+ const doc = await fs.readFile(path.join(ROOT, 'docs', 'embody.md'), 'utf8');
+ const ids = reloadIdsIn(doc);
+ expect(ids.length).toBeGreaterThan(0);
+ for (const id of ids) expect(isPersonaId(id)).toBe(true);
+ });
+});