Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(x-content): queue the embed-in-30-seconds post with a branded card renderer
nirholas787a7033bc1f
diff --git a/data/x-content/cards/embed-30-seconds.json b/data/x-content/cards/embed-30-seconds.jsonnew file mode 100644index 000000000..229162cdf--- /dev/null+++ b/data/x-content/cards/embed-30-seconds.json@@ -0,0 +1,14 @@+{+ "out": "public/x-media/embed-30-seconds/card.png",+ "headline": "A 3D agent on\nyour website.\nTwo lines.",+ "headlineSize": 66,+ "code": [+ "<script type=\"module\"",+ " src=\"https://three.ws/agent-3d/latest/agent-3d.js\"></script>",+ "<agent-3d agent-id=\"YOUR_AGENT_ID\" mode=\"floating\"></agent-3d>"+ ],+ "foot": "No build step \u00b7 no npm install \u00b7 free and open source",+ "frame": "browser",+ "shot": "public/x-media/embed-30-seconds/demo-page.png",+ "label": "yoursite.com"+}diff --git a/data/x-content/queue.json b/data/x-content/queue.jsonindex 733bf95d4..0900ea4cc 100644--- a/data/x-content/queue.json+++ b/data/x-content/queue.json@@ -500,6 +500,118 @@],"mentions": {},"tier": 2+ },+ {+ "id": "embed-30-seconds",+ "status": "review",+ "kind": "post",+ "tier": 2,+ "lane": "tutorial",+ "pattern": "how-to",+ "notBefore": "2026-09-18T08:00:00Z",+ "source": {+ "path": "docs/tutorials/embed-in-30-seconds.md"+ },+ "posts": [+ {+ "text": "Put a living 3D agent on your website in 30 seconds.\n\nTwo lines of HTML. No build step, no npm install.\n\nPaste, refresh, and a 3D character is standing in the corner of your page, greeting visitors and answering questions.\n\nAs easy as embedding a video.\n\nthree.ws/tutorials/embed-in-30-seconds",+ "textFrom": "docs/announcements/embed-30-seconds.post.txt",+ "media": [+ {+ "path": "public/x-media/embed-30-seconds/card.png",+ "alt": "A three.ws card reading 'A 3D agent on your website. Two lines.' above the two HTML tags that do it, beside a browser window showing a bookshop's site with a 3D character standing in the bottom corner offering to say hi"+ }+ ]+ },+ {+ "text": "How it works:\n\nBuild your agent at three.ws/create. Pick a character, give it a name and a personality.\n\nCopy its ID into the two lines, and refresh your page.\n\nIt animates, greets and chats out of the box. Works in plain HTML, React and Next.js."+ }+ ],+ "claims": [+ {+ "says": "in 30 seconds",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/tutorials/embed-in-30-seconds",+ "contains": "Embed in 30 seconds"+ }+ ]+ },+ {+ "says": "Two lines of HTML",+ "evidence": [+ {+ "type": "file",+ "path": "docs/tutorials/embed-in-30-seconds.md",+ "contains": "<agent-3d agent-id=\"YOUR_AGENT_ID\" mode=\"floating\"></agent-3d>"+ },+ {+ "type": "file",+ "path": "docs/tutorials/embed-in-30-seconds.md",+ "contains": "One script tag, one `<agent-3d>` tag, one working 3D agent."+ }+ ]+ },+ {+ "says": "No build step, no npm install",+ "evidence": [+ {+ "type": "file",+ "path": "docs/tutorials/embed-in-30-seconds.md",+ "contains": "No build step, no npm install, no framework adapter"+ }+ ]+ },+ {+ "says": "Works in plain HTML, React and Next.js",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/tutorials/embed-on-website",+ "contains": "Next.js"+ },+ {+ "type": "page",+ "url": "https://three.ws/tutorials/embed-on-website",+ "contains": "React"+ },+ {+ "type": "file",+ "path": "docs/tutorials/embed-on-website.md",+ "contains": "React"+ }+ ]+ },+ {+ "says": "It animates, greets and chats out of the box",+ "evidence": [+ {+ "type": "file",+ "path": "docs/tutorials/embed-in-30-seconds.md",+ "contains": "A floating widget that animates, greets, and chats out of the box"+ }+ ]+ }+ ],+ "probes": [+ {+ "type": "api",+ "name": "the embed runtime is served",+ "url": "https://three.ws/agent-3d/latest/agent-3d.js",+ "expect": {+ "status": 200+ }+ },+ {+ "type": "api",+ "name": "the tutorial page is live",+ "url": "https://three.ws/tutorials/embed-in-30-seconds",+ "expect": {+ "contains": "Embed in 30 seconds"+ }+ }+ ]}]}diff --git a/data/x-content/reviews/embed-30-seconds.json b/data/x-content/reviews/embed-30-seconds.jsonnew file mode 100644index 000000000..df615bc1b--- /dev/null+++ b/data/x-content/reviews/embed-30-seconds.json@@ -0,0 +1,151 @@+{+ "id": "embed-30-seconds",+ "contentHash": "be90c1dfc0897669bbe988d32d5920da1cf5b78427ffe49f4acd45a41f850d19",+ "reviewedAt": "2026-09-18T08:48:05.659Z",+ "passed": false,+ "blockers": [+ "editor verdict is revise"+ ],+ "texts": [+ "Put a living 3D agent on your website in 30 seconds.\n\nTwo lines of HTML. No build step, no npm install.\n\nPaste, refresh, and a 3D character is standing in the corner of your page, greeting visitors and answering questions.\n\nAs easy as embedding a video.\n\nthree.ws/tutorials/embed-in-30-seconds",+ "How it works:\n\nBuild your agent at three.ws/create. Pick a character, give it a name and a personality.\n\nCopy its ID into the two lines, and refresh your page.\n\nIt animates, greets and chats out of the box. Works in plain HTML, React and Next.js."+ ],+ "lint": [],+ "verification": {+ "ok": true,+ "checks": [+ {+ "claim": "in 30 seconds",+ "kind": "evidence:page",+ "target": "https://three.ws/tutorials/embed-in-30-seconds",+ "ok": true,+ "detail": "live page shows \"Embed in 30 seconds\""+ },+ {+ "claim": "Two lines of HTML",+ "kind": "evidence:file",+ "target": "docs/tutorials/embed-in-30-seconds.md",+ "ok": true,+ "detail": "file supports the claim"+ },+ {+ "claim": "Two lines of HTML",+ "kind": "evidence:file",+ "target": "docs/tutorials/embed-in-30-seconds.md",+ "ok": true,+ "detail": "file supports the claim"+ },+ {+ "claim": "No build step, no npm install",+ "kind": "evidence:file",+ "target": "docs/tutorials/embed-in-30-seconds.md",+ "ok": true,+ "detail": "file supports the claim"+ },+ {+ "claim": "Works in plain HTML, React and Next.js",+ "kind": "evidence:page",+ "target": "https://three.ws/tutorials/embed-on-website",+ "ok": true,+ "detail": "live page shows \"Next.js\""+ },+ {+ "claim": "Works in plain HTML, React and Next.js",+ "kind": "evidence:page",+ "target": "https://three.ws/tutorials/embed-on-website",+ "ok": true,+ "detail": "live page shows \"React\""+ },+ {+ "claim": "Works in plain HTML, React and Next.js",+ "kind": "evidence:file",+ "target": "docs/tutorials/embed-on-website.md",+ "ok": true,+ "detail": "file supports the claim"+ },+ {+ "claim": "It animates, greets and chats out of the box",+ "kind": "evidence:file",+ "target": "docs/tutorials/embed-in-30-seconds.md",+ "ok": true,+ "detail": "file supports the claim"+ },+ {+ "kind": "probe:api",+ "target": "the embed runtime is served",+ "ok": true,+ "detail": "HTTP 200, expectations met"+ },+ {+ "kind": "probe:api",+ "target": "the tutorial page is live",+ "ok": true,+ "detail": "HTTP 200, expectations met"+ },+ {+ "kind": "link",+ "target": "https://three.ws/tutorials/embed-in-30-seconds",+ "ok": true,+ "detail": "HTTP 200"+ },+ {+ "kind": "link",+ "target": "https://three.ws/create",+ "ok": true,+ "detail": "HTTP 200"+ }+ ]+ },+ "editor": {+ "verdict": "revise",+ "scores": {+ "accuracy": 4,+ "clarity": 5,+ "specificity": 4,+ "voice": 4,+ "professionalism": 5,+ "visual": 3+ },+ "issues": [+ {+ "severity": "major",+ "area": "visual",+ "quote": "free and open source",+ "problem": "The image footer states 'No build step · no npm install · free and open source'. Nothing in the verification results or the live page text quoted by a passing check supports 'free and open source'. A claim that appears only inside the image is still a claim, and it is unverified.",+ "fix": "Recapture the card with the footer reading 'No build step · no npm install' only, or keep 'free and open source' only if a passing check verifies it (e.g. a probes/docs page stating the embed runtime is open source)."+ },+ {+ "severity": "minor",+ "area": "specificity",+ "quote": "living 3D agent",+ "problem": "'Living' is an adjective, not a mechanism; the same post already proves the claim with 'Two lines of HTML', which is stronger.",+ "fix": "Replace with 'Put a 3D agent on your website in 30 seconds.' The mechanism carries the line on its own."+ },+ {+ "severity": "minor",+ "area": "voice",+ "quote": "As easy as embedding a video.",+ "problem": "A standalone simile line drifts toward copywriting; the measurable fact (two lines, no build step) is already stated.",+ "fix": "Drop the line or fold it into the prior sentence as 'Paste, refresh, and a 3D character is standing in the corner of your page, greeting visitors and answering questions.' The post survives without it."+ }+ ],+ "rewrite": {+ "posts": [+ "Put a 3D agent on your website in 30 seconds.\n\nTwo lines of HTML. No build step, no npm install.\n\nPaste, refresh, and a 3D character is standing in the corner of your page, greeting visitors and answering questions.\n\nthree.ws/tutorials/embed-in-30-seconds",+ "How it works:\n\nBuild your agent at three.ws/create. Pick a character, give it a name and a personality.\n\nCopy its ID into the two lines, and refresh your page.\n\nIt animates, greets and chats out of the box. Works in plain HTML, React and Next.js."+ ],+ "altText": [+ "A three.ws card reading 'A 3D agent on your website. Two lines.' above the two HTML tags that do it, beside a browser window showing a bookshop's site with a 3D character standing in the bottom corner offering to say hi"+ ]+ },+ "summary": "The copy is accurate, verified, in voice, and within length; every factual line traces to a passing check. The one real problem is the image footer claiming 'free and open source' with no verification behind it: recapture the card with that footer trimmed (or verify the claim) before shipping.",+ "model": "nvidia:moonshotai/kimi-k3",+ "fallbacks": [+ "No GCP credentials found. Set GCP_SERVICE_ACCOUNT_JSON, run `gcloud auth application-default login`, or run on GCE/Cloud Run.",+ "openrouter 402: {\"error\":{\"message\":\"Insufficient credits. Add more using https://openrouter.ai/settings/credits\",\"code\":402,\"metadata\":{\"limit_source\":\"openrouter_credits\",\"remedy_hint\":\"Add credits at https://openr",+ "openai 429: {\n \"error\": {\n \"message\": \"Your account is not active, please check your billing details on our website.\",\n \"type\": \"billing_not_active\",\n \"param\": null,\n \"code\": \"billi"+ ],+ "rewriteFindings": []+ },+ "editorError": null+}diff --git a/docs/announcements/embed-30-seconds.post.txt b/docs/announcements/embed-30-seconds.post.txtnew file mode 100644index 000000000..69268c45f--- /dev/null+++ b/docs/announcements/embed-30-seconds.post.txt@@ -0,0 +1,9 @@+Put a living 3D agent on your website in 30 seconds.++Two lines of HTML. No build step, no npm install.++Paste, refresh, and a 3D character is standing in the corner of your page, greeting visitors and answering questions.++As easy as embedding a video.++three.ws/tutorials/embed-in-30-seconds\ No newline at end of filediff --git a/public/x-media/embed-30-seconds/card.png b/public/x-media/embed-30-seconds/card.pngnew file mode 100644index 000000000..be9fcdbb5Binary files /dev/null and b/public/x-media/embed-30-seconds/card.png differdiff --git a/public/x-media/embed-30-seconds/demo-page.png b/public/x-media/embed-30-seconds/demo-page.pngnew file mode 100644index 000000000..144169052Binary files /dev/null and b/public/x-media/embed-30-seconds/demo-page.png differdiff --git a/scripts/make-x-post-card.mjs b/scripts/make-x-post-card.mjsnew file mode 100644index 000000000..5e57e5448--- /dev/null+++ b/scripts/make-x-post-card.mjs@@ -0,0 +1,114 @@+#!/usr/bin/env node+// Render one branded 1600x900 card for an X post, in the same visual system as the+// Android launch cards (scripts/make-x-thread-cards.mjs): black ground, soft blue and+// violet glow, the three.ws lockup, a Space Grotesk headline, and the product shown+// inside a device frame instead of as a raw screenshot.+//+// Raw screenshots read as noise in a timeline. The posts that moved the most $THREE+// volume all carried either a video or a clean card that says one thing in large type,+// so every queued post gets one of these.+//+// node scripts/make-x-post-card.mjs --spec data/x-content/cards/<id>.json+//+// Spec: { "out": "public/x-media/<id>/card.png", "headline": "Line one\nLine two",+// "body": "One or two plain sentences.", "code": ["<line>", "<line>"],+// "frame": "browser" | "phone", "shot": "path/to.png" | "https://three.ws/page",+// "label": "yoursite.com" }+// `shot` is a local PNG (a capture of the feature really running) or a live URL that is+// captured on the spot. A capture that comes back blank fails the run, so a card can+// never ship showing nothing.++import sharp from 'sharp';+import { chromium } from 'playwright';+import { mkdirSync, readFileSync, writeFileSync, existsSync } from 'node:fs';+import { fileURLToPath } from 'node:url';+import path from 'node:path';++const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const args = process.argv.slice(2);+const specPath = args[args.indexOf('--spec') + 1];+if (!specPath || !existsSync(specPath)) throw new Error('pass --spec <file.json>');+const spec = JSON.parse(readFileSync(specPath, 'utf8'));+const W = 1600;+const H = 900;++const FONT_FACES = [+ ['Space Grotesk', '300 700', 'space-grotesk-latin.woff2'],+ ['Inter', '300 800', 'inter-latin.woff2'],+].map(([family, weight, file]) => `@font-face{font-family:'${family}';font-style:normal;font-weight:${weight};src:url(data:font/woff2;base64,${readFileSync(path.join(ROOT, 'public/fonts', file)).toString('base64')}) format('woff2');}`).join('\n');+const MARK_URI = `data:image/png;base64,${readFileSync(path.join(ROOT, 'public/pwa-512x512.png')).toString('base64')}`;+const OVERLAYS = ['#tws-corner-stack', '.twx-i18n-fab', '.walk-companion', '.walk-c2w-fx', '.walk-trail-layer', '#market-sidebar-toggle'];+const esc = (s) => String(s).replace(/[&<>]/g, (c) => ({ '&': '&', '<': '<', '>': '>' }[c]));++const browser = await chromium.launch({ args: ['--use-gl=swiftshader', '--enable-unsafe-swiftshader', '--ignore-gpu-blocklist'] });++async function shotUri() {+ let buf;+ if (/^https?:/.test(spec.shot)) {+ const page = await browser.newPage({ viewport: spec.frame === 'phone' ? { width: 412, height: 892 } : { width: 1280, height: 800 }, deviceScaleFactor: 2, colorScheme: 'dark' });+ try { await page.goto(spec.shot, { waitUntil: 'networkidle', timeout: 90000 }); } catch { /* an open socket never idles; the settle below covers it */ }+ await page.addStyleTag({ content: `${OVERLAYS.join(',')}{display:none!important}` });+ await page.waitForTimeout(spec.settleMs ?? 9000);+ buf = await page.screenshot({ type: 'png' });+ await page.close();+ } else {+ buf = readFileSync(path.resolve(ROOT, spec.shot));+ }+ const means = (await sharp(buf).stats()).channels.slice(0, 3).map((c) => c.mean);+ if (means.every((m) => m < 6)) throw new Error(`[x-card] the capture for ${spec.out} is effectively blank`);+ return `data:image/png;base64,${buf.toString('base64')}`;+}++const shot = await shotUri();+const headline = esc(spec.headline).replace(/\n/g, '<br>');+const code = (spec.code || []).map((line) => `<div>${esc(line).replace(/(<\/?)([a-z0-9-]+)/gi, '$1<b>$2</b>').replace(/([a-z-]+)=("|")/gi, '<i>$1</i>=$2')}</div>`).join('');+const phoneFrame = spec.frame === 'phone';++const html = `<!doctype html><meta charset="utf-8"><style>+${FONT_FACES}+*{margin:0;padding:0;box-sizing:border-box}+body{width:${W}px;height:${H}px;background:#000;color:#fff;overflow:hidden;position:relative;font-family:'Inter',sans-serif;-webkit-font-smoothing:antialiased}+.glow{position:absolute;inset:0;background:+ radial-gradient(34% 40% at 22% 28%, rgba(78,120,255,.22), transparent 70%),+ radial-gradient(30% 36% at 80% 24%, rgba(56,180,255,.14), transparent 72%),+ radial-gradient(34% 40% at 30% 84%, rgba(140,84,255,.16), transparent 70%),+ radial-gradient(30% 36% at 84% 80%, rgba(104,96,255,.14), transparent 72%)}+.beam{position:absolute;left:4%;right:4%;top:40%;height:220px;transform:rotate(-5deg);filter:blur(60px);+ background:linear-gradient(90deg, transparent, rgba(150,200,255,.09) 22%, rgba(190,220,255,.14) 50%, rgba(150,200,255,.09) 78%, transparent)}+.lockup{position:absolute;left:72px;top:60px;display:flex;align-items:center;gap:16px}+.lockup img{width:64px;height:64px;border-radius:17px}+.lockup span{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:42px;letter-spacing:-.045em}+.copy{position:absolute;left:72px;top:${spec.code ? 196 : 232}px;width:${phoneFrame ? 760 : 650}px}+h1{font-family:'Space Grotesk',sans-serif;font-weight:600;letter-spacing:-.04em;line-height:1.02;font-size:${spec.headlineSize || 74}px}+.copy p{margin-top:26px;font-size:27px;line-height:1.45;color:#a7b6d3}+.code{margin-top:34px;padding:22px 24px;border-radius:16px;background:rgba(12,16,32,.78);box-shadow:0 0 0 1px rgba(255,255,255,.10) inset;+ font:500 16px/1.75 ui-monospace,'SF Mono',Menlo,Consolas,monospace;color:#c9d6f2;white-space:nowrap;overflow:hidden}+.code b{color:#7fb2ff;font-weight:600}.code i{color:#b79bff;font-style:normal}+.foot{position:absolute;left:72px;bottom:58px;font-size:21px;color:#8fa3c6;letter-spacing:.01em}+.browser{position:absolute;left:760px;top:150px;width:780px;border-radius:18px;overflow:hidden;+ background:#12131f;box-shadow:0 50px 100px rgba(0,0,0,.9), 0 12px 30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.12) inset;+ transform:perspective(2200px) rotateY(-7deg) rotateX(2deg)}+.bar{height:44px;display:flex;align-items:center;gap:8px;padding:0 16px;background:linear-gradient(#262a40,#1a1d2e)}+.bar u{width:11px;height:11px;border-radius:50%;background:#4a5070;display:block}+.bar span{margin-left:14px;flex:1;height:24px;border-radius:12px;background:rgba(255,255,255,.07);font-size:13px;line-height:24px;padding:0 12px;color:#93a2c4}+.browser img{display:block;width:100%}+.phone{position:absolute;left:1180px;top:470px;width:360px;transform:translate(-50%,-50%) perspective(1800px) rotateY(-8deg) rotateX(3deg);+ border-radius:34px;padding:8px;background:linear-gradient(135deg,#4a5070 0%,#2a2e44 26%,#12131f 62%,#31364f 100%);+ box-shadow:0 50px 100px rgba(0,0,0,.92), 0 12px 30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.10) inset}+.phone img{display:block;width:100%;border-radius:27px;background:#000}+</style>+<div class="glow"></div><div class="beam"></div>+<div class="lockup"><img src="${MARK_URI}" alt=""><span>three.ws</span></div>+<div class="copy"><h1>${headline}</h1>${spec.body ? `<p>${esc(spec.body)}</p>` : ''}${code ? `<div class="code">${code}</div>` : ''}</div>+${spec.foot ? `<div class="foot">${esc(spec.foot)}</div>` : ''}+${phoneFrame ? `<div class="phone"><img src="${shot}" alt=""></div>` : `<div class="browser"><div class="bar"><u></u><u></u><u></u><span>${esc(spec.label || 'yoursite.com')}</span></div><img src="${shot}" alt=""></div>`}`;++const page = await browser.newPage({ viewport: { width: W, height: H }, deviceScaleFactor: 1 });+await page.setContent(html, { waitUntil: 'load' });+await page.waitForTimeout(400);+const out = path.resolve(ROOT, spec.out);+mkdirSync(path.dirname(out), { recursive: true });+const png = await page.screenshot({ type: 'png' });+await browser.close();+writeFileSync(out, await sharp(png).png({ compressionLevel: 9 }).toBuffer());+console.log(`[x-card] wrote ${spec.out} (${W}x${H})`);