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.

fix: update Browserbase API key handling and remove project ID requirement

fudjia006c44ba0f47
diff --git a/src/agent-screen-runcmd.js b/src/agent-screen-runcmd.js
index 832d782a5..2307163c6 100644
--- a/src/agent-screen-runcmd.js
+++ b/src/agent-screen-runcmd.js
@@ -27,12 +27,14 @@ export const RUNTIME_LABELS = {
bb: 'Browserbase',
};
-// Browserbase keys are the only values the user supplies themselves — they come
-// from the user's Browserbase account, not from three.ws. Marked as explicit
-// angle-bracket placeholders so it's obvious they must be filled in.
+// The Browserbase API key is the only value the user supplies themselves — it
+// comes from the user's Browserbase account, not from three.ws. Marked as an
+// explicit angle-bracket placeholder so it's obvious it must be filled in.
+// NOTE: no BROWSERBASE_PROJECT_ID — Browserbase resolves the project from the API
+// key alone. Never emit a project-id placeholder; it would only be a value the
+// user has to hunt down for nothing.
const BB_PLACEHOLDERS = [
['BROWSERBASE_API_KEY', '<your-bb-key>'],
- ['BROWSERBASE_PROJECT_ID', '<your-bb-project>'],
];
// Anthropic key drives Stagehand's page.act()/page.extract() — the difference
diff --git a/src/agent-wallet-hub/tabs/portfolio.js b/src/agent-wallet-hub/tabs/portfolio.js
index d9497fd7a..3a7e2fadd 100644
--- a/src/agent-wallet-hub/tabs/portfolio.js
+++ b/src/agent-wallet-hub/tabs/portfolio.js
@@ -58,9 +58,14 @@ const PORT_STYLE = `
.awh-port-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm,.764rem); }
.awh-port-table th { text-align: right; font-weight: 500; color: var(--ink-dim,#888); font-size: var(--text-2xs,.6875rem); text-transform: uppercase; letter-spacing: .04em; padding: 0 0 8px; border-bottom: 1px solid var(--stroke, rgba(255,255,255,.08)); }
.awh-port-table th:first-child { text-align: left; }
-.awh-port-table td { text-align: right; padding: 9px 0; border-bottom: 1px solid var(--stroke, rgba(255,255,255,.06)); font-family: var(--font-mono, ui-monospace, monospace); }
-.awh-port-table td:first-child { text-align: left; font-family: inherit; }
+.awh-port-table td { text-align: right; padding: 9px 0; border-bottom: 1px solid var(--stroke, rgba(255,255,255,.06)); font-family: var(--font-mono, ui-monospace, monospace); white-space: nowrap; }
+.awh-port-table td:first-child { text-align: left; font-family: inherit; white-space: normal; }
+.awh-port-table td + td, .awh-port-table th + th { padding-left: 16px; }
+.awh-port-table td:last-child, .awh-port-table th:last-child { width: 1%; }
.awh-port-table tr:last-child td { border-bottom: none; }
+.awh-port-table tbody tr { transition: background var(--duration-fast,140ms); }
+.awh-port-table tbody tr:hover td { background: var(--surface-1, rgba(255,255,255,.035)); }
+.awh-port-table td.col-val { color: var(--ink-bright,#fff); font-weight: 600; }
.awh-port-asset { display: flex; align-items: center; gap: 9px; min-width: 0; }
.awh-port-asset img { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--surface-2, rgba(255,255,255,.05)); object-fit: cover; }
.awh-port-asset .ph { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--surface-3, rgba(255,255,255,.08)); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; color: var(--ink-dim,#888); font-family: var(--font-mono, ui-monospace, monospace); }
@@ -366,7 +371,7 @@ registerWalletTab({
</div>
</td>
<td class="col-amt">${escapeHtml(amt)}</td>
- <td>${value}</td>
+ <td class="col-val">${value}</td>
<td class="col-basis">${basis}</td>
<td>${upnl}</td>
<td>${tradeBtn}</td>
diff --git a/tests/agent-screen-runcmd.test.js b/tests/agent-screen-runcmd.test.js
index a60d5b431..326b061b9 100644
--- a/tests/agent-screen-runcmd.test.js
+++ b/tests/agent-screen-runcmd.test.js
@@ -36,11 +36,12 @@ describe('runtimeEnv', () => {
expect(env.ANTHROPIC_API_KEY).toBe('<your-anthropic-key>');
});
- it('adds Browserbase creds only for the bb runtime', () => {
+ it('adds the Browserbase key only for the bb runtime — and never a project id', () => {
expect(runtimeEnv({ runtime: 'local', ...REAL }).map((e) => e[0])).not.toContain('BROWSERBASE_API_KEY');
const bb = runtimeEnv({ runtime: 'bb', ...REAL }).map((e) => e[0]);
expect(bb).toContain('BROWSERBASE_API_KEY');
- expect(bb).toContain('BROWSERBASE_PROJECT_ID');
+ // Browserbase resolves the project from the key — a project id is never emitted
+ expect(bb).not.toContain('BROWSERBASE_PROJECT_ID');
});
it('joins PUSH_URL onto a non-prod origin (preview/staging hosts)', () => {
@@ -66,10 +67,10 @@ describe('buildRunCommand', () => {
expect(cmd.trim().endsWith(IMAGE_TAG)).toBe(true);
});
- it('bb runtime carries the Browserbase creds and runs npm start', () => {
+ it('bb runtime carries the Browserbase key (no project id) and runs npm start', () => {
const cmd = buildRunCommand({ runtime: 'bb', ...REAL });
expect(cmd).toContain('BROWSERBASE_API_KEY=');
- expect(cmd).toContain('BROWSERBASE_PROJECT_ID=');
+ expect(cmd).not.toContain('BROWSERBASE_PROJECT_ID');
expect(cmd.endsWith('npm start')).toBe(true);
});
diff --git a/workers/agent-screen-worker/README.md b/workers/agent-screen-worker/README.md
index 6db42181f..6289510d6 100644
--- a/workers/agent-screen-worker/README.md
+++ b/workers/agent-screen-worker/README.md
@@ -39,9 +39,8 @@ docker run --env-file .env agent-screen-worker
No Docker needed. Run as a plain Node process or in any VM:
```bash
-export BROWSERBASE_API_KEY=...
-export BROWSERBASE_PROJECT_ID=...
-export ANTHROPIC_API_KEY=... # drives page.act()/page.extract() — see below
+export BROWSERBASE_API_KEY=... # the only Browserbase value — no project id needed
+export ANTHROPIC_API_KEY=... # drives page.act()/page.extract() — see below
export AGENT_ID=...
export AGENT_JWT=...
npm start
@@ -61,7 +60,7 @@ npm start
| `AGENT_JWT` | yes | — | Bearer token for that agent |
| `PUSH_URL` | no | `https://three.ws/api/agent-screen-push` | Push endpoint override |
| `BROWSERBASE_API_KEY` | no | — | Browserbase API key (cloud mode) |
-| `BROWSERBASE_PROJECT_ID` | no | — | Required when `BROWSERBASE_API_KEY` is set |
+| `BROWSERBASE_PROJECT_ID` | no | — | Not required — Browserbase resolves the project from the API key. Leave unset. |
| `ANTHROPIC_API_KEY` | recommended | — | Drives `page.act()`/`page.extract()`. Without it the agent navigates + screenshots but can't type, click, or read pages. |
| `STAGEHAND_MODEL` | no | `anthropic/claude-opus-4-8` | Model for act/extract. Keep the `anthropic/` prefix (routes to Stagehand's Anthropic client). Use `anthropic/claude-haiku-4-5` for cheaper, faster casting at high volume. |
| `CYCLE_MS` | no | `30000` | Task loop cycle time in ms |
diff --git a/workers/agent-screen-worker/config.js b/workers/agent-screen-worker/config.js
index 2435f9405..b539e0f6e 100644
--- a/workers/agent-screen-worker/config.js
+++ b/workers/agent-screen-worker/config.js
@@ -5,12 +5,11 @@ export function loadConfig() {
}
const BROWSERBASE_API_KEY = process.env.BROWSERBASE_API_KEY || '';
+ // Browserbase resolves the project from the API key alone — BROWSERBASE_PROJECT_ID
+ // is NOT required and the caster never asks for one. It's still read (optional) so
+ // an environment that happens to set it keeps working, but its absence is normal.
const BROWSERBASE_PROJECT_ID = process.env.BROWSERBASE_PROJECT_ID || '';
- if (BROWSERBASE_API_KEY && !BROWSERBASE_PROJECT_ID) {
- throw new Error('BROWSERBASE_PROJECT_ID is required when BROWSERBASE_API_KEY is set');
- }
-
// Stagehand's page.act()/page.extract() are LLM-driven — without a model + key
// they throw on the first real interaction. The provider-prefixed form
// ("anthropic/<model>") passes the model string straight to Stagehand's