Add ElevenLabs integration: voice agent + browser agent#84
Conversation
Adds a standalone Next.js example under examples/integrations/elevenlabs showing ElevenLabs as the voice shell driving a Browserbase-backed browser agent. A single controller owns browser state: ElevenLabs handles voice, the Claude Agent SDK plans steps, and execution runs through the Browserbase browse CLI against a shared persistent session rendered in a live iframe. Includes the Browserbase-branded UI, API routes, controller logic, .env.example, and local setup docs. Also lists the integration in the monorepo README. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e2c3d89. Configure here.
| pushEvent(session, "system", "Browserbase live view is ready."); | ||
| pushEvent(session, "system", `Browse CLI is attached to Browserbase session ${browserSession.id}.`); | ||
| publishSession(session); | ||
| } |
There was a problem hiding this comment.
Browse setup skipped after failure
High Severity
If ensureBrowseRemoteMode fails after a Browserbase session is created, browserbaseSessionId is already set. Later calls to ensureBrowserRuntime return immediately and never retry Browse CLI remote setup, so that demo can stay unable to run browser commands until the process is restarted.
Reviewed by Cursor Bugbot for commit e2c3d89. Configure here.
| setControlOutcome(session, "error", message); | ||
| pushEvent(session, "error", message); | ||
| publishSession(session); | ||
| }); |
There was a problem hiding this comment.
Queued runs stall on error
Medium Severity
When a run finishes, the next queued instruction is started via executeInstruction in a fire-and-forget promise. If that call rejects, the handler sets error state but does not start further queue items, so remaining queued instructions never run while the snapshot still shows a non-zero queue.
Reviewed by Cursor Bugbot for commit e2c3d89. Configure here.


What
Adds a standalone Next.js example under
examples/integrations/elevenlabs/that integrates an ElevenLabs voice agent with a Browserbase-backed browser agent.The two agents share a single run state:
control_demo) for issuing high-level browser instructions.browseCLI against a shared persistent Browserbase session.This lets you say things out loud ("open Browserbase, find the docs, read me the first heading") and have a real cloud browser carry it out, narrated back by voice.
Contents
app/— Next.js UI (Browserbase-branded) + API routes (session,control,stream)lib/demo-controller.ts— controller: Claude Agent SDK planner +browseCLI executor over a shared Browserbase sessionlib/demo-types.ts— shared typesREADME.md— local setup, required env vars, and ElevenLabs agent configuration.env.example—ANTHROPIC_API_KEY,BROWSERBASE_API_KEY,BROWSERBASE_PROJECT_ID,NEXT_PUBLIC_ELEVENLABS_AGENT_IDAlso adds an
elevenlabs/entry to the monorepo README integration list.Run locally
Requires the Browserbase
browseCLI on yourPATH.🤖 Generated with Claude Code
Note
Low Risk
Isolated example app and documentation only; no changes to published packages or core library behavior.
Overview
Adds a new ElevenLabs + Browserbase example under
examples/integrations/elevenlabs/and lists it in the root README.The demo is a Next.js app where ElevenLabs handles voice and calls a single client tool (
control_demo), while a shared controller owns browser state: it spins up a persistent Browserbase session (live iframe), plans steps with the Claude Agent SDK, and runs actions via thebrowseCLI. The UI pollsGET /api/demo/session, streams snapshots over SSE (/api/demo/stream), and posts instructions toPOST /api/demo/control.The controller layer adds queuing, duplicate detection, optional interrupt, direct-navigation shortcuts, snapshot-based planning, and voice-oriented outcomes/guidance returned to the agent. Docs cover env vars (
.env.example), local run on port 3001, and suggested ElevenLabs agent tool/system copy.Reviewed by Cursor Bugbot for commit e2c3d89. Bugbot is set up for automated code reviews on this repo. Configure here.