mirror of
https://github.com/vercel-labs/agent-browser.git
synced 2026-12-04 02:26:21 +08:00
* docs: add Browser and Desktop homepage
* chore: normalize merged workspace lockfile
* chore: hold demo deployments for homepage review branch
* chore: enable PR preview deployments
* docs: polish homepage use-case illustrations
- Fan the screenshot card's two captures like a deck of cards, and drift the cursor across the page after the second capture.
- Anchor the selection marquee's dashes at the drag's starting corner, so they no longer stutter as the box grows.
- Clip the terminal's scrolling lines at its top edge instead of fading them under a scrim.
- Show the sign-in check as a black tick on a white disc.
- Give the use-case cards a 2px corner radius.
* docs: rebuild the homepage hero story
Replace the hero wallpapers with CSS gradients that follow the theme, add Chrome, Maps, Photos, and Trash dock icons, and tune the browser and desktop timelines for light and dark mode.
* docs: show homepage use cases as tabs
Replace the four-card grid with six tabbed use cases, each with its own scene. Tabs advance while the section is visible and pause off screen. The hero now shares one description across products.
* docs: polish homepage headings and drop parity tests
Fit the closing heading on one line per phrase at 390px, keep the tweet heading from splitting into narrow lines on phones, and refine the tweet rail rules. Remove the homepage parity tests and the CI step that installed Chrome for them.
* docs: give the hero mock site two typos
The production headline now reads "Build bdtter prpducts, faster", and the PR fixes both words. The mock headline matches the homepage H1 weight and tracking, and its buttons use a gray fill and an outline so they stay quieter than the real actions.
* docs: use the Vercel brand in the navbar
Switch the Geistdocs navbar brand from Labs to Vercel, and remove the CSS that hid the Labs wordmark behind a triangle.
* docs: show only the Vercel logo in the nav
Use the standard Geistdocs navbar and hide the divider and site logo after the Vercel triangle on both the marketing and documentation layouts.
* docs: hide the Labs wordmark in the nav
Restore the Vercel Labs navbar brand so the divider and product switcher return, and hide only the Labs wordmark in its logo on the marketing and documentation layouts. This replaces the Vercel-only navbar from the previous two commits.
* docs: use the same product wordmark in both navs
* docs: trim unused stageshow parts and tidy shared landing files
Drop the unused Check part from the stageshow kit (no imports), and its
upstream.json entries and NOTICE mention.
Replace the local bezier and travel curves in the hero scene with the
kit's bezier (same curves, max difference under 1e-13 over 101 samples),
and import smooth from hero-timeline instead of keeping two copies.
Move vercel.css and vercel-cursor.{tsx,css} to landing/shared, since the
hero and use-case scenes both use them, and drop a stale tokens.ts
reference from vercel.css.
* docs: align lucide-react with the workspace
The docs pinned lucide-react to 0.468.0, which downgraded the version
fumadocs resolved in pnpm-lock.yaml. Use ^1.7.0, the range the dashboard
uses, so the lockfile resolves a single lucide-react (1.7.0).
* docs: serve homepage Markdown and a dedicated OG image
The homepage now has its own Markdown built from the landing copy, and the docs introduction moves to /docs.md with a /docs canonical URL. llms.txt and the docs chat prompt point at /docs. The homepage uses a 2400x1256 Open Graph image from docs/public/landing/home-og.png, and the route tests cover both changes.
* docs: steady the homepage hero and copy button
Reserve stable slots for the nav wordmark, product switcher, and hero title so switching products does not shift layout. The copy button reserves the width of every label it can show and uses a lighter copy icon, and the docs link reads "Read the docs and get set up". The hero wallpaper waits until it is needed and uses a lighter gray, the mock site's typos are refined, and the sessions scene uses avatars only.
* docs: keep the inactive hero word out of the heading text
The hero title reserves the width of both product words. Draw the inactive word with a CSS pseudo-element so the server-rendered H1 reads only the selected headline, which fixes the route test that saw "BrowserDesktop automation built for any agent".
* docs: let reduced motion pick the hero's browser tabs
Under reduced motion, the hero still gets real buttons over its mock browser tabs, so readers can switch between production, the preview, and the pull request without any animation. Turning reduced motion off resumes playback from the still, and each change of the preference resets the chosen tab.
* docs: show each use case's payoff under reduced motion
Reduced motion now shows the frame each tab hands off on: the saved form, both screenshot copies, the finished performance report, and the agents contesting a window. The tabs also reset their handoff and reading time when a scene replays after the motion preference changes, so a replayed scene still advances.
* docs: move the docs introduction to /introduction
The introduction now lives at /introduction and /introduction.md, and /docs and /docs.md return 404 with no redirect, since /docs was never public. Navigation, search, docs chat, llms.txt, the sitemap, homepage Markdown, and content links point at /introduction. The sitemap lists the homepage once, and the frozen route fixture records the introduction's new URL.
* docs: point intro navigation and Markdown links at /introduction
Remap the introduction in the shared page tree so the sidebar, breadcrumbs, and Previous and Next links use /introduction, and drop the duplicate remap in the docs layout. Resolve page Markdown links with resolvePageMarkdownUrl so the introduction links to /introduction.md instead of /introduction/index.md.
* docs: reword the homepage agent prompts and docs link
The copied prompts now ask the agent to set itself up from the docs at /introduction or /desktop, and the secondary link reads "Read the docs" again.
* docs: drop the unsupported basePath from the intro Markdown link
The site config has no basePath, so passing config.basePath failed type checking. resolvePageMarkdownUrl treats it as optional, and the resolved URL is unchanged.
* docs: check full intro Markdown and restart copy reset on repeat copies (#2593)
- The intro Markdown route test checked one sentence, so the body could lose most of its content and still pass. Compare it against the frozen fixture with assertContainsLines.
- A second copy while the button showed copied did not change status, so the reset fired 2s after the first click. Key the reset effect on each settled copy.
Tested: route suite against a build with the intro Markdown truncated now fails; clean build passes it. Copy button checked in jsdom with clicks at 0ms and 1500ms.
Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
* docs: label the homepage prompt CTA Add to your agent
* docs: show the full Vercel Labs logo in the footer
Patch @vercel/geistdocs 2.7.5 so the footer uses its Vercel Labs logo, linked to vercel.com/labs, sized so the triangle stays 14px. The logo gains an optional height that defaults to 18, so the navbar is unchanged.
* docs: expect the Add to your agent label in the homepage route test
The homepage CTA was relabeled from Teach your agent to Add to your agent, and the route test still looked for the old text.
* docs: drop static focus stops and fix the tweet focus ring
The hero panel and the use-case description no longer take a tab stop, since they hold static text and the hero's copy button is already reachable. Tweet cards use the Geist --ds-focus-ring shadow instead of the undefined --ds-focus-color, so keyboard focus shows a visible ring.
* docs: show white Claude and Gemini marks in the sessions scene
Match the hero: the agents' marks are white on their brand discs in both themes.
---------
Co-authored-by: Lahfir <70215676+lahfir@users.noreply.github.com>
Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
7753 lines
1.4 MiB
Plaintext
7753 lines
1.4 MiB
Plaintext
{
|
||
"commit": "efee3893d9080fcacb1aa6c9a21d13fbc6021f20",
|
||
"policy": "Only git objects at the pinned commit are inputs. Modern Markdown removes AST-level MDX imports, DiffDemo and presentation className attributes; fenced code is preserved. Legacy Markdown executes the original converter verbatim, including its removal of export/import lines inside fences. Heading IDs execute the original slugify/extractText without deduplication. Root metadata comes from the root layout; child metadata comes from each original layout and pageMetadata/PAGE_TITLES.",
|
||
"sources": {
|
||
"docs/mdx-components.tsx": {
|
||
"sha256": "3faa623b397c3ffd156d843cee30986e77730015ae120bf3b3bd3cabb1ff0983",
|
||
"raw": "import type { MDXComponents } from \"mdx/types\";\nimport Link from \"next/link\";\nimport { CodeBlock } from \"@/components/code-block\";\n\nfunction slugify(text: string): string {\n return text\n .toLowerCase()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/\\s+/g, \"-\")\n .trim();\n}\n\nfunction extractText(children: React.ReactNode): string {\n if (typeof children === \"string\") return children;\n if (typeof children === \"number\") return String(children);\n if (Array.isArray(children)) return children.map(extractText).join(\"\");\n if (children && typeof children === \"object\") {\n const obj = children as unknown as Record<string, unknown>;\n if (\"props\" in obj) {\n const props = obj.props as { children?: React.ReactNode } | undefined;\n return extractText(props?.children);\n }\n }\n return \"\";\n}\n\nexport function useMDXComponents(components: MDXComponents): MDXComponents {\n return {\n ...components,\n h1: ({ children }: { children?: React.ReactNode }) => {\n const id = slugify(extractText(children));\n return (\n <h1 id={id} className=\"heading-anchor\">\n {children}\n <a href={`#${id}`} aria-label=\"Link to this section\">#</a>\n </h1>\n );\n },\n h2: ({ children }: { children?: React.ReactNode }) => {\n const id = slugify(extractText(children));\n return (\n <h2 id={id} className=\"heading-anchor\">\n {children}\n <a href={`#${id}`} aria-label=\"Link to this section\">#</a>\n </h2>\n );\n },\n h3: ({ children }: { children?: React.ReactNode }) => {\n const id = slugify(extractText(children));\n return (\n <h3 id={id} className=\"heading-anchor\">\n {children}\n <a href={`#${id}`} aria-label=\"Link to this section\">#</a>\n </h3>\n );\n },\n a: ({\n href,\n children,\n }: {\n href?: string;\n children?: React.ReactNode;\n }) => {\n if (href?.startsWith(\"/\")) {\n return <Link href={href}>{children}</Link>;\n }\n return (\n <a href={href} target=\"_blank\" rel=\"noopener noreferrer\">\n {children}\n </a>\n );\n },\n code: ({\n children,\n className,\n }: {\n children?: React.ReactNode;\n className?: string;\n }) => {\n if (className) {\n return <code className={className}>{children}</code>;\n }\n return <code>{children}</code>;\n },\n pre: async ({ children }: { children?: React.ReactNode }) => {\n const codeElement = children as React.ReactElement<{\n className?: string;\n children?: string;\n }>;\n const className = codeElement?.props?.className || \"\";\n const lang = className.replace(\"language-\", \"\") || \"bash\";\n const code = codeElement?.props?.children || \"\";\n\n return (\n <CodeBlock\n code={typeof code === \"string\" ? code : String(code)}\n lang={lang}\n />\n );\n },\n };\n}\n"
|
||
},
|
||
"docs/src/lib/mdx-to-markdown.ts": {
|
||
"sha256": "f21a9e329ce86079655a4c10483bba1efbae052aba16c42060401c442f81324d",
|
||
"raw": "/**\n * Converts raw MDX content to clean Markdown suitable for AI agents.\n *\n * Strips export/import statements and standalone JSX divs with className\n * attributes, passing everything else through as valid Markdown.\n */\nexport function mdxToCleanMarkdown(raw: string): string {\n const lines = raw.split(\"\\n\");\n const out: string[] = [];\n let inJsxBlock = false;\n let jsxDepth = 0;\n\n for (const line of lines) {\n const trimmed = line.trim();\n\n if (trimmed.startsWith(\"export \") || trimmed.startsWith(\"import \")) {\n continue;\n }\n\n if (\n !inJsxBlock &&\n trimmed.startsWith(\"<div \") &&\n trimmed.includes(\"className=\")\n ) {\n inJsxBlock = true;\n jsxDepth = 1;\n continue;\n }\n\n if (inJsxBlock) {\n const opens = (line.match(/<div[\\s>]/g) || []).length;\n const closes = (line.match(/<\\/div>/g) || []).length;\n jsxDepth += opens - closes;\n if (jsxDepth <= 0) {\n inJsxBlock = false;\n jsxDepth = 0;\n }\n continue;\n }\n\n out.push(line);\n }\n\n let result = out.join(\"\\n\");\n result = result.replace(/^\\n+/, \"\\n\").trim();\n return result;\n}\n"
|
||
},
|
||
"docs/src/lib/page-titles.ts": {
|
||
"sha256": "36afdeab53f2a30aa4eba8ff3aa6d3ae2ca4c2803324502250c2f8d646fafa2a",
|
||
"raw": "export const PAGE_TITLES: Record<string, string> = {\n \"\": \"Browser\\nAutomation for AI\",\n installation: \"Installation\",\n \"quick-start\": \"Quick Start\",\n skills: \"Skills\",\n commands: \"Commands\",\n webmcp: \"WebMCP\",\n configuration: \"Configuration\",\n plugins: \"Plugins\",\n selectors: \"Selectors\",\n snapshots: \"Snapshots\",\n sessions: \"Sessions\",\n diffing: \"Diffing\",\n network: \"Network\",\n \"cdp-mode\": \"CDP Mode\",\n dashboard: \"Dashboard\",\n streaming: \"Streaming\",\n recording: \"Video Recording\",\n webgpu: \"WebGPU\",\n debugging: \"Debugging\",\n profiler: \"Profiler\",\n react: \"React & Web Vitals\",\n files: \"Files & Clipboard\",\n \"init-scripts\": \"Init Scripts\",\n proxy: \"Proxy\",\n ios: \"iOS Simulator\",\n security: \"Security\",\n \"engines/chrome\": \"Chrome\",\n \"engines/lightpanda\": \"Lightpanda\",\n \"engines/obscura\": \"Obscura\",\n next: \"Next.js + Vercel\",\n eve: \"eve Extension\",\n \"native-mode\": \"Native Mode\",\n \"providers/agentcore\": \"AgentCore\",\n \"providers/browser-use\": \"Browser Use\",\n \"providers/browserbase\": \"Browserbase\",\n \"providers/browserless\": \"Browserless\",\n \"providers/kernel\": \"Kernel\",\n \"providers/remote-agent-browser\": \"Remote Agent Browser\",\n changelog: \"Changelog\",\n};\n\nexport function getPageTitle(slug: string): string | null {\n return slug in PAGE_TITLES ? PAGE_TITLES[slug]! : null;\n}\n"
|
||
},
|
||
"docs/src/lib/page-metadata.ts": {
|
||
"sha256": "3b368bbbb23d86c19f71b1125c5aff6cd848bc6cde625a535bb5b3d255be9968",
|
||
"raw": "import type { Metadata } from \"next\";\nimport { PAGE_TITLES } from \"./page-titles\";\n\nconst DESCRIPTION =\n \"Browser automation CLI for AI agents\";\n\nexport function pageMetadata(slug: string): Metadata {\n const title = PAGE_TITLES[slug];\n if (!title) return {};\n\n const displayTitle = title.replace(/\\n/g, \" \");\n const fullTitle = `${displayTitle} | agent-browser`;\n const ogImageUrl = slug ? `/og/${slug}` : \"/og\";\n\n return {\n title: displayTitle,\n openGraph: {\n type: \"website\",\n locale: \"en_US\",\n siteName: \"agent-browser\",\n title: fullTitle,\n description: DESCRIPTION,\n images: [\n {\n url: ogImageUrl,\n width: 1200,\n height: 630,\n alt: `${displayTitle} - agent-browser`,\n },\n ],\n },\n twitter: {\n card: \"summary_large_image\",\n title: fullTitle,\n description: DESCRIPTION,\n images: [ogImageUrl],\n },\n };\n}\n"
|
||
},
|
||
"docs/src/lib/docs-navigation.ts": {
|
||
"sha256": "9b962fd84544b22088c67ee015e262c7b0033f771158a392d12f337b0b2f7adf",
|
||
"raw": "export type NavItem = {\n name: string;\n href: string;\n};\n\nexport type NavSection = {\n title: string | null;\n items: NavItem[];\n};\n\nexport const navigation: NavSection[] = [\n {\n title: null,\n items: [\n { name: \"Introduction\", href: \"/\" },\n { name: \"Installation\", href: \"/installation\" },\n { name: \"Quick Start\", href: \"/quick-start\" },\n { name: \"Skills\", href: \"/skills\" },\n ],\n },\n {\n title: \"Reference\",\n items: [\n { name: \"Commands\", href: \"/commands\" },\n { name: \"WebMCP\", href: \"/webmcp\" },\n { name: \"Configuration\", href: \"/configuration\" },\n { name: \"Plugins\", href: \"/plugins\" },\n { name: \"Selectors\", href: \"/selectors\" },\n { name: \"Snapshots\", href: \"/snapshots\" },\n ],\n },\n {\n title: \"Features\",\n items: [\n { name: \"Sessions\", href: \"/sessions\" },\n { name: \"Dashboard\", href: \"/dashboard\" },\n { name: \"Diffing\", href: \"/diffing\" },\n { name: \"Network\", href: \"/network\" },\n { name: \"CDP Mode\", href: \"/cdp-mode\" },\n { name: \"Streaming\", href: \"/streaming\" },\n { name: \"Video Recording\", href: \"/recording\" },\n { name: \"WebGPU\", href: \"/webgpu\" },\n { name: \"Debugging\", href: \"/debugging\" },\n { name: \"Profiler\", href: \"/profiler\" },\n { name: \"React & Web Vitals\", href: \"/react\" },\n { name: \"Files & Clipboard\", href: \"/files\" },\n { name: \"Init Scripts\", href: \"/init-scripts\" },\n { name: \"Proxy\", href: \"/proxy\" },\n { name: \"iOS Simulator\", href: \"/ios\" },\n { name: \"Security\", href: \"/security\" },\n { name: \"Next.js + Vercel\", href: \"/next\" },\n { name: \"eve Extension\", href: \"/eve\" },\n { name: \"Native Mode\", href: \"/native-mode\" },\n ],\n },\n {\n title: \"Providers\",\n items: [\n { name: \"AgentCore\", href: \"/providers/agentcore\" },\n { name: \"Browser Use\", href: \"/providers/browser-use\" },\n { name: \"Browserbase\", href: \"/providers/browserbase\" },\n { name: \"Browserless\", href: \"/providers/browserless\" },\n { name: \"Kernel\", href: \"/providers/kernel\" },\n {\n name: \"Remote Agent Browser\",\n href: \"/providers/remote-agent-browser\",\n },\n ],\n },\n {\n title: \"Engines\",\n items: [\n { name: \"Chrome\", href: \"/engines/chrome\" },\n { name: \"Lightpanda\", href: \"/engines/lightpanda\" },\n { name: \"Obscura\", href: \"/engines/obscura\" },\n ],\n },\n {\n title: null,\n items: [{ name: \"Changelog\", href: \"/changelog\" }],\n },\n];\n\nexport const allDocsPages: NavItem[] = navigation.flatMap(\n (section) => section.items\n);\n"
|
||
},
|
||
"docs/src/app/layout.tsx": {
|
||
"sha256": "e175fe1ac877272d78d5f5d6031db931ac124c1f4ce10d4dc6ea233b387ef595",
|
||
"raw": "import type { Metadata } from \"next\";\nimport { Inter, Geist_Mono } from \"next/font/google\";\nimport { GeistPixelSquare } from \"geist/font/pixel\";\nimport \"./globals.css\";\nimport { ThemeProvider } from \"@/components/theme-provider\";\nimport { Header } from \"@/components/header\";\nimport { DocsSidebar } from \"@/components/docs-sidebar\";\nimport { DocsMobileNav } from \"@/components/docs-mobile-nav\";\nimport { CopyPageButton } from \"@/components/copy-page-button\";\nimport { DocsChat } from \"@/components/docs-chat\";\nimport { cookies } from \"next/headers\";\nimport { SpeedInsights } from \"@vercel/speed-insights/next\";\nimport { Analytics } from \"@vercel/analytics/next\";\n\nconst inter = Inter({\n variable: \"--font-inter\",\n subsets: [\"latin\"],\n});\n\nconst geistMono = Geist_Mono({\n variable: \"--font-geist-mono\",\n subsets: [\"latin\"],\n});\n\nexport const metadata: Metadata = {\n metadataBase: new URL(\"https://agent-browser.dev\"),\n title: {\n default: \"agent-browser | Browser Automation for AI\",\n template: \"%s | agent-browser\",\n },\n description: \"Browser automation CLI for AI agents\",\n openGraph: {\n type: \"website\",\n locale: \"en_US\",\n url: \"https://agent-browser.dev\",\n siteName: \"agent-browser\",\n title: \"agent-browser | Browser Automation for AI\",\n description: \"Browser automation CLI for AI agents\",\n images: [{ url: \"/og\", width: 1200, height: 630, alt: \"agent-browser\" }],\n },\n twitter: {\n card: \"summary_large_image\",\n title: \"agent-browser | Browser Automation for AI\",\n description: \"Browser automation CLI for AI agents\",\n images: [\"/og\"],\n },\n};\n\nexport default async function RootLayout({\n children,\n}: Readonly<{\n children: React.ReactNode;\n}>) {\n const cookieStore = await cookies();\n const chatOpen = cookieStore.get(\"docs-chat-open\")?.value === \"true\";\n const chatWidth = Number(cookieStore.get(\"docs-chat-width\")?.value) || 400;\n\n return (\n <html lang=\"en\" suppressHydrationWarning>\n <head>\n {chatOpen && (\n <style\n dangerouslySetInnerHTML={{\n __html: `@media(min-width:640px){body{padding-right:${chatWidth}px}}`,\n }}\n />\n )}\n </head>\n <body\n className={`${inter.variable} ${geistMono.variable} ${GeistPixelSquare.variable} bg-white text-neutral-900 antialiased dark:bg-neutral-950 dark:text-neutral-100`}\n >\n <ThemeProvider>\n <Header />\n <DocsMobileNav />\n <div className=\"max-w-5xl mx-auto px-6 py-8 lg:py-12 flex gap-16\">\n <aside className=\"w-48 shrink-0 hidden lg:block sticky top-28 h-[calc(100vh-7rem)] overflow-y-auto\">\n <DocsSidebar />\n </aside>\n <div className=\"flex-1 min-w-0 max-w-2xl pb-20\">\n <div className=\"flex justify-end mb-4\">\n <CopyPageButton />\n </div>\n <article className=\"prose\">{children}</article>\n </div>\n </div>\n <DocsChat defaultOpen={chatOpen} defaultWidth={chatWidth} />\n </ThemeProvider>\n <SpeedInsights />\n <Analytics />\n </body>\n </html>\n );\n}\n"
|
||
},
|
||
"docs/src/app/cdp-mode/page.mdx": {
|
||
"sha256": "a5e4190a8520dddd7807bcb485ee65b9c1f9b338b9157e65d95e8d97c58d1bf0",
|
||
"raw": "# CDP Mode\n\nConnect to an existing browser via Chrome DevTools Protocol:\n\n```bash\n# Start Chrome with: google-chrome --remote-debugging-port=9222\n\n# Connect once, then run commands without --cdp\nagent-browser connect 9222\nagent-browser snapshot\nagent-browser tab\nagent-browser close\n\n# Or pass --cdp on each command\nagent-browser --cdp 9222 snapshot\n```\n\n## Remote WebSocket URLs\n\nConnect to remote browser services via WebSocket URL:\n\n```bash\n# Connect to remote browser service\nagent-browser --cdp \"wss://browser-service.com/cdp?token=...\" snapshot\n\n# Works with any CDP-compatible service\nagent-browser --cdp \"ws://localhost:9222/devtools/browser/abc123\" open example.com\n```\n\nThe `--cdp` flag accepts either:\n\n- A port number (e.g., `9222`) for local connections via `http://localhost:{port}`\n- A full WebSocket URL (e.g., `wss://...` or `ws://...`) for remote browser services\n\nRoot WebSocket endpoints accept query strings with or without an explicit slash, so both `wss://browser-service.com?token=...` and `wss://browser-service.com/?token=...` work.\n\n## Auto-Connect\n\nUse `--auto-connect` to automatically discover and connect to a running Chrome instance without specifying a port:\n\n```bash\n# Auto-discover running Chrome with remote debugging\nagent-browser --auto-connect open example.com\nagent-browser --auto-connect snapshot\n\n# Or via environment variable\nAGENT_BROWSER_AUTO_CONNECT=1 agent-browser snapshot\n```\n\nAuto-connect discovers Chrome by:\n\n1. Reading Chrome's `DevToolsActivePort` file from the default user data directory and connecting to its WebSocket endpoint, then HTTP discovery (`/json/version`, `/json/list`) for older Chrome versions\n2. Falling back to probing common debugging ports (9222, 9229)\n\nChrome 144+ shows a remote-debugging permission prompt on the first connection. Auto-connect waits up to 20 seconds for approval. If the prompt is still open after that, the command fails with a message asking you to approve it and retry, without opening a second prompt.\n\nThis is useful when:\n\n- Chrome 144+ has remote debugging enabled via `chrome://inspect/#remote-debugging` (which uses a dynamic port)\n- You want a zero-configuration connection to your existing browser\n- You don't want to track which port Chrome is using\n\n## Tab pinning\n\nWhen several sessions share one browser over CDP, each session remembers which tab it is bound to (by CDP target id, persisted across daemon restarts). A restarted daemon reattaches to the session's own tab instead of adopting whatever tab is currently active, which in a shared browser is usually another session's.\n\nPass `--pin-tab` (or set `AGENT_BROWSER_PIN_TAB=1`) to make the binding strict:\n\n```bash\n# Two agents sharing one Chrome, each pinned to its own tab\nagent-browser --session agent1 --cdp 9222 --pin-tab open https://site-a.com\nagent-browser --session agent2 --cdp 9222 --pin-tab open https://site-b.com\n```\n\nWith `--pin-tab`:\n\n- Attaching with no binding opens a fresh tab instead of adopting an existing one\n- If the bound tab is closed, commands fail with a `tab_gone` error instead of silently acting on another tab. JSON responses carry <code>\"code\": \"tab_gone\"</code>, <code>data.targetId</code>, and optional <code>data.lastUrl</code>\n- `tab list`, `tab new`, and `tab <ref>` still work in that state, so an agent can recover by binding a new tab\n- Tabs opened by other sessions or the user never steal the pinned session's active tab\n\nThe flag is sticky per session: pass it once and later commands and daemon restarts keep the strict semantics. Pass `--no-pin-tab` to explicitly turn the pin off again. See [Sessions](/sessions) for the multi-session workflow and [Commands](/commands) for tab refs by CDP target id.\n\nThe structured <code>lastUrl</code> is emitted only for sanitized HTTP(S) URLs and <code>about:blank</code>. Credentials, query strings, and fragments are removed from HTTP(S) URLs, while opaque URLs such as <code>data:</code> are omitted. Batch JSON exposes the recovery object under <code>result</code>.\n\nWhen re-running a shared-tab script such as the repro from #1530, add `--pin-tab` to the first command for every session. Without it, `open` intentionally preserves the legacy behavior and navigates the shared active tab, so the original script still collides. The same rule applies when sessions attach with `--auto-connect` instead of `--cdp`.\n\n## Color scheme\n\nUse `--color-scheme` to set a persistent preference when connecting via CDP:\n\n```bash\nagent-browser --cdp 9222 --color-scheme dark open https://example.com\nagent-browser --cdp 9222 snapshot # stays in dark mode\n```\n\nOr set it globally via config or environment variable:\n\n```bash\nAGENT_BROWSER_COLOR_SCHEME=dark agent-browser --cdp 9222 open https://example.com\n```\n\n## Use cases\n\nThis enables control of:\n\n- Electron apps\n- Chrome/Chromium with remote debugging\n- WebView2 applications\n- Remote browser services (via WebSocket URL)\n- Any browser exposing a CDP endpoint\n\n## Global options\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--session <name></code></td><td>Use isolated session</td></tr>\n <tr><td><code>--profile <path></code></td><td>Persistent browser profile directory</td></tr>\n <tr><td><code>-p <provider></code></td><td>Browser provider (<code>browserbase</code>, <code>browseruse</code>, <code>kernel</code>, <code>browserless</code>, <code>agentcore</code>, or a configured <code>browser.provider</code> plugin)</td></tr>\n <tr><td><code>--headers <json></code></td><td>HTTP headers scoped to origin</td></tr>\n <tr><td><code>--executable-path</code></td><td>Custom browser executable</td></tr>\n <tr><td><code>--args <args></code></td><td>Browser launch args (comma-separated)</td></tr>\n <tr><td><code>--user-agent <ua></code></td><td>Custom User-Agent string</td></tr>\n <tr><td><code>--proxy <url></code></td><td>Proxy server URL</td></tr>\n <tr><td><code>--proxy-bypass <hosts></code></td><td>Hosts to bypass proxy</td></tr>\n <tr><td><code>--json</code></td><td>JSON output for scripts</td></tr>\n <tr><td><code>--name, -n</code></td><td>Locator name filter</td></tr>\n <tr><td><code>--exact</code></td><td>Exact, case-sensitive match (accessible name for role)</td></tr>\n <tr><td><code>--headed</code></td><td>Show browser window</td></tr>\n <tr><td><code>{\"--cdp <port|url>\"}</code></td><td>CDP connection (port or WebSocket URL)</td></tr>\n <tr><td><code>--auto-connect</code></td><td>Auto-discover and connect to running Chrome</td></tr>\n <tr><td><code>--pin-tab</code></td><td>Pin the session to its bound tab (strict tab binding)</td></tr>\n <tr><td><code>--no-pin-tab</code></td><td>Disable a sticky pin previously enabled with <code>--pin-tab</code></td></tr>\n <tr><td><code>--color-scheme <scheme></code></td><td>Persistent color scheme (<code>dark</code>, <code>light</code>, <code>no-preference</code>)</td></tr>\n <tr><td><code>--debug</code></td><td>Debug output</td></tr>\n </tbody>\n</table>\n\n## Cloud providers\n\nUse the `-p` flag to connect to a cloud browser provider or configured `browser.provider` plugin instead of launching a local browser:\n\n```bash\nagent-browser -p browserbase open https://example.com\n```\n\nSee the [Providers](/providers/browser-use) section for setup and configuration of each built-in provider: [Browser Use](/providers/browser-use), [Browserbase](/providers/browserbase), [Browserless](/providers/browserless), [Kernel](/providers/kernel), and [AgentCore](/providers/agentcore).\n"
|
||
},
|
||
"docs/src/app/cdp-mode/layout.tsx": {
|
||
"sha256": "537a6601fff5b7a65537c5c28fb4e5fbbae899608df8f5bf573c057bb55bbb2f",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"cdp-mode\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/changelog/page.mdx": {
|
||
"sha256": "08e1d72305ad419da0c0218f3b9b629e8bf3bbcfb3c4ce45753e12bb1d1f4eb2",
|
||
"raw": "# Changelog\n\n## v0.38.2\n\n<p className=\"text-[#888] text-sm\">October 1, 2026</p>\n\n### Bug Fixes\n\n- Fixed **auth vault login** to pick usable controls when hidden duplicates exist, and to bind credential entry to the selected field so replaced fields or redirected focus are rejected before submitting (#2014)\n- Fixed **chat mode** to allow `webmcp`, `skills`, and other top-level browser commands, so the model uses page WebMCP tools instead of falling back to `eval` (#2015)\n- Fixed **Kernel profiles** so `KERNEL_PROFILE_NAME` sessions send the profile as an object instead of failing with a 400, and added `KERNEL_PROFILE_SAVE_CHANGES` to opt into saving changes back (#2004)\n- Fixed **Chrome freezing after launch** by draining its stderr for the browser's lifetime, so a full log pipe no longer blocks the browser (#2003)\n- Fixed **Browser Use** by switching to Cloud V4, which creates, attaches to, and stops the same browser with bounded timeouts (#1879)\n- Fixed **Vercel Sandbox shared memory detection** by measuring `/dev/shm` capacity and adding `--disable-dev-shm-usage` below 256 MiB, so Chrome no longer terminates renderers on the undersized mount (#1890)\n\n### Improvements\n\n- Upgraded the **eve integration** from eve 0.47.3 to 0.57.0, so apps on eve 0.50 and later build again (#1945)\n\n### Documentation\n\n- Updated the **contact sheet example** with the loading-flash demo output (#1871)\n\n---\n\n## v0.38.1\n\n<p className=\"text-[#888] text-sm\">September 16, 2026</p>\n\n### Bug Fixes\n\n- Fixed **recording cursor and mouse movement timing** so cursor rendering stays synchronized with page content during drags and timed mouse moves (#1869)\n\n### Documentation\n\n- Added Vercel Labs product and project status badges to the README (#1868)\n\n---\n\n## v0.38.0\n\n<p className=\"text-[#888] text-sm\">September 16, 2026</p>\n\n### New Features\n\n- Added **conditional screenshots** with `screenshot --if-changed` to skip unchanged captures and `--threshold <0-1>` to tolerate small pixel differences. Screenshot history is scoped to each tab and capture mode, and unchanged captures omit the image path to save tokens (#1813)\n- Added **automatic snapshot deltas** with `snapshot --delta`, which returns a full baseline followed by an unchanged revision or compact structural changes. Use `--full` to refresh the baseline (#1811)\n- Added **persistent snapshot refs** for surviving DOM elements across same-document changes. Replaced elements and navigated pages or iframes invalidate their refs without recycling identifiers (#1812)\n- Added **human-like pointer movement** with session `--input-mode`, per-action `--human` for clicks and drags, and reproducible curved `mouse move` paths (#1810)\n- Added **recording presentation tools**: `--cursor` renders an animated pointer and click ripple, while `--contact-sheet` saves a timestamped PNG summary of visual changes (#1807, #1808)\n- Added **stateful auth vault login** with `auth login --no-navigate`, which fills an already prepared login page after verifying its origin against the credential URL (#1771)\n- Added **WebMCP catalog updates** to normal browser responses. Concise, content-bounded summaries appear on initial discovery and catalog changes, while full schemas remain opt-in (#1842)\n\n### Improvements\n\n- Improved **recording frame timing** by holding the latest Chrome frame between repaints so the output duration follows the requested frame rate (#1806)\n\n### Bug Fixes\n\n- Fixed **CDP transport recovery and shutdown** so malformed transport messages do not strand unrelated commands and failed initialization disconnects cleanly (#1739)\n- Fixed **dropdown label matching** to normalize whitespace, including non-breaking spaces, when selecting options by visible label (#1736)\n\n### Documentation\n\n- Clarified **reliable browser wait strategies** by recommending page-specific selectors, text, URLs, or JavaScript conditions and reserving `networkidle` for pages known to become quiet (#1834)\n\n---\n\n## v0.37.1\n\n<p className=\"text-[#888] text-sm\">September 8, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows headless Chrome desktop artifacts** by isolating owned headless Chrome on a private desktop and ensuring its process tree is cleaned up when the daemon exits or is forcibly terminated. Headed and externally connected browsers retain their existing desktop behavior (#1498, #1820)\n\n---\n\n## v0.37.0\n\n<p className=\"text-[#888] text-sm\">September 7, 2026</p>\n\n### New Features\n\n- Added **higher-quality video recording**: `record start` and `record restart` now capture the current active page at 30 fps by default, support `--fps 1-60`, use `Page.startScreencast` for smoother motion, and preserve wall-clock timing. WebM and MP4 output are documented, and `doctor` reports the ffmpeg recording dependencies (#1763, #1776, #1778)\n- Added **WebMCP availability output** so navigation responses advertise when a page exposes allowed WebMCP tools, including availability metadata for CLI, JSON, and MCP clients (#1760)\n- Added **session setup inheritance for new tabs**. Tabs opened with `tab new` or through page clicks now inherit the active session's headers, credentials, user agent, locale, timezone, geolocation, offline mode, routes, color scheme, and init scripts before their first navigation (#1777)\n\n### Bug Fixes\n\n- Fixed **recording startup validation** so missing ffmpeg, extensionless output paths, and invalid recording options fail before browser or recording state changes. Failed replacements preserve the active take, and ffmpeg errors now include useful diagnostics (#1778)\n- Fixed **recording navigation state** so URL navigation during recording clears stale element refs, frame scope, and page WebMCP state like normal navigation (#1776)\n\n---\n\n## v0.36.0\n\n<p className=\"text-[#888] text-sm\">September 1, 2026</p>\n\n### New Features\n\n- Added experimental **WebMCP support** for discovering and invoking tools provided by the current page, including frame-aware tool selection, detached results, cancellation, bounded metadata and output handling, and an opt-in MCP tool profile. WebMCP is enabled by default for locally managed Chrome and can be disabled with `--no-webmcp` or `AGENT_BROWSER_NO_WEBMCP`.\n- Added a **WebMCP generation skill** that helps agents expose existing page workflows as validated page tools while recording safety constraints, deterministic checks, and fallback behavior.\n\n### Improvements\n\n- Updated the **eve integration** to 0.47.3 and raised its compatibility floor to 0.39.1.\n- Updated **brace-expansion dependency resolutions** across the project lockfiles.\n\n### Bug Fixes\n\n- Removed the obsolete **Lightpanda session timeout** argument so launches use the current supported server options.\n\n---\n\n## v0.35.2\n\n<p className=\"text-[#888] text-sm\">August 31, 2026</p>\n\n### Security\n\n- Hardened **dashboard origin validation and reverse-proxy access** with same-origin provenance enforcement that defends against DNS rebinding, form/header smuggling, and cross-origin requests. Reverse-proxied origins now require exact HTTPS allowlisting and generated token authentication, while tokenless IPv4 and IPv6 loopback access remains supported. Dashboard options are validated strictly, and CLI and MCP lifecycle behavior is aligned (#1738)\n\n### Bug Fixes\n\n- Fixed **root remote CDP WebSocket URLs with query strings** to insert the required slash before the query while preserving the encoded query (#1735)\n\n---\n\n## v0.35.1\n\n<p className=\"text-[#888] text-sm\">August 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows ARM64 launcher selection** to prefer a native ARM64 executable when present and fall back to the published x64 executable through Windows emulation when it is not (#1725)\n- Fixed **stream URL tracking** to emit active main-frame URL updates for full-document, History API, and fragment navigation, while rebinding correctly after active-tab changes and ignoring child-frame or background-tab navigation (#1682)\n- Fixed **snapshot diff element references** by resetting ref numbering for each diff, invalidating refs across URL navigations, and preserving the previous refs when a diff fails (#1719)\n\n### Improvements\n\n- Updated **Rust dependencies** to `rustls-webpki` 0.103.13 and `quinn-proto` 0.11.17 (#1723, #1720)\n\n---\n\n## v0.35.0\n\n<p className=\"text-[#888] text-sm\">August 24, 2026</p>\n\n### New Features\n\n- Added **private proxy CA trust for locally launched Chromium on Linux**. Use `--ca-cert <path>`, `AGENT_BROWSER_CA_CERT`, or `caCert` in config and MCP to import a PEM bundle or DER certificate into an isolated NSS trust store without disabling hostname, validity, or unrelated-authority verification. The effective CA persists across commands in a running session, equivalent certificate content reuses Chromium, and `--no-ca-cert` explicitly clears retained trust. Unsupported launch modes and conflicting CA options return actionable errors (#1669)\n\n### Improvements\n\n- Added a bundled **protected Vercel deployments skill** that guides agents through short-lived Trusted Sources OIDC authentication, authorized automation bypasses, and explicit human handoffs for dashboard-only configuration (#1705)\n\n---\n\n## v0.34.0\n\n<p className=\"text-[#888] text-sm\">August 10, 2026</p>\n\n### New Features\n\n- Added **persistent session-to-tab binding for shared Chrome sessions**. Named sessions connected through `--cdp` or `--auto-connect` now remember their CDP target across commands and daemon restarts, and CDP target ids can be used directly as tab references. Start each session with `--pin-tab` to make the binding strict, so a tab closed externally returns a stable `tab_gone` error instead of silently adopting a neighboring tab. JSON output includes `data.targetId` and an optional sanitized `data.lastUrl`; batch exposes the same recovery data under `result` (#1589)\n\n### Improvements\n\n- Added a **Remote Agent Browser provider guide** covering Vercel authentication, disposable and stable sessions, custom VCR images, snapshots, and live-view URLs (#1648)\n\n### Bug Fixes\n\n- Fixed **parallel sessions sharing one Chrome hijacking each other's tabs**. Event-discovered targets no longer steal a pinned session's active tab, re-attach restores the persisted target instead of selecting index 0, and preliminary plus existing-daemon `--cdp` and `--auto-connect` paths preserve explicit pin enable and disable. Agent skill guidance now requires a named `--session` before the first command (#1589)\n- Fixed **`agent-browser doctor` hanging on Chrome version detection**. Windows reads the version from the executable resource table without spawning Chrome; other platforms bound the version subprocess with a deadline, kill, and reap so inherited output handles cannot block forever or leave an orphan browser (#1641)\n\n---\n\n## v0.33.2\n\n<p className=\"text-[#888] text-sm\">July 31, 2026</p>\n\n### New Features\n\n- Added **input priority and per-client delivery settings** to the stream server: each WebSocket connection now splits into a reader task and a writer loop, so clicks and keystrokes dispatch to the browser without queueing behind a frame write. Adds a per-client `{\"type\":\"config\",\"maxFps\":N}` cap (1 to 120, `0` uncapped) and opt-in ack pacing via `{\"type\":\"config\",\"pacing\":\"ack\"}` with `{\"type\":\"ack\",\"seq\":N}`, which keeps one frame in flight so a stalled client never drains a backlog. Both settings can also be declared on the connection URL (`?pacing=ack&maxFps=10`), the only way to cover the opening frame. Every frame now carries a monotonic `seq` (#1594)\n- Added **configurable stream encoding**: frames were hardcoded to jpeg quality 80 at the session viewport, so frame rate was the only bandwidth lever. `AGENT_BROWSER_STREAM_QUALITY`, `AGENT_BROWSER_STREAM_MAX_WIDTH` and `AGENT_BROWSER_STREAM_MAX_HEIGHT` are read once per daemon and cut bytes without dropping frames: on a busy page at 1280x720, quality 20 takes a frame from 54 KB to 25 KB, and quality 20 at 640x360 takes it to 9 KB, frame rate unchanged in both. Width and height default to the session viewport, so a larger viewport is never downscaled unless both are set (#1626)\n\n### Behavior Changes\n\n- **Frame delivery is now latest-wins.** The stream server holds only the newest frame and reads it at send time, so frames produced while an earlier one is still being written are skipped. A client that assumed it received every frame from the WebSocket now receives fewer. Nothing in this repo consumes the stream that way, since `record` captures through CDP and the dashboard is a viewer, so this affects external consumers only (#1594)\n- **`metadata.timestamp` now carries a real value.** It was always 0, because CDP sends the capture time as a float in seconds and the code read it as an integer. It is now epoch milliseconds, so a client can measure how stale the frame it is drawing is. A client that treated 0 as unknown is unaffected (#1594)\n\n### Bug Fixes\n\n- Fixed **keyboard input over the stream**, which worked in none of the three shapes the docs publish: an absent `key`, `code`, or `text` reached CDP as an explicit null, which rejects the whole command, so every key release and every non-printable key was silently dropped, the dashboard's own payloads included (#1594)\n- Fixed **click latency behind mouse movement**: input dispatch awaited Chrome's reply before reading the next message, so a click sat one round trip behind every queued mouse move. After a 300-event sweep a click landed 2471ms late; it now lands in 6ms (#1627)\n- Fixed **`stream disable`** returning while a slow client's input reader was still running (#1594)\n\n---\n\n## v0.33.1\n\n<p className=\"text-[#888] text-sm\">July 28, 2026</p>\n\n### Behavior Changes\n\n- The daemon now ships a **default idle timeout of 1 hour**: after an hour with no commands or dashboard input it saves configured restore state, closes the browser, and exits, so integrations that die without calling `close` no longer leak the daemon and its Chrome tree indefinitely. Sessions without `--restore` or another restore key discard transient browser state and open tabs when they shut down. Set `AGENT_BROWSER_IDLE_TIMEOUT_MS=0` to restore the old always-persist behavior, or any other value to tune it. Dashboard mouse, keyboard, and touch input reset the timer. The default never closes headed browsers, including Safari and iOS WebDriver sessions, or user-attached browsers that may be in direct human use. Provider-owned cloud browsers remain eligible for cleanup, and an explicitly configured timeout applies to all browsers, as before (#1605)\n\n### Bug Fixes\n\n- Fixed **tab recovery and selection** to avoid daemon hangs on Memory Saver-discarded tabs by selecting a live renderer on CDP connect, reviving tabs on switch or after close, treating dialog-blocked tabs as live, preserving refs on rejected operations, and surfacing recovery state across CLI, JSON, and MCP output (#1543)\n- Fixed **a11y selector errors** to report invalid CSS selectors cleanly instead of exposing raw browser evaluation stack traces in text and JSON output (#1604)\n\n---\n\n## v0.33.0\n\n<p className=\"text-[#888] text-sm\">July 23, 2026</p>\n\n### New Features\n\n- Added **axe-core accessibility audits** with `agent-browser a11y [url]`, WCAG tag filtering, selector scoping, iframe-aware text and JSON results, an embedded offline and CSP-safe audit engine, and a matching MCP tool (#1596)\n\n---\n\n## v0.32.4\n\n<p className=\"text-[#888] text-sm\">July 22, 2026</p>\n\n### Bug Fixes\n\n- Fixed **find role** to match implicit ARIA roles and browser-computed accessible names through the accessibility tree, so semantic elements like `<h2>` (heading) and `<ul>` (list) resolve, with case-insensitive substring name matching that mirrors Playwright's `getByRole` (#1552)\n- Fixed **element-not-found errors** to preserve the locator detail (selector, role, name, or index) instead of flattening every miss into one generic message, and aligned the advertised `find` actions with the set the dispatcher actually accepts (#1553)\n\n---\n\n## v0.32.3\n\n<p className=\"text-[#888] text-sm\">July 19, 2026</p>\n\n### New Features\n\n- Added **HAR response body capture** with text bodies embedded by default and configurable `all`, `text`, and `none` content modes across the CLI and MCP surfaces (#1578)\n- Added a **derive-client skill** for recording browser traffic and generating reusable API clients from HAR request and response data (#1578)\n\n---\n\n## v0.32.2\n\n<p className=\"text-[#888] text-sm\">July 17, 2026</p>\n\n### Improvements\n\n- Updated **eve extension packaging** for eve 0.25.1, adopting the new source and dist extension manifest format, updating the eve example to stable AI SDK releases, and keeping extension tests aligned with eve's scoped config registry (#1570)\n\n---\n\n## v0.32.1\n\n<p className=\"text-[#888] text-sm\">July 16, 2026</p>\n\n### Improvements\n\n- Widened **eve compatibility** for `@agent-browser/eve` to accept eve 0.23 and future major releases without peer-resolution warnings (#1563)\n\n### Documentation\n\n- Standardized **eve branding** to use lowercase styling across the docs, examples, package readmes, and release notes (#1557)\n\n---\n\n## v0.32.0\n\n<p className=\"text-[#888] text-sm\">July 15, 2026</p>\n\n### New Features\n\n- **eve extension** - Added `@agent-browser/eve`, an eve extension that mounts the agent-browser tool set with namespaced browser tools, sandbox bootstrap helpers, docs, examples, CI, and release packaging (#1547)\n\n### Security\n\n- Hardened **domain allowlists** by blocking WebRTC bypasses, applying network containment across launch modes, workers, popups, restored state, and reused daemon sessions, rejecting unsafe startup arguments, and adding Chrome regression coverage (#1546)\n\n### Bug Fixes\n\n- Fixed **completed-page waits** so load and DOMContentLoaded waits resolve immediately when the current document is already ready, with structured eve wait timeout handling and focused coverage (#1554)\n\n---\n\n## v0.31.2\n\n<p className=\"text-[#888] text-sm\">July 13, 2026</p>\n\n### New Features\n\n- **WebGPU launch preset** - Added `--webgpu` across the CLI, config, environment, and MCP surfaces, with hardware backends on macOS and Windows, software Vulkan on Linux, automatic Xvfb for displayless headed sessions, and a `doctor --webgpu` render and screenshot probe (#1529)\n\n### Improvements\n\n- Added periodic **restore-state autosaves** while the browser remains open, preserving recent state after a browser window is closed by hand and capturing background page changes while honoring the restore save policy. The interval is configurable with `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS` (#1509)\n\n---\n\n## v0.31.1\n\n<p className=\"text-[#888] text-sm\">June 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed the **React renderer** so it picks the react-dom renderer instead of hardcoding renderer id 1, which prevented reading an empty tree on Next.js 16.3 Turbopack (#1491)\n\n---\n\n## v0.31.0\n\n<p className=\"text-[#888] text-sm\">June 25, 2026</p>\n\n### New Features\n\n- **Restore workflow** - Added `--restore`, `--restore-save`, restore validation flags, worktree-scoped `session id`, `session info`, and `--namespace` so agent runs can use stable, isolated, automatically restored browser state without managing state files by hand (#1486)\n\n### Improvements\n\n- Hardened **session lifecycle handling** with explicit daemon and browser compatibility checks, lifecycle status output, MCP support for restore options, and safer auto-save behavior that avoids overwriting good state after a failed restore or failed validation (#1486)\n\n### Bug Fixes\n\n- Fixed **restore lifecycle edge cases** around switching restore keys with a live browser, daemon configuration startup races, launch mode validation, and clearing restore failures after an explicit state load (#1486)\n\n---\n\n## v0.30.1\n\n<p className=\"text-[#888] text-sm\">June 24, 2026</p>\n\n### Bug Fixes\n\n- Fixed **URL waits** so `wait --url` and `waitforurl` honor glob patterns such as `**/dashboard` against the full active URL (#1483)\n\n---\n\n## v0.30.0\n\n<p className=\"text-[#888] text-sm\">June 24, 2026</p>\n\n### New Features\n\n- **Read command** - Added `agent-browser read [url]` and the matching MCP tool for agent-readable text extraction. URL reads prefer Markdown, try `.md` and nearby `llms.txt` docs, support outlines, filters, raw and JSON output, headers, and domain/output safeguards; omitting the URL reads the rendered active tab DOM with current browser state (#1480)\n\n---\n\n## v0.29.1\n\n<p className=\"text-[#888] text-sm\">June 20, 2026</p>\n\n### Improvements\n\n- Defaulted **sandbox system dependency installs** so the eve and Vercel sandbox helpers install Chromium's required libraries unless explicitly disabled, making first-run sandbox setup simpler (#1469)\n\n---\n\n## v0.29.0\n\n<p className=\"text-[#888] text-sm\">June 20, 2026</p>\n\n### New Features\n\n- **Sandbox package** - Added `@agent-browser/sandbox` with shared, eve, and Vercel Sandbox helpers, example projects, and docs for running agent-browser in hosted sandbox environments (#1465)\n\n### Improvements\n\n- Updated **sandbox release flow** so the new package stays version-synced with the CLI release and publishes from the correct workspace path (#1465)\n- Reflowed **documentation prose** across the README, docs site, examples, and skills so Markdown and MDX wrap naturally in editors and renderers (#1466)\n\n---\n\n## v0.28.0\n\n<p className=\"text-[#888] text-sm\">June 16, 2026</p>\n\n### New Features\n\n- **MCP server** - Added `agent-browser mcp`, a stdio Model Context Protocol server with typed tools, paginated discovery, protocol negotiation, and startup tool profiles. The default `core` profile keeps context small, while `--tools all` exposes full CLI parity and composed profiles such as `core,network,react` are supported (#1454)\n- **Plugin system** - Added out-of-process plugin support over the `agent-browser.plugin.v1` stdio protocol, with `plugin add/list/show/run`, manifest discovery, npm and GitHub refs, credential providers, browser provider plugins, launch mutators, custom command capabilities, config and env registry support, and capability-scoped policy gates (#1452)\n\n### Infrastructure\n\n- Added **context footprint eval coverage** for CLI skills, MCP core, and MCP full-profile surfaces, plus MCP parity tests to keep tool behavior aligned with the CLI (#1454)\n\n---\n\n## v0.27.3\n\n<p className=\"text-[#888] text-sm\">June 12, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows ARM64 installs** by falling back to the Windows x64 binary during postinstall, avoiding failed downloads for a native ARM64 artifact that is not published (#1269)\n\n---\n\n## v0.27.2\n\n<p className=\"text-[#888] text-sm\">June 10, 2026</p>\n\n### Bug Fixes\n\n- Fixed **click reliability** by scrolling off-viewport elements into view before resolving coordinates, handling JavaScript dialogs promptly, recovering mouse state after dialog-opening clicks, and detecting click interception by overlays before dispatching input (#1432, #1434)\n- Fixed **frame-scoped selectors and waits** so CSS-selector actions and `wait` respect the selected iframe, including cross-process iframes, with translated click coordinates (#1432)\n- Fixed **wait timeout handling** so the documented 25s default is used, `--timeout` is honored across wait variants, and long waits receive an appropriate client read budget (#1432)\n- Fixed **agent-facing form commands** so `find label` matches `aria-label` and `aria-labelledby`, `select` errors when no option matches, and `type` parses `--clear` and `--delay` instead of typing them as text (#1432)\n\n### Improvements\n\n- Cut **warm CLI command latency** from about 150ms to about 1ms by removing the unconditional daemon settle sleep and retrying once when a stale daemon socket is discovered (#1432)\n- Extended **daemon respawn and retry** handling to batch commands so batches recover from a daemon exit after the initial liveness check (#1432)\n\n### Infrastructure\n\n- Pinned **GNU Linux release artifacts** to glibc 2.28 with zigbuild, added a release guard for newer GLIBC symbols, and aligned Docker release helpers with the pinned target (#1417)\n\n---\n\n## v0.27.1\n\n<p className=\"text-[#888] text-sm\">June 1, 2026</p>\n\n### Improvements\n\n- Improved **`vitals` command** output formatting for better readability (#1404)\n\n### Documentation\n\n- Surfaced agent-browser feature coverage in documentation (#1403)\n\n---\n\n## v0.27.0\n\n<p className=\"text-[#888] text-sm\">May 7, 2026</p>\n\n### New Features\n\n- **React introspection** - First-class React DevTools integration with new `react tree`, `react inspect <fiberId>`, `react renders start|stop`, and `react suspense` commands for full component-tree visibility, per-fiber props/hooks/state inspection, render profiling with mount/re-render counts and change details, and Suspense boundary classification with root-cause grouping and recommendations. React DevTools hook is vendored (MIT) and embedded in the binary with zero runtime dependencies (#1257)\n- **Web Vitals** - New `vitals [url]` command that reports Core Web Vitals (LCP, CLS, TTFB, FCP, INP) plus React hydration phases for any page (#1257)\n- **SPA navigation** - New `pushstate <url>` command for client-side SPA navigations without a full page load (#1257)\n- **Init scripts and feature flags** - New `--init-script <path>` flag (repeatable; env `AGENT_BROWSER_INIT_SCRIPTS`) to register scripts before first navigation, and `--enable <feature>` flag (repeatable; env `AGENT_BROWSER_ENABLE`) for built-in init scripts such as `react-devtools` (#1257)\n- **Network route resource type filter** - `network route` now accepts `--resource-type <csv>` to filter intercepted requests by CDP resource type (#1257)\n- **cURL cookie import** - `cookies set --curl <file>` auto-detects JSON, cURL, and Cookie-header formats for bulk cookie import (#1257)\n- **Dashboard proxy support** - The observability dashboard now works from proxied origins via a same-origin proxy, enabling deployment behind reverse proxies and path-based routing (#1111)\n\n### Bug Fixes\n\n- Fixed **`doctor` command** generating duplicate check ids when called multiple times in the same process (#1330)\n\n### Infrastructure\n\n- Switched npm publishing to **trusted publishing** via GitHub Actions OIDC, removing the need for manually managed npm tokens (#1273)\n\n---\n\n## v0.26.0\n\n<p className=\"text-[#888] text-sm\">April 16, 2026</p>\n\n### New Features\n\n- **`doctor` command** - Added `agent-browser doctor` for one-shot diagnosis of an install. Checks environment, Chrome, running daemons, config files, security, providers, and network connectivity; auto-cleans stale daemon sidecar files on every run; and performs a live headless launch test. Supports `--offline` to skip network probes, `--quick` to skip the launch test, `--fix` for opt-in repairs (install missing Chrome, close version-mismatched daemons, prune expired state files), and `--json` for structured output (#1254)\n- **Stable tab ids and labels** - Tabs now have stable string ids like `t1`, `t2`, `t3` that don't shift when other tabs close or popups appear. Tabs can be created with a memorable label via `tab new --label <name> [<url>]`, and labels are interchangeable with `t<N>` ids everywhere a tab ref is accepted (`tab <id|label>`, `tab close <id|label>`). Bare-integer input is rejected with a teaching error so agents can't mistake stable handles for positional indices (#892, #1249, #1250)\n- **`core` skill** - Renamed the built-in `agent-browser` skill to `core` and replaced its ~40-line discovery stub with a ~420-line usage guide covering the core snapshot-ref-act loop, reading, interacting, waiting, common workflows, troubleshooting, and global flags. `agent-browser skills get core` now returns content agents can use directly; `--full` adds references and templates. Added a `hidden:` frontmatter flag so the original `agent-browser` stub stays reachable for `npx skills add` discovery without polluting `skills list` (#1253)\n- **JSON Schema for config files** - Added `agent-browser.schema.json` describing every config option with types and descriptions, enabling IDE autocomplete and validation when referenced via `$schema` in `agent-browser.json` or `~/.agent-browser/config.json`. The schema is served from the docs site at `https://agent-browser.dev/schema.json` (#1242, #1248)\n\n### Bug Fixes\n\n- Fixed **`--state` / `AGENT_BROWSER_STATE`** not actually loading saved browser state (cookies and localStorage) at launch. The flag had been fully plumbed through parsing, env propagation, and validation since the native Rust rewrite, but the load step was never wired up. Storage state now loads after launch across all four paths: explicit launch, auto-connect, provider, and local Chrome (#1241)\n\n### Documentation\n\n- `--help` output now shows the **skills** section first so agents discover `skills get core` (the canonical usage guide) before the core command list (#1251)\n\n---\n\n## v0.25.5\n\n<p className=\"text-[#888] text-sm\">April 16, 2026</p>\n\n### Bug Fixes\n\n- Fixed **`--auto-connect` CDP discovery** preferring HTTP endpoint discovery over the DevToolsActivePort websocket path, which could fail on some setups. The CLI now reads the websocket path from DevToolsActivePort first and only falls back to HTTP discovery (#1218)\n- Fixed **recording context viewport** not inheriting the active viewport dimensions, causing recordings to use default resolution instead of the configured viewport (#1208)\n- Fixed **`get box` and `get styles`** printing no data in text mode (#1231, #1233)\n- Fixed **active page changing** when closing or removing earlier tabs. The previously focused page is now preserved correctly (#1220)\n\n---\n\n## v0.25.4\n\n<p className=\"text-[#888] text-sm\">April 12, 2026</p>\n\n### New Features\n\n- **`skills` command** - Added `agent-browser skills` command for discovering and installing agent skills, with built-in evaluation support for testing skills against live browser sessions (#1225, #1227)\n\n### Bug Fixes\n\n- Fixed **custom viewport dimensions** not being used in streaming frame metadata and image resolution (#1033)\n- Fixed **`--ignore-https-errors`** not being re-applied to recording contexts, causing TLS errors during screen recordings (#1178)\n- Fixed **duplicate option numbering** in the auth skill documentation (#1161)\n\n### Documentation\n\n- The docs site header now **dynamically fetches** the GitHub star count (#1202)\n\n---\n\n## v0.25.3\n\n<p className=\"text-[#888] text-sm\">April 7, 2026</p>\n\n### Bug Fixes\n\n- Fixed **hidden radio/checkbox inputs missing from snapshot refs** when a `<label>` wraps a `display:none` `<input type=\"radio\">` or `<input type=\"checkbox\">`. Chrome excludes these inputs from the accessibility tree entirely, making it impossible for AI agents to identify radio buttons and checkboxes via refs. Hidden inputs inside elements are now detected during cursor-interactive scanning and their parent nodes are promoted to the correct role with proper name and checked state (#1085)\n\n### Documentation\n\n- Added **clickable heading anchors** to the docs site, making it easy to link directly to any section (#1175)\n\n---\n\n## v0.25.2\n\n<p className=\"text-[#888] text-sm\">April 6, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Chrome being killed after ~10s idle on Linux** caused by `PR_SET_PDEATHSIG` tracking the blocking thread that spawned Chrome rather than the daemon process. When Tokio reaped the idle thread, the kernel sent SIGKILL to Chrome even though the daemon was still alive (#1157, #1173)\n\n---\n\n## v0.25.1\n\n<p className=\"text-[#888] text-sm\">April 6, 2026</p>\n\n### Improvements\n\n- **Embedded dashboard** - The observability dashboard is now bundled directly into the CLI binary using `rust-embed`, eliminating the need for `dashboard install`. The dashboard is available immediately after installing agent-browser (#1169)\n\n---\n\n## v0.25.0\n\n<p className=\"text-[#888] text-sm\">April 6, 2026</p>\n\n### New Features\n\n- **AI chat command** - Added `chat` command for AI-powered browser automation. Supports single-shot mode (`chat \"open google.com\"`) and an interactive REPL. The AI agent can execute any agent-browser command via tool calls. Requires `AI_GATEWAY_API_KEY`. Configure the model with `--model` or `AI_GATEWAY_MODEL` (#1160, #1163)\n- **Dashboard AI chat** - The observability dashboard now includes a built-in AI chat interface for conversational browser control alongside live session views (#1160, #1163)\n- **`snapshot --urls`** - New `-u`/`--urls` flag to include href URLs for link elements in snapshot output, giving agents direct access to link targets without additional queries (#1160)\n- **Batch argument mode** - The `batch` command now accepts commands as inline arguments in addition to reading from stdin, simplifying single-invocation multi-command workflows (#1160)\n\n### Bug Fixes\n\n- Fixed **`getByRole`** matching wrong elements (e.g. `<link>` stylesheet elements instead of `<a>` anchors) by rewriting the implementation to use the CDP accessibility tree with ref-based element resolution instead of CSS selectors (#1145)\n- Fixed **`upload` command** not supporting accessibility tree refs (`@eN`) for file upload element selection (#1156)\n- Fixed **`AGENT_BROWSER_DEFAULT_TIMEOUT`** not being applied to `wait` commands. The environment variable now propagates to all wait variants (`wait`, `wait --url`, `wait --text`, `wait --load`, `wait --fn`, `wait --download`) (#1153)\n- Fixed **dashboard download** error handling with improved retry logic for more reliable dashboard installation (#1154)\n\n---\n\n## v0.24.1\n\n<p className=\"text-[#888] text-sm\">April 4, 2026</p>\n\n### New Features\n\n- **Chrome profile login state reuse** - `--profile <name>` now resolves Chrome profile names (e.g. `Default`, `Profile 1`) and copies the profile to a temp directory to reuse login state, cookies, and extensions without modifying the original. Added `profiles` command to list available Chrome profiles with `--json` support (#1131)\n\n### Bug Fixes\n\n- Fixed **`--ignore-https-errors`** not passing `--ignore-certificate-errors` as a Chrome launch flag, causing TLS errors like `ERR_SSL_PROTOCOL_ERROR` to be rejected at the network layer before CDP could intervene (#1132)\n- Fixed **orphaned Chrome processes** on daemon exit by spawning Chrome in its own process group and killing the entire group on shutdown. On Linux, `PR_SET_PDEATHSIG` ensures Chrome is killed even if the daemon is OOM-killed (#1137)\n- Fixed **CDP attach hang on Chrome 144+** when connecting to real browser sessions. Targets paused waiting for the debugger after attach are now resumed with `Runtime.runIfWaitingForDebugger` (#1133)\n- Fixed **stale daemon after upgrade** silently reusing the old daemon process with broken CDP behavior. The daemon now writes a `.version` sidecar file and auto-restarts on version mismatch (#1134)\n- Fixed **stale daemon/socket recovery** where `close --all` failed to clean up zombie daemons and stale files. Unreachable daemons are now force-killed and orphaned socket/pid files are removed (#1136)\n- Fixed **idle timeout** not being respected because the sleep future was recreated on every select loop iteration, preventing the deadline from being reached (#1110)\n- Fixed **browser not relaunching** when launch options change (e.g. adding extensions to `config.json`) between consecutive launch commands (#996)\n- Fixed **`auto_launch()`** not honouring `AGENT_BROWSER_PROVIDER` for cloud providers, causing non-launch commands to fall back to local Chrome instead of connecting via the provider API (#1126)\n- Fixed **HAR capture missing API requests** under heavy traffic by increasing the CDP broadcast buffer from 256 to 4096 events, reducing the drain interval from 500ms to 100ms, and enabling network tracking in cross-origin iframes (#1135)\n\n---\n\n## v0.24.0\n\n<p className=\"text-[#888] text-sm\">April 2, 2026</p>\n\n### New Features\n\n- **AWS Bedrock AgentCore provider** - Added AWS Bedrock AgentCore as a cloud browser provider. Connect with `--provider agentcore` or `AGENT_BROWSER_PROVIDER=agentcore`. Uses lightweight manual SigV4 signing for authentication with support for the full AWS credential provider chain (environment variables, AWS CLI, SSO, IAM roles). Configure with `AGENTCORE_REGION`, `AGENTCORE_PROFILE_ID`, and `AGENTCORE_BROWSER_ID` environment variables. Returns session ID and Live View URL in the launch response (#397)\n\n### Documentation\n\n- Added AgentCore provider page to docs site, README options table, SKILL.md, and dashboard provider icons (#1120)\n\n---\n\n## v0.23.4\n\n<p className=\"text-[#888] text-sm\">March 31, 2026</p>\n\n### Bug Fixes\n\n- Fixed **daemon hang on Linux** caused by a `waitpid(-1)` race condition in the SIGCHLD handler that stole exit statuses from Rust's `Child` handles, leaving the daemon in a broken state. Replaced the global signal handler with targeted crash detection via the existing drain interval (#1098)\n\n---\n\n## v0.23.3\n\n<p className=\"text-[#888] text-sm\">March 30, 2026</p>\n\n### Bug Fixes\n\n- Fixed **drag and drop** not working because `mouseMoved` events during the drag omitted the `buttons` bitmask, causing the browser to see `event.buttons === 0` and never fire `dragstart`/`dragover`/`drop` (#1087)\n\n---\n\n## v0.23.2\n\n<p className=\"text-[#888] text-sm\">March 30, 2026</p>\n\n### New Features\n\n- **Dashboard session creation** - Sessions can now be created directly from the dashboard UI. A new session dialog provides a unified selector grid for local engines (Chrome, Lightpanda) and cloud providers (Browserbase, Browserless, Browser Use, Kernel) with async creation, loading state, and error display (#1092)\n- **Dashboard provider icons** - The session sidebar now shows the provider or engine icon for each session, making it easy to identify which backend a session is using (#1092)\n\n### Bug Fixes\n\n- Fixed **Browser Use** provider using an intermediate API call instead of connecting directly via WSS, which caused connection failures (#1092)\n- Fixed **Browserbase** provider not sending an explicit JSON body and `Content-Type` header, causing session creation to fail (#1092)\n- Fixed **provider navigation** hanging because `wait_for_lifecycle` waited for page load events that remote providers may not emit. Navigation with `--provider` now automatically sets `waitUntil=none` (#1092)\n- Fixed **remote CDP connections** timing out by increasing the CDP connect timeout from 10s to 25s for cloud providers (#1092)\n- Fixed **zombie daemon processes** not being cleaned up when a provider connection fails during session creation from the dashboard (#1092)\n\n---\n\n## v0.23.1\n\n<p className=\"text-[#888] text-sm\">March 30, 2026</p>\n\n### New Features\n\n- **Auto-dismissal for alert and beforeunload dialogs** - JavaScript `alert()` and `beforeunload` dialogs are now automatically accepted to prevent the agent from blocking indefinitely. `confirm` and `prompt` dialogs still require explicit `dialog accept/dismiss` commands. Disable with `--no-auto-dialog` flag or `AGENT_BROWSER_NO_AUTO_DIALOG` environment variable (#1075)\n- **Puppeteer browser cache fallback** - Chrome discovery now searches `~/.cache/puppeteer/chrome/` (or `PUPPETEER_CACHE_DIR`) for Chrome binaries, so users with an existing Puppeteer installation can use agent-browser without a separate install step (#1088)\n- **Console output improvements** - `console.log` of objects now shows the actual object preview (e.g. `{userId: \"abc\", count: 42}`) instead of `\"Object\"`. JSON output includes a raw `args` array for programmatic access (#1040)\n\n### Bug Fixes\n\n- Fixed **same-document navigation** (e.g. SPA hash routing) hanging forever because `wait_for_lifecycle` waited for a `Page.loadEventFired` that never fires on same-document navigations (#1059)\n- Fixed **save_state** only capturing cookies and localStorage for the current origin, silently dropping cross-domain data (e.g. SSO/CAS auth cookies). Now uses `Network.getAllCookies` and collects localStorage from all visited origins (#1064)\n- Fixed **externally opened tabs** not appearing in `tab list` when using `--cdp` mode. Tabs opened by the user or another CDP client are now detected and tracked (#1042)\n- Fixed **dashboard server** not picking up installed files without a restart. `dashboard install` now takes effect immediately on a running server (#1066)\n- Fixed **Windows Chrome extraction** failing because zip path normalization used forward slashes while the extraction code expected backslashes (#1088)\n\n---\n\n## v0.23.0\n\n<p className=\"text-[#888] text-sm\">March 27, 2026</p>\n\n### New Features\n\n- **Observability dashboard** - Added a local web UI (`dashboard`) that shows live browser viewports, command activity feeds, console output, network requests, storage, and extensions for all sessions. Manage it with `dashboard start`, `dashboard stop`, and `dashboard install`. The dashboard runs as a standalone background process and all sessions stream to it automatically (#1034)\n\n```bash\nagent-browser dashboard install\nagent-browser dashboard start\nagent-browser open example.com # session appears in dashboard\nagent-browser dashboard stop\n```\n\n- **Runtime stream management** - Added `stream enable`, `stream disable`, and `stream status` commands to control WebSocket streaming at runtime. Streaming is now always enabled by default; `AGENT_BROWSER_STREAM_PORT` overrides the port instead of toggling the feature (#951)\n- **Close all sessions** - Added `close --all` flag to close every active browser session at once\n\n### Bug Fixes\n\n- Fixed **Lightpanda engine** compatibility (#1050)\n- Fixed **Windows daemon TCP bind** failing when Hyper-V reserves the port by falling back to an OS-assigned port and writing it to a `.port` file (#1041)\n- Fixed **Windows dashboard relay** using Unix socket instead of TCP (#1038)\n- Fixed **radio/checkbox elements** being dropped from compact snapshot tree because the `ref=` check required a leading `[` that those elements lack (#1008)\n\n---\n\n## v0.22.3\n\n<p className=\"text-[#888] text-sm\">March 25, 2026</p>\n\n### Bug Fixes\n\n- **Re-apply download behavior on recording context** - Fixed an issue where downloads were silently dropped in recording contexts because `Browser.setDownloadBehavior` set at launch only applied to the default context. The download behavior is now re-applied when a new recording context is created (#1019)\n- **Reap zombie Chrome process and fast-detect crash for auto-restart** - Added a non-blocking process-exit check before attempting CDP connection checks. This prevents a 3-second CDP timeout when Chrome has already crashed or exited, enabling faster detection and auto-restart of the browser (#1023)\n- **Route keyboard `type` through text input** - Fixed keyboard `type` subaction to correctly route through the text input handler, and added support for an `insertText` subaction using `Input.insertText` (#1014)\n- **Handle `--clear` flag in `console` command** - Fixed the `console` command to accept and process a `clear` parameter, allowing console event history to be cleared (#1015)\n\n---\n\n## v0.22.2\n\n<p className=\"text-[#888] text-sm\">March 24, 2026</p>\n\n### New Features\n\n- **Dialog status command** - Added `dialog status` command to check whether a JavaScript dialog is currently open (#999)\n- **Dialog warning field** - Command responses now include a `warning` field when a JavaScript dialog is pending, indicating the dialog type and message (#999)\n\n### Improvements\n\n- **Standard proxy environment variables** - The proxy setting now automatically falls back to standard environment variables (`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and their lowercase variants), with `NO_PROXY`/`no_proxy` respected for bypass rules (#1000)\n- **Font packages for `--with-deps`** - Installing with `--with-deps` now includes CJK and emoji font packages on Linux (Debian, RPM, and yum-based distros) to prevent missing glyphs when rendering international content (#1002)\n\n### Bug Fixes\n\n- Fixed `state show` always failing with \"Missing 'path' parameter\" due to a mismatched JSON field name (#994)\n- Fixed `console` command returning only `Done` due to a JSON field name mismatch in the response (#986)\n- Fixed browser-domain CDP events being dropped during downloads due to a `sessionId` mismatch (#998)\n- Fixed proxy authentication by handling credentials via the CDP `Fetch.authRequired` event rather than passing them inline (#1000)\n\n---\n\n## v0.22.1\n\n<p className=\"text-[#888] text-sm\">March 24, 2026</p>\n\n### Bug Fixes\n\n- Fixed **modifier key chords** (e.g. `Control+a`, `Shift+Enter`, `Control+Shift+a`) not being handled correctly when using `press`. Modifier keys are now parsed and forwarded as CDP modifier bitmasks rather than treated as part of the key name (#980)\n- Fixed **query parameters being dropped** from `--cdp` HTTP URLs (e.g. `http://host:9222?mode=Hello`). Query strings are now preserved and forwarded to the remote CDP endpoint (#982)\n\n---\n\n## v0.22.0\n\n<p className=\"text-[#888] text-sm\">March 23, 2026</p>\n\n### New Features\n\n- **Cross-origin iframe support** - Added support for snapshots and interactions within cross-origin iframes via `Target.setAutoAttach` (#949)\n- **Network request detail and filtering** - Added `network request <requestId>` command to view full request/response detail, and new filtering options for `network requests` including `--type` (e.g. `xhr,fetch`), `--method` (e.g. `POST`), and `--status` (e.g. `2xx`, `400-499`) (#935)\n\n```bash\nagent-browser network requests --type xhr,fetch --method POST\nagent-browser network request <requestId>\n```\n\n### Improvements\n\n- **Snapshot usability** - Reduced AI cognitive load by filtering semantic noise from snapshot output; cursor-interactive elements are now included by default, making the `-C` flag unnecessary (#968)\n- **Upgrade command** - Improved robustness of installation method detection in the upgrade command (#960)\n- **Target tracking** - Enhanced target tracking and page information handling for more reliable browser session management (#969)\n\n### Bug Fixes\n\n- Fixed **viewport dimensions** being reported incorrectly in streaming status messages and screencast (#952)\n- Fixed **`find` command** flags such as `--exact` and `--name` leaking into fill values when used with fill actions (#955)\n- Fixed **state commands** incorrectly starting the daemon when no `session_name` is provided (#677, #964)\n- Fixed **auto-connect** triggering when the daemon is already running, preventing duplicate connections (#971)\n- Fixed **Enter key press** not working by adding a text field to `keyDown` events (#972)\n- Fixed **download command** to properly handle absolute paths and correctly click target elements (#970)\n\n### Breaking Changes\n\n- The `-C` / `--cursor` flag for `snapshot` is deprecated; cursor-interactive elements are now included by default and the flag has no additional effect (#968)\n\n---\n\n## v0.21.4\n\n<p className=\"text-[#888] text-sm\">March 20, 2026</p>\n\n### Bug Fixes\n\n- **Auth login readiness** - `agent-browser auth login` now navigates with `load`, waits for usable login form selectors, and uses staged username detection (targeted email/username selectors first, then broad text-input fallback). This reduces SPA timing failures, avoids false matches on unrelated text fields, and prevents `networkidle` hangs on pages with continuous background requests.\n\n---\n\n## v0.21.3\n\n<p className=\"text-[#888] text-sm\">March 20, 2026</p>\n\n### Bug Fixes\n\n- **WebSocket keepalive for remote browsers** - Added WebSocket Ping frames and TCP `SO_KEEPALIVE` to prevent CDP connections from being silently dropped by intermediate proxies during idle periods (#936)\n- **XPath selector support** - Fixed element resolution to correctly handle the `xpath=` selector prefix (#908)\n\n### Performance\n\n- **Fast-path for identical snapshots** - Short-circuits the Myers diff algorithm when comparing a snapshot to itself, avoiding unnecessary computation in retry and loop workloads (#922)\n\n---\n\n## v0.21.2\n\n<p className=\"text-[#888] text-sm\">March 18, 2026</p>\n\n### Bug Fixes\n\n- **Deduplicate text content in snapshots** - Fixed an issue where duplicate text content appeared in page snapshots (#909)\n- **Native mouse drag state** - Fixed incorrect raw native mouse drag state not being properly tracked across `down`, `move`, and `up` events (#872)\n- **Chrome headless launch failures** - Fixed browser launch failures caused by the `--enable-unsafe-swiftshader` flag in Chrome headless mode (#915)\n- **Origin-scoped `--headers` persistence** - Restored correct persistence of origin-scoped headers set via `--headers` across navigation commands (#894)\n- **Relative URLs in WebSocket domain filter** - Fixed handling of relative URLs in the WebSocket domain filter script (#624)\n\n---\n\n## v0.21.1\n\n<p className=\"text-[#888] text-sm\">March 18, 2026</p>\n\n### New Features\n\n- **HAR 1.2 network capture** - Added commands to capture and export network traffic in HAR 1.2 format, including accurate request/response timing, headers, body sizes, and resource types sourced from Chrome DevTools Protocol events (#864)\n- **Built-in `upgrade` command** - Added `agent-browser upgrade` to self-update the CLI; automatically detects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command (#898)\n\n```bash\nagent-browser upgrade\n```\n\n---\n\n## v0.21.0\n\n<p className=\"text-[#888] text-sm\">March 17, 2026</p>\n\n### New Commands\n\n- **`batch`** -- Execute multiple commands in a single invocation. Pipe a JSON array of string arrays to stdin and receive results sequentially. Supports `--bail` to stop on first error and `--json` for structured output.\n\n```bash\necho '[[\"open\",\"example.com\"],[\"snapshot\"]]' | agent-browser batch --json\n```\n\n- **`network har start/stop`** -- Capture and export network traffic in HAR 1.2 format.\n\n```bash\nagent-browser network har start\n# ... interact with the page ...\nagent-browser network har stop ./trace.har\n```\n\n### New Features\n\n- **iframe support** -- CLI interactions and snapshots now traverse into iframe content, enabling automation of cross-frame pages.\n- **`--idle-timeout` flag** -- Automatically shut down the daemon after a period of inactivity. Accepts human-friendly formats such as `10s`, `3m`, `1h`, or raw milliseconds. Also available as `AGENT_BROWSER_IDLE_TIMEOUT_MS`.\n- **Cursor-interactive elements in snapshots** -- Cursor-interactive elements are now embedded directly into the snapshot tree for richer context.\n- **Brave Browser auto-connect** -- Auto-discovery of Brave Browser for CDP connections on macOS, Linux, and Windows.\n- **linux-musl (Alpine) builds** -- Pre-built binaries for linux-musl targeting both x64 and arm64, enabling native support for Alpine Linux and other musl-based distributions.\n- **WebSocket fallback for CDP discovery** -- When HTTP-based CDP endpoint discovery fails, the CLI now falls back to a WebSocket connection automatically.\n\n### Improvements\n\n- **`--full`/`-f` refactored to command-level flag** -- Moved from a global flag to a per-command flag for clearer scoping.\n- **Enhanced Chrome launch** -- Added `--user-data-dir` support and configurable launch timeout for more reliable browser startup. Chrome now retries launching up to 3 times on transient startup failures.\n- **Consecutive `--auto-connect` commands** -- Multiple consecutive auto-connect commands no longer require a full browser relaunch; external connections are correctly identified and reused.\n- **Batched CDP calls** -- `snapshot -C` and `screenshot --annotate` now batch CDP calls instead of issuing sequential round-trips per element, preventing timeouts on high-latency WSS connections.\n\n### Bug Fixes\n\n- Fixed remote CDP (WSS) snapshot and screenshot hangs by removing WebSocket message/frame size limits\n- Fixed Material Design `check`/`uncheck` falling back to JS `.click()` for overlay-based controls\n- Fixed punctuation characters being dropped in the `type` command\n- Fixed WebSocket streaming by keeping the StreamServer instance alive\n- Filtered internal Chrome targets (`chrome://`, `devtools://`) from auto-connect discovery\n- Fixed `snapshot --selector` scoping to the matched element's subtree\n- Fixed network idle detection returning prematurely for cached pages\n- Fixed daemon panic on broken stderr pipe during Chrome launch\n- Fixed broadcast channel lag being treated as stream closure\n- Fixed daemon liveness detection for PID namespace isolation (e.g. `unshare`)\n- Fixed Ubuntu dependency install accidentally removing system packages\n\n---\n\n## v0.20.0\n\n<p className=\"text-[#888] text-sm\">March 13, 2026</p>\n\n### Full Native Rust\n\nagent-browser is now 100% native Rust. The Node.js/Playwright daemon has been completely removed -- no Node.js runtime or Playwright dependency is required to run the daemon. The Rust native daemon is now the only implementation.\n\n<table>\n <thead>\n <tr>\n <th>Metric</th>\n <th>Node.js</th>\n <th>Rust</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Cold start</td>\n <td>1002ms</td>\n <td>617ms</td>\n <td>1.6x faster</td>\n </tr>\n <tr>\n <td>Daemon memory</td>\n <td>143 MB</td>\n <td>8 MB</td>\n <td>18x less</td>\n </tr>\n <tr>\n <td>Install size</td>\n <td>710 MB</td>\n <td>7 MB</td>\n <td>99x smaller</td>\n </tr>\n </tbody>\n</table>\n\n```bash\nnpm install -g agent-browser # 7 MB install\nagent-browser install # download Chrome\nagent-browser open example.com\nagent-browser snapshot\n```\n\n### Improvements\n\n- **Benchmarks** -- Added benchmark suite for comparing native vs Node.js daemon performance across cold start, warm start, memory, and install size.\n- **Chromium installer hardened** -- Fixed zip path traversal vulnerability in Chrome for Testing installer.\n\n### Bug Fixes\n\n- Fixed `--headed false` flag not being respected in CLI\n- Fixed \"not found\" error pattern in `to_ai_friendly_error` incorrectly catching non-element errors\n- Fixed storage local key lookup parsing and text output\n- Fixed Lightpanda engine launch with release binaries\n- Hardened Lightpanda startup timeouts\n\n---\n\n## v0.19.0\n\n<p className=\"text-[#888] text-sm\">March 13, 2026</p>\n\n### New Features\n\n- **Browserless.io provider** -- Added browserless.io as a browser provider, supported in both Node.js and native daemon paths. Connect to remote Browserless instances using the `--provider browserless` flag or `AGENT_BROWSER_PROVIDER=browserless` environment variable.\n\n```bash\nexport BROWSERLESS_API_KEY=\"your-api-key\"\nagent-browser --provider browserless open example.com\nagent-browser --provider browserless screenshot ./page.png\n```\n\n- **`clipboard` command** -- Read from and write to the browser clipboard. Supports `read`, `write`, `copy` (simulates Ctrl+C), and `paste` (simulates Ctrl+V) operations.\n\n```bash\nagent-browser clipboard read\nagent-browser clipboard write \"Hello, World!\"\nagent-browser clipboard copy\nagent-browser clipboard paste\n```\n\n- **Screenshot output configuration** -- New global flags for persistent screenshot settings: `--screenshot-dir`, `--screenshot-quality`, and `--screenshot-format`. Also available as environment variables `AGENT_BROWSER_SCREENSHOT_DIR`, `AGENT_BROWSER_SCREENSHOT_QUALITY`, and `AGENT_BROWSER_SCREENSHOT_FORMAT`.\n\n```bash\nagent-browser screenshot --screenshot-dir ./shots\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80\n```\n\n### Bug Fixes\n\n- Fixed `wait --text` not working in native daemon path\n- Fixed `BrowserManager.navigate()` and package entry point\n- Fixed extensions not being loaded from `config.json`\n- Fixed scroll on page load\n- Fixed HTML retrieval by using `browser.getLocator()` for selector operations\n\n---\n\n## v0.18.0\n\n<p className=\"text-[#888] text-sm\">March 12, 2026</p>\n\n### New Features\n\n- **`inspect` command** -- Opens Chrome DevTools for the active page by launching a local proxy server that forwards the DevTools frontend to the browser's CDP WebSocket. Agent commands continue to work while DevTools is open.\n\n```bash\nagent-browser open example.com\nagent-browser inspect # opens DevTools in your browser\nagent-browser click \"Submit\" # commands still work while DevTools is open\n```\n\n- **`get cdp-url` subcommand** -- Retrieve the Chrome DevTools Protocol WebSocket URL for the active page, useful for connecting external debugging tools.\n\n```bash\nagent-browser get cdp-url\n```\n\n- **Screenshot annotate** -- The `--annotate` flag overlays numbered labels on interactive elements in screenshots.\n\n### Improvements\n\n- **KERNEL_API_KEY now optional** -- External credential injection no longer requires `KERNEL_API_KEY` to be set, making it easier to use Kernel with pre-configured environments.\n- **Browserbase simplified** -- Removed the `BROWSERBASE_PROJECT_ID` requirement, reducing setup friction for Browserbase users.\n\n### Bug Fixes\n\n- Fixed Browserbase API using incorrect endpoint to release sessions\n- Fixed CDP connect paths using hardcoded 10s timeout instead of the configurable default timeout\n- Fixed lone Unicode surrogates causing errors by sanitizing with `toWellFormed()`\n- Fixed CDP connection failure on IPv6-first systems\n- Fixed recordings not inheriting the current viewport settings\n\n---\n\n## v0.17.1\n\n<p className=\"text-[#888] text-sm\">March 9, 2026</p>\n\n### Improvements\n\n- **Viewport scale factor** -- Added support for device scale factor (retina display) in the viewport command via an optional `scale` parameter.\n- **Webview target support** -- Added webview target type support for better Electron application compatibility. The pages list now includes target type information.\n\n---\n\n## v0.17.0\n\n<p className=\"text-[#888] text-sm\">March 8, 2026</p>\n\n### New Features\n\n- **Lightpanda browser engine support** -- Added `--engine <name>` flag to select the browser engine (`chrome` by default, or `lightpanda`), implying `--native` mode. Configurable via `AGENT_BROWSER_ENGINE` environment variable.\n\n```bash\nagent-browser --engine lightpanda open example.com\n```\n\n- **Dialog dismiss command** -- Added support for `dismiss` subcommand in dialog command parsing.\n\n### Improvements\n\n- **Daemon startup error reporting** -- Daemon startup errors are now surfaced directly instead of showing an opaque timeout message.\n- **CDP port discovery** -- Replaced hand-rolled HTTP client with `reqwest` for more reliable CDP port discovery.\n- **Chrome extensions** -- Extensions now load correctly by forcing headed mode when extensions are present.\n- **Google Translate bar suppression** -- Suppressed the Google Translate bar in native headless mode to avoid interference.\n- **Auth cookie persistence** -- Auth cookies are now persisted on browser close in native mode.\n\n### Bug Fixes\n\n- Fixed native auth login failing due to incompatible encryption format.\n\n### Performance\n\n- Added benchmarks to the CLI codebase.\n\n---\n\n## v0.16.0\n\n<p className=\"text-[#888] text-sm\">March 3, 2026</p>\n\n### New Features\n\n- **Native Rust daemon (experimental).** A pure Rust daemon that communicates with Chrome directly via the Chrome DevTools Protocol (CDP), eliminating Node.js and Playwright dependencies entirely. Enable with `--native`, `AGENT_BROWSER_NATIVE=1`, or `\"native\": true` in your config file. Supports 150+ commands with full parity to the default Node.js daemon.\n\n```bash\n# Via flag\nagent-browser --native open example.com\n\n# Via environment variable\nexport AGENT_BROWSER_NATIVE=1\nagent-browser open example.com\n```\n\nOr add to `agent-browser.json`:\n\n```json\n{\"native\": true}\n```\n\n### Architecture\n\n<table>\n <thead>\n <tr><th></th><th>Default (Node.js)</th><th>Native (<code>--native</code>)</th></tr>\n </thead>\n <tbody>\n <tr><td><strong>Runtime</strong></td><td>Node.js + Playwright</td><td>Pure Rust binary</td></tr>\n <tr><td><strong>Protocol</strong></td><td>Playwright protocol</td><td>Direct CDP / WebDriver</td></tr>\n <tr><td><strong>Install size</strong></td><td>Larger (Node.js + npm deps)</td><td>Smaller (single binary)</td></tr>\n <tr><td><strong>Browser support</strong></td><td>Chromium, Firefox, WebKit</td><td>Chromium, Safari (via WebDriver)</td></tr>\n <tr><td><strong>Stability</strong></td><td>Stable</td><td>Experimental</td></tr>\n </tbody>\n</table>\n\n### What's Supported\n\nAll core commands work in native mode: navigation, interaction (click, fill, type, press, hover, scroll, drag), observation (snapshot, screenshot, eval), state management (cookies, storage, state save/load), tabs, emulation (viewport, device, timezone, locale, geolocation), streaming, diffing, recording, and profiling.\n\nThe native daemon also includes a WebDriver backend for Safari and iOS support.\n\n### Known Limitations\n\n- Firefox and WebKit are not yet supported (Chromium and Safari only)\n- Playwright trace format is not available (uses Chrome's built-in tracing)\n- HAR export is not available\n- Network route interception uses CDP Fetch domain instead of Playwright's route API\n- The native and Node.js daemons share the same session socket. Use `agent-browser close` before switching between modes.\n\nSee the [Native Mode](/native-mode) page for full details.\n\n---\n\n## v0.15.0\n\n<p className=\"text-[#888] text-sm\">February 25, 2026</p>\n\n### New Features\n\n- **Authentication vault** -- Store credentials locally (always AES-256-GCM encrypted) and reference them by name. The LLM never sees passwords. Commands: `auth save`, `auth login`, `auth list`, `auth show`, `auth delete`. Passwords can be piped via stdin (`--password-stdin`) to avoid shell history exposure.\n- **Content boundary markers** -- `--content-boundaries` wraps page-sourced output in structural delimiters with a per-process CSPRNG nonce, so LLMs can distinguish trusted tool output from untrusted page content. In `--json` mode, a `_boundary` object is injected with `nonce` and `origin` fields.\n- **Domain allowlist** -- `--allowed-domains` restricts navigation, sub-resource requests, WebSocket connections, and EventSource streams to trusted domains. Supports exact match and wildcard prefix patterns (e.g., `*.example.com`).\n- **Action policy** -- `--action-policy` gates actions using a static JSON policy file with `allow`/`deny` lists across 13 action categories. Auth vault operations bypass policy enforcement.\n- **Action confirmation** -- `--confirm-actions` requires explicit approval for sensitive action categories. New `confirm` and `deny` commands for orchestrator use. `--confirm-interactive` enables human-in-the-loop terminal prompts (auto-denies if stdin is not a TTY). Pending confirmations auto-deny after 60 seconds.\n- **Output length limits** -- `--max-output` truncates large page outputs to prevent LLM context flooding.\n- **`--download-path` option** -- Set a default download directory via flag, `AGENT_BROWSER_DOWNLOAD_PATH` env var, or `downloadPath` config key. Without it, downloads go to a temporary directory deleted when the browser closes.\n- **`--selector` flag for scroll** -- Scroll within a specific container element instead of the page: `agent-browser scroll down 500 --selector \"div.scroll-container\"`\n\n```bash\n# Auth vault\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\nagent-browser auth login github\n\n# Security flags\nagent-browser --content-boundaries --allowed-domains \"example.com,*.example.com\" --max-output 50000 open https://example.com\n\n# Download path\nagent-browser --download-path ./downloads open https://example.com\n\n# Scroll within container\nagent-browser scroll down 500 --selector \"div.content\"\n```\n\n### Environment Variables\n\nSix new environment variables for security configuration: `AGENT_BROWSER_CONTENT_BOUNDARIES`, `AGENT_BROWSER_MAX_OUTPUT`, `AGENT_BROWSER_ALLOWED_DOMAINS`, `AGENT_BROWSER_ACTION_POLICY`, `AGENT_BROWSER_CONFIRM_ACTIONS`, `AGENT_BROWSER_CONFIRM_INTERACTIVE`.\n\n---\n\n## v0.14.0\n\n<p className=\"text-[#888] text-sm\">February 23, 2026</p>\n\n### New Features\n\n- **`keyboard` command** -- Type with real keystrokes, insert text, and press shortcuts at the currently focused element without needing a selector (`keyboard type`, `keyboard inserttext`).\n- **`--color-scheme` flag** -- Persistent dark/light mode preference across browser sessions via flag or `AGENT_BROWSER_COLOR_SCHEME` env var.\n\n```bash\nagent-browser keyboard type \"Hello world\"\nagent-browser keyboard inserttext \"pasted text\"\nagent-browser --color-scheme dark open https://example.com\n```\n\n### Bug Fixes\n\n- Fixed IPC EAGAIN errors (os error 35/11) with backpressure-aware socket writes, command serialization, and lowered default Playwright timeout to 25s (configurable via `AGENT_BROWSER_DEFAULT_TIMEOUT`).\n- Fixed remote debugging (CDP) reconnection.\n- Fixed state load failing when no browser is running.\n- Fixed `--annotate` flag warning appearing when not explicitly passed via CLI.\n\n---\n\n## v0.13.0\n\n<p className=\"text-[#888] text-sm\">February 20, 2026</p>\n\n### New Features\n\n- **Diff commands** -- Compare snapshots, screenshots, and URLs between page states. Run visual pixel diffs against baseline images, compare accessibility tree snapshots with customizable depth and selectors, and diff two URLs side-by-side with optional screenshot comparison.\n\n```bash\nagent-browser diff snapshot\nagent-browser diff screenshot --baseline before.png\nagent-browser diff url https://staging.example.com https://prod.example.com\n```\n\n---\n\n## v0.12.0\n\n<p className=\"text-[#888] text-sm\">February 18, 2026</p>\n\n### New Features\n\n- **Annotated screenshots** -- `--annotate` flag overlays numbered labels on interactive elements and prints a legend mapping each label to its element ref. Enables multimodal AI models to reason about visual layout while using the same `@eN` refs for subsequent interactions. Also settable via `AGENT_BROWSER_ANNOTATE` env var.\n\n```bash\nagent-browser screenshot --annotate\n```\n\n---\n\n## v0.11.1\n\n<p className=\"text-[#888] text-sm\">February 18, 2026</p>\n\n### Documentation\n\n- Added documentation for command chaining with `&&` across README, CLI help output, docs, and skill files.\n\n---\n\n## v0.11.0\n\n<p className=\"text-[#888] text-sm\">February 17, 2026</p>\n\n### New Features\n\n- **Configuration file support** -- Automatic loading from user (`~/.agent-browser/config.json`) and project (`./agent-browser.json`) directories with priority-based merging.\n- **Profiler commands** -- Chrome DevTools profiling with `profiler start` and `profiler stop`.\n- **Browser extension loading** -- `--extension` flag to load browser extensions.\n- **Storage state management** -- `state save` and `state load` commands for auth state persistence.\n- **iOS device emulation** -- `--device` flag for device emulation.\n- **Enhanced click** -- `--new-tab` option for click commands.\n- **Enhanced find** -- Additional actions and filtering options.\n- **CDP WebSocket URLs** -- `--cdp` now accepts WebSocket URLs in addition to ports.\n\n---\n\n## v0.10.0\n\n<p className=\"text-[#888] text-sm\">February 13, 2026</p>\n\n### New Features\n\n- **Session persistence** - Automatic save/restore of cookies and localStorage across browser restarts using `--session-name` flag\n- **Encrypted state** - Optional AES-256-GCM encryption for saved session state data\n- **State management commands** - New commands for listing, showing, renaming, clearing, and cleaning up session state files\n- **New tab on click** - Added `--new-tab` option for click commands to open links in new tabs\n\n```bash\n# Persist session state\nagent-browser --session-name myapp open https://example.com\n\n# Manage saved states\nagent-browser state list\nagent-browser state show myapp\nagent-browser state clear myapp\n```\n\n---\n\n## v0.9.4\n\n<p className=\"text-[#888] text-sm\">February 13, 2026</p>\n\n### Bug Fixes\n\n- Fixed all Clippy lint warnings in the Rust CLI\n\n---\n\n## v0.9.3\n\n<p className=\"text-[#888] text-sm\">February 12, 2026</p>\n\n### Improvements\n\n- Added support for custom executable path in CLI browser launch options\n- Documentation site UI improvements including a new chat component with sheet-based interface\n\n---\n\n## v0.9.2\n\n<p className=\"text-[#888] text-sm\">February 10, 2026</p>\n\n### Improvements\n\n- Migrated documentation site to MDX for improved content authoring\n- Added AI-powered docs chat feature\n- Updated README with Homebrew installation instructions for macOS users\n\n---\n\n## v0.9.1\n\n<p className=\"text-[#888] text-sm\">February 5, 2026</p>\n\n### New Features\n\n- **`--allow-file-access` flag** - Enable opening and interacting with local `file://` URLs (PDFs, HTML files) by passing Chromium flags that allow JavaScript access to local files\n- **`-C`/`--cursor` flag for snapshots** - Include cursor-interactive elements like divs with onclick handlers or `cursor:pointer` styles\n\n```bash\nagent-browser --allow-file-access open file:///path/to/document.pdf\nagent-browser snapshot -C\n```\n\n---\n\n## v0.9.0\n\n<p className=\"text-[#888] text-sm\">February 3, 2026</p>\n\n### New Features\n\n- **iOS Simulator support** - Mobile Safari testing via Appium with real device and simulator support\n\n```bash\n# List available iOS simulators\nagent-browser device list\n\n# Launch on iOS device\nagent-browser -p ios --device \"iPhone 16 Pro\" open https://example.com\n\n# Touch interactions\nagent-browser tap @e1\nagent-browser swipe up\n```\n\n---\n\n## v0.8.10\n\n<p className=\"text-[#888] text-sm\">February 2, 2026</p>\n\n### Improvements\n\n- Added `--stdin` flag for eval command to read JavaScript from stdin, enabling heredoc usage for multiline scripts\n- Fixed binary permission issues on macOS/Linux when postinstall scripts don't run\n\n---\n\n## v0.8.9\n\n<p className=\"text-[#888] text-sm\">February 2, 2026</p>\n\n### Improvements\n\n- Added `--stdin` flag for eval command to read JavaScript from stdin\n\n---\n\n## v0.8.8\n\n<p className=\"text-[#888] text-sm\">February 2, 2026</p>\n\n### Improvements\n\n- Added base64 encoding support for the eval command with `-b`/`--base64` flag to avoid shell escaping issues\n- Updated documentation with AI agent setup instructions\n\n---\n\n## v0.8.7\n\n<p className=\"text-[#888] text-sm\">February 2, 2026</p>\n\n### Bug Fixes\n\n- Fixed browser launch options not being passed correctly when using persistent profiles\n- Added pre-flight checks for socket path length limits and directory write permissions\n- Improved error handling to properly exit with failure status when browser launch fails\n\n---\n\n## v0.8.6\n\n<p className=\"text-[#888] text-sm\">January 31, 2026</p>\n\n### Bug Fixes\n\n- Improved daemon connection reliability with automatic retry logic for transient errors\n- CLI now cleans up stale socket and PID files before starting a new daemon\n\n---\n\n## v0.8.5\n\n<p className=\"text-[#888] text-sm\">January 29, 2026</p>\n\n### Bug Fixes\n\n- Fixed version synchronization to automatically update Cargo.lock alongside Cargo.toml during releases\n- Made the CLI binary executable in the npm package\n\n---\n\n## v0.8.4\n\n<p className=\"text-[#888] text-sm\">January 27, 2026</p>\n\n### Bug Fixes\n\n- Fixed \"Daemon not found\" error when running through AI agents by resolving symlinks in the executable path\n\n---\n\n## v0.8.3\n\n<p className=\"text-[#888] text-sm\">January 27, 2026</p>\n\n### Improvements\n\n- Replaced shell-based CLI wrappers with a cross-platform Node.js wrapper to enable npx support on Windows\n- Added postinstall logic to patch npm bin entry on global installs for zero-overhead native binary invocation\n- Added CI tests to verify global installation across all platforms\n\n---\n\n## v0.8.2\n\n<p className=\"text-[#888] text-sm\">January 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed the Windows CMD wrapper to use the native binary directly instead of routing through Node.js\n- Added retry logic to CI install command for transient browser installation failures\n\n---\n\n## v0.8.1\n\n<p className=\"text-[#888] text-sm\">January 26, 2026</p>\n\n### Improvements\n\n- Improved release workflow to validate binary file sizes and ensure binaries are executable after npm install\n- Updated documentation site with a new mobile navigation system\n\n---\n\n## v0.8.0\n\n<p className=\"text-[#888] text-sm\">January 26, 2026</p>\n\n### New Features\n\n- **Kernel cloud browser provider** - Connect to Kernel (kernel.sh) for remote browser infrastructure with stealth mode and persistent profiles\n\n```bash\n# Via -p flag\nagent-browser -p kernel open https://example.com\n\n# Via environment variable\nexport AGENT_BROWSER_PROVIDER=kernel\nexport KERNEL_API_KEY=your-api-key\nagent-browser open https://example.com\n\n# With persistent profile\nexport KERNEL_PROFILE_NAME=my-profile\nagent-browser open https://example.com\n```\n\n- **Ignore HTTPS certificate errors** - New flag for working with self-signed certificates and development environments\n\n```bash\nagent-browser --ignore-https-errors open https://localhost:3000\n```\n\n- **Enhanced cookie management** - Extended `cookies set` command with additional flags for setting cookies before page load\n\n```bash\nagent-browser cookies set session_id \"abc123\" --url https://app.example.com --httpOnly --secure\nagent-browser cookies set token \"xyz\" --domain .example.com --path /api --expires 1735689600\n```\n\n### Bug Fixes\n\n- Fixed tab list command not recognizing new pages opened via clicks or `target=\"_blank\"` links\n- Fixed `check` command hanging indefinitely\n- Fixed `set device` not applying deviceScaleFactor - HiDPI screenshots now work correctly\n- Fixed state load and profile persistence not working in v0.7.6\n- Screenshots now save to temp directory when no path is provided\n\n### Security\n\n- Daemon and stream server now reject cross-origin connections\n\n---\n\n## v0.7.1\n\n<p className=\"text-[#888] text-sm\">January 23, 2026</p>\n\n### Bug Fixes\n\n- **Fix native binary distribution** - Native binaries for all platforms (Linux x64/arm64, macOS x64/arm64, Windows x64) are now included in the npm package. Previously, the release workflow published to npm before building binaries, causing \"No binary found\" errors on installation.\n\n---\n\n## v0.7.0\n\n<p className=\"text-[#888] text-sm\">January 23, 2026</p>\n\n### New Features\n\n- **Cloud browser providers** - Connect to Browserbase or Browser Use for remote browser infrastructure\n\n```bash\n# Via -p flag (recommended)\nagent-browser -p browserbase open https://example.com\nagent-browser -p browseruse open https://example.com\n\n# Via environment variable\nexport AGENT_BROWSER_PROVIDER=browserbase\nagent-browser open https://example.com\n```\n\n- **Persistent browser profiles** - Store cookies, localStorage, and login sessions across browser restarts\n\n```bash\nagent-browser --profile ~/.myapp-profile open myapp.com\n# Login persists across restarts\n```\n\n- **Remote CDP WebSocket URLs** - Connect to remote browser services via WebSocket\n\n```bash\nagent-browser --cdp \"wss://browser-service.com/cdp?token=...\" snapshot\n```\n\n- **`download` command** - Trigger downloads and wait for completion\n\n```bash\nagent-browser download @e1 ./file.pdf\nagent-browser wait --download ./output.zip --timeout 30000\n```\n\n- **Browser launch configuration** - Fine-grained control over browser startup\n\n```bash\nagent-browser --args \"--disable-gpu,--no-sandbox\" open example.com\nagent-browser --user-agent \"Custom UA\" open example.com\nagent-browser --proxy-bypass \"localhost,*.internal\" open example.com\n```\n\n- **Enhanced skills** - Hierarchical structure with references and templates for Claude Code\n\n### Bug Fixes\n\n- Screenshot command now supports refs and has improved error messages\n- WebSocket URLs work in `connect` command\n- Fixed socket file location (uses `~/.agent-browser` instead of TMPDIR)\n- Windows binary path fix (.exe extension)\n- State load and path-based actions now show correct output messages\n\n### Documentation\n\n- Added Claude Code marketplace plugin installation instructions\n- Updated skill documentation with references and templates\n- Improved error documentation\n\n---\n\n## v0.6.0\n\n<p className=\"text-[#888] text-sm\">January 18, 2026</p>\n\n### New Features\n\n- **Video recording** - Record browser sessions to WebM using Playwright's native recording\n\n```bash\nagent-browser record start ./demo.webm\nagent-browser click @e1\nagent-browser record stop\n```\n\n- **`connect` command** - Connect to a browser via CDP and persist the connection for subsequent commands\n\n```bash\nagent-browser connect 9222\nagent-browser snapshot # No --cdp needed after connect\n```\n\n- **`--proxy` flag** - Configure browser proxy with optional authentication\n\n```bash\nagent-browser --proxy http://user:pass@proxy.com:8080 open example.com\n```\n\n- **`get styles` command** - Extract computed styles from elements\n\n```bash\nagent-browser get styles \"button\"\n```\n\n- **Claude marketplace plugin** - Added `.claude-plugin/marketplace.json` for Claude Code integration\n- **Enhanced network output** - `network requests` now shows method, URL, and resource type\n- **`--version` flag** - Display CLI version\n\n### Bug Fixes\n\n- Fix Windows daemon startup and port calculation\n- Support `libasound2t64` on newer Ubuntu versions (24.04+)\n- Prevent CDP timeout on empty URL tabs\n- Output screenshot as base64 when no path provided\n- Resolve refs in `get value` command\n- Support URL parameter in `tab new` command\n- Allow `about:`, `data:`, and `file:` URL schemes\n- Detect stale unix socket by attempting connection\n- Respect `AGENT_BROWSER_HEADED` environment variable\n- Handle SIGPIPE to prevent panic when piping to `head`/`tail`\n- Fix null path validation in screenshot command\n\n### Protocol Alignment\n\nThese changes align the CLI with the daemon protocol for consistency:\n\n- `select` command now uses `values` field (supports multiple selections)\n- `frame main` uses `mainframe` action\n- `mouse wheel` uses `wheel` action\n- `set media` uses `emulatemedia` action\n- Console output uses `messages` field\n\n### Documentation\n\n- Expanded SKILL.md with comprehensive command reference\n- Updated README with new commands and options\n- Updated CDP mode documentation with `connect` workflow\n"
|
||
},
|
||
"docs/src/app/changelog/layout.tsx": {
|
||
"sha256": "87552536c8e24aeff75d052089bdabc99a4487ac9acaf9e5a37bcca72224dec1",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"changelog\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/commands/page.mdx": {
|
||
"sha256": "1fc7444d202ebe41f008b120dd530e21734f3a33adf1d6671ed2a6707a24985c",
|
||
"raw": "# Commands\n\n## Core\n\n```bash\nagent-browser open # Launch browser (no nav); stays on about:blank\nagent-browser open <url> # Launch + navigate (aliases: goto, navigate)\nagent-browser read [url] # Fetch agent-readable text, or read rendered active-tab DOM\nagent-browser click <sel> # Click element (--new-tab to open in new tab)\nagent-browser dblclick <sel> # Double-click\nagent-browser fill <sel> <text> # Clear and fill\nagent-browser type <sel> <text> # Type into element\nagent-browser press <key> # Press key (Enter, Tab, Control+a) (alias: key)\nagent-browser keyboard type <text> # Type at current focus (no selector needed)\nagent-browser keyboard inserttext <text> # Insert text without key events\nagent-browser keydown <key> # Hold key down\nagent-browser keyup <key> # Release key\nagent-browser hover <sel> # Hover element\nagent-browser focus <sel> # Focus element\nagent-browser select <sel> <val> # Select dropdown by value or visible label\nagent-browser check <sel> # Check checkbox\nagent-browser uncheck <sel> # Uncheck checkbox\nagent-browser scroll <dir> [px] # Scroll (up/down/left/right, --selector <sel>)\nagent-browser scrollintoview <sel> # Scroll element into view\nagent-browser drag <src> <dst> # Drag and drop\nagent-browser upload <sel> <files> # Upload files\nagent-browser screenshot [path] # Screenshot (--full for full page)\nagent-browser screenshot --annotate # Annotated screenshot with numbered element labels\nagent-browser screenshot --if-changed # Recommended: skip unchanged images to save tokens\nagent-browser screenshot --threshold 0.01 # Ignore changes affecting at most 1% of pixels\nagent-browser screenshot --screenshot-dir ./shots # Save to custom directory\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80\nagent-browser pdf <path> # Save page as PDF\nagent-browser snapshot # Accessibility tree with refs\nagent-browser eval <js> # Run JavaScript\nagent-browser connect <port|url> # Connect to browser via CDP\nagent-browser stream enable [--port <port>] # Start runtime WebSocket streaming\nagent-browser webmcp list # List experimental page tools\nagent-browser webmcp invoke <tool> --params @input.json\nagent-browser stream status # Show runtime streaming state and bound port\nagent-browser stream disable # Stop runtime WebSocket streaming\nagent-browser close # Close browser (aliases: quit, exit)\nagent-browser close --all # Close all active sessions\nagent-browser mcp # Start an MCP stdio server\n```\n\nBrowser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain only names, brief descriptions, origins, and frame IDs. Choose a relevant tool, then fetch its full schema with `agent-browser webmcp list <tool> --frame <frame-id> --json` before invoking it. Schemas and annotations are never included proactively. Unchanged catalogs and pages without tools add no context. JSON exposes updates as `data.webmcp`; CLI and MCP text include the same bounded summary. See [WebMCP](/webmcp) for update semantics and security.\n\nClicks fail before dispatch when another element covers the target's click point. The error names the covering element, for example `covered by <div#consent-banner>`. Dismiss or interact with that element, take a fresh snapshot, then retry the original action.\n\nHeadless Chromium screenshots hide native scrollbars for consistent image output. Pass `--hide-scrollbars false` when launching to keep native scrollbars visible.\n\n## Get info\n\n```bash\nagent-browser get text <sel> # Get text content\nagent-browser get html <sel> # Get innerHTML\nagent-browser get value <sel> # Get input value\nagent-browser get attr <sel> <attr> # Get attribute\nagent-browser get title # Get page title\nagent-browser get url # Get current URL\nagent-browser get cdp-url # Get CDP WebSocket URL\nagent-browser get count <sel> # Count matching elements\nagent-browser get box <sel> # Get bounding box\nagent-browser get styles <sel> # Get computed styles\n```\n\n## Read agent-friendly text\n\n```bash\nagent-browser read\nagent-browser read https://example.com/article\nagent-browser read https://example.com/article --filter overview\nagent-browser read https://example.com/article --outline\nagent-browser read https://docs.example.com --llms index --filter auth\nagent-browser read https://docs.example.com --llms full --filter auth\nagent-browser read example.com/article --require-md\nagent-browser read https://example.com/article --json\n```\n\n`read` fetches a URL without launching Chrome. Omit the URL to read the rendered DOM of the active tab in the current browser session, including browser auth state and client-side updates. Explicit URL reads send `Accept: text/markdown` by default, try the same URL with `.md` appended when the first response is not markdown, walk ancestor paths toward `/` to find the nearest `llms.txt` for a matching docs link, print markdown or plain text when available, and fall back to readable text extracted from HTML. `--llms` and `--require-md` with no URL use the active tab URL because they depend on HTTP resources. `read` does not read `llms-full.txt` unless you ask for it.\n\nOptions: `--raw` prints the response body without HTML extraction, `--require-md` fails unless the server returns `Content-Type: text/markdown`, `--outline` prints a compact heading outline for one page, `--llms index` prints a compact nearest-ancestor `llms.txt` link list, `--llms full` reads the nearest-ancestor `llms-full.txt`, `--filter <text>` narrows page sections, llms links/sections, or outline headings, and `--timeout <ms>` changes the request timeout. Global safeguards such as `--allowed-domains`, `--content-boundaries`, and `--max-output` also apply to read fetches and output.\n\n## Check state\n\n```bash\nagent-browser is visible <sel> # Check if visible\nagent-browser is enabled <sel> # Check if enabled\nagent-browser is checked <sel> # Check if checked\n```\n\n## Find elements\n\nSemantic locators with actions (`click`, `fill`, `check`, `hover`, `text`):\n\n```bash\nagent-browser find role <role> <action> [value]\nagent-browser find text <text> <action> [value]\nagent-browser find label <label> <action> [value]\nagent-browser find placeholder <ph> <action> [value]\nagent-browser find alt <text> <action> [value]\nagent-browser find title <text> <action> [value]\nagent-browser find testid <id> <action> [value]\nagent-browser find first <sel> <action> [value]\nagent-browser find last <sel> <action> [value]\nagent-browser find nth <n> <sel> <action> [value]\n```\n\nOptions:\n\n- `--name <name>`: filter role by accessible name\n- `--exact`: exact, case-sensitive match. For `role` it applies to the accessible name, whose default is a case-insensitive substring.\n\nExamples:\n\n```bash\nagent-browser find role button click --name \"Submit\"\nagent-browser find role heading text --name \"Skills\" # implicit roles work: <h2>=heading, <ul>=list, top-level <header>=banner\nagent-browser find label \"Email\" fill \"test@test.com\"\nagent-browser find alt \"Logo\" click\nagent-browser find first \".item\" click\nagent-browser find last \".item\" text\nagent-browser find nth 2 \".card\" hover\n```\n\n## Wait\n\n```bash\nagent-browser wait <selector> # Wait for element\nagent-browser wait <ms> # Wait for time\nagent-browser wait --text \"Welcome\" # Wait for text (substring match)\nagent-browser wait --url \"**/dash\" # Wait for URL pattern\nagent-browser wait --load domcontentloaded # Wait for DOMContentLoaded\nagent-browser wait --load load # Wait for the load event\nagent-browser wait --load networkidle # Use only for pages known to become quiet\nagent-browser wait --fn \"condition\" # Wait for JS condition\nagent-browser wait --download [path] # Wait for download\nagent-browser wait --fn \"!document.body.innerText.includes('Loading...')\" # Wait for text to disappear\nagent-browser wait \"#spinner\" --state hidden # Wait for element to disappear\n```\n\nAfter a page change, prefer a selector, text, URL, or JavaScript condition that represents the state you need. Use `networkidle` only when the page is known to become quiet, because SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Downloads\n\n```bash\nagent-browser download <sel> <path> # Click element to trigger download\nagent-browser wait --download [path] # Wait for any download to complete\n```\n\nUse `--download-path <dir>` (or `AGENT_BROWSER_DOWNLOAD_PATH` env) to set a default download directory. Without it, downloads go to a temporary directory that is deleted when the browser closes.\n\nSee [Files & Clipboard](/files) for upload, download, local file, screenshot, PDF, and clipboard workflows.\n\n## Mouse\n\n```bash\nagent-browser mouse move <x> <y> # Move mouse instantly\nagent-browser mouse move 600 400 --duration 250 --steps 24\nagent-browser mouse move 600 400 --human --seed 42\nagent-browser mouse down [button] # Press button\nagent-browser mouse up [button] # Release button\nagent-browser mouse wheel <dy> [dx] # Scroll wheel\n```\n\nUse `--human` with `click`, `drag`, or `mouse move` for curved, eased movement from the current cursor position. For `mouse move`, `--duration` sets the target total milliseconds including browser response time, `--steps` sets the number of events, and `--seed` makes the path reproducible. A slow browser can still extend the requested duration.\n\n## Clipboard\n\n```bash\nagent-browser clipboard read # Read text from clipboard\nagent-browser clipboard write \"Hello, World!\" # Write text to clipboard\nagent-browser clipboard copy # Copy current selection (Ctrl+C)\nagent-browser clipboard paste # Paste from clipboard (Ctrl+V)\n```\n\nSee [Files & Clipboard](/files) for clipboard, upload, download, local file, screenshot, and PDF workflows.\n\n## Settings\n\n```bash\nagent-browser set viewport <w> <h> [scale] # Set viewport size (scale for retina, e.g. 2)\nagent-browser set device <name> # Emulate device (\"iPhone 14\")\nagent-browser set geo <lat> <lng> # Set geolocation\nagent-browser set offline [on|off] # Toggle offline mode\nagent-browser set headers <json> # Extra HTTP headers\nagent-browser set credentials <u> <p> # HTTP basic auth for current and future tabs\nagent-browser set media [dark|light] # Emulate color scheme (persists for session)\n```\n\nUse `--color-scheme` for persistent dark/light mode across all commands:\n\n```bash\nagent-browser --color-scheme dark open https://example.com\n```\n\n## Cookies & storage\n\n```bash\nagent-browser cookies # Get all cookies\nagent-browser cookies set <name> <val> # Set cookie\nagent-browser cookies clear # Clear cookies\n\nagent-browser storage local # Get all localStorage\nagent-browser storage local <key> # Get specific key\nagent-browser storage local set <k> <v> # Set value\nagent-browser storage local clear # Clear all\n\nagent-browser storage session # Same for sessionStorage\n```\n\n## Network\n\n```bash\nagent-browser network route <url> # Intercept requests\nagent-browser network route <url> --abort # Block requests\nagent-browser network route <url> --body <json> # Mock response\nagent-browser network route '*' --abort --resource-type script # Block scripts only\nagent-browser network unroute [url] # Remove routes\nagent-browser network requests # View tracked requests\nagent-browser network requests --clear # Clear request log\nagent-browser network requests --filter <pat> # Filter by URL pattern\nagent-browser network requests --type xhr,fetch # Filter by resource type\nagent-browser network requests --method POST # Filter by HTTP method\nagent-browser network requests --status 2xx # Filter by status (200, 2xx, 400-499)\nagent-browser network request <requestId> # View full request/response detail\nagent-browser network har start # Start HAR recording (embeds text response bodies)\nagent-browser network har start --content all # Embed all response bodies (binary as base64)\nagent-browser network har start --content none # Metadata only, no bodies\nagent-browser network har stop [output.har] # Stop and save HAR (temp path if omitted)\n```\n\nSee [Network](/network) for pre-navigation routing, request filters, HAR export, and SSR/no-JavaScript debugging.\n\n## Tabs & frames\n\n```bash\nagent-browser tab # List tabs (each row shows tabId and label)\nagent-browser tab new [url] # New tab\nagent-browser tab new --label docs [url] # New tab with a user-assigned label\nagent-browser tab <t<N>|label> # Switch to a tab by id or label\nagent-browser tab close [t<N>|label] # Close a tab (defaults to active)\nagent-browser window new # Open new browser window\nagent-browser frame <sel> # Switch to iframe by CSS selector\nagent-browser frame @e3 # Switch to iframe by element ref\nagent-browser frame main # Back to main frame\n```\n\n### Stable tab ids and labels\n\nTab ids are stable strings of the form `t1`, `t2`, `t3`. They're never reused within a session, so `t2` keeps pointing at the same tab even as other tabs are opened or closed. The `t` prefix mirrors the `@e1` element-ref convention and is not interchangeable with positional integers — `agent-browser tab 2` errors with a teaching message; use `t2`.\n\nYou can also assign a memorable label (`docs`, `app`, `admin`) at tab-creation time and use it anywhere an id is accepted:\n\n```bash\nagent-browser tab new --label docs https://docs.example.com\nagent-browser tab docs # switch to the docs tab\nagent-browser snapshot # populate refs for docs\nagent-browser click @e3 # click uses docs's refs\nagent-browser tab close docs # close by label\n```\n\nLabels are never auto-generated and never rewritten on navigation — an agent that names a tab `docs` keeps that name until the tab is closed. Labels are unique within a session; creating a second tab with an existing label errors.\n\nTabs opened through `tab new` or `click --new-tab` inherit the session's setup before their first document loads: user agent, `set headers`, `set credentials`, origin-scoped `--headers`, init scripts, `route` rules, and emulation overrides (color scheme, timezone, locale, geolocation, offline). Turning offline mode off or setting headers to `{}` restores the default setup for future tabs.\n\n`tab list --json` also reports each tab's CDP `targetId`, and target ids are accepted anywhere a tab ref is accepted (`tab <targetId>`, `tab close <targetId>`). Unlike `t<N>` ids, which are per-daemon counters, target ids stay stable across daemon restarts. Each session is bound to its active tab by target id and returns to it after a daemon restart; with `--pin-tab` the binding is strict and a closed bound tab produces a `tab_gone` error instead of a silent fallback. JSON errors include <code>code: \"tab_gone\"</code>, <code>data.targetId</code>, and optional sanitized <code>data.lastUrl</code>. Batch output carries the recovery object under <code>result</code>. See [CDP Mode](/cdp-mode) for the multi-session workflow.\n\nRefs (`@e1`, etc.) are scoped to the tab that was active when the snapshot ran, so switch tabs first, then snapshot and interact:\n\n```bash\nagent-browser tab docs # switch first\nagent-browser snapshot # refs for docs\nagent-browser click @e3 # uses docs's refs\n```\n\n### Discarded tab revival\n\nBrowsers discard background tabs to save memory, leaving a tab with no renderer to drive. Switching to a discarded tab reactivates it, which reloads the page and resets its unsaved state; the switch result adds `\"revived\": true` so the reload is visible rather than silent. A tab whose page is paused by a JavaScript dialog is alive rather than discarded: the switch leaves it untouched and adds `\"dialogBlocked\": true`. Resolve the dialog with `dialog accept` or `dialog dismiss` and the tab keeps its state. Closing the active tab onto a discarded successor revives it the same way and reports `\"activeTabRevived\": true`.\n\n### Snapshot deltas\n\n```bash\nagent-browser snapshot --delta\nagent-browser snapshot --delta --full\n```\n\n`snapshot --delta` returns `full`, `unchanged`, or incremental updates per tab and option set. URL changes or large deltas return full state; `--full` resets the baseline. Apply a delta’s `changes` to ref metadata and `treeChange` to the previous tree: split on newlines, replace `deleteCount` lines at zero-based `startLine` with `lines`, then rejoin. Apply both to `baseRevision` before advancing to `revision`.\n\n### Iframe support\n\nIframes are detected automatically during snapshots. `Iframe` nodes are resolved and their content is inlined beneath the iframe element in the snapshot output. Refs assigned to elements inside iframes carry frame context, so `click`, `fill`, and other interactions work without manually switching frames.\n\n```bash\nagent-browser snapshot -i\n# @e3 [Iframe] \"payment-frame\"\n# @e4 [input] \"Card number\"\n# @e5 [button] \"Pay\"\n\n# Interact directly using refs — no frame switch needed\nagent-browser fill @e4 \"4111111111111111\"\nagent-browser click @e5\n\n# Or switch frame context for scoped snapshots\nagent-browser frame @e3\nagent-browser snapshot -i # Only elements inside that iframe\nagent-browser frame main # Return to main frame\n```\n\nThe `frame` command accepts element refs (`@e3`), CSS selectors (`\"#my-iframe\"`), or frame name/URL.\n\n## Dialogs\n\n```bash\nagent-browser dialog accept [text] # Accept dialog (with optional prompt text)\nagent-browser dialog dismiss # Dismiss dialog\nagent-browser dialog status # Check if a dialog is currently open\n```\n\nBy default, `alert` and `beforeunload` dialogs are automatically accepted so they never block the agent. `confirm` and `prompt` dialogs still require explicit handling. Use `--no-auto-dialog` (or `AGENT_BROWSER_NO_AUTO_DIALOG=1`) to disable automatic handling.\n\nWhen a JavaScript dialog (`alert`, `confirm`, `prompt`) is pending, all command responses include a `warning` field with the dialog type and message.\n\n## Streaming\n\n```bash\nagent-browser stream enable # Start runtime WebSocket streaming on an auto-selected port\nagent-browser stream enable --port 9223 # Bind a specific localhost port\nagent-browser stream status # Show enabled state, port, browser connection, screencasting\nagent-browser stream disable # Stop runtime streaming and remove the .stream metadata file\n```\n\nStreaming is enabled automatically for all sessions. Use these commands to check status, re-enable on a specific port, or disable streaming.\n\nStreaming is separate from file-based recordings. Use [Video Recording](/recording) when you need a saved WebM or MP4 artifact.\n\n## Debug\n\n```bash\nagent-browser trace start # Start trace\nagent-browser trace stop [path] # Stop and save trace\nagent-browser profiler start # Start Chrome DevTools profiling\nagent-browser profiler stop [path] # Stop and save profile (.json)\nagent-browser record start <path> # Start video recording (.webm/.mp4, 30 fps; needs ffmpeg)\nagent-browser record start <path> --fps 60 # Record at 60 fps (--fps accepts 1-60)\nagent-browser record start <path> --cursor # Include an animated mouse pointer\nagent-browser record start <path> --contact-sheet # Also save a timestamped PNG summary\nagent-browser record start <path> --contact-sheet-threshold 0.02 # Tune changed-frame selection\nagent-browser record stop # Stop and save video\nagent-browser record restart <path> # Stop current and start new recording\nagent-browser console # View console messages\nagent-browser console --json # JSON output with raw CDP args\nagent-browser console --clear # Clear console log\nagent-browser errors # View page errors\nagent-browser errors --clear # Clear error log\nagent-browser highlight <sel> # Highlight element\nagent-browser inspect # Open Chrome DevTools for the active page\n```\n\nRecording requires `ffmpeg` on `PATH`. See [Debugging](/debugging) for console, error, dialog, trace, highlight, and DevTools workflows. See [Video Recording](/recording) for recording requirements and `record` workflows, and [Profiler](/profiler) for performance profiles.\n\n## Auth vault\n\n```bash\nagent-browser auth save <name> [opts] # Save auth profile\nagent-browser auth login <name> # Login using saved credentials\nagent-browser auth login <name> --no-navigate\n # Use active page after origin validation\nagent-browser auth login <name> --credential-provider <plugin> [--item <ref>] [--url <url>]\n # Resolve credentials from plugin\nagent-browser auth login <name> --username-selector <s> --password-selector <s> [--submit-selector <s>]\n # Override selectors for one login\nagent-browser auth list # List saved profiles (names and URLs only)\nagent-browser auth show <name> # Show profile metadata (no passwords)\nagent-browser auth delete <name> # Delete a saved profile\nagent-browser plugin add <ref> # Add a plugin from npm or GitHub\nagent-browser plugin list # List configured plugins\nagent-browser plugin show <name> # Show one configured plugin\nagent-browser plugin run <name> <type> --payload <json>\n # Run an arbitrary plugin request\n```\n\nSave options:\n\n- `--url <url>`: login page URL (required)\n- `--username <user>`: username (required)\n- `--password <pass>`: password (required unless `--password-stdin`)\n- `--password-stdin`: read password from stdin (recommended to avoid shell history exposure)\n- `--username-selector <sel>`: custom CSS selector for username field\n- `--password-selector <sel>`: custom CSS selector for password field\n- `--submit-selector <sel>`: custom CSS selector for submit button\n\n`auth login` filters matching controls by their layout size, computed visibility and opacity, and disabled/readonly state, including custom CSS selectors. If a selected credential field is replaced or redirects focus before entry, the command fails without submitting.\n\n`auth login` navigates with `load` and then waits for the username/password/submit selectors to appear before interacting. This improves reliability on SPA login pages where fields render after initial page load.\n\nUse `--no-navigate` after an in-page click, challenge clearance, consent dismissal, or other stateful setup that must survive credential entry:\n\n```bash\nagent-browser open https://example.com/\nagent-browser click \"a[href='/login']\"\nagent-browser auth login work --no-navigate\n```\n\nThe flag suppresses only the initial auth-login navigation. It requires an existing active top-level HTTP(S) page and compares that page with the effective credential URL by scheme, host, and effective port. Paths, queries, and fragments may differ. Waiting, filling, clicking submit, and any submit-triggered navigation are unchanged. A command-level `--url` overrides profile or provider URL metadata and acts as the expected-origin constraint rather than a navigation destination.\n\nPlugin login options:\n\n- `--credential-provider <plugin>`: resolve credentials from a configured plugin\n- `--item <ref>`: provider-specific vault item reference\n- `--url <url>`: login URL override\n- `--no-navigate`: use the active top-level page after validating it against the effective credential origin\n- `--username-selector <sel>`: selector override for this login\n- `--password-selector <sel>`: selector override for this login\n- `--submit-selector <sel>`: selector override for this login\n\nCredential provider plugins run out-of-process over the `agent-browser.plugin.v1` stdio JSON protocol. They return credentials to the daemon for a single login and agent-browser does not save those credentials locally.\n\nOther plugin capabilities use the same protocol:\n\n- `browser.provider`: use the plugin with `--provider <name>` to return a CDP WebSocket URL\n- `launch.mutate`: append local launch args, extensions, or init scripts before Chrome starts\n- `command.run`: run arbitrary namespaced requests through `agent-browser plugin run`\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths.\n\n```bash\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\nagent-browser auth login github\nagent-browser plugin add agent-browser-plugin-vault --name vault\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\nagent-browser --provider cloud-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\nagent-browser auth list\n```\n\n## Confirmation\n\nWhen `--confirm-actions` is set, certain action categories return a `confirmation_required` response instead of executing immediately. Use `confirm` or `deny` to approve or reject the action.\n\n```bash\nagent-browser confirm <confirmation-id> # Approve a pending action\nagent-browser deny <confirmation-id> # Deny a pending action\n```\n\nPending confirmations auto-deny after 60 seconds.\n\n```bash\nagent-browser --confirm-actions eval,download eval \"document.title\"\n# Returns confirmation_required with ID\nagent-browser confirm c_8f3a1234\n```\n\n## State management\n\n```bash\nagent-browser state save <path> # Save auth state to file\nagent-browser state load <path> # Load auth state from file\nagent-browser state list # List saved state files\nagent-browser state show <file> # Show state summary\nagent-browser state rename <old> <new> # Rename state file\nagent-browser state clear [name] # Clear states for session name\nagent-browser state clear --all # Clear all saved states\nagent-browser state clean --older-than <days> # Delete old states\n```\n\n## Sessions\n\n```bash\nagent-browser session # Show current session name\nagent-browser session list # List active sessions\n```\n\n## Chrome profiles\n\n```bash\nagent-browser profiles # List available Chrome profiles\nagent-browser profiles --json # List profiles as JSON\nagent-browser --profile Default open https://gmail.com # Reuse a profile's login state\n```\n\n## Dashboard\n\n```bash\nagent-browser dashboard [start] # Start the dashboard server (default port: 4848)\nagent-browser dashboard start --port <n> # Start on a specific port\nagent-browser dashboard start --allowed-origins <origins> # Allow exact HTTPS reverse-proxied browser origins\nagent-browser dashboard stop # Stop the dashboard server\n```\n\nLoopback dashboard origins are accepted by default without an access token. For a reverse-proxied or forwarded URL, pass its exact browser origin with `--allowed-origins` or set `AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS`. Every configured origin must be a valid exact HTTPS origin. Ports must be integers from 1 to 65535. Unknown options, missing values, invalid ports, and malformed origins fail without starting the server. The command prints private tokenized access URLs only for external origins; open the matching URL once to establish the browser session and do not share it. Open the normal `http://localhost:<port>` URL for local access. The browser stays on the dashboard origin; per-session tabs, status, and stream traffic are proxied internally, so session ports do not need to be exposed. Stop the running dashboard before changing the port or allowed origins.\n\n## Doctor\n\nDiagnose your install, auto-clean stale daemon files, and optionally repair common problems.\n\n```bash\nagent-browser doctor # Full diagnosis (env, Chrome, daemons, config, providers, network, launch test)\nagent-browser doctor --offline --quick # Local-only, fastest\nagent-browser doctor --fix # Also run destructive repairs (reinstall Chrome, purge old state, ...)\nagent-browser doctor --webgpu # Also run a live WebGPU render probe (see the WebGPU page)\nagent-browser doctor --json # Structured JSON output for agents\n```\n\nExit code is `0` if all checks pass (warnings are fine), `1` if any fail. See the [Installation page](/installation#doctor) for the full check catalog.\n\n## Chat\n\nUse natural language to control the browser via AI. The `chat` command translates instructions into agent-browser commands, executes them, and streams the AI response. Requires `AI_GATEWAY_API_KEY` to be set.\n\n```bash\nagent-browser chat \"open google.com and search for cats\" # Single-shot instruction\nagent-browser chat # Interactive REPL (type quit to exit)\necho \"summarize this page\" | agent-browser chat # Piped input\nagent-browser -q chat \"summarize this page\" # Quiet: text only, no tool calls shown\nagent-browser -v chat \"fill in the login form\" # Verbose: show commands and their output\nagent-browser --model openai/gpt-4o chat \"take a screenshot\" # Override the default AI model\nagent-browser --json chat \"open example.com\" # Structured JSON output\n```\n\nChat-specific options:\n\n```bash\n--model <name> # AI model (or AI_GATEWAY_MODEL env, default: anthropic/claude-sonnet-4.6)\n-v, --verbose # Show tool commands and their raw output\n-q, --quiet # Show only the AI text response (hide tool calls)\n```\n\n## Navigation\n\n```bash\nagent-browser back # Go back\nagent-browser forward # Go forward\nagent-browser reload # Reload page\nagent-browser pushstate <url> # SPA client-side nav; auto-detects window.next.router.push,\n # falls back to history.pushState + popstate\n```\n\n## Pre-navigation setup\n\nSome flows need routes, cookies, or init scripts configured *before* the first navigation (SSR debug, auth on protected origins, etc.). `open` without a URL launches the browser but stays on `about:blank`, leaving room to stage state. `batch` makes it one CLI invocation:\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\n## React / Web Vitals\n\nReact commands require `--enable react-devtools` at launch (installs the React DevTools hook before any page JS runs). `vitals` and `pushstate` work on any site.\n\n```bash\nagent-browser open --enable react-devtools <url> # Launch with React hook installed\nagent-browser react tree # Full component tree\nagent-browser react inspect <fiberId> # Inspect one component\nagent-browser react renders start # Begin fiber render recording\nagent-browser react renders stop [--json] # Stop + print profile\nagent-browser react suspense [--only-dynamic] [--json] # Suspense boundaries + classifier\n # --only-dynamic hides the \"static\" list\nagent-browser vitals [url] [--json] # LCP/CLS/TTFB/FCP/INP + hydration\n```\n\nWorks on any React app (Next.js, Remix, Vite+React, CRA, TanStack Start, React Native Web, etc.). `vitals` and `pushstate` are framework-agnostic.\n\nSee [React & Web Vitals](/react) for full command details and examples.\n\n## Accessibility audits\n\nRun an embedded axe-core audit against the current page or navigate to a URL first. The vendored engine works without a CDN request and runs under strict page CSP. It runs private partial audits across the page's frame tree and merges serialized results without page messaging, so page-provided `window.axe` values remain intact and iframe violations retain their frame selector paths. Accessibility audits require a CDP browser and are not available with Safari or iOS WebDriver sessions.\n\n```bash\nagent-browser a11y # Audit the current page\nagent-browser a11y https://example.com # Navigate, then audit\nagent-browser a11y --tags wcag2a,wcag2aa # Filter by axe rule tags\nagent-browser a11y --selector \"#main\" # Scope to a subtree\nagent-browser a11y https://example.com --json # Structured results\n```\n\nThe default output lists violations and incomplete checks with impact, rule ID, fix guidance, and failing-node paths. JSON output preserves axe's `target` selector path arrays, including nested arrays for shadow DOM boundaries and multiple entries for frame boundaries.\n\n## Init scripts\n\n```bash\nagent-browser open --init-script <path> # Register before first navigation (repeatable)\nagent-browser addinitscript <js> # Register at runtime (returns identifier)\nagent-browser removeinitscript <identifier> # Remove from every tab in the session\n```\n\nSee [Init Scripts & Extensions](/init-scripts) for launch-time scripts, runtime scripts, built-in React DevTools, and extensions.\n\n## Global options\n\n```bash\n--session <name> # Isolated browser session\n--restore [name] # Auto-save/restore session state, defaults to --session\n--restore-save <policy> # Restore save policy: auto, always, never\n--namespace <name> # Isolate daemon sockets and restore-state directories\n--profile <path> # Persistent browser profile directory\n--state <path> # Load storage state from JSON file\n--headers <json> # HTTP headers scoped to URL's origin\n--executable-path <path> # Custom browser executable\n--extension <path> # Load browser extension (repeatable)\n--init-script <path> # Register a page init script before first navigation (repeatable)\n--enable <feature> # Built-in init scripts: react-devtools (repeatable or comma-list)\n--args <args> # Browser launch args (comma separated)\n--user-agent <ua> # Custom User-Agent string\n--proxy <url> # Proxy server URL\n--proxy-bypass <hosts> # Hosts to bypass proxy\n--ignore-https-errors # Ignore HTTPS certificate errors\n--ca-cert <path> # Trust a CA for locally launched Chromium on Linux\n--no-ca-cert # Clear CA trust retained by the running session\n--allow-file-access # Allow file:// URLs to access local files (Chromium only)\n--hide-scrollbars <bool> # Hide native scrollbars in headless Chromium screenshots\n-p, --provider <name> # Browser provider or configured provider plugin\n--device <name> # iOS device name (e.g., \"iPhone 15 Pro\")\n--json # JSON output (for scripts)\n--annotate # Annotated screenshot with numbered element labels\n--screenshot-dir <path> # Default screenshot output directory (or AGENT_BROWSER_SCREENSHOT_DIR)\n--screenshot-quality <n> # JPEG quality 0-100 (or AGENT_BROWSER_SCREENSHOT_QUALITY)\n--screenshot-format <fmt> # Format: png (default), jpeg (or AGENT_BROWSER_SCREENSHOT_FORMAT)\n--headed # Show browser window (not headless)\n--webgpu # Enable WebGPU (software Vulkan on Linux, no GPU needed)\n--no-webmcp # Disable default experimental WebMCP Chrome features (or AGENT_BROWSER_NO_WEBMCP env)\n--cdp <port|url> # Connect via CDP; root WebSocket query slash is optional\n--auto-connect # Auto-discover and connect to running Chrome\n--color-scheme <scheme> # Color scheme: dark, light, no-preference\n--download-path <path> # Default download directory\n--content-boundaries # Wrap page output in boundary markers for LLM safety\n--max-output <chars> # Truncate page output to N characters\n--allowed-domains <list> # Allowed domains; rejects restore/state replay, profile/session startup args, and direct-page providers\n--action-policy <path> # Path to action policy JSON file\n--confirm-actions <list> # Action categories requiring confirmation\n--confirm-interactive # Interactive confirmation prompts (auto-denies if stdin is not a TTY)\n--engine <name> # Browser engine: chrome (default), lightpanda, obscura (experimental)\n--input-mode <mode> # Pointer movement: instant (default), smooth, human\n--idle-timeout <time> # Auto-shutdown daemon after inactivity (default: 1h; 0 disables)\n--no-auto-dialog # Disable auto-accept for alert and beforeunload dialogs\n--model <name> # AI model for chat (or AI_GATEWAY_MODEL env)\n-v, --verbose # Show tool commands and their raw output (chat)\n-q, --quiet # Show only AI text responses (chat)\n--config <path> # Use a custom config file\n--debug # Debug output\n```\n\nSee [Configuration](/configuration) for config files and environment variables. See [Proxy](/proxy) for proxy server, bypass, and credential settings.\n\n## Batch execution\n\nExecute multiple commands in a single invocation. Commands can be passed as quoted arguments or piped as JSON via stdin.\n\n```bash\n# Argument mode: each quoted argument is a full command\nagent-browser batch \"open https://example.com\" \"snapshot -i\" \"screenshot\"\n\n# With --bail to stop on first error\nagent-browser batch --bail \"open https://example.com\" \"click @e1\" \"screenshot\"\n\n# Stdin mode: pipe commands as JSON\necho '[\n [\"open\", \"https://example.com\"],\n [\"snapshot\", \"-i\"],\n [\"click\", \"@e1\"],\n [\"screenshot\", \"result.png\"]\n]' | agent-browser batch --json\n```\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--bail</code></td><td>Stop on first error (default: continue all commands)</td></tr>\n <tr><td><code>--json</code></td><td>Output results as a JSON array</td></tr>\n </tbody>\n</table>\n\n## MCP server\n\n```bash\nagent-browser mcp\nagent-browser mcp --tools all\nagent-browser mcp --tools core,network,react\n```\n\nStarts a Model Context Protocol server over stdio. MCP clients launch this command as a subprocess and exchange newline-delimited JSON-RPC on stdin and stdout. The server defaults to MCP protocol 2025-11-25 and accepts older supported client protocol versions during initialization.\n\nThe default tools profile is `core`, which keeps MCP context small for everyday browser automation. Use `--tools all` for the full typed CLI parity surface, or combine profiles with commas, such as `--tools core,network,react`.\n\nProfiles:\n\n- `core` - Default. Navigation, snapshots, interaction, waits, reads, screenshots, JavaScript eval, close, tab basics, and profile discovery\n- `network` - Network routes, request inspection, HAR, headers, credentials, offline\n- `state` - Cookies, storage, auth, saved state, sessions, profiles, skills\n- `debug` - Console/errors, tracing, profiling, recording, accessibility audits, clipboard, plugins, doctor, dashboard, install, upgrade, chat, diff, batch, confirm/deny\n- `tabs` - Back/forward/reload, tabs, windows, frames, dialogs\n- `react` - React tree/inspect/renders/suspense, vitals, pushstate\n- `mobile` - Viewport/device/geolocation/media, touch, swipe, mouse, keyboard\n- `all` - Every MCP tool, including the full typed CLI parity surface\n\nExample MCP client config:\n\n```json\n{\n \"mcpServers\": {\n \"agent-browser\": {\n \"command\": \"agent-browser\",\n \"args\": [\"mcp\"]\n }\n }\n}\n```\n\nWith `--tools all`, the server exposes typed tools across the CLI command surface, including navigation, snapshots, input, waits, screenshots/PDF, get/is/find, mouse, network, storage, cookies, tabs, windows, frames, dialogs, tracing, recording, accessibility audits, clipboard, auth, state, iOS, diff, React, vitals, sessions, skills, plugins, doctor, dashboard, install, upgrade, chat, eval, and close.\n\nCommon tools include:\n\n- `agent_browser_tools_profiles`\n- `agent_browser_open`\n- `agent_browser_snapshot`\n- `agent_browser_click`\n- `agent_browser_fill`\n- `agent_browser_type`\n- `agent_browser_press`\n- `agent_browser_wait_for_selector`\n- `agent_browser_screenshot`\n- `agent_browser_get_url`\n- `agent_browser_eval`\n- `agent_browser_close`\n\nEach tool has typed fields such as `url`, `selector`, `text`, `key`, `session`, `allowedDomains`, and `idleTimeout`, so MCP clients show meaningful approval prompts instead of raw command arrays. The common `allowedDomains` array maps to `--allowed-domains` and activates the same WebRTC containment and launch-mode restrictions. The common `idleTimeout` string maps to `--idle-timeout`, accepts values such as `30s`, `5m`, `1h`, or raw milliseconds, and accepts `0` to disable idle shutdown. Each tool also accepts `extraArgs` for advanced CLI flags and exact CLI parity. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally.\n\nTool invocations use the same config files and environment variables as the CLI. Use `session` in the tool arguments, or set `AGENT_BROWSER_SESSION`, to isolate browser state.\n\n## Command chaining\n\nChain commands with `&&` in a single shell invocation. The browser persists via a background daemon, so chaining works naturally and is more efficient than separate calls:\n\n```bash\nagent-browser open example.com && agent-browser wait --load domcontentloaded && agent-browser snapshot -i\nagent-browser fill @e1 \"user@example.com\" && agent-browser fill @e2 \"pass\" && agent-browser click @e3\nagent-browser open example.com && agent-browser wait --load load && agent-browser screenshot page.png\n```\n\nUse `&&` when you don't need to read intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs, then interact with those refs).\n\n## Local files\n\nOpen local files (PDFs, HTML) using `file://` URLs:\n\n```bash\nagent-browser --allow-file-access open file:///path/to/document.pdf\nagent-browser --allow-file-access open file:///path/to/page.html\nagent-browser screenshot output.png\n```\n\nThe `--allow-file-access` flag enables JavaScript to access other local files. Chromium only.\n\nSee [Files & Clipboard](/files) for local files, uploads, downloads, screenshots, PDFs, and clipboard workflows.\n"
|
||
},
|
||
"docs/src/app/commands/layout.tsx": {
|
||
"sha256": "d6ec5244af6179a0266a7454c1933d7b49d5c744e7d61956d0e8b3f5b930a835",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"commands\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/configuration/page.mdx": {
|
||
"sha256": "061818943c04dbad7a0cefd395848cba8e60bbe37a1159662bc92626747b710c",
|
||
"raw": "# Configuration\n\nCreate an `agent-browser.json` file to set persistent defaults instead of repeating flags on every command.\n\n## Config File Locations\n\nagent-browser checks two locations, merged in priority order:\n\n<table>\n <thead>\n <tr><th>Priority</th><th>Location</th><th>Scope</th></tr>\n </thead>\n <tbody>\n <tr><td>1 (lowest)</td><td><code>~/.agent-browser/config.json</code></td><td>User-level defaults</td></tr>\n <tr><td>2</td><td><code>./agent-browser.json</code></td><td>Project-level overrides</td></tr>\n <tr><td>3</td><td><code>AGENT_BROWSER_*</code> env vars</td><td>Override config values</td></tr>\n <tr><td>4 (highest)</td><td>CLI flags</td><td>Override everything</td></tr>\n </tbody>\n</table>\n\nProject-level values override user-level values. Environment variables override both. CLI flags always win.\n\nUse `--config <path>` or the `AGENT_BROWSER_CONFIG` environment variable to load a specific config file instead of the default locations:\n\n```bash\nagent-browser --config ./ci-config.json open example.com\nAGENT_BROWSER_CONFIG=./ci-config.json agent-browser open example.com\n```\n\n## Example Config\n\n```json\n{\n \"headed\": true,\n \"proxy\": \"http://localhost:8080\",\n \"profile\": \"./browser-data\",\n \"userAgent\": \"my-agent/1.0\",\n \"hideScrollbars\": false,\n \"ignoreHttpsErrors\": true\n}\n```\n\nA [JSON Schema](https://agent-browser.dev/schema.json) is available for IDE autocomplete and validation. Add a `$schema` key to your config file to enable it:\n\n```json\n{\n \"$schema\": \"https://agent-browser.dev/schema.json\",\n \"headed\": true\n}\n```\n\n## All Options\n\nGlobal launch, output, provider, and chat options can be set in the config file using their camelCase equivalent. Command-scoped flags such as `screenshot --full` remain command arguments.\n\n<table>\n <thead>\n <tr><th>Config Key</th><th>CLI Flag</th><th>Type</th></tr>\n </thead>\n <tbody>\n <tr><td><code>headed</code></td><td><code>--headed</code></td><td>boolean</td></tr>\n <tr><td><code>json</code></td><td><code>--json</code></td><td>boolean</td></tr>\n <tr><td><code>debug</code></td><td><code>--debug</code></td><td>boolean</td></tr>\n <tr><td><code>session</code></td><td><code>--session</code></td><td>string</td></tr>\n <tr><td><code>restore</code></td><td><code>--restore</code></td><td>string</td></tr>\n <tr><td><code>restoreSave</code></td><td><code>--restore-save</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckUrl</code></td><td><code>--restore-check-url</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckText</code></td><td><code>--restore-check-text</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckFn</code></td><td><code>--restore-check-fn</code></td><td>string</td></tr>\n <tr><td><code>namespace</code></td><td><code>--namespace</code></td><td>string</td></tr>\n <tr><td><code>sessionName</code></td><td><code>--session-name</code></td><td>string, legacy restore key</td></tr>\n <tr><td><code>executablePath</code></td><td><code>--executable-path</code></td><td>string</td></tr>\n <tr><td><code>extensions</code></td><td><code>--extension</code></td><td>string[]</td></tr>\n <tr><td><code>initScripts</code></td><td><code>--init-script</code></td><td>string[]</td></tr>\n <tr><td><code>enable</code></td><td><code>--enable</code></td><td>string[]</td></tr>\n <tr><td><code>profile</code></td><td><code>--profile</code></td><td>string</td></tr>\n <tr><td><code>state</code></td><td><code>--state</code></td><td>string</td></tr>\n <tr><td><code>proxy</code></td><td><code>--proxy</code></td><td>string</td></tr>\n <tr><td><code>proxyBypass</code></td><td><code>--proxy-bypass</code></td><td>string</td></tr>\n <tr><td><code>args</code></td><td><code>--args</code></td><td>string</td></tr>\n <tr><td><code>userAgent</code></td><td><code>--user-agent</code></td><td>string</td></tr>\n <tr><td><code>provider</code></td><td><code>-p, --provider</code></td><td>string</td></tr>\n <tr><td><code>device</code></td><td><code>--device</code></td><td>string</td></tr>\n <tr><td><code>hideScrollbars</code></td><td><code>--hide-scrollbars</code></td><td>boolean</td></tr>\n <tr><td><code>webgpu</code></td><td><code>--webgpu</code></td><td>boolean</td></tr>\n <tr><td><code>noWebmcp</code></td><td><code>--no-webmcp</code> or <code>AGENT_BROWSER_NO_WEBMCP</code></td><td>boolean</td></tr>\n <tr><td><code>ignoreHttpsErrors</code></td><td><code>--ignore-https-errors</code></td><td>boolean</td></tr>\n <tr><td><code>caCert</code></td><td><code>--ca-cert</code></td><td>string</td></tr>\n <tr><td><code>clearCaCert</code></td><td><code>--no-ca-cert</code></td><td>boolean</td></tr>\n <tr><td><code>allowFileAccess</code></td><td><code>--allow-file-access</code></td><td>boolean</td></tr>\n <tr><td><code>cdp</code></td><td><code>--cdp</code></td><td>string</td></tr>\n <tr><td><code>autoConnect</code></td><td><code>--auto-connect</code></td><td>boolean</td></tr>\n <tr><td><code>pinTab</code></td><td><code>--pin-tab</code></td><td>boolean</td></tr>\n <tr><td><code>annotate</code></td><td><code>--annotate</code></td><td>boolean</td></tr>\n <tr><td><code>colorScheme</code></td><td><code>--color-scheme</code></td><td>string (<code>dark</code>, <code>light</code>, <code>no-preference</code>)</td></tr>\n <tr><td><code>downloadPath</code></td><td><code>--download-path</code></td><td>string</td></tr>\n <tr><td><code>contentBoundaries</code></td><td><code>--content-boundaries</code></td><td>boolean</td></tr>\n <tr><td><code>maxOutput</code></td><td><code>--max-output</code></td><td>number</td></tr>\n <tr><td><code>allowedDomains</code></td><td><code>--allowed-domains</code></td><td>string[]; also disables WebRTC in supported Chromium sessions and requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins</td></tr>\n <tr><td><code>actionPolicy</code></td><td><code>--action-policy</code></td><td>string</td></tr>\n <tr><td><code>confirmActions</code></td><td><code>--confirm-actions</code></td><td>string</td></tr>\n <tr><td><code>confirmInteractive</code></td><td><code>--confirm-interactive</code></td><td>boolean</td></tr>\n <tr><td><code>engine</code></td><td><code>--engine</code></td><td>string (<code>chrome</code>, <code>lightpanda</code>, <code>obscura</code>)</td></tr>\n <tr><td><code>screenshotDir</code></td><td><code>--screenshot-dir</code></td><td>string</td></tr>\n <tr><td><code>screenshotQuality</code></td><td><code>--screenshot-quality</code></td><td>number (0-100)</td></tr>\n <tr><td><code>screenshotFormat</code></td><td><code>--screenshot-format</code></td><td>string (<code>png</code>, <code>jpeg</code>)</td></tr>\n <tr><td><code>idleTimeout</code></td><td><code>--idle-timeout</code></td><td>string (<code>10s</code>, <code>3m</code>, <code>1h</code>, or raw ms); defaults to <code>1h</code>, while <code>0</code> disables idle shutdown</td></tr>\n <tr><td><code>noAutoDialog</code></td><td><code>--no-auto-dialog</code></td><td>boolean</td></tr>\n <tr><td><code>model</code></td><td><code>--model</code></td><td>string</td></tr>\n <tr><td><code>headers</code></td><td><code>--headers</code></td><td>string (JSON)</td></tr>\n <tr><td><code>plugins</code></td><td>(config only)</td><td>plugin config[]</td></tr>\n </tbody>\n</table>\n\n## Common Configurations\n\n### Local Development\n\n```json\n{\n \"headed\": true,\n \"profile\": \"./browser-data\"\n}\n```\n\n### Behind a Proxy\n\n```json\n{\n \"proxy\": \"http://proxy.corp.example.com:8080\",\n \"proxyBypass\": \"localhost,*.internal.com\",\n \"caCert\": \"/etc/ssl/certs/proxy-ca.crt\"\n}\n```\n\n`caCert` imports the supplied CA certificate or PEM bundle into an isolated NSS database for locally launched Chromium on Linux. Hostname, validity period, and unrelated CA verification remain enabled. The CA remains active when later commands omit it. Setting different certificate content or `clearCaCert: true` relaunches Chromium without restarting the daemon. `agent-browser install --with-deps` installs the required `certutil`; otherwise install `libnss3-tools` on Debian/Ubuntu or `nss-tools` on RPM Linux. This initial implementation does not support Chrome profiles, CDP attach, providers, Lightpanda, macOS, or Windows.\n\nWithout the CA certificate on hand, fall back to ignoring every certificate error, which is less secure:\n\n```json\n{\n \"proxy\": \"http://proxy.corp.example.com:8080\",\n \"proxyBypass\": \"localhost,*.internal.com\",\n \"ignoreHttpsErrors\": true\n}\n```\n\n### CI / Devcontainer\n\n```json\n{\n \"args\": \"--no-sandbox,--disable-gpu\",\n \"ignoreHttpsErrors\": true\n}\n```\n\n### iOS Testing\n\n```json\n{\n \"provider\": \"ios\",\n \"device\": \"iPhone 16 Pro\"\n}\n```\n\n### AI Agent Security\n\n```json\n{\n \"contentBoundaries\": true,\n \"maxOutput\": 50000,\n \"allowedDomains\": [\"your-app.com\", \"*.your-app.com\"],\n \"actionPolicy\": \"./policy.json\"\n}\n```\n\n## Overriding Boolean Options\n\nBoolean flags accept an optional `true`/`false` value to override config settings:\n\n```bash\nagent-browser --headed false open example.com\n```\n\nA bare flag is equivalent to passing `true`:\n\n```bash\nagent-browser --headed open example.com # same as --headed true\nagent-browser --headed true open example.com # explicit\n```\n\nThis applies to boolean flags such as `--headed`, `--debug`, `--json`, `--ignore-https-errors`, `--allow-file-access`, `--hide-scrollbars`, `--auto-connect`, `--annotate`, `--content-boundaries`, `--confirm-interactive`, and `--no-auto-dialog`.\n\n## Extensions Merging\n\nExtensions from user-level and project-level configs are **concatenated**, not replaced. For example, if `~/.agent-browser/config.json` specifies `[\"/ext1\"]` and `./agent-browser.json` specifies `[\"/ext2\"]`, the result is `[\"/ext1\", \"/ext2\"]`.\n\nThe `AGENT_BROWSER_EXTENSIONS` environment variable and CLI `--extension` flags follow the standard priority rules (env replaces config, CLI appends).\n\n## Plugins\n\nConfigure external plugins with the `plugins` array:\n\nSee [Plugins](/plugins) for the plugin author protocol and implementation examples. Use `agent-browser plugin add <ref>` to create this config automatically.\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"args\": [],\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"cloud-browser\",\n \"command\": \"agent-browser-plugin-cloud-browser\",\n \"capabilities\": [\"browser.provider\"]\n },\n {\n \"name\": \"stealth\",\n \"command\": \"agent-browser-plugin-stealth\",\n \"capabilities\": [\"launch.mutate\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nProject-level plugin entries are appended after user-level entries. If two entries use the same name, agent-browser resolves the later entry, so a project can override a user default. `AGENT_BROWSER_PLUGINS` can replace config discovery with a JSON array using the same shape.\n\nDo not put vault tokens or passwords in plugin command args. Use the vault vendor's own login/session mechanism or environment outside agent-browser config.\n\n```bash\nagent-browser plugin list\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --provider cloud-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\n```\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths.\n\n## Environment Variables\n\nThese environment variables configure additional daemon and runtime behavior:\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_CONFIG</code></td><td>Path to an explicit config file.</td><td>(default discovery)</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION</code></td><td>Isolated browser session name.</td><td><code>default</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTO_CONNECT</code></td><td>Auto-discover and connect to a running Chrome instance.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOW_FILE_ACCESS</code></td><td>Allow <code>file://</code> URLs to access local files.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_EXECUTABLE_PATH</code></td><td>Custom browser executable path.</td><td>(auto-discover)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROFILE</code></td><td>Chrome profile name or persistent profile directory.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE</code></td><td>Storage state file to load at launch.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY</code></td><td>Proxy URL. Takes precedence over standard proxy variables.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_BYPASS</code></td><td>Proxy bypass host list.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_USERNAME</code></td><td>Proxy username when credentials are supplied separately.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_PASSWORD</code></td><td>Proxy password when credentials are supplied separately.</td><td>(none)</td></tr>\n <tr><td><code>HTTP_PROXY</code> / <code>HTTPS_PROXY</code> / <code>ALL_PROXY</code></td><td>Standard proxy fallback variables.</td><td>(none)</td></tr>\n <tr><td><code>NO_PROXY</code></td><td>Standard proxy bypass fallback.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_ARGS</code></td><td>Comma or newline separated browser launch arguments.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_USER_AGENT</code></td><td>Custom User-Agent string.</td><td>(browser default)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROVIDER</code></td><td>Browser provider such as <code>ios</code>, <code>browserbase</code>, <code>kernel</code>, <code>browseruse</code>, <code>browserless</code>, <code>agentcore</code>, or a configured <code>browser.provider</code> plugin name.</td><td>(local browser)</td></tr>\n <tr><td><code>AGENT_BROWSER_HIDE_SCROLLBARS</code></td><td>Hide native scrollbars in headless Chromium screenshots.</td><td><code>true</code></td></tr>\n <tr><td><code>AGENT_BROWSER_COLOR_SCHEME</code></td><td>Color scheme preference (<code>dark</code>, <code>light</code>, <code>no-preference</code>).</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_DOWNLOAD_PATH</code></td><td>Default directory for browser downloads.</td><td>(temp directory)</td></tr>\n <tr><td><code>AGENT_BROWSER_DEFAULT_TIMEOUT</code></td><td>Default timeout in ms. Keep below 30000 to avoid IPC timeouts.</td><td><code>25000</code></td></tr>\n <tr><td><code>AGENT_BROWSER_NAMESPACE</code></td><td>Namespace for daemon sockets and restore-state directories.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE</code></td><td>Auto-save/load state persistence key.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_SAVE</code></td><td>Restore save policy: <code>auto</code>, <code>always</code>, or <code>never</code>.</td><td><code>auto</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTOSAVE_INTERVAL_MS</code></td><td>Minimum ms between periodic session autosaves while the browser is open. <code>0</code> saves only on close.</td><td><code>30000</code></td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_URL</code></td><td>URL pattern restored state must match.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_TEXT</code></td><td>Page text restored state must contain.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_FN</code></td><td>JavaScript expression restored state must satisfy.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION_NAME</code></td><td>Legacy auto-save/load state persistence name.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code></td><td>Auto-delete saved session states older than N days.</td><td><code>30</code></td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM session encryption.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_EXTENSIONS</code></td><td>Comma-separated browser extension paths. Extensions work in both headed and headless mode.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_INIT_SCRIPTS</code></td><td>Comma-separated paths to page init scripts.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_ENABLE</code></td><td>Comma-separated built-in init script features such as <code>react-devtools</code>.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_HEADED</code></td><td>Show browser window instead of running headless (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_WEBGPU</code></td><td>Enable WebGPU; SwiftShader software Vulkan on Linux, no GPU required (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_NO_XVFB</code></td><td>Disable automatic Xvfb virtual display for headed mode on displayless Linux hosts (<code>1</code> to disable).</td><td>(auto-Xvfb enabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CLEAR_CA_CERT</code></td><td>Clear CA trust retained by the running browser session.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_JSON</code></td><td>Use JSON output by default.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ANNOTATE</code></td><td>Enable annotated screenshots by default.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CDP</code></td><td>Connect the daemon to a CDP port or WebSocket URL.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_PORT</code></td><td>Override the WebSocket streaming port. By default, an OS-assigned port is used. Set this to bind to a specific port (e.g., <code>9223</code>).</td><td>OS-assigned</td></tr>\n <tr><td><code>AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS</code></td><td>Comma-separated exact HTTPS origins allowed for a reverse-proxied dashboard. Every entry must be valid or dashboard startup fails. Without this setting, only loopback origins are accepted. Loopback access does not require the external dashboard token.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_QUALITY</code></td><td>JPEG quality for streamed frames, 0 to 100. Lower values cut bandwidth: quality 20 costs about half the bytes of the default on a busy page.</td><td><code>80</code></td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_MAX_WIDTH</code></td><td>Cap the encoded frame width in pixels. Caps the frame only and leaves the page size alone, so pointer coordinates are unaffected.</td><td>the viewport</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_MAX_HEIGHT</code></td><td>Cap the encoded frame height in pixels.</td><td>the viewport</td></tr>\n <tr><td><code>AGENT_BROWSER_IDLE_TIMEOUT_MS</code></td><td>Auto-shutdown the daemon after N ms without commands or dashboard input. Set <code>0</code> to disable. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default. Provider-owned cloud browsers are eligible for cleanup, and an explicit value applies to every browser.</td><td><code>3600000</code> (1 hour)</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_DEVICE</code></td><td>Default iOS device name for the <code>ios</code> provider.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_UDID</code></td><td>Default iOS device UDID for the <code>ios</code> provider.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_DEBUG</code></td><td>Enable debug output (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONTENT_BOUNDARIES</code></td><td>Wrap page output in boundary markers for LLM safety.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_MAX_OUTPUT</code></td><td>Max characters for page output (truncates beyond limit).</td><td>(unlimited)</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOWED_DOMAINS</code></td><td>Comma-separated allowed domain patterns (e.g., <code>example.com,*.example.com</code>). Requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins.</td><td>(unrestricted)</td></tr>\n <tr><td><code>AGENT_BROWSER_ACTION_POLICY</code></td><td>Path to action policy JSON file.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_ACTIONS</code></td><td>Comma-separated action categories requiring confirmation.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_INTERACTIVE</code></td><td>Enable interactive confirmation prompts (auto-denies if stdin is not a TTY).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ENGINE</code></td><td>Browser engine to use: <code>chrome</code> (default), <code>lightpanda</code>, <code>obscura</code> (experimental).</td><td><code>chrome</code></td></tr>\n <tr><td><code>AGENT_BROWSER_NO_AUTO_DIALOG</code></td><td>Disable automatic dismissal of <code>alert</code>/<code>beforeunload</code> dialogs.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_PLUGINS</code></td><td>JSON plugin registry override.</td><td>(config discovery)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_DIR</code></td><td>Default screenshot output directory.</td><td>(temp directory)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_QUALITY</code></td><td>JPEG screenshot quality from 0 to 100.</td><td>(format default)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_FORMAT</code></td><td>Screenshot format: <code>png</code> or <code>jpeg</code>.</td><td><code>png</code></td></tr>\n <tr><td><code>AGENT_BROWSER_SOCKET_DIR</code></td><td>Advanced override for daemon socket files.</td><td>runtime dir or <code>~/.agent-browser</code></td></tr>\n <tr><td><code>AGENT_BROWSER_SKILLS_DIR</code></td><td>Override the directory used by <code>agent-browser skills</code>.</td><td>bundled skills</td></tr>\n <tr><td><code>AGENT_BROWSER_COLOR</code></td><td>Enable colored CLI output when truthy.</td><td>(disabled)</td></tr>\n <tr><td><code>NO_COLOR</code></td><td>Disable colored output when present.</td><td>(not set)</td></tr>\n <tr><td><code>AI_GATEWAY_URL</code></td><td>Vercel AI Gateway base URL.</td><td><code>https://ai-gateway.vercel.sh</code></td></tr>\n <tr><td><code>AI_GATEWAY_API_KEY</code></td><td>API key for the Vercel AI Gateway. Required to enable AI chat.</td><td>(none)</td></tr>\n <tr><td><code>AI_GATEWAY_MODEL</code></td><td>Default AI model for dashboard chat.</td><td><code>anthropic/claude-sonnet-4.6</code></td></tr>\n </tbody>\n</table>\n\n## Error Handling\n\n- **Auto-discovered config files** (`~/.agent-browser/config.json`, `./agent-browser.json`) that are missing are silently ignored.\n- **`--config <path>`** with a missing or malformed file exits with an error.\n- **Malformed JSON** in auto-discovered files prints a warning to stderr and continues without that file.\n- **Unknown keys** are silently ignored for forward compatibility.\n\n> **Tip:** If your project-level `agent-browser.json` contains environment-specific values (paths, proxies), consider adding it to `.gitignore`.\n"
|
||
},
|
||
"docs/src/app/configuration/layout.tsx": {
|
||
"sha256": "afc19fdd65e721f2b7e26646f1ee438b7264aa85f1438beacd806d9f9203a25d",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"configuration\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/dashboard/page.mdx": {
|
||
"sha256": "d992bc635950e46152dcd232fad676228f9481bd001a63de21536b710b0e9553",
|
||
"raw": "# Observability Dashboard\n\nMonitor agent-browser sessions in real time with a local web dashboard showing a live browser viewport and command activity feed.\n\n## Usage\n\nThe dashboard is bundled into the binary and requires no separate install. Start the server and open any session:\n\n```bash\nagent-browser dashboard start\nagent-browser open example.com\n```\n\nThen open `http://localhost:4848` in your browser to see the live dashboard. If you expose the dashboard through a reverse proxy or port forward, explicitly allow its browser HTTPS origin when starting the server:\n\n```bash\nagent-browser dashboard start --allowed-origins https://dashboard.example.com\n```\n\nAll sessions automatically stream to the dashboard. Local loopback origins are allowed automatically over IPv4 and IPv6 without an access token. For a reverse-proxied dashboard, use a comma-separated list of exact origins with `--allowed-origins` or `AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS`; this lets the dashboard reject cross-origin requests and DNS-rebinding attacks. Every configured origin must be valid, and custom ports must be integers from 1 to 65535. Unknown options, missing values, invalid ports, and malformed origins fail without starting the server. The command prints private tokenized access URLs only for external origins. Open the matching URL once to establish the browser session and do not share it. Its unguessable token stays in the initial URL fragment, then the browser stores it in a Secure, host-bound, same-site cookie for dashboard API and stream requests. Open `http://localhost:<port>` directly for local access; the external token is never written to a loopback cookie. Configure the reverse proxy to redact cookies from logs. The browser stays on the dashboard origin while the server proxies per-session tabs, status, and stream traffic internally, so session ports do not need to be exposed. Repeated starts reuse the dashboard only when these settings match; stop it before changing the port or allowed origins.\n\n### Custom stream port\n\nBy default each session binds its WebSocket stream server to an OS-assigned port. To use a specific port, set the `AGENT_BROWSER_STREAM_PORT` environment variable:\n\n```bash\nAGENT_BROWSER_STREAM_PORT=9223 agent-browser open example.com\n```\n\nYou can also use the runtime commands to control streaming on a running session:\n\n```bash\nagent-browser stream enable --port 9223\nagent-browser stream status\nagent-browser stream disable\n```\n\n## Dashboard features\n\nThe dashboard is a single-page web app with three areas:\n\n<table>\n <thead>\n <tr>\n <th>Area</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong>Live viewport</strong></td>\n <td>Real-time JPEG frames from the browser, rendered to a canvas element</td>\n </tr>\n <tr>\n <td><strong>Activity feed</strong></td>\n <td>Chronological stream of commands, results, and console messages with expandable details</td>\n </tr>\n <tr>\n <td><strong>Session creation</strong></td>\n <td>Create new sessions from the dashboard with local engines (Chrome, Lightpanda) or cloud providers (AgentCore, Browserbase, Browserless, Browser Use, Kernel)</td>\n </tr>\n <tr>\n <td><strong>Status bar</strong></td>\n <td>Connection status, viewport dimensions, and WebSocket endpoint</td>\n </tr>\n </tbody>\n</table>\n\n## WebSocket protocol\n\nThe dashboard connects to the same WebSocket endpoint used by [Streaming](/streaming), with additional message types for observability:\n\n### Command events\n\nSent when a command begins executing:\n\n```json\n{\n \"type\": \"command\",\n \"action\": \"click\",\n \"id\": \"r123\",\n \"params\": { \"selector\": \"@e5\" },\n \"timestamp\": 1711367000000\n}\n```\n\n### Result events\n\nSent when a command finishes:\n\n```json\n{\n \"type\": \"result\",\n \"id\": \"r123\",\n \"action\": \"click\",\n \"success\": true,\n \"data\": {},\n \"duration_ms\": 45,\n \"timestamp\": 1711367000045\n}\n```\n\n### Console events\n\nSent when the browser logs to the console:\n\n```json\n{\n \"type\": \"console\",\n \"level\": \"log\",\n \"text\": \"Page loaded\",\n \"args\": [{\"type\": \"string\", \"value\": \"Page loaded\"}],\n \"timestamp\": 1711367000100\n}\n```\n\nThe `args` array contains the raw CDP `Runtime.consoleAPICalled` arguments for programmatic access. Object arguments include preview data (e.g. `{userId: \"abc\", count: 42}` instead of `\"Object\"`).\n\nThese are in addition to the existing `frame`, `status`, and `error` message types documented on the [Streaming](/streaming) page.\n\n## Architecture\n\nThe dashboard is a Next.js static export (`output: 'export'`) that produces plain HTML, CSS, and JS. It lives at `packages/dashboard/` in the monorepo and is built with:\n\n```bash\npnpm build:dashboard\n```\n\nThe dashboard is embedded into the CLI binary at compile time using `rust-embed`. Plain HTTP requests serve the embedded dashboard assets and same-origin API routes. Session-specific tabs, status, and stream WebSocket traffic are proxied through the dashboard server to loopback-only session ports.\n\n## AI Chat\n\nThe dashboard includes an optional AI chat panel powered by the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway). When enabled, a **Chat** tab appears in the right pane alongside Activity, Console, Network, Storage, and Extensions.\n\n### Setup\n\nThe Chat tab is always visible. Set the API key to enable responses:\n\n```bash\nexport AI_GATEWAY_API_KEY=gw_your_key_here\nagent-browser dashboard start\n```\n\nOptionally override the gateway URL or model:\n\n```bash\nexport AI_GATEWAY_URL=https://ai-gateway.vercel.sh # this is the default\nexport AI_GATEWAY_MODEL=openai/gpt-4o-mini # default: anthropic/claude-sonnet-4.6\n```\n\n### How it works\n\nThe Rust server proxies chat requests from the dashboard to the Vercel AI Gateway and streams responses back using the Vercel AI SDK's UI Message Stream protocol. The dashboard frontend uses `useChat` from `@ai-sdk/react` with `DefaultChatTransport`.\n\nChat runs one agent-browser command per tool call. A `;` or `&&` inside a quoted argument is kept as text, so JSON parameters can contain them. Chat can load bundled skills with `skills get <name>` and use page WebMCP tools: it fetches a tool's input schema with `webmcp list <tool> --frame <frame-id> --json`, then calls `webmcp invoke` with the same `--frame`.\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AI_GATEWAY_URL</code></td><td>Vercel AI Gateway base URL.</td><td><code>https://ai-gateway.vercel.sh</code></td></tr>\n <tr><td><code>AI_GATEWAY_API_KEY</code></td><td>API key for the AI Gateway. Required to enable AI chat responses.</td><td>(none)</td></tr>\n <tr><td><code>AI_GATEWAY_MODEL</code></td><td>Default AI model for chat requests.</td><td><code>anthropic/claude-sonnet-4.6</code></td></tr>\n </tbody>\n</table>\n"
|
||
},
|
||
"docs/src/app/dashboard/layout.tsx": {
|
||
"sha256": "9520bc63b9673d147069ed55fd5a9df109a728377809aa55825cd2764465643c",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"dashboard\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/debugging/page.mdx": {
|
||
"sha256": "4a06ffc5b78ffbfbe6fef94a7edf783eada4f2df8c241c8cfd2432488b18bec3",
|
||
"raw": "# Debugging\n\nUse debugging commands to inspect browser logs, page errors, JavaScript dialogs, Chrome DevTools traces, highlighted elements, and the live DevTools frontend during automation.\n\n## Console and page errors\n\n```bash\nagent-browser console\nagent-browser console --json\nagent-browser console --clear\n\nagent-browser errors\nagent-browser errors --clear\n```\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>console</code></td><td>Show browser console messages</td></tr>\n <tr><td><code>console --json</code></td><td>Show structured console output with raw CDP arguments</td></tr>\n <tr><td><code>console --clear</code></td><td>Clear the console log captured by agent-browser</td></tr>\n <tr><td><code>errors</code></td><td>Show captured page errors and uncaught JavaScript exceptions</td></tr>\n <tr><td><code>errors --clear</code></td><td>Clear the captured page error log</td></tr>\n </tbody>\n</table>\n\nUse `console --json` when object previews or raw CDP arguments matter for an automated diagnostic script. Use the default text output when an agent only needs to understand what the page logged.\n\n## JavaScript dialogs\n\n```bash\nagent-browser dialog status\nagent-browser dialog accept\nagent-browser dialog accept \"prompt text\"\nagent-browser dialog dismiss\n```\n\nBy default, `alert` and `beforeunload` dialogs are automatically accepted so they do not block the agent. `confirm` and `prompt` dialogs still require explicit handling. Use `--no-auto-dialog` or `AGENT_BROWSER_NO_AUTO_DIALOG=1` to disable automatic handling.\n\nWhen a dialog is pending, command responses include a `warning` field with the dialog type and message so agents can recover with `dialog accept` or `dialog dismiss`.\n\n## DevTools and visual inspection\n\n```bash\nagent-browser highlight @e4\nagent-browser highlight \"#submit\"\nagent-browser inspect\n```\n\n`highlight` draws attention to an element in the live page, which is useful when running headed or when viewing the session through streaming or the dashboard. `inspect` opens Chrome DevTools for the active page through a local proxy while the daemon continues to accept agent-browser commands.\n\n## Chrome trace capture\n\n```bash\nagent-browser trace start\n\nagent-browser open https://example.com\nagent-browser click @e3\n\nagent-browser trace stop ./trace.json\n```\n\n`trace start` begins a Chrome DevTools trace. `trace stop [path]` ends tracing and saves a Chrome Trace Event JSON file. If no path is provided, agent-browser writes an auto-generated trace file under its temp directory.\n\nUse [Profiler](/profiler) when you want curated performance categories and event counts. Use raw traces when you need a general Chrome trace for lower-level debugging.\n\n## Related tools\n\n<table>\n <thead>\n <tr><th>Need</th><th>Use</th></tr>\n </thead>\n <tbody>\n <tr><td>Performance profile</td><td><a href=\"/profiler\">Profiler</a></td></tr>\n <tr><td>Saved video artifact</td><td><a href=\"/recording\">Video Recording</a></td></tr>\n <tr><td>Live browser stream</td><td><a href=\"/streaming\">Streaming</a></td></tr>\n <tr><td>Install and environment diagnosis</td><td><a href=\"/installation#doctor\">Doctor</a></td></tr>\n </tbody>\n</table>\n"
|
||
},
|
||
"docs/src/app/debugging/layout.tsx": {
|
||
"sha256": "aa09bf7777537cbb3cc3fd83310a8871c04993c18fef250967ba8103a1e51616",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"debugging\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/diffing/page.mdx": {
|
||
"sha256": "8ac94e6fe9daed07123c8ef148521462ee6ea7ee7d49ed4b1f66206c5c8b2b3d",
|
||
"raw": "import { DiffDemo } from \"@/components/diff-demo\"\n\n# Diffing\n\nCompare page states to detect changes -- structurally via accessibility tree snapshots, visually via pixel comparison, or across two different URLs.\n\n<DiffDemo />\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>diff snapshot</code></td><td>Compare current snapshot to last snapshot in session</td></tr>\n <tr><td><code>diff snapshot --baseline <file></code></td><td>Compare current snapshot to a saved file</td></tr>\n <tr><td><code>diff screenshot --baseline <file></code></td><td>Visual pixel diff against a baseline image</td></tr>\n <tr><td><code>diff url <url1> <url2></code></td><td>Compare two pages (snapshot + optional screenshot)</td></tr>\n </tbody>\n</table>\n\n## Snapshot diff\n\nCompares the accessibility tree between two points in time using a line-level text diff.\n\n```bash\n# Compare against the last snapshot taken in this session\nagent-browser diff snapshot\n\n# Compare against a saved baseline file\nagent-browser diff snapshot --baseline before.txt\n\n# Scope to a specific part of the page\nagent-browser diff snapshot --selector \"#main\" --compact\n```\n\nWithout `--baseline`, the command automatically compares against the most recent snapshot taken in the current session. This is the primary use case for agents verifying that an action had the intended effect.\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-b, --baseline <file></code></td><td>Path to a saved snapshot file to compare against</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope the current snapshot to a CSS selector or @ref</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Use compact snapshot format</td></tr>\n <tr><td><code>-d, --depth <n></code></td><td>Limit snapshot tree depth</td></tr>\n </tbody>\n</table>\n\n### Output\n\nThe diff uses `+` for added lines and `-` for removed lines, similar to unified diff format. A summary line shows the count of additions, removals, and unchanged lines.\n\n```\n- button \"Submit\" [ref=e2]\n+ button \"Submit\" [ref=e2] [disabled]\n 3 additions, 2 removals, 41 unchanged\n```\n\n## Screenshot diff\n\nCompares the current page screenshot against a baseline image at the pixel level. Produces a diff image with changed pixels highlighted in red.\n\n```bash\n# Basic visual diff\nagent-browser diff screenshot --baseline before.png\n\n# Save diff image to a specific path\nagent-browser diff screenshot --baseline before.png --output diff.png\n\n# Adjust threshold and scope to element\nagent-browser diff screenshot --baseline before.png --threshold 0.2 --selector \"#hero\"\n```\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-b, --baseline <file></code></td><td>Baseline PNG/JPEG image to compare against (required)</td></tr>\n <tr><td><code>-o, --output <file></code></td><td>Path for the generated diff image (default: temp dir)</td></tr>\n <tr><td><code>-t, --threshold <0-1></code></td><td>Color distance threshold (default: 0.1). Higher = more tolerant</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope the current screenshot to an element</td></tr>\n <tr><td><code>--full</code></td><td>Take a full-page screenshot</td></tr>\n </tbody>\n</table>\n\n### Output\n\nReports the diff image path, number of different pixels, and mismatch percentage. The diff image shows unchanged pixels dimmed with changed pixels in red.\n\nIf the baseline and current images have different dimensions, the command reports a dimension mismatch instead of attempting pixel comparison.\n\n## URL diff\n\nCompares two pages by navigating to each in sequence and diffing the results.\n\n```bash\n# Compare two URLs (snapshot diff)\nagent-browser diff url https://staging.example.com https://prod.example.com\n\n# Include visual comparison\nagent-browser diff url https://v1.example.com https://v2.example.com --screenshot\n\n# Full-page screenshot comparison\nagent-browser diff url https://v1.example.com https://v2.example.com --screenshot --full\n```\n\nThe command navigates to the first URL, captures state, then navigates to the second URL and captures again. Snapshot diff is always included. Screenshot diff requires the `--screenshot` flag.\n\nAfter completion, the browser remains on the second URL.\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--screenshot</code></td><td>Also perform visual screenshot comparison</td></tr>\n <tr><td><code>--full</code></td><td>Use full-page screenshots</td></tr>\n <tr><td><code>--wait-until <strategy></code></td><td>Navigation wait strategy: <code>load</code>, <code>domcontentloaded</code>, <code>networkidle</code> (default: <code>load</code>)</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope snapshots to a CSS selector or @ref</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Use compact snapshot format</td></tr>\n <tr><td><code>-d, --depth <n></code></td><td>Limit snapshot tree depth</td></tr>\n </tbody>\n</table>\n\nThe `--wait-until` option accepts only `load`, `domcontentloaded`, and `networkidle`; it cannot express an app-specific condition. If a page needs a selector, text, URL, or JavaScript condition, use separate `open` and `wait` commands, then compare the captured snapshots or screenshots instead of using `diff url`. `networkidle` is supported for quiet pages, but SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Use cases\n\n### Verifying agent actions\n\nThe most common use case: confirm that an action (click, fill, submit) changed the page as expected.\n\n```bash\nagent-browser snapshot -i # Take interactive-only snapshot (baseline)\nagent-browser fill @e3 \"test@example.com\"\nagent-browser diff snapshot # Compare current snapshot to the baseline\n```\n\n### Monitoring for changes\n\nPeriodically compare a page against a saved baseline to detect updates.\n\n```bash\n# Save baseline\nagent-browser open https://example.com && agent-browser snapshot > baseline.txt\n\n# Later, check for changes\nagent-browser open https://example.com && agent-browser diff snapshot --baseline baseline.txt\n```\n\n### Visual regression testing\n\nCompare screenshots before and after a deploy to catch unintended visual changes.\n\n```bash\nagent-browser open https://staging.example.com && agent-browser screenshot baseline.png\n# ... deploy happens ...\nagent-browser open https://staging.example.com && agent-browser diff screenshot --baseline baseline.png\n```\n\n### Comparing environments\n\nDiff staging against production to verify parity.\n\n```bash\nagent-browser diff url https://staging.example.com https://prod.example.com --screenshot\n```\n"
|
||
},
|
||
"docs/src/app/diffing/layout.tsx": {
|
||
"sha256": "a4821cfa6f976fe377942838dc47932179d2032c85e6d4deb52bfd7cc9e334ef",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"diffing\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/engines/chrome/page.mdx": {
|
||
"sha256": "efc7760a94cd0be3e71d565e59405f2a353c8940075b46e0c6df7f22c2a0cbba",
|
||
"raw": "# Chrome\n\nChrome (and Chromium) is the default browser engine. agent-browser discovers, launches, and manages the Chrome process automatically via the Chrome DevTools Protocol (CDP).\n\n## Binary Discovery\n\nWhen no `--executable-path` is provided, agent-browser searches for Chrome in this order:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Locations checked</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>macOS</td>\n <td>\n <code>/Applications/Google Chrome.app</code>,\n <code>/Applications/Google Chrome Canary.app</code>,\n <code>/Applications/Chromium.app</code>,\n <code>/Applications/Brave Browser.app</code>,\n Puppeteer cache (<code>~/.cache/puppeteer/chrome/</code> or <code>PUPPETEER_CACHE_DIR</code>),\n Chrome for Testing cache\n </td>\n </tr>\n <tr>\n <td>Linux</td>\n <td>\n <code>google-chrome</code>,\n <code>google-chrome-stable</code>,\n <code>chromium-browser</code>,\n <code>chromium</code> in PATH,\n Puppeteer cache (<code>~/.cache/puppeteer/chrome/</code> or <code>PUPPETEER_CACHE_DIR</code>),\n Chrome for Testing cache\n </td>\n </tr>\n <tr>\n <td>Windows</td>\n <td>\n <code>%LOCALAPPDATA%\\Google\\Chrome\\Application\\chrome.exe</code>,\n <code>C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe</code>,\n <code>C:\\Program Files (x86)\\...\\chrome.exe</code>\n </td>\n </tr>\n </tbody>\n</table>\n\nIf Chrome is not found, run `agent-browser install` to download Chrome from Chrome for Testing.\n\n## Usage\n\nChrome is the default engine -- no `--engine` flag is needed:\n\n```bash\nagent-browser open example.com\n```\n\nTo be explicit:\n\n```bash\nagent-browser --engine chrome open example.com\n```\n\n## Custom Binary\n\nPoint to any Chromium-based browser with `--executable-path`:\n\n```bash\nagent-browser --executable-path /path/to/chromium open example.com\n```\n\nOr via environment variable:\n\n```bash\nexport AGENT_BROWSER_EXECUTABLE_PATH=/path/to/chromium\nagent-browser open example.com\n```\n\n## Chrome-Specific Features\n\nThese features are available only with Chrome:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Flag</th></tr>\n </thead>\n <tbody>\n <tr><td>Browser extensions</td><td><code>--extension <path></code></td></tr>\n <tr><td>Persistent profiles</td><td><code>--profile <path></code> (sets Chrome's <code>--user-data-dir</code>)</td></tr>\n <tr><td>Storage state</td><td><code>--state <path></code></td></tr>\n <tr><td>File URL access</td><td><code>--allow-file-access</code></td></tr>\n <tr><td>Headless screenshot scrollbars</td><td><code>--hide-scrollbars false</code> keeps native scrollbars visible</td></tr>\n <tr><td>Headed mode</td><td><code>--headed</code></td></tr>\n <tr><td>Custom launch args</td><td><code>--args <args></code></td></tr>\n </tbody>\n</table>\n\n## Containers and CI\n\nIn Docker, CI runners, or other sandboxed environments, Chrome's user namespace sandbox may need to be disabled:\n\n```bash\nagent-browser --args \"--no-sandbox\" open example.com\n```\n\nagent-browser automatically adds `--no-sandbox` when it detects a container environment (Docker, Podman, running as root).\n"
|
||
},
|
||
"docs/src/app/engines/chrome/layout.tsx": {
|
||
"sha256": "0cec89bfa0f509c1adffecbc16dffaae3cdd16279ddee80bf83200454b4b5098",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"engines/chrome\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/engines/lightpanda/page.mdx": {
|
||
"sha256": "af1630ac72e596ba666a30cb02797e97d0b744b2978246d8c33df238be199100",
|
||
"raw": "# Lightpanda\n\n[Lightpanda](https://lightpanda.io/) is a headless browser engine built from scratch in Zig for machines. It starts instantly, uses 10x less memory than Chrome, and executes 10x faster.\n\nagent-browser manages Lightpanda the same way it manages Chrome -- spawning the process, connecting via CDP, and shutting it down. All downstream commands (snapshot, click, fill, screenshot, etc.) work through the same CDP protocol path.\n\n## Installation\n\nInstall the Lightpanda binary before using it with agent-browser:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Command</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>macOS (Apple Silicon)</td>\n <td><code>curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos && chmod a+x ./lightpanda</code></td>\n </tr>\n <tr>\n <td>Linux (x86_64)</td>\n <td><code>curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && chmod a+x ./lightpanda</code></td>\n </tr>\n </tbody>\n</table>\n\nMove the binary somewhere in your `PATH` (e.g. `/usr/local/bin/lightpanda` or `~/.local/bin/lightpanda`).\n\nSee the [Lightpanda installation docs](https://lightpanda.io/docs/open-source/installation) for more options.\n\n## Usage\n\nUse the `--engine` flag to select Lightpanda:\n\n```bash\nagent-browser --engine lightpanda open example.com\nagent-browser --engine lightpanda snapshot\nagent-browser --engine lightpanda screenshot\n```\n\nOr set it as the default via environment variable:\n\n```bash\nexport AGENT_BROWSER_ENGINE=lightpanda\nagent-browser open example.com\n```\n\nOr in your `agent-browser.json` config:\n\n```json\n{\n \"engine\": \"lightpanda\"\n}\n```\n\n## Custom Binary Path\n\nIf the `lightpanda` binary is not in your `PATH`, use `--executable-path`:\n\n```bash\nagent-browser --engine lightpanda --executable-path /path/to/lightpanda open example.com\n```\n\n## Differences from Chrome\n\nLightpanda is a purpose-built headless engine. Some Chrome-specific features are not available:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Status</th></tr>\n </thead>\n <tbody>\n <tr><td>Extensions (<code>--extension</code>)</td><td>Not supported</td></tr>\n <tr><td>Persistent profiles (<code>--profile</code>)</td><td>Not supported</td></tr>\n <tr><td>Storage state (<code>--state</code>)</td><td>Not supported</td></tr>\n <tr><td>File access (<code>--allow-file-access</code>)</td><td>Not supported</td></tr>\n <tr><td>Headed mode (<code>--headed</code>)</td><td>Not applicable (headless only)</td></tr>\n <tr><td>Screenshots</td><td>Depends on Lightpanda CDP support</td></tr>\n </tbody>\n</table>\n\nagent-browser returns a clear error if you combine `--engine lightpanda` with unsupported flags.\n\n## When to Use Lightpanda\n\nLightpanda is a good fit for:\n\n- Fast web scraping and data extraction\n- AI agent workflows where speed and low memory matter\n- CI/CD environments with constrained resources\n- High-volume parallel automation\n\nUse Chrome when you need full browser fidelity, extensions, or persistent profiles.\n"
|
||
},
|
||
"docs/src/app/engines/lightpanda/layout.tsx": {
|
||
"sha256": "a2e883bd6cd0058567d067370488a6ee76243685fd7cacd62d6adcd2a9a83d42",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"engines/lightpanda\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/engines/obscura/page.mdx": {
|
||
"sha256": "bad7a21e84dec56007bfd0bb8587d49d1a76559c305b8cd9c62aa4f2534324a8",
|
||
"raw": "# Obscura (experimental)\n\nThis adapter does not fix upstream engine bugs or imply Chrome parity. Review the limitations below before choosing Obscura.\n\n[Obscura](https://github.com/h4ckf0r0day/obscura) is a headless browser engine written in Rust. It runs real JavaScript through V8, speaks the Chrome DevTools Protocol, and targets web scraping and AI agent automation.\n\nagent-browser manages Obscura the same way it manages Chrome. It spawns the `obscura serve` process, connects over CDP, and shuts it down when done. All downstream commands (snapshot, click, fill, screenshot, and so on) run through the same CDP path.\n\n## Installation\n\nInstall the Obscura binary before using it with agent-browser:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Command</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>Linux (x86_64)</td>\n <td><code>curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-linux.tar.gz && tar xzf obscura-x86_64-linux.tar.gz</code></td>\n </tr>\n <tr>\n <td>macOS (Apple Silicon)</td>\n <td><code>curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-aarch64-macos.tar.gz && tar xzf obscura-aarch64-macos.tar.gz</code></td>\n </tr>\n </tbody>\n</table>\n\nMove the binary somewhere in your `PATH` (e.g. `/usr/local/bin/obscura` or `~/.local/bin/obscura`).\n\nSee the [Obscura README](https://github.com/h4ckf0r0day/obscura) for more install options, including Docker and building from source.\n\n## Usage\n\nUse the `--engine` flag to select Obscura:\n\n```bash\nagent-browser --engine obscura open example.com\nagent-browser --engine obscura snapshot\nagent-browser --engine obscura screenshot\n```\n\nOr set it as the default via environment variable:\n\n```bash\nexport AGENT_BROWSER_ENGINE=obscura\nagent-browser open example.com\n```\n\nOr in your `agent-browser.json` config:\n\n```json\n{\n \"engine\": \"obscura\"\n}\n```\n\n## Custom Binary Path\n\nIf the `obscura` binary is not in your `PATH`, use `--executable-path`:\n\n```bash\nagent-browser --engine obscura --executable-path /path/to/obscura open example.com\n```\n\n## Stealth mode\n\nObscura ships an optional stealth mode that presents a privacy-first, consistent browser fingerprint and blocks known trackers. Enable it for the Obscura engine by setting `AGENT_BROWSER_OBSCURA_STEALTH`:\n\n```bash\nAGENT_BROWSER_OBSCURA_STEALTH=1 agent-browser --engine obscura open example.com\n```\n\nWhen set, agent-browser launches `obscura serve` with `--stealth`. Accepted values are `1`, `true`, `yes`, and `on`. Stealth is off by default and requires an Obscura build with stealth support; disabling it does not imply Chrome parity.\n\n## Differences from Chrome\n\nObscura is a purpose-built headless engine. Some Chrome-specific features are not available:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Status</th></tr>\n </thead>\n <tbody>\n <tr><td>Extensions (<code>--extension</code>)</td><td>Not supported</td></tr>\n <tr><td>Persistent profiles (<code>--profile</code>)</td><td>Not supported</td></tr>\n <tr><td>Storage state (<code>--state</code>)</td><td>Not supported</td></tr>\n <tr><td>File access (<code>--allow-file-access</code>)</td><td>Not supported</td></tr>\n <tr><td>Headed mode (<code>--headed</code>)</td><td>Not applicable (headless only)</td></tr>\n <tr><td>Proxy bypass (<code>--proxy-bypass</code>, config, or environment)</td><td>Rejected, even without a proxy</td></tr>\n <tr><td>WebGPU, custom CA certificates, Chrome arguments</td><td>Not supported</td></tr>\n </tbody>\n</table>\n\nagent-browser returns a clear error if you combine `--engine obscura` with unsupported flags.\n\n## When to Use Obscura\n\nPotential uses to evaluate include:\n\n- Web scraping and data extraction with real JavaScript execution\n- AI agent workflows that want a lightweight CDP target\n- CI/CD environments where you prefer a single self-contained binary\n- Setups that want a privacy-first, consistent browser fingerprint (Obscura ships an optional stealth mode)\n\nUse Chrome when you need full browser fidelity, extensions, or persistent profiles.\n\n## Experimental Obscura provider\n\nSelect `--engine obscura --executable-path /path/to/obscura` to launch a local Obscura binary. This provider is experimental. Obscura v0.2.2 has known accessibility naming, hidden-element, iframe and screenshot fidelity gaps; successful CDP connection does not establish Chrome parity. Use Chrome for workflows that depend on these features until validated against your target pages.\n\nLocal development pages require `OBSCURA_ALLOW_PRIVATE_NETWORK=1` in the environment before the session starts. Close and relaunch the named session when changing engine launch settings. Stealth support depends on how the Obscura binary was built. Unsupported options including `--webgpu`, `--ca-cert`, `--args`, and `--proxy-bypass` are rejected. Proxy bypass rules from `proxyBypass` config, `AGENT_BROWSER_PROXY_BYPASS`, `NO_PROXY`, or `no_proxy` are also rejected, even without a proxy. Remove those settings only if bypass is not needed; otherwise use Chrome. Explicit `--engine obscura` launches validate the current invocation's resolved bypass settings, even with an existing daemon; clearing those settings does not reuse stale daemon environment values. Startup discovery and CDP initialization each have a 10-second deadline, with bounded connection cleanup on initialization failure.\n\nMCP tools use the same provider through `extraArgs`: `[\"--engine\", \"obscura\", \"--executable-path\", \"/path/to/obscura\"]`. A separate engine-specific MCP tool is unnecessary because tools delegate to the canonical CLI parser.\n\nFor source-build testing, see the [Obscura adapter contributor guide](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md#obscura-adapter).\n"
|
||
},
|
||
"docs/src/app/engines/obscura/layout.tsx": {
|
||
"sha256": "a1d290ef837433d52f5870d1f40f7332cdc4a6b550ce60dc1d3c102ceea4206f",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"engines/obscura\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/eve/page.mdx": {
|
||
"sha256": "08de1a8e033ea0b80d5667a20d00f1ed63b569963d6de76e1ee282878b361bd4",
|
||
"raw": "# eve Extension\n\n`@agent-browser/eve` mounts the full agent-browser tool set into an [eve](https://eve.dev) agent. The tools run `agent-browser` inside the agent sandbox, so the browser process, downloads, screenshots, and state stay out of the Next.js runtime.\n\n## Install\n\n```bash\npnpm add @agent-browser/eve\n```\n\n`eve` is a peer dependency and should already be present in an eve app. The sandbox preinstall helpers shown below ship with the same package, so no other install is needed.\n\n## Mount\n\nCreate an extension mount under `agent/extensions/`. The file name becomes the tool namespace.\n\n```ts\n// agent/extensions/browser.ts\nimport browser from \"@agent-browser/eve\";\n\nexport default browser({\n allowedDomains: [\"example.com\", \"*.example.com\"],\n maxOutputChars: 50000,\n});\n```\n\nThe agent gets namespaced tools such as `browser__navigate`, `browser__snapshot`, `browser__click`, `browser__fill`, `browser__find`, `browser__screenshot`, `browser__console`, and `browser__network_requests`.\n\n## Sandbox bootstrap\n\nThe extension can install `agent-browser`, Chromium, and required Linux libraries on first tool use. For production, install them in the eve sandbox template so sessions start warm.\n\n```ts\n// agent/sandbox.ts\nimport { agentBrowserRevalidationKey, installAgentBrowser } from \"@agent-browser/eve/sandbox\";\nimport { defineSandbox } from \"eve/sandbox\";\nimport { vercel } from \"eve/sandbox/vercel\";\n\nexport default defineSandbox({\n backend: vercel({ resources: { vcpus: 2 } }),\n revalidationKey: () => agentBrowserRevalidationKey(),\n async bootstrap({ use }) {\n const sandbox = await use();\n await installAgentBrowser(sandbox);\n },\n});\n```\n\n## Configuration\n\nCommon options:\n\n- `allowedDomains` restricts navigation and subresources.\n- `contentBoundaries` wraps page output in boundary markers.\n- `maxOutputChars` truncates large page output.\n- `inlineScreenshots` embeds screenshots as data URLs for channels that can render them.\n- `autoInstall`, `installSpec`, `installBrowser`, and `installSystemDependencies` control first-use installation.\n- `session` and `sessionPrefix` control browser session naming.\n- `binary` points at the `agent-browser` executable inside the sandbox.\n- `proxy` configures browser proxy use.\n\n## Agent workflow\n\nHave the agent navigate, snapshot, then act on snapshot refs. Snapshot refs like `[ref=e12]` become `@e12` selectors for interaction tools.\n\n```text\nInspect https://example.com and summarize what is visible.\n```\n\nFor reading articles or docs, prefer `browser__read`. For apps, use `browser__snapshot` before interaction and resnapshot after page changes.\n\n## Security\n\nCookie, storage, and saved-auth-state commands are intentionally not exposed by the extension because they can reveal credential material to the model. Use standard eve extension overrides when you need to disable a tool, add approval requirements, or provide an app-specific guarded tool.\n\n## Example\n\nSee [`examples/eve`](https://github.com/vercel-labs/agent-browser/tree/main/examples/eve) for a complete Next.js eve app with the extension mounted.\n"
|
||
},
|
||
"docs/src/app/eve/layout.tsx": {
|
||
"sha256": "8895b26b28e015bbf153787c9dd6ea5de791347b4951c646fee500ce42f8367a",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"eve\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/files/page.mdx": {
|
||
"sha256": "b671a6a8facc78b7b10f9a63b61871938efa3d86aede147da141ed80d5aee917",
|
||
"raw": "# Files & Clipboard\n\nagent-browser can upload files, capture downloads, read local files through `file://` URLs, write PDFs and screenshots, and interact with the browser clipboard.\n\n## Upload files\n\n```bash\nagent-browser snapshot -i\nagent-browser upload @e4 ./invoice.pdf\nagent-browser upload @e4 ./front.png ./back.png\n```\n\nThe selector must resolve to a file input. Multiple file paths are accepted for multi-file inputs.\n\n## Downloads\n\n```bash\nagent-browser download @e5 ./report.csv\nagent-browser wait --download ./archive.zip --timeout 30000\n```\n\nUse `download` when a specific element triggers the download. Use `wait --download` when another action starts the download and you need to wait for completion.\n\nSet a default download directory for browser-initiated downloads:\n\n```bash\nagent-browser --download-path ./downloads open https://app.example.com\n```\n\nWithout `--download-path`, downloads go to a temporary directory that is cleaned up when the browser closes.\n\n## Screenshots and PDFs\n\n```bash\nagent-browser screenshot ./page.png\nagent-browser screenshot --full ./page-full.png\nagent-browser screenshot --if-changed\nagent-browser screenshot --threshold 0.01\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80 ./page.jpg\nagent-browser pdf ./page.pdf\n```\n\nPrefer `--if-changed` for repeated captures: skipping unchanged images is the most token-efficient option. History is per tab and capture scope. The first capture returns a path; later unchanged captures omit it. JSON includes `changed`, `revision`, and `pixelChangeRatio`. `--threshold <0-1>` implies `--if-changed` and treats changes at or below that ratio as unchanged.\n\nScreenshot defaults can also be configured with:\n\n<table>\n <thead>\n <tr><th>Setting</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--screenshot-dir</code> / <code>AGENT_BROWSER_SCREENSHOT_DIR</code></td><td>Default screenshot output directory</td></tr>\n <tr><td><code>--screenshot-format</code> / <code>AGENT_BROWSER_SCREENSHOT_FORMAT</code></td><td><code>png</code> or <code>jpeg</code></td></tr>\n <tr><td><code>--screenshot-quality</code> / <code>AGENT_BROWSER_SCREENSHOT_QUALITY</code></td><td>JPEG quality from 0 to 100</td></tr>\n </tbody>\n</table>\n\n## Local files\n\n```bash\nagent-browser --allow-file-access open file:///Users/me/report.pdf\nagent-browser --allow-file-access open file:///path/to/page.html\nagent-browser screenshot ./local-file.png\n```\n\n`--allow-file-access` is Chromium-only. It allows `file://` pages to load and access other local files through browser APIs such as `fetch` and XHR.\n\n## Clipboard\n\n```bash\nagent-browser clipboard read\nagent-browser clipboard write \"Hello, world\"\nagent-browser clipboard copy\nagent-browser clipboard paste\n```\n\n`copy` and `paste` simulate the platform keyboard shortcuts for the current selection or focused element. Use `write` when you want to set clipboard text directly.\n"
|
||
},
|
||
"docs/src/app/files/layout.tsx": {
|
||
"sha256": "b5c74865cdda67dc2dddbebbd9baef7daa000de85b90d93d7893d798459ca435",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"files\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/init-scripts/page.mdx": {
|
||
"sha256": "035caf5a8f503e03c1ca13493a4bd3372827210c243ab875b8bf01d5366dd647",
|
||
"raw": "# Init Scripts & Extensions\n\nInit scripts run before page JavaScript. Use them to install hooks, polyfills, instrumentation, or test helpers before the first navigation.\n\n## Launch-time scripts\n\n```bash\nagent-browser --init-script ./instrumentation.js open https://example.com\nagent-browser --init-script ./a.js --init-script ./b.js open https://example.com\n```\n\nYou can also configure scripts with an environment variable:\n\n```bash\nexport AGENT_BROWSER_INIT_SCRIPTS=\"./a.js,./b.js\"\nagent-browser open https://example.com\n```\n\nLaunch-time scripts are applied when the browser starts. If the daemon is already running, close it before changing launch-time script options.\n\n## Built-in scripts\n\n```bash\nagent-browser --enable react-devtools open http://localhost:3000\n```\n\n`react-devtools` is the built-in feature currently available. It installs the React DevTools hook before application code runs and is required for `react tree`, `react inspect`, `react renders`, and `react suspense`.\n\n## Runtime scripts\n\n```bash\nagent-browser addinitscript \"window.__testMode = true\"\n# Returns an identifier\n\nagent-browser removeinitscript <identifier>\n```\n\nRuntime init scripts are useful after a session has started. They are still init scripts, so they affect future documents and navigations rather than rewriting already-executed page code.\n\nRuntime init-script identifiers are session-wide. `removeinitscript` removes the script from every open tab where it was registered and prevents it from being replayed into tabs opened later.\n\n## Pre-navigation setup\n\nFor flows that need routes, cookies, or scripts installed before the first real navigation, start the browser without a URL:\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\n`open` with no URL launches the browser on `about:blank`, leaving room to stage state before the target page loads.\n\n## Extensions\n\n```bash\nagent-browser --extension ./extension open https://example.com\nagent-browser --extension ./a --extension ./b open https://example.com\n```\n\nExtensions are launch-time options. They require a local Chromium-based browser and are not supported with CDP connections, cloud providers, or Lightpanda.\n\n## Safety\n\nInit scripts and extensions run with high privilege in the page context. Only load scripts and extension directories from trusted local paths.\n"
|
||
},
|
||
"docs/src/app/init-scripts/layout.tsx": {
|
||
"sha256": "ee32fe7ddbd24f7e87d5ddd4b81c3a010ca04f96b6b19d199b22c834aa8b3f9b",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"init-scripts\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/installation/page.mdx": {
|
||
"sha256": "2814c86965a6635d4eee08e4e5f522bf568e2f60e278656d6c1c89486a82ed45",
|
||
"raw": "# Installation\n\n## Global installation (recommended)\n\nInstalls the native Rust binary for maximum performance:\n\n```bash\nnpm install -g agent-browser\nagent-browser install # Download Chrome from Chrome for Testing (first time)\n```\n\nThis is the fastest option -- commands run through the native Rust CLI directly with sub-millisecond parsing overhead.\n\n## Quick start (no install)\n\n```bash\nnpx agent-browser install # Download Chrome (first time only)\nnpx agent-browser open example.com\n```\n\n## Project installation (local dependency)\n\nFor projects that want to pin the version in `package.json`:\n\n```bash\nnpm install agent-browser\nnpx agent-browser install # Download Chrome (first time)\n```\n\nThen use via `npx` or `package.json` scripts.\n\n## Homebrew (macOS)\n\n```bash\nbrew install agent-browser\nagent-browser install # Download Chrome (first time)\n```\n\n## Cargo (Rust)\n\n```bash\ncargo install agent-browser\nagent-browser install # Download Chrome (first time)\n```\n\nCompiles from source (~2-3 min). Requires Node.js 24+, pnpm 11+, and the Rust toolchain ([rustup.rs](https://rustup.rs)).\n\n## From source\n\n```bash\ngit clone https://github.com/vercel-labs/agent-browser\ncd agent-browser\npnpm install\npnpm build\npnpm build:native\n./bin/agent-browser install\npnpm link --global\n```\n\n## Windows browser sessions\n\nHeadless Chrome runs on a private Windows desktop. This prevents hidden browser windows from leaving visible rectangles on your desktop, including with affected Chrome 150 builds. It applies to bundled and custom Chrome executables and to windows created later in the session. Automation, screenshots, and GPU rendering continue through CDP.\n\nUse `--headed` to show Chrome on the interactive desktop. Sessions with extensions also use the interactive desktop. Agent-browser owns the Chrome processes it launches: Windows terminates the entire Chrome tree when its daemon exits or is forcibly killed. Browsers attached with `--cdp` or `--auto-connect` remain externally owned.\n\n## Linux dependencies\n\nOn Linux, install system dependencies:\n\n```bash\nagent-browser install --with-deps\n```\n\nThis exits nonzero if the package manager cannot install every required browser library.\n\n## Updating\n\nUpgrade to the latest version:\n\n```bash\nagent-browser upgrade\n```\n\nDetects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command automatically. Displays the version change on success, or informs you if you are already on the latest version.\n\n## Doctor\n\n`doctor` diagnoses your install and auto-cleans stale daemon files. Run it whenever something stops working unexpectedly, or after upgrades:\n\n```bash\nagent-browser doctor # Full diagnosis\nagent-browser doctor --offline --quick # Local-only, fastest (~<1s)\nagent-browser doctor --fix # Also run destructive repairs\nagent-browser doctor --webgpu # Also run a live WebGPU render probe\nagent-browser doctor --json # Structured output\n```\n\nIt checks:\n\n<table>\n<thead>\n<tr><th>Category</th><th>What it checks</th></tr>\n</thead>\n<tbody>\n<tr><td>Environment</td><td>CLI version, platform, home directory, state and socket dirs, free disk space</td></tr>\n<tr><td>Chrome</td><td>Chrome install path and version, cache dir, Puppeteer fallback, user-data dir and profile count, optional <code>lightpanda</code> engine</td></tr>\n<tr><td>Daemons</td><td>Running daemons per session, stale <code>.sock</code> / <code>.pid</code> / <code>.version</code> / <code>.stream</code> files (auto-cleaned), version mismatch with the CLI, dashboard process liveness</td></tr>\n<tr><td>Config</td><td><code>~/.agent-browser/config.json</code>, <code>./agent-browser.json</code>, and any file at <code>AGENT_BROWSER_CONFIG</code> parse as valid JSON</td></tr>\n<tr><td>Security</td><td>Encryption key env var or <code>~/.agent-browser/.encryption-key</code> (with 0600 permissions on unix), state file count and age vs <code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code>, action policy file</td></tr>\n<tr><td>Providers</td><td>Env vars for Browserless, Browserbase, Browser Use, Kernel, AgentCore (AWS creds), Appium (for <code>--provider ios</code>), and <code>AI_GATEWAY_API_KEY</code> for chat</td></tr>\n<tr><td>Network</td><td>Reachability of the Chrome for Testing CDN, AI Gateway (if configured), and any currently selected provider endpoint (skipped under <code>--offline</code>)</td></tr>\n<tr><td>Launch test</td><td>Spawns a scratch session, launches headless Chrome, navigates to <code>about:blank</code>, then closes. Measures wall time (skipped under <code>--quick</code>)</td></tr>\n<tr><td>WebGPU probe</td><td>Opt-in via <code>--webgpu</code>: launches a scratch session with the <a href=\"/webgpu\">WebGPU preset</a>, renders through a real WebGPU pass, and pixel-checks both an offscreen readback and a decoded screenshot. Add <code>--headed</code> to validate the headed/Xvfb capture path</td></tr>\n</tbody>\n</table>\n\nStale sidecar files are always cleaned. Destructive actions are opt-in via `--fix`:\n\n<table>\n<thead>\n<tr><th>Check</th><th>What <code>--fix</code> does</th></tr>\n</thead>\n<tbody>\n<tr><td>Chrome missing</td><td>Runs <code>agent-browser install</code></td></tr>\n<tr><td>Version-mismatched daemons</td><td>Sends <code>close</code> to each and cleans files</td></tr>\n<tr><td>Old state files</td><td>Deletes state files older than <code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code> (default 30)</td></tr>\n<tr><td>Missing encryption key</td><td>Generates a new key at <code>~/.agent-browser/.encryption-key</code> (0600, unix); never overwrites an existing key</td></tr>\n</tbody>\n</table>\n\nExit code is `0` if all checks pass (warnings are fine), `1` if any fail.\n\n## Custom browser\n\nUse a custom browser executable instead of bundled Chromium:\n\n- **Serverless** - Use `@sparticuz/chromium` (~50MB vs ~684MB)\n- **System browser** - Use existing Chrome installation\n- **Custom builds** - Use modified browser builds\n\n```bash\n# Via flag\nagent-browser --executable-path /path/to/chromium open example.com\n\n# Via environment variable\nAGENT_BROWSER_EXECUTABLE_PATH=/path/to/chromium agent-browser open example.com\n```\n\n### Serverless example\n\nUse `@sparticuz/chromium` or similar to obtain a Chromium executable path, then pass it via `--executable-path` or `AGENT_BROWSER_EXECUTABLE_PATH`.\n\n## AI agent setup\n\nagent-browser works with any AI agent out of the box. For richer context:\n\n### AI coding assistants (recommended)\n\nInstall the skill for your AI coding assistant:\n\n```bash\nnpx skills add vercel-labs/agent-browser\n```\n\nThis works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode, and Windsurf. The skill is fetched from the repository and stays up to date automatically.\n\n> **Do not** copy `SKILL.md` from `node_modules` -- it will become stale as new features are added. Always use `npx skills add` or reference the repository version.\n\n### AGENTS.md / CLAUDE.md\n\nAdd to your instructions file:\n\n```markdown\n## Browser Automation\n\nUse `agent-browser` for web automation. Run `agent-browser --help` for all commands.\n\nCore workflow:\n1. `agent-browser open <url>` - Navigate to page\n2. `agent-browser snapshot -i` - Get interactive elements with refs (@e1, @e2)\n3. `agent-browser click @e1` / `fill @e2 \"text\"` - Interact using refs\n4. Re-snapshot after page changes\n```\n"
|
||
},
|
||
"docs/src/app/installation/layout.tsx": {
|
||
"sha256": "fc98d4d319ba7d43f639a78c1ed4ee0281fe15cddd21ab40a6c2d83c3772a040",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"installation\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/ios/page.mdx": {
|
||
"sha256": "ca3908a6e7159347d4bb94514334e67d35221994ea4eae52c1d58a345eeb1092",
|
||
"raw": "# iOS Simulator\n\nControl real Mobile Safari in the iOS Simulator for authentic mobile web testing. Uses Appium with XCUITest for native automation.\n\n## Requirements\n\n- macOS with Xcode installed\n- iOS Simulator runtimes (download via Xcode)\n- Appium with XCUITest driver\n\n## Setup\n\n```bash\n# Install Appium globally\nnpm install -g appium\n\n# Install the XCUITest driver for iOS\nappium driver install xcuitest\n```\n\n## List available devices\n\nSee all iOS simulators available on your system:\n\n```bash\nagent-browser device list\n\n# Output:\n# Available iOS Simulators:\n#\n# ○ iPhone 16 Pro (iOS 18.0)\n# F21EEC0D-7618-419F-811B-33AF27A8B2FD\n# ○ iPhone 16 Pro Max (iOS 18.0)\n# 50402807-C9B8-4D37-9F13-2E00E782C744\n# ○ iPad Pro 13-inch (M4) (iOS 18.0)\n# 3A6C6436-B909-4593-866D-91D1062BB070\n# ...\n```\n\n## Basic usage\n\nUse the `-p ios` flag to enable iOS mode. The workflow is identical to desktop:\n\n```bash\n# Launch Safari on iPhone 16 Pro\nagent-browser -p ios --device \"iPhone 16 Pro\" open https://example.com\n\n# Get snapshot with refs (same as desktop)\nagent-browser -p ios snapshot -i\n\n# Interact using refs\nagent-browser -p ios tap @e1\nagent-browser -p ios fill @e2 \"text\"\n\n# Take screenshot\nagent-browser -p ios screenshot mobile.png\n\n# Close session (shuts down simulator)\nagent-browser -p ios close\n```\n\n## Mobile-specific commands\n\n```bash\n# Swipe gestures\nagent-browser -p ios swipe up\nagent-browser -p ios swipe down\nagent-browser -p ios swipe left\nagent-browser -p ios swipe right\n\n# Swipe with distance (pixels)\nagent-browser -p ios swipe up 500\n\n# Tap (alias for click, semantically clearer for touch)\nagent-browser -p ios tap @e1\n```\n\n## Environment variables\n\nConfigure iOS mode via environment variables:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=ios\nexport AGENT_BROWSER_IOS_DEVICE=\"iPhone 16 Pro\"\n\n# Now all commands use iOS\nagent-browser open https://example.com\nagent-browser snapshot -i\nagent-browser tap @e1\n```\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_PROVIDER</code></td><td>Set to <code>ios</code> to enable iOS mode</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_DEVICE</code></td><td>Device name (e.g., \"iPhone 16 Pro\")</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_UDID</code></td><td>Device UDID (alternative to device name)</td></tr>\n </tbody>\n</table>\n\n## Supported devices\n\nAll iOS Simulators available in Xcode are supported, including:\n\n- All iPhone models (iPhone 15, 16, 17, SE, etc.)\n- All iPad models (iPad Pro, iPad Air, iPad mini, etc.)\n- Multiple iOS versions (17.x, 18.x, etc.)\n\n**Real devices** are also supported via USB connection (see below).\n\n## Real device support\n\nAppium can control Safari on real iOS devices connected via USB. This requires additional one-time setup.\n\n### 1. Get your device UDID\n\n```bash\n# List connected devices\nxcrun xctrace list devices\n\n# Or via system profiler\nsystem_profiler SPUSBDataType | grep -A 5 \"iPhone\\|iPad\"\n```\n\n### 2. Sign WebDriverAgent (one-time)\n\nWebDriverAgent needs to be signed with your Apple Developer certificate to run on real devices.\n\n```bash\n# Open the WebDriverAgent Xcode project\ncd ~/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent\nopen WebDriverAgent.xcodeproj\n```\n\nIn Xcode:\n\n1. Select the `WebDriverAgentRunner` target\n2. Go to Signing & Capabilities\n3. Select your Team (requires Apple Developer account, free tier works)\n4. Let Xcode manage signing automatically\n\n### 3. Use with agent-browser\n\n```bash\n# Connect device via USB, then use the UDID\nagent-browser -p ios --device \"<DEVICE_UDID>\" open https://example.com\n\n# Or use the device name if unique\nagent-browser -p ios --device \"John's iPhone\" open https://example.com\n```\n\n### Real device notes\n\n- First run installs WebDriverAgent to the device (may require Trust prompt on device)\n- Device must be unlocked and connected via USB\n- Slightly slower initial connection than simulator\n- Tests against real Safari performance and behavior\n- On first install, go to Settings → General → VPN & Device Management to trust the developer certificate\n\n## Performance notes\n\n- **First launch:** Takes 30-60 seconds to boot the simulator and start Appium\n- **Subsequent commands:** Fast (simulator stays running)\n- **Close command:** Shuts down simulator and Appium server\n\n## Differences from desktop\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Desktop</th><th>iOS</th></tr>\n </thead>\n <tbody>\n <tr><td>Browser</td><td>Chrome, Lightpanda</td><td>Safari only</td></tr>\n <tr><td>Tabs</td><td>Supported</td><td>Single tab only</td></tr>\n <tr><td>PDF export</td><td>Supported</td><td>Not supported</td></tr>\n <tr><td>Screencast</td><td>Supported</td><td>Not supported</td></tr>\n <tr><td>Swipe gestures</td><td>Not native</td><td>Native support</td></tr>\n </tbody>\n</table>\n\n## Troubleshooting\n\n### Appium not found\n\n```bash\n# Make sure Appium is installed globally\nnpm install -g appium\nappium driver install xcuitest\n\n# Verify installation\nappium --version\n```\n\n### No simulators available\n\nOpen Xcode and download iOS Simulator runtimes from **Settings → Platforms**.\n\n### Simulator won't boot\n\nTry booting the simulator manually from Xcode or the Simulator app to ensure it works, then retry with agent-browser.\n"
|
||
},
|
||
"docs/src/app/ios/layout.tsx": {
|
||
"sha256": "a8d608162dd7c0b0d0a78bb80a5268de0ed56691577634e7ab0d04132a5186fd",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"ios\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/native-mode/page.mdx": {
|
||
"sha256": "cc6a213090ab51eaae7da4c8da8f774fcdc021d5310211e0b7ced4c75bc9f6cd",
|
||
"raw": "# Native Mode\n\nagent-browser is now 100% native Rust by default. The Node.js/Playwright daemon has been removed.\n\nThis page is no longer relevant. See the main [documentation](/) for current architecture and usage.\n"
|
||
},
|
||
"docs/src/app/native-mode/layout.tsx": {
|
||
"sha256": "1f19f6d29d26fe22de178711ebc401f3e2b4aa1526d6cf8df1b148840d703b20",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"native-mode\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/network/page.mdx": {
|
||
"sha256": "1a1cc13cc57b0a85dc293c7e283f7acf146ea473165045091de0b6efd56fd862",
|
||
"raw": "# Network\n\nUse network commands to intercept requests, mock responses, inspect traffic, and export HAR files during browser automation.\n\n## Request routing\n\nRoutes apply before matching requests are sent. Set them before navigation when you need the first page load to be affected.\n\n```bash\nagent-browser open\nagent-browser network route \"**/analytics/**\" --abort\nagent-browser network route \"**/api/users\" --body '{\"users\":[]}'\nagent-browser navigate https://app.example.com\n```\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>network route <url></code></td><td>Intercept matching requests</td></tr>\n <tr><td><code>network route <url> --abort</code></td><td>Block matching requests</td></tr>\n <tr><td><code>network route <url> --body <json></code></td><td>Fulfill matching requests with a mock body</td></tr>\n <tr><td><code>network route \"*\" --resource-type script --abort</code></td><td>Block only a specific resource type</td></tr>\n <tr><td><code>network unroute [url]</code></td><td>Remove one route or all routes</td></tr>\n </tbody>\n</table>\n\n`--resource-type` accepts comma-separated resource types such as `script`, `image`, `font`, `xhr`, and `fetch`.\n\n## Request log\n\n```bash\nagent-browser network requests\nagent-browser network requests --filter api\nagent-browser network requests --type xhr,fetch\nagent-browser network requests --method POST\nagent-browser network requests --status 2xx\nagent-browser network request <requestId>\nagent-browser network requests --clear\n```\n\n<table>\n <thead>\n <tr><th>Filter</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--filter <pattern></code></td><td>Filter by URL substring or pattern</td></tr>\n <tr><td><code>--type <csv></code></td><td>Filter by resource type</td></tr>\n <tr><td><code>--method <method></code></td><td>Filter by HTTP method</td></tr>\n <tr><td><code>--status <status></code></td><td>Filter by exact status, status family, or range</td></tr>\n <tr><td><code>--clear</code></td><td>Clear the tracked request log</td></tr>\n </tbody>\n</table>\n\nUse `network request <requestId>` to inspect one request and response in detail after finding its ID in `network requests`.\n\n## HAR export\n\n```bash\nagent-browser network har start\n\nagent-browser open https://app.example.com\nagent-browser click @e4\n\nagent-browser network har stop ./trace.har\n```\n\nText response bodies (JSON, HTML, JavaScript, form data) are embedded in the HAR as `content.text` by default, captured while the browser still has them buffered so they survive navigation. The `--content` flag on `har start` controls this:\n\n<table>\n <thead>\n <tr><th>Mode</th><th>Behavior</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--content text</code></td><td>Default. Embed text-like bodies (JSON, XML, HTML, JS, form data), up to 2 MB per body.</td></tr>\n <tr><td><code>--content all</code></td><td>Embed every body; binary content is base64-encoded with <code>encoding: \"base64\"</code>.</td></tr>\n <tr><td><code>--content none</code></td><td>Sizes and MIME types only, no bodies.</td></tr>\n </tbody>\n</table>\n\nHAR files include request headers, response headers, cookies, POST data, and response bodies. Treat them as sensitive when pages use cookies, bearer tokens, or API keys.\n\n## SSR and no-JavaScript debugging\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"navigate\",\"http://localhost:3000\"]' \\\n '[\"snapshot\",\"-i\"]'\n```\n\nLaunching with `open` and no URL leaves the browser on `about:blank`, which gives routes time to register before the first real navigation.\n"
|
||
},
|
||
"docs/src/app/network/layout.tsx": {
|
||
"sha256": "4223006dfe52172dabeb126d1f909c9708af16c914fd65976f4f166a145a12ca",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"network\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/next/page.mdx": {
|
||
"sha256": "0a5cab81b28a3ecbbb9ca1d8d59331beb7a9b71ba21bc8ef6974f23ad61286ba",
|
||
"raw": "# Next.js + Vercel\n\nRun agent-browser from a Next.js app on Vercel using Vercel Sandbox. A Linux microVM spins up on demand, runs agent-browser + Chrome, and shuts down. No binary size limits, no Chromium bundling complexity.\n\n## Setup\n\n```bash\npnpm add @agent-browser/sandbox @vercel/sandbox\n```\n\n## Server action\n\nThe Vercel Sandbox runs Amazon Linux. Chromium requires system libraries that are not installed by default, so fresh sandboxes need a `dnf install` step before agent-browser can launch Chrome. Use a sandbox snapshot (below) to skip this entirely in production. The `@agent-browser/sandbox` helper installs those system dependencies by default and handles command execution.\n\n```ts\n\"use server\";\nimport { runAgentBrowserCommand, withAgentBrowserSandbox } from \"@agent-browser/sandbox/vercel\";\n\nexport async function screenshotUrl(url: string) {\n return withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\"open\", url]);\n\n const ssResult = await runAgentBrowserCommand<{ data?: { path?: string } }>(sandbox, [\n \"screenshot\",\n ]);\n const ssPath = ssResult.json?.data?.path;\n if (!ssPath) throw new Error(\"Screenshot did not return a file path.\");\n\n const b64Result = await sandbox.runCommand(\"base64\", [\"-w\", \"0\", ssPath]);\n const screenshot = (await b64Result.stdout()).trim();\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return { ok: true, screenshot };\n });\n}\n\nexport async function snapshotUrl(url: string) {\n return withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\"open\", url]);\n\n const result = await runAgentBrowserCommand(sandbox, [\"snapshot\", \"-i\", \"-c\"], {\n json: false,\n });\n\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return { ok: true, snapshot: result.stdout };\n });\n}\n```\n\n## Sandbox snapshots\n\nWithout optimization, each Sandbox run installs system dependencies + agent-browser + Chromium from scratch (~30 seconds). A **sandbox snapshot** is a saved VM image with everything pre-installed, similar to a Docker image for Vercel Sandbox. When `AGENT_BROWSER_SNAPSHOT_ID` is set, the sandbox boots from that image instead of installing, bringing startup down to sub-second.\n\nThis is different from an agent-browser *accessibility snapshot* (which dumps a page's accessibility tree). A sandbox snapshot is a Vercel infrastructure concept.\n\nCreate a sandbox snapshot by running the helper script once:\n\n```bash\nnpx tsx scripts/create-snapshot.ts\n```\n\nThe script spins up a fresh sandbox, installs system dependencies + agent-browser + Chromium, saves the VM state, and prints the snapshot ID:\n\n```\nAGENT_BROWSER_SNAPSHOT_ID=snap_xxxxxxxxxxxx\n```\n\nAdd this to your Vercel project environment variables (or `.env.local` for local development). Recommended for any production deployment.\n\n## Authentication\n\nOn Vercel deployments, the Sandbox SDK authenticates automatically via OIDC. For local development, provide explicit credentials:\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>VERCEL_TOKEN</code></td><td>Vercel personal access token</td></tr>\n <tr><td><code>VERCEL_TEAM_ID</code></td><td>Vercel team ID</td></tr>\n <tr><td><code>VERCEL_PROJECT_ID</code></td><td>Vercel project ID</td></tr>\n </tbody>\n</table>\n\nWhen all three are set, they are passed to `Sandbox.create()`. When absent, the SDK falls back to `VERCEL_OIDC_TOKEN` (automatic on Vercel).\n\n## Scheduled workflows (cron)\n\nFor recurring tasks like daily monitoring, use Vercel Cron Jobs:\n\n```ts\n// app/api/cron/monitor/route.ts\nimport { runAgentBrowserCommand, withAgentBrowserSandbox } from \"@agent-browser/sandbox/vercel\";\n\nexport async function GET() {\n const result = await withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\n \"open\", \"https://example.com/pricing\",\n ]);\n const snap = await runAgentBrowserCommand(sandbox, [\n \"snapshot\", \"-i\", \"-c\",\n ], { json: false });\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return snap.stdout;\n });\n\n // Process results, send alerts, store data...\n return Response.json({ ok: true, snapshot: result });\n}\n```\n\n```json\n// vercel.json\n{\n \"crons\": [\n { \"path\": \"/api/cron/monitor\", \"schedule\": \"0 9 * * *\" }\n ]\n}\n```\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_SNAPSHOT_ID</code></td><td>Sandbox snapshot ID for sub-second startup (see above)</td></tr>\n <tr><td><code>VERCEL_TOKEN</code></td><td>Vercel personal access token (for local dev; OIDC is automatic on Vercel)</td></tr>\n <tr><td><code>VERCEL_TEAM_ID</code></td><td>Vercel team ID (for local dev)</td></tr>\n <tr><td><code>VERCEL_PROJECT_ID</code></td><td>Vercel project ID (for local dev)</td></tr>\n </tbody>\n</table>\n\n## Demo app\n\nA working demo with streaming progress UI, rate limiting, and a deploy-to-Vercel button is at [`examples/environments/`](https://github.com/vercel-labs/agent-browser/tree/main/examples/environments).\n"
|
||
},
|
||
"docs/src/app/next/layout.tsx": {
|
||
"sha256": "bd59c82b0196d1957dcccc622d99dc4b5d84e3290ce134b688a11e25c73943ac",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"next\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/page.mdx": {
|
||
"sha256": "a8944e48018ff35b54691083380dd10259d4a9c55624ffd418f6ef475f05dadc",
|
||
"raw": "# agent-browser\n\nBrowser automation CLI designed for AI agents. Compact text output minimizes context usage. 100% native Rust.\n\n```bash\nnpm install -g agent-browser # all platforms\nbrew install agent-browser # macOS\nagent-browser install # Download Chrome (first time)\n\n# or try without installing\nnpx agent-browser open example.com\n```\n\n## Features\n\n- **Agent-first**: Compact text output uses fewer tokens than JSON, designed for AI context efficiency\n- **Ref-based**: Snapshot returns accessibility tree with refs for deterministic element selection\n- **Complete**: 50+ commands for navigation, forms, screenshots, network, storage, files, tabs, frames, and debugging\n- **Observable**: [Video recording](/recording), [streaming](/streaming), [debugging](/debugging), [profiler](/profiler), and [diffing](/diffing) tools are built in\n- **Modern apps**: [Network control](/network), [React & Web Vitals](/react), [init scripts](/init-scripts), [Next.js + Vercel](/next), and [eve Extension](/eve) workflows have first-class docs\n- **Stateful**: [Sessions](/sessions), profiles, auth state, cookies, storage, proxy, and security controls support long-running agents\n- **Cross-platform**: macOS, Linux, Windows with native binaries\n\n## Works with\n\nClaude Code, Cursor, GitHub Copilot, OpenAI Codex, Google Gemini, opencode, and any agent that can run shell commands.\n\n## Example\n\n```bash\n# Navigate and get snapshot\nagent-browser open example.com\nagent-browser snapshot -i\n\n# Output:\n# - heading \"Example Domain\" [ref=e1]\n# - link \"More information...\" [ref=e2]\n\n# Interact using refs\nagent-browser click @e2\nagent-browser screenshot page.png\nagent-browser close\n```\n\n## Why refs?\n\nThe `snapshot` command returns a compact accessibility tree where each element has a unique ref like `@e1`, `@e2`. This provides:\n\n- **Context-efficient**: Text output uses ~200-400 tokens vs ~3000-5000 for full DOM\n- **Deterministic**: Ref points to exact element from snapshot\n- **Fast**: No DOM re-query needed\n- **AI-friendly**: LLMs parse text output naturally\n\n## Architecture\n\nClient-daemon architecture for optimal performance:\n\n1. **Rust CLI**: Parses commands, communicates with daemon\n2. **Native Daemon**: Pure Rust daemon using direct CDP, manages Chrome via Chrome DevTools Protocol\n\nThe daemon starts automatically and persists between commands. By default, it saves configured restore state, closes its headless browser, and exits after one hour without commands or dashboard input. Without `--restore` or another restore key, shutdown discards transient browser state and open tabs. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default timeout; provider-owned cloud browsers are not. Use `--idle-timeout <time>` or `AGENT_BROWSER_IDLE_TIMEOUT_MS` to tune the timeout, and use `0` to disable it.\n\n## Platforms\n\nNative Rust binaries for macOS (ARM64, x64), Linux (ARM64, x64), and Windows (x64).\n"
|
||
},
|
||
"docs/src/app/plugins/page.mdx": {
|
||
"sha256": "ae6ad531b00e8831140eafeb30715ac64bb7d9ce0e1f6d61ca8ef5d589e1cb33",
|
||
"raw": "# Plugins\n\nPlugins let agent-browser integrate with external tools without adding those tools to core. A plugin is a local executable that reads one JSON request from stdin and writes one JSON response to stdout.\n\nUse plugins for vault-backed login, custom browser providers, local launch customization, and domain-specific commands such as CAPTCHA solving.\n\n## When to write a plugin\n\nWrite a plugin when the integration needs vendor SDKs, local CLIs, credentials, paid APIs, or behavior that should not become an agent-browser dependency.\n\nGood plugin fits:\n\n- Resolve login credentials from an external vault\n- Launch a browser through a hosted provider and return a CDP WebSocket URL\n- Add local Chrome launch arguments, extensions, or init scripts\n- Run a namespaced command such as `captcha.solve`\n\nKeep browser automation itself in agent-browser. A plugin should provide data or launch configuration, then let agent-browser continue driving the browser.\n\n## What to build as a plugin\n\nThese are good places for plugin authors to start:\n\n- **New cloud browser providers**: Hosted browser platforms are good models for `browser.provider`. Existing built-ins can stay in core for compatibility, but new providers should usually start as plugins.\n- **Vault integrations**: Password managers, secret stores, and enterprise SSO helpers fit `credential.read`. Keep the local encrypted auth vault in core, but put vendor-specific vault access in plugins.\n- **Stealth and anti-detection**: These techniques change quickly and can be risky to support in core. They fit `launch.mutate` plugins that append launch args, extensions, init scripts, or user-agent overrides.\n- **CAPTCHA solvers**: CAPTCHA integrations are plugin territory because they involve third-party APIs, credentials, policy concerns, and fast vendor churn. They can use `command.run` or a custom capability such as `captcha.solve`.\n- **Vendor-specific auth helpers**: Login helpers for a specific app, IdP, or enterprise flow should live outside core unless they become generic browser automation primitives.\n\n## Add a plugin someone else built\n\nUse `plugin add` with the package or repository name:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha\nagent-browser plugin add @company/agent-browser-plugin-vault --name vault\nagent-browser plugin add org/agent-browser-plugin-cloud-browser\n```\n\nagent-browser chooses the source from the reference:\n\n<table>\n <thead>\n <tr><th>Reference</th><th>Source</th><th>Example</th></tr>\n </thead>\n <tbody>\n <tr><td><code>name</code></td><td>npm package</td><td><code>agent-browser-plugin-captcha</code></td></tr>\n <tr><td><code>@scope/name</code></td><td>scoped npm package</td><td><code>@company/agent-browser-plugin-vault</code></td></tr>\n <tr><td><code>owner/repo</code></td><td>GitHub repository</td><td><code>org/agent-browser-plugin-cloud-browser</code></td></tr>\n </tbody>\n</table>\n\n`plugin add` writes `./agent-browser.json` by default. Use `--global` to write `~/.agent-browser/config.json` instead.\n\nDuring add, agent-browser runs the package once and asks for `plugin.manifest`. A plugin manifest declares the plugin name and capabilities. If a plugin does not support manifests yet, use the capabilities from the plugin README:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha --capability command.run --capability captcha.solve --no-manifest\n```\n\nVerify the plugin is configured:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show captcha\n```\n\nThen use it through the command path for its capability:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\nagent-browser --provider cloud-browser open https://example.com\nagent-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"abc\",\"url\":\"https://example.com\"}'\n```\n\n`launch.mutate` plugins run automatically for local launches such as `agent-browser open`.\n\n## Configure a plugin\n\n`plugin add` creates this config for you. You can also edit the `plugins` array manually:\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"args\": [],\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nInspect the registry:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show vault\n```\n\n`AGENT_BROWSER_PLUGINS` can replace config discovery with a JSON array using the same shape.\n\nDo not put API tokens, vault tokens, or passwords in plugin `args`. Use the vendor's own CLI login, keychain, environment, or session mechanism outside agent-browser config.\n\n## Protocol\n\nagent-browser starts the executable, writes this envelope to stdin, waits for stdout, and parses stdout as JSON:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"credential.resolve\",\n \"capability\": \"credential.read\",\n \"request\": {}\n}\n```\n\nEvery successful response must include the same protocol and `success: true`:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"data\": {}\n}\n```\n\nOnly stdout is parsed. Write no logs to stdout. agent-browser suppresses plugin stderr for core integrations, so use files or your own debug mode when developing.\n\nCore integrations suppress plugin-provided error text in user-facing errors to reduce accidental secret exposure. Generic `plugin run` keeps plugin error text because it is a developer-facing command.\n\n## Plugin manifest\n\nSupport `plugin.manifest` so users can add your plugin without manually entering capabilities:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"plugin.manifest\",\n \"capability\": \"plugin.manifest\",\n \"request\": {}\n}\n```\n\nReturn the plugin name and capabilities:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"manifest\": {\n \"name\": \"captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"],\n \"description\": \"Solve CAPTCHA challenges through Example CAPTCHA\"\n }\n}\n```\n\nWith a manifest, users can run:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha\n```\n\nWithout a manifest, users must pass `--capability` flags during add.\n\n## Capabilities\n\n<table>\n <thead>\n <tr><th>Capability</th><th>Request type</th><th>How users invoke it</th><th>Response field</th></tr>\n </thead>\n <tbody>\n <tr><td><code>credential.read</code></td><td><code>credential.resolve</code></td><td><code>auth login --credential-provider <name></code></td><td><code>credential</code></td></tr>\n <tr><td><code>browser.provider</code></td><td><code>browser.launch</code>, <code>browser.close</code></td><td><code>--provider <name></code></td><td><code>browser</code></td></tr>\n <tr><td><code>launch.mutate</code></td><td><code>launch.mutate</code></td><td>Any local launch</td><td><code>launch</code></td></tr>\n <tr><td><code>command.run</code></td><td>Custom request type</td><td><code>plugin run <name> <type></code></td><td><code>data</code></td></tr>\n </tbody>\n</table>\n\nPlugins may declare custom capabilities such as `captcha.solve`. `plugin run` can invoke `command.run` and custom capabilities, but it cannot invoke core capabilities or protocol request types directly. Use the dedicated command path for `credential.read`, `browser.provider`, and `launch.mutate`.\n\n## Minimal plugin\n\nThis plugin implements `captcha.solve` and returns a fake token:\n\n```js\n#!/usr/bin/env node\n\nconst chunks = [];\nfor await (const chunk of process.stdin) {\n chunks.push(chunk);\n}\n\nconst input = JSON.parse(Buffer.concat(chunks).toString(\"utf8\"));\n\nfunction reply(body) {\n process.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: true,\n ...body,\n })\n );\n}\n\nif (input.protocol !== \"agent-browser.plugin.v1\") {\n process.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: false,\n error: \"unsupported protocol\",\n })\n );\n process.exit(0);\n}\n\nif (input.type === \"plugin.manifest\") {\n reply({\n manifest: {\n name: \"captcha\",\n capabilities: [\"command.run\", \"captcha.solve\"],\n description: \"Example CAPTCHA plugin\",\n },\n });\n process.exit(0);\n}\n\nif (input.type === \"captcha.solve\") {\n reply({\n data: {\n token: \"example-token\",\n siteKey: input.request.siteKey,\n url: input.request.url,\n },\n });\n process.exit(0);\n}\n\nprocess.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: false,\n error: `unsupported request type: ${input.type}`,\n })\n);\n```\n\nMake it executable and configure it:\n\n```bash\nchmod +x ./agent-browser-plugin-captcha\n```\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"captcha\",\n \"command\": \"./agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nRun it:\n\n```bash\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"abc\",\"url\":\"https://example.com\"}'\n```\n\n## Credential plugin\n\nA credential plugin receives:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"credential.resolve\",\n \"capability\": \"credential.read\",\n \"request\": {\n \"profileName\": \"my-app\",\n \"itemRef\": \"My App\",\n \"url\": \"https://app.example.com/login\"\n }\n}\n```\n\nReturn `credential`:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"credential\": {\n \"username\": \"alice@example.com\",\n \"password\": \"secret\",\n \"url\": \"https://app.example.com/login\",\n \"usernameSelector\": \"#username\",\n \"passwordSelector\": \"#password\",\n \"submitSelector\": \"input[type=submit]\"\n }\n}\n```\n\nUse it for one login:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\n```\n\nFor a login form reached through stateful in-page setup, add `--no-navigate`. The active top-level page must have the same scheme, host, and effective port as the effective credential URL. Command-level `--url` overrides provider URL metadata and supplies this expected origin without navigating. The provider secret remains outside generated process arguments and normal output:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\n```\n\nFor external vaults, prefer calling the vendor CLI from the plugin and relying on its existing local session. Do not pass vault tokens in `agent-browser.json`.\n\n## Browser provider plugin\n\nA browser provider plugin receives `browser.launch` and returns a CDP URL:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"browser\": {\n \"cdpUrl\": \"ws://127.0.0.1:9222/devtools/browser/session\",\n \"directPage\": false,\n \"metadata\": {\n \"sessionId\": \"provider-session-id\"\n },\n \"cleanup\": {\n \"sessionId\": \"provider-session-id\"\n }\n }\n}\n```\n\nThen users launch through the plugin name:\n\n```bash\nagent-browser --provider cloud-browser open https://example.com\n```\n\nIf `cleanup` is returned and connection fails, agent-browser later sends it back as the request body for `browser.close`.\n\n## Launch mutator plugin\n\nA launch mutator receives local launch options before Chrome starts and can append arguments, extensions, init scripts, or a user agent:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"launch\": {\n \"args\": [\"--disable-blink-features=AutomationControlled\"],\n \"extensions\": [\"/absolute/path/to/extension\"],\n \"initScripts\": [\n \"Object.defineProperty(navigator, 'webdriver', { get: () => undefined });\"\n ],\n \"userAgent\": \"my-agent/1.0\"\n }\n}\n```\n\nConfigure it with `launch.mutate`, then use any local launch command:\n\n```bash\nagent-browser open https://example.com\n```\n\nLaunch mutators do not run for CDP connections or remote browser providers because those browsers are already running outside the local launch path.\n\n## Policy and confirmation\n\nPlugin access is exposed as capability-scoped policy actions:\n\n```bash\nagent-browser --confirm-actions plugin:vault:credential.read auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --confirm-actions plugin:cloud-browser:browser.provider --provider cloud-browser open https://example.com\nagent-browser --confirm-actions plugin:stealth:launch.mutate open https://example.com\n```\n\nThe action string is `plugin:<name>:<capability>`.\n\n## Packaging guidance\n\nFor npm packages, expose a `bin` command with no required stdout logs:\n\n```json\n{\n \"name\": \"agent-browser-plugin-example\",\n \"bin\": {\n \"agent-browser-plugin-example\": \"./bin/plugin.js\"\n }\n}\n```\n\nKeep the plugin small and explicit:\n\n- Declare only the capabilities it actually supports\n- Read exactly one request from stdin\n- Write exactly one JSON response to stdout\n- Keep secrets out of command-line arguments\n- Let agent-browser handle navigation, selectors, screenshots, state, and policy\n"
|
||
},
|
||
"docs/src/app/plugins/layout.tsx": {
|
||
"sha256": "60f1d09788f72c0dcc16fb294eaffa610d01c9ce339785c393157fecda291b1d",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"plugins\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/profiler/page.mdx": {
|
||
"sha256": "35d84228ed2efa5b521452427e2bc9c007fbf6f01571f9b9af0eaf856cb948d0",
|
||
"raw": "# Profiler\n\nCapture Chrome DevTools performance profiles during browser automation. Use profiles to diagnose slow page loads, expensive JavaScript, layout thrashing, and other performance bottlenecks in agentic workflows.\n\n## Basic usage\n\n```bash\n# Start profiling\nagent-browser profiler start\n\n# Perform actions\nagent-browser navigate https://example.com\nagent-browser click \"#button\"\n\n# Stop and save profile\nagent-browser profiler stop ./trace.json\n```\n\nThe output JSON file can be loaded into Chrome DevTools, Perfetto UI, or any tool that accepts Chrome Trace Event format.\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>profiler start</code></td><td>Start recording a performance profile</td></tr>\n <tr><td><code>profiler start --categories <list></code></td><td>Start with custom trace categories</td></tr>\n <tr><td><code>profiler stop [path]</code></td><td>Stop profiling and save to file</td></tr>\n </tbody>\n</table>\n\n## Trace categories\n\nThe `--categories` flag accepts a comma-separated list of Chrome trace categories.\n\n```bash\nagent-browser profiler start --categories \"devtools.timeline,v8.execute,blink.user_timing\"\n```\n\nDefault categories include `devtools.timeline`, `v8.execute`, `blink`, `blink.user_timing`, `latencyInfo`, `renderer.scheduler`, `toplevel`, and several `disabled-by-default-*` categories for detailed CPU profiling and call stack analysis.\n\n### Common categories\n\n<table>\n <thead>\n <tr><th>Category</th><th>What it captures</th></tr>\n </thead>\n <tbody>\n <tr><td><code>devtools.timeline</code></td><td>Standard DevTools performance events</td></tr>\n <tr><td><code>v8.execute</code></td><td>Time spent running JavaScript</td></tr>\n <tr><td><code>blink</code></td><td>Renderer events (layout, paint, style)</td></tr>\n <tr><td><code>blink.user_timing</code></td><td><code>performance.mark()</code> and <code>performance.measure()</code> calls</td></tr>\n <tr><td><code>latencyInfo</code></td><td>Input-to-display latency</td></tr>\n <tr><td><code>disabled-by-default-v8.cpu_profiler</code></td><td>Sampling-based JS CPU profiling</td></tr>\n </tbody>\n</table>\n\n## Output format\n\nThe output is a JSON file in Chrome Trace Event format:\n\n```json\n{\n \"traceEvents\": [\n {\n \"cat\": \"devtools.timeline\",\n \"name\": \"RunTask\",\n \"ph\": \"X\",\n \"ts\": 12345,\n \"dur\": 100,\n \"pid\": 1,\n \"tid\": 1\n }\n ],\n \"metadata\": {\n \"clock-domain\": \"LINUX_CLOCK_MONOTONIC\"\n }\n}\n```\n\nThe `metadata.clock-domain` field reflects the host platform (Linux or macOS). On Windows it is omitted.\n\n## Viewing profiles\n\n- **Chrome DevTools** -- Performance panel > Load profile\n- **Perfetto** -- https://ui.perfetto.dev/ (drag and drop the JSON file)\n- **Trace Viewer** -- `chrome://tracing` in any Chromium browser\n\n## Use cases\n\n- **Page load analysis** -- Profile navigation to identify slow resources, long tasks, or layout shifts\n- **Interaction profiling** -- Measure the cost of clicks, form fills, and other user interactions\n- **CI regression checks** -- Capture profiles per build and compare trace data over time\n- **Agent workflow optimization** -- Find which steps in an agentic flow are most expensive\n\n## Limitations\n\n- Only works with Chromium-based browsers (Chrome, Edge). Not supported on Firefox or WebKit.\n- Trace data accumulates in memory while profiling is active (capped at 5 million events). Stop profiling promptly after the area of interest.\n- Data collection on stop has a 30-second timeout. If the browser is unresponsive, the stop command may fail.\n- When no output path is provided, the profile is saved to an auto-generated path under the agent-browser temp directory.\n"
|
||
},
|
||
"docs/src/app/profiler/layout.tsx": {
|
||
"sha256": "49534aa9cb836baa2ae0b742083eee98629596d64f5b3ebd6c523f623b381530",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"profiler\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/providers/agentcore/page.mdx": {
|
||
"sha256": "836b71e0aca383ab7331cb4dd5496485310edb27ce45227dd885680775b97a86",
|
||
"raw": "# AgentCore\n\n[AWS Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/) provides cloud browser sessions with SigV4 authentication. Use it when running agent-browser in AWS environments or when you need managed cloud browsers backed by AWS infrastructure.\n\n## Setup\n\nCredentials are automatically resolved from:\n\n1. Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)\n2. AWS CLI (`aws configure export-credentials`) which supports SSO, profiles, IAM roles, etc.\n\n```bash\nagent-browser -p agentcore open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=agentcore\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENTCORE_REGION</code></td><td>AWS region for the AgentCore endpoint</td><td><code>us-east-1</code></td></tr>\n <tr><td><code>AGENTCORE_BROWSER_ID</code></td><td>Browser identifier</td><td><code>aws.browser.v1</code></td></tr>\n <tr><td><code>AGENTCORE_PROFILE_ID</code></td><td>Browser profile for persistent state (cookies, localStorage)</td><td>(none)</td></tr>\n <tr><td><code>AGENTCORE_SESSION_TIMEOUT</code></td><td>Session timeout in seconds</td><td><code>3600</code></td></tr>\n <tr><td><code>AWS_PROFILE</code></td><td>AWS CLI profile for credential resolution</td><td><code>default</code></td></tr>\n <tr><td><code>AWS_ACCESS_KEY_ID</code></td><td>AWS access key (checked before AWS CLI fallback)</td><td>(none)</td></tr>\n <tr><td><code>AWS_SECRET_ACCESS_KEY</code></td><td>AWS secret key</td><td>(none)</td></tr>\n <tr><td><code>AWS_SESSION_TOKEN</code></td><td>Temporary session token (for STS/SSO credentials)</td><td>(none)</td></tr>\n </tbody>\n</table>\n\n## Browser Profiles\n\nUse `AGENTCORE_PROFILE_ID` to persist browser state (cookies, localStorage) across sessions:\n\n```bash\nAGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://example.com\n```\n\nWhen a profile is set, AgentCore stores and restores browser state automatically between sessions.\n\n## Live View\n\nWhen a session starts, AgentCore prints a Live View URL to stderr:\n\n```\nSession: abc123-def456\nLive View: https://us-east-1.console.aws.amazon.com/bedrock-agentcore/browser/aws.browser.v1/session/abc123-def456#\n```\n\nOpen this URL in your browser to watch the agent session in real time from the AWS Console.\n\n## Credential Resolution\n\nAgentCore uses lightweight manual SigV4 signing (no AWS SDK dependency). Credentials are resolved in order:\n\n1. **Environment variables** (`AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY`, optionally `AWS_SESSION_TOKEN`)\n2. **AWS CLI** (`aws configure export-credentials --format env`), which supports SSO, IAM roles, credential files, and profiles\n\nIf using SSO, run `aws sso login` before launching agent-browser. Set `AWS_PROFILE` to select a specific named profile.\n\n## Example\n\n```bash\n# Basic usage (credentials auto-resolved via AWS CLI)\nagent-browser -p agentcore open https://example.com\n\n# With a browser profile for persistent login state\nAGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://x.com/home\n\n# With explicit region\nAGENTCORE_REGION=eu-west-1 agent-browser -p agentcore open https://example.com\n\n# With SSO profile\nAWS_PROFILE=my-sso-profile agent-browser -p agentcore open https://example.com\n```\n\nWhen enabled, agent-browser connects to an AgentCore cloud browser session instead of launching a local browser. All commands work identically.\n"
|
||
},
|
||
"docs/src/app/providers/agentcore/layout.tsx": {
|
||
"sha256": "a13983e0824aa8154b90a575ff98a028f49aab5e36e16eed40dc50539241f0b4",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"providers/agentcore\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/providers/browser-use/page.mdx": {
|
||
"sha256": "d2f8e0a22f10e56692020e9142f410ba036c8f5b4163bb534bb8b2a9da3a4bda",
|
||
"raw": "# Browser Use\n\n[Browser Use](https://browser-use.com) is an open-source browser automation project for AI agents with [over 100,000 GitHub stars](https://github.com/browser-use/browser-use), plus a managed Cloud browser service. Browser Use Cloud is useful when running agent-browser in environments where a local browser isn't available, such as serverless and CI environments.\n\n## Setup\n\n```bash\nexport BROWSER_USE_API_KEY=\"your-api-key\"\nagent-browser -p browseruse open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=browseruse\nexport BROWSER_USE_API_KEY=\"your-api-key\"\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Browser settings\n\n<table>\n <thead>\n <tr><th>Environment variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>BROWSER_USE_PROFILE_ID</code></td><td>Profile UUID for persistent cookies and logins</td></tr>\n <tr><td><code>BROWSER_USE_PROXY_COUNTRY</code></td><td>Managed proxy country, or <code>none</code>/<code>direct</code> to disable proxy</td></tr>\n <tr><td><code>BROWSER_USE_ENABLE_RECORDING</code></td><td>Record the Cloud browser session</td></tr>\n </tbody>\n</table>\n\n```bash\nexport BROWSER_USE_PROFILE_ID=\"your-profile-uuid\"\nexport BROWSER_USE_PROXY_COUNTRY=\"de\"\nexport BROWSER_USE_ENABLE_RECORDING=\"true\"\nagent-browser -p browseruse open https://example.com\n```\n\nWhen enabled, agent-browser creates a Browser Use Cloud V4 session and connects to its CDP endpoint. Browser Use setup is limited to 18 seconds, with up to 4 more seconds for cleanup if setup times out. Within setup, creation waits up to 10 seconds and CDP attachment up to 8 seconds; each stop request waits up to 4 seconds. Navigation and other page commands keep their existing timeouts. If creation fails before a browser id is returned, the outcome is unknown; inspect the Browser Use Cloud dashboard before retrying, since a browser may still have been created.\n\nThe Cloud browser stays active between commands. Run `agent-browser close` when the task finishes. The daemon also attempts cleanup on exit, including its default one-hour idle timeout; a failed stop can leave the Cloud browser running.\n\n## Close and recovery\n\nIf a stop keeps returning 404, verify the browser status in Browser Use Cloud. After confirming it has stopped, use a new `--session` name to continue; agent-browser does not treat 404 as proof of a successful stop.\n\n`close` succeeds only after Browser Use acknowledges the browser as stopped. On a failed stop, `close` returns an error and keeps the session id, so running `agent-browser close` again retries the same browser, and a new launch is blocked until the pending browser is released.\n\nIf the daemon exits before a stop succeeds, inspect the Browser Use Cloud dashboard and stop the browser there.\n\nGet your API key from the [Browser Use Cloud Dashboard](https://cloud.browser-use.com/settings?tab=api-keys).\n"
|
||
},
|
||
"docs/src/app/providers/browser-use/layout.tsx": {
|
||
"sha256": "179e36325de7ede165db8e8aa00a1a7a6be3c6041fc40dba8c5283383c5d94eb",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"providers/browser-use\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/providers/browserbase/page.mdx": {
|
||
"sha256": "753fac9b0616339ac0eb14b7db389a31cac79f70f29d18ccb0d50ca7f680e610",
|
||
"raw": "# Browserbase\n\n[Browserbase](https://browserbase.com) provides remote browser infrastructure to make deployment of agentic browsing agents easy. Use it when running agent-browser in environments where a local browser isn't feasible.\n\n## Setup\n\n```bash\nexport BROWSERBASE_API_KEY=\"your-api-key\"\nagent-browser -p browserbase open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=browserbase\nexport BROWSERBASE_API_KEY=\"your-api-key\"\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\nWhen enabled, agent-browser connects to a Browserbase session instead of launching a local browser. All commands work identically.\n\nGet your API key from the [Browserbase Dashboard](https://browserbase.com/overview).\n"
|
||
},
|
||
"docs/src/app/providers/browserbase/layout.tsx": {
|
||
"sha256": "3f42fb861158530b89c38c2291c4247f4cbd9f61df1efa0d7dab18e6586f38d5",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"providers/browserbase\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/providers/browserless/page.mdx": {
|
||
"sha256": "39299446ceef68d506f24548dd3776a1e6ba714dad77aac115131beb8219e7ce",
|
||
"raw": "# Browserless\n\n[Browserless](https://browserless.io) provides cloud browser infrastructure with a Sessions API. Use it when running agent-browser in environments where a local browser isn't available.\n\n## Setup\n\n```bash\nexport BROWSERLESS_API_KEY=\"your-api-token\"\nagent-browser -p browserless open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=browserless\nexport BROWSERLESS_API_KEY=\"your-api-token\"\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>BROWSERLESS_API_KEY</code></td><td>API token (required)</td><td></td></tr>\n <tr><td><code>BROWSERLESS_API_URL</code></td><td>Base API URL (for custom regions or self-hosted)</td><td><code>https://production-sfo.browserless.io</code></td></tr>\n <tr><td><code>BROWSERLESS_BROWSER_TYPE</code></td><td>Type of browser to use (<code>chromium</code> or <code>chrome</code>)</td><td><code>chromium</code></td></tr>\n <tr><td><code>BROWSERLESS_TTL</code></td><td>Session TTL in milliseconds</td><td><code>300000</code></td></tr>\n <tr><td><code>BROWSERLESS_STEALTH</code></td><td>Enable stealth mode</td><td><code>true</code></td></tr>\n </tbody>\n</table>\n\nWhen enabled, agent-browser connects to a Browserless cloud session instead of launching a local browser. All commands work identically.\n\nGet your API token from the [Browserless Dashboard](https://browserless.io).\n"
|
||
},
|
||
"docs/src/app/providers/browserless/layout.tsx": {
|
||
"sha256": "7948a13748dc7e0a44e4e7f39eeeff41f4d5254d59d00d3ceb34e20bcd65aa79",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"providers/browserless\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/providers/kernel/page.mdx": {
|
||
"sha256": "bad05fbb931da566d7fbfe258bcc5e7838e8f2c2fb7760f84a5544e6ee1a8c31",
|
||
"raw": "# Kernel\n\n[Kernel](https://www.kernel.sh) provides cloud browser infrastructure for AI agents with features like stealth mode and persistent profiles.\n\n## Setup\n\n```bash\nexport KERNEL_API_KEY=\"your-api-key\"\nagent-browser -p kernel open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=kernel\nexport KERNEL_API_KEY=\"your-api-key\"\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>KERNEL_API_KEY</code></td><td>API key (required)</td><td></td></tr>\n <tr><td><code>KERNEL_HEADLESS</code></td><td>Run browser in headless mode</td><td><code>true</code></td></tr>\n <tr><td><code>KERNEL_STEALTH</code></td><td>Enable stealth mode to avoid bot detection</td><td><code>false</code></td></tr>\n <tr><td><code>KERNEL_TIMEOUT_SECONDS</code></td><td>Session timeout in seconds</td><td><code>300</code></td></tr>\n <tr><td><code>KERNEL_PROFILE_NAME</code></td><td>Name of an existing browser profile to load</td><td>(none)</td></tr>\n <tr><td><code>KERNEL_PROFILE_SAVE_CHANGES</code></td><td>Save session changes back to the profile</td><td><code>false</code></td></tr>\n </tbody>\n</table>\n\n**Profile persistence:** `KERNEL_PROFILE_NAME` loads an existing Kernel profile (create it first in Kernel). Set `KERNEL_PROFILE_SAVE_CHANGES=true` to save cookies, logins, and session data back to the profile when the session ends.\n\nWhen enabled, agent-browser connects to a Kernel cloud session instead of launching a local browser. All commands work identically.\n\nGet your API key from the [Kernel Dashboard](https://dashboard.onkernel.com).\n"
|
||
},
|
||
"docs/src/app/providers/kernel/layout.tsx": {
|
||
"sha256": "4ae472a867142d9e7905ad3179ff6334ec05b3f9a5d21bac5593a9eda5c2e387",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"providers/kernel\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/providers/remote-agent-browser/page.mdx": {
|
||
"sha256": "f362d2f933cebdd41a22b6ad5ac3514e77eb076a23f593a0266561185569968a",
|
||
"raw": "# Remote Agent Browser\n\n[Remote Agent Browser](https://github.com/vercel-labs/remote-agent-browser) runs agent-browser inside an isolated [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox). Use it when a TypeScript application needs to provision a browser on demand without managing a local Chrome process.\n\nRemote Agent Browser is a library rather than an agent-browser `-p` provider. Import it in your application and use the returned client to run agent-browser commands.\n\n## Setup\n\n```bash\npnpm add remote-agent-browser\n```\n\nAuthentication is automatic on Vercel through `VERCEL_OIDC_TOKEN`. For local development, link a Vercel project and pull its environment:\n\n```bash\nvercel link\nvercel env pull .env.local\n```\n\n## Create a browser\n\n```ts\nimport { AgentBrowser } from \"remote-agent-browser\";\n\nconst browser = await AgentBrowser.create();\n\ntry {\n await browser.exec(\"open\", {\n args: [\"https://example.com\"],\n });\n\n const snapshot = await browser.exec(\"snapshot\");\n console.log(snapshot.stdout);\n} finally {\n await browser.close();\n}\n```\n\nCommands issued through the same client share the same page, cookies, tabs, and element references. Always close disposable clients when the work is complete.\n\n## Stable browser sessions\n\nUse a stable ID when browser identity needs to survive process boundaries:\n\n```ts\nconst browser = AgentBrowser.session({\n id: `chat:${chatId}`,\n});\n\nconst stopKeepalive = browser.keepalive();\n\ntry {\n await browser.exec(\"open\", {\n args: [\"https://example.com\"],\n });\n} finally {\n stopKeepalive();\n}\n```\n\nThe first command finds or creates the named Sandbox. A later process using the same ID can attach to it. If an expired Sandbox resumes, Chromium starts fresh and in-memory page state is reset.\n\n## Custom browser image\n\nThe default image is `remote-agent-browser:latest`. Pass a Vercel Container Registry repository, tag, digest, or fully qualified reference to use a custom image:\n\n```ts\nconst browser = await AgentBrowser.create({\n image: \"vcr.vercel.com/my-team/my-project/my-browser:v1\",\n});\n```\n\nYou can also set `REMOTE_AGENT_BROWSER_IMAGE` to configure the image for every client.\n\n## Options\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>image</code></td><td>Vercel Container Registry image containing agent-browser and Chromium</td><td><code>remote-agent-browser:latest</code></td></tr>\n <tr><td><code>timeoutMs</code></td><td>Sandbox wall-clock timeout in milliseconds</td><td><code>600000</code></td></tr>\n <tr><td><code>vcpus</code></td><td>Number of Sandbox vCPUs</td><td><code>2</code></td></tr>\n <tr><td><code>env</code></td><td>Additional environment variables for commands in the Sandbox</td><td><code>{}</code></td></tr>\n <tr><td><code>args</code></td><td>Global agent-browser CLI arguments applied to each command</td><td><code>[]</code></td></tr>\n <tr><td><code>proxy</code></td><td>Proxy URL or proxy configuration for the browser client</td><td>(none)</td></tr>\n </tbody>\n</table>\n\nSee the [Remote Agent Browser repository](https://github.com/vercel-labs/remote-agent-browser) for file transfer, proxy configuration, typed JSON output, keepalive, and stable-session examples.\n"
|
||
},
|
||
"docs/src/app/providers/remote-agent-browser/layout.tsx": {
|
||
"sha256": "a952aae3c4b47f3101b92fd57883606ae0dd699da6b63305460cb34576865df5",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"providers/remote-agent-browser\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/proxy/page.mdx": {
|
||
"sha256": "8ed15177ae6618aa48062569477cee3c8a5d23fc6e8d15079eaca14aad064340",
|
||
"raw": "# Proxy\n\nUse proxies for corporate networks, geo-testing, scraping infrastructure, and traffic routing through a controlled egress point.\n\n## CLI flags\n\n```bash\nagent-browser --proxy \"http://proxy.example.com:8080\" open https://example.com\nagent-browser --proxy \"http://user:pass@proxy.example.com:8080\" open https://example.com\nagent-browser --proxy \"http://proxy.example.com:8080\" --proxy-bypass \"localhost,*.internal.com\" open https://example.com\nagent-browser --proxy \"http://proxy.example.com:8080\" --ca-cert /etc/ssl/certs/proxy-ca.pem open https://example.com\n```\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--proxy <url></code></td><td>Proxy server URL, with optional credentials</td></tr>\n <tr><td><code>--proxy-bypass <hosts></code></td><td>Hosts that should bypass the proxy</td></tr>\n <tr><td><code>--ca-cert <path></code></td><td>Trust a CA certificate or PEM bundle in a locally launched Chromium browser on Linux</td></tr>\n <tr><td><code>--no-ca-cert</code></td><td>Clear CA trust retained by the running browser session</td></tr>\n </tbody>\n</table>\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_PROXY</code></td><td>agent-browser proxy URL</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_BYPASS</code></td><td>agent-browser proxy bypass list</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_USERNAME</code></td><td>Proxy username when credentials are provided separately</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_PASSWORD</code></td><td>Proxy password when credentials are provided separately</td></tr>\n <tr><td><code>AGENT_BROWSER_CA_CERT</code></td><td>Path to a CA certificate or PEM bundle for locally launched Chromium on Linux</td></tr>\n <tr><td><code>HTTP_PROXY</code> / <code>HTTPS_PROXY</code></td><td>Standard proxy environment variables, used as fallbacks</td></tr>\n <tr><td><code>ALL_PROXY</code></td><td>SOCKS or all-traffic proxy fallback</td></tr>\n <tr><td><code>NO_PROXY</code></td><td>Standard proxy bypass fallback</td></tr>\n </tbody>\n</table>\n\n`AGENT_BROWSER_PROXY` takes precedence over standard proxy variables. The CLI also accepts credentials embedded in the proxy URL and separates them before passing launch options to the daemon.\n\n## HTTPS interception certificates\n\nOn Linux, `--ca-cert` imports each certificate into a private NSS database used only by the Chromium process launched for that session. Normal hostname and validity checks remain enabled. Later commands retain that trust when they omit the flag. A different certificate or `--no-ca-cert` relaunches Chromium without restarting the daemon. The same certificate content reuses the current browser even when supplied from a different path. `agent-browser install --with-deps` installs the required `certutil`; otherwise install `libnss3-tools` on Debian/Ubuntu or `nss-tools` on RPM Linux.\n\nThe option cannot be combined with `--profile`, `--cdp`, `--auto-connect`, providers, Lightpanda, or `--ignore-https-errors`. It is not supported on macOS or Windows.\n\n## SOCKS proxy\n\n```bash\nexport ALL_PROXY=\"socks5://proxy.example.com:1080\"\nagent-browser open https://example.com\n\nexport ALL_PROXY=\"socks5://user:pass@proxy.example.com:1080\"\nagent-browser open https://example.com\n```\n\n## Bypass local traffic\n\n```bash\nexport AGENT_BROWSER_PROXY=\"http://proxy.example.com:8080\"\nexport AGENT_BROWSER_PROXY_BYPASS=\"localhost,127.0.0.1,*.internal.com\"\n\nagent-browser open https://external.example.com\nagent-browser open http://localhost:3000\n```\n\n## Verify routing\n\n```bash\nagent-browser open https://httpbin.org/ip\nagent-browser get text body\n```\n\nThe response should show the proxy egress address, not the machine's direct network address.\n\n## Security notes\n\n- Prefer environment variables or secret stores for proxy credentials.\n- Do not commit proxy usernames, passwords, or session URLs.\n- HAR exports and network logs may include proxy-authenticated requests.\n"
|
||
},
|
||
"docs/src/app/proxy/layout.tsx": {
|
||
"sha256": "5346aaaaa1575584a0eb14311f5cabdbf56ba1c82fec660a4234fc73461e1628",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"proxy\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/quick-start/page.mdx": {
|
||
"sha256": "ac4c52686f6bc0420a5d7e616a7011a9e9bf5b256be24afd9b9ea29fa81e7e65",
|
||
"raw": "# Quick Start\n\n## Core workflow\n\nEvery browser automation follows this pattern:\n\n```bash\n# 1. Navigate\nagent-browser open example.com\n\n# 2. Snapshot to get element refs\nagent-browser snapshot -i\n# Output:\n# @e1 [heading] \"Example Domain\"\n# @e2 [link] \"More information...\"\n\n# 3. Interact using refs\nagent-browser click @e2\n\n# 4. Re-snapshot after page changes\nagent-browser snapshot -i\n```\n\n## Common commands\n\n```bash\nagent-browser open example.com\nagent-browser snapshot -i # Get interactive elements with refs\nagent-browser click @e2 # Click by ref\nagent-browser fill @e3 \"test@example.com\" # Fill input by ref\nagent-browser get text @e1 # Get text content\nagent-browser screenshot # Save to temp directory\nagent-browser screenshot page.png # Save to specific path\nagent-browser close\n```\n\n## Traditional selectors\n\nCSS selectors and semantic locators also supported:\n\n```bash\nagent-browser click \"#submit\"\nagent-browser fill \"#email\" \"test@example.com\"\nagent-browser find role button click --name \"Submit\"\n```\n\n## Headed mode\n\nShow browser window for debugging:\n\n```bash\nagent-browser open example.com --headed\n```\n\n## Wait for content\n\n```bash\nagent-browser wait @e1 # Wait for element\nagent-browser wait --text \"Welcome\" # Wait for expected text\nagent-browser wait --url \"**/dashboard\" # Wait for URL pattern\nagent-browser wait --fn \"window.appReady === true\" # Wait for JS condition\nagent-browser wait --load domcontentloaded # Wait for the DOM lifecycle event\n```\n\nAfter a page change, prefer the condition that represents the result you need. Use `load` or `domcontentloaded` only when the lifecycle event is the milestone. `networkidle` remains available for pages known to become quiet, but SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Command chaining\n\nChain commands with `&&` in a single shell call. The browser persists via a background daemon, so chaining is safe and efficient:\n\n```bash\n# Open, wait, and snapshot in one call\nagent-browser open example.com && agent-browser wait --load domcontentloaded && agent-browser snapshot -i\n\n# Chain multiple interactions\nagent-browser fill @e1 \"user@example.com\" && agent-browser fill @e2 \"pass\" && agent-browser click @e3\n\n# Navigate and capture\nagent-browser open example.com && agent-browser wait --load load && agent-browser screenshot page.png\n```\n\nUse `&&` when you don't need intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs before interacting).\n\n## JSON output\n\nFor programmatic parsing in scripts:\n\n```bash\nagent-browser snapshot --json\nagent-browser get text @e1 --json\n```\n\nNote: The default text output is more compact and preferred for AI agents.\n"
|
||
},
|
||
"docs/src/app/quick-start/layout.tsx": {
|
||
"sha256": "77196f1771e6d5817458c2506d57226d0afb19b1ea0c933fca877c0c40c6b587",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"quick-start\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/react/page.mdx": {
|
||
"sha256": "033725f2963bf79beee4ec81cd43aee68921eb6943379894d4456deadfa13dfb",
|
||
"raw": "# React & Web Vitals\n\nagent-browser can inspect React component trees, record re-renders, classify Suspense boundaries, measure Core Web Vitals, and perform SPA navigation.\n\n## Enable React inspection\n\nReact inspection requires the React DevTools hook to be installed before page JavaScript runs:\n\n```bash\nagent-browser open --enable react-devtools http://localhost:3000\nagent-browser react tree\n```\n\nIf the session already has a browser without the hook, passing `--enable react-devtools` relaunches that session with the hook installed.\n\n## React commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>react tree</code></td><td>Print the React component tree with fiber IDs</td></tr>\n <tr><td><code>react inspect <fiberId></code></td><td>Inspect props, hooks, state, and source for one component</td></tr>\n <tr><td><code>react renders start</code></td><td>Begin recording component render commits</td></tr>\n <tr><td><code>react renders stop [--json]</code></td><td>Stop recording and print a render profile</td></tr>\n <tr><td><code>react suspense [--only-dynamic] [--json]</code></td><td>Walk Suspense boundaries and classify static versus dynamic boundaries</td></tr>\n </tbody>\n</table>\n\n```bash\nagent-browser react tree\nagent-browser react inspect 42\n\nagent-browser react renders start\nagent-browser click @e3\nagent-browser react renders stop\n\nagent-browser react suspense --only-dynamic\n```\n\n## Web Vitals\n\n`vitals` works on any site. When a React profiling build is detected, it also reports hydration phases.\n\n```bash\nagent-browser vitals\nagent-browser vitals https://example.com --json\n```\n\nBy default, `vitals` prints a summary using the same fields as the structured `--json` response. Reported metrics include LCP, CLS, TTFB, FCP, INP, and hydration timing when available.\n\n## SPA navigation\n\n`pushstate` performs client-side navigation without forcing a full browser reload. On Next.js apps, it attempts to use `window.next.router.push` so RSC fetches still run. Other frameworks fall back to `history.pushState` plus navigation events.\n\n```bash\nagent-browser pushstate /dashboard\nagent-browser wait --url \"**/dashboard\"\nagent-browser snapshot -i\n```\n\nUse `open` for full navigation and `pushstate` when the workflow needs SPA behavior.\n"
|
||
},
|
||
"docs/src/app/react/layout.tsx": {
|
||
"sha256": "c920bc00499f735c0a035bb7b6ab8f583f38d6e49aabfacc21815d0e5a918001",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"react\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/recording/page.mdx": {
|
||
"sha256": "ac02ee70297ad625b21a82f1868006b5031ba1d841076213b7a4e59ff24d5464",
|
||
"raw": "# Video Recording\n\nUse `record` to capture browser automation as a WebM or MP4 video for debugging, CI evidence, product walkthroughs, or repro reports.\n\n## Requirements\n\nRecording pipes frames into `ffmpeg`, which must be on `PATH` with the `libvpx` and `libx264` encoders (the default builds from Homebrew and Debian/Ubuntu include both):\n\n```bash\nbrew install ffmpeg # macOS\nsudo apt install ffmpeg # Debian/Ubuntu\nagent-browser doctor # reports ffmpeg and its encoders under \"Recording\"\n```\n\nThe supported formats are `.webm` (VP8 via libvpx) and `.mp4` (H.264 via libx264). Any other extension is handed to ffmpeg as-is with H.264 video, so `.mkv` or `.mov` work if ffmpeg knows the container. A path with no extension is rejected before recording starts, since ffmpeg would have nothing to pick a container from. Nothing else in agent-browser needs ffmpeg.\n\n## Basic workflow\n\n```bash\nagent-browser open https://example.com\nagent-browser record start ./demo.webm\nagent-browser snapshot -i\nagent-browser click @e1\n\nagent-browser record stop\n```\n\nAfter launching a session, `record start` can also navigate immediately:\n\n```bash\nagent-browser open\nagent-browser record start ./demo.webm https://example.com\n```\n\n`record start` records the current active page as-is. With no URL, nothing is navigated or replaced: the recorder attaches to the tab you already have open, so capture begins on a hydrated page rather than at `load` on a cold navigation. With a URL, the active tab navigates there first and recording starts once the page has loaded. No extra tab or browser context is created.\n\nTo record in a separate tab, open one first:\n\n```bash\nagent-browser tab new https://example.com\nagent-browser record start ./demo.webm\n```\n\n## Visible cursor\n\nChrome recordings do not normally include the native pointer. Add `--cursor` for an animated pointer and click ripple rendered with the page, keeping drags synchronized in every captured frame. The temporary overlay is inert, hidden from accessibility snapshots, and removed when recording stops. Screenshots taken during the recording include it:\n\n```bash\nagent-browser record start ./walkthrough.webm --cursor\n```\n\n## Contact sheets\n\nAdd `--contact-sheet` for a timestamped PNG with highlighted changes.\n\n```bash\nagent-browser record start ./checkout.webm --contact-sheet\n\n# Select a frame when at least 2% of pixels change\nagent-browser record start ./checkout.webm --contact-sheet-threshold 0.02\n```\n\nThe threshold accepts `0` to `1`, defaults to `0.05`, and implies `--contact-sheet`. Contact sheets contain at most 100 frames.\n\n\n\n## Frame rate\n\nRecording captures 30 frames per second by default, which is enough for scrolling, hover states, and CSS transitions to read as motion rather than as a slideshow. Use `--fps` to change it:\n\n```bash\n# 60 fps for a short, motion-heavy take\nagent-browser record start ./scroll.webm --fps 60\n\n# 10 fps for a long soak run where file size matters more than motion\nagent-browser record start ./soak.webm --fps 10\n```\n\n<table>\n <thead>\n <tr><th>Rate</th><th>When to use it</th></tr>\n </thead>\n <tbody>\n <tr><td>60</td><td>Drag interactions, animation and scroll polish work, anything where a single frame is the evidence. Best on short clips.</td></tr>\n <tr><td>30 (default)</td><td>Everything else: flows, CI evidence, walkthroughs.</td></tr>\n <tr><td>1 to 15</td><td>Long sessions where the video is a timeline rather than a motion study.</td></tr>\n </tbody>\n</table>\n\nValid rates are 1 to 60. The latest Chrome frame is held between repaints so the file duration matches wall clock.\n\n`record stop` reports `frames` written to the file and distinct `capturedFrames` received from Chrome.\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>record start <path.webm|path.mp4> [url] [--fps <n>] [--cursor] [--contact-sheet]</code></td><td>Start recording the active page; a URL navigates the active tab first</td></tr>\n <tr><td><code>record stop</code></td><td>Stop the active recording and save the file</td></tr>\n <tr><td><code>record restart <path.webm|path.mp4> [url] [--fps <n>] [--cursor] [--contact-sheet]</code></td><td>Stop the current recording and immediately start another</td></tr>\n </tbody>\n</table>\n\n## CI evidence\n\n```bash\n#!/bin/bash\nset -e\n\ncleanup() {\n agent-browser record stop 2>/dev/null || true\n agent-browser close 2>/dev/null || true\n}\ntrap cleanup EXIT\n\nagent-browser open https://app.example.com/login\nagent-browser record start \"./artifacts/login-flow.webm\"\nagent-browser snapshot -i\nagent-browser fill @e1 \"demo@example.com\"\nagent-browser fill @e2 \"password\"\nagent-browser click @e3\nagent-browser wait --url \"**/dashboard\"\n```\n\nKeep recordings as CI artifacts when browser failures are hard to diagnose from text output alone.\n\n## Human-readable demos\n\nAdd small waits when the video is meant for a person to watch:\n\n```bash\nagent-browser open https://shop.example.com\nagent-browser record start ./checkout.webm\nagent-browser wait 500\nagent-browser click @e4\nagent-browser wait 500\nagent-browser screenshot ./screenshots/cart.png\nagent-browser record stop\n```\n\nScreenshots and videos work well together: screenshots capture precise still states, while the video shows timing, transitions, and unexpected overlays.\n\n## Output format\n\n<table>\n <thead>\n <tr><th>Property</th><th>Value</th></tr>\n </thead>\n <tbody>\n <tr><td>Container</td><td>WebM (<code>.webm</code>, VP8 via libvpx) or MP4 (<code>.mp4</code>, H.264 via libx264), chosen by the extension; other extensions get H.264 in whatever container ffmpeg maps them to</td></tr>\n <tr><td>Encoder</td><td>ffmpeg on <code>PATH</code></td></tr>\n <tr><td>Frame rate</td><td>30 fps by default, 1 to 60 with <code>--fps</code></td></tr>\n <tr><td>Viewport</td><td>Uses the active browser viewport settings</td></tr>\n <tr><td>State</td><td>Records the active page in place, including its session and in-page state</td></tr>\n </tbody>\n</table>\n\n## Limitations\n\n- Recording adds overhead to automation, and higher frame rates add more.\n- Long recordings can use significant disk space; 60 fps roughly doubles the bitrate of 30 fps.\n- Distinct frames per second are bounded by how often the page repaints, so a page that renders below 60 fps records below it too.\n- Use `record stop` before closing a session if you need the file flushed.\n- Some constrained headless environments may have codec or GPU limitations. An ffmpeg built without libvpx or libx264 cannot write the matching format; `agent-browser doctor` reports which encoders are present.\n"
|
||
},
|
||
"docs/src/app/recording/layout.tsx": {
|
||
"sha256": "19e5e8c8855db27f08bf2984b70733141cd7247cdbd4dc6df00c2f345eb6d154",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"recording\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/security/page.mdx": {
|
||
"sha256": "b229140618468ea7f0f4c22651cd1e8642d5ac9bb56e1583a66159c75fc79405",
|
||
"raw": "# Security\n\nagent-browser includes security features to protect against credential exposure, prompt injection via untrusted page content, and unauthorized browser actions.\n\nAll security features are opt-in. By default, agent-browser imposes no restrictions on navigation, actions, or output. Enable these features as needed for your deployment -- existing workflows are unaffected until you explicitly activate a feature.\n\n## Threat Model\n\nThese features are designed to mitigate the following threats when an LLM-based agent drives a browser:\n\n- **Credential exposure** -- Passwords stored in the auth vault are never included in LLM context. The CLI handles vault operations locally; credentials do not pass through the daemon's IPC channel.\n- **Plugin secret access**: Credential provider plugins run out-of-process and only receive a structured credential resolution request. Core agent-browser keeps browser automation, policy checks, and redaction-sensitive output handling.\n- **Prompt injection via page content** -- Malicious pages can embed text that looks like tool output or system instructions. Content boundary markers (`--content-boundaries`) let the orchestrator distinguish trusted tool output from untrusted page content.\n- **Unauthorized navigation / data exfiltration** — A compromised or manipulated agent could navigate to attacker-controlled domains to exfiltrate data. The domain allowlist (`--allowed-domains`) blocks navigations, sub-resource requests, WebSocket connections, EventSource streams, and `sendBeacon` calls to non-allowed domains. In supported Chromium sessions, it disables WebRTC peer connections so STUN, TURN, and related DNS traffic cannot bypass HTTP interception.\n- **Unauthorized destructive actions** -- Action policy (`--action-policy`) and confirmation gating (`--confirm-actions`) prevent the agent from performing dangerous operations (eval, downloads, uploads) without explicit approval.\n- **Context flooding** -- Large page outputs can overwhelm an LLM's context window. Output truncation (`--max-output`) caps the size of page-sourced content.\n\n### Known limitations\n\n- **WebSocket/EventSource blocking is best-effort.** It works by overriding browser constructors via an init script. If the `eval` action category is allowed, page scripts could theoretically restore the original constructors. Deny `eval` via `--action-policy` for maximum protection.\n- **Domain filter timing on cloud providers.** Cloud providers run outside the local Chrome process, so resources loaded by provider-side startup behavior before agent-browser connects are not retroactively blocked. agent-browser rejects pre-existing browser attach modes, Chrome profiles, direct-page provider plugins, restore/state replay, and raw startup Chrome args when the allowlist is active.\n- **The domain allowlist is not an operating-system firewall.** Locally launched Chrome disables non-proxied WebRTC UDP in addition to blocking `RTCPeerConnection` in page JavaScript. Combine the allowlist with host, container, or network egress controls when you require a boundary below the browser process.\n- **Pre-existing attach modes, profiles, saved state, and startup args do not support the domain allowlist.** agent-browser rejects `--allowed-domains` with `--cdp`, `--auto-connect`, `--profile`, `--restore`, `--state`, `state load`, and raw Chrome args that select profiles, restore sessions, or open startup pages because pages or saved origins may run before agent-browser can verify containment.\n- **iOS, Safari, and direct-page provider plugins do not support the domain allowlist.** agent-browser rejects `--allowed-domains` with these providers because their automation backends cannot install the Chromium network controls or enforce equivalent WebRTC containment.\n- **Content boundaries are defense-in-depth.** They rely on the LLM and orchestrator respecting the structural markers. A sufficiently capable adversarial page could attempt to mimic the boundary format, though the per-process CSPRNG nonce makes this impractical to predict.\n- **Plugins are local executables.** Install credential plugins only from maintainers you trust. agent-browser limits the data it sends to plugins and supports policy gates, but it does not sandbox arbitrary local executables.\n- **Plugin config is not secret storage.** Do not put vault tokens or passwords in plugin command args. Use the vendor's own login/session mechanism or environment outside agent-browser config.\n- **Confirmation timeout.** Pending confirmations auto-deny after 60 seconds. Orchestrators must respond within that window.\n- **Non-TTY auto-deny.** When `--confirm-interactive` is set but stdin is not a terminal (e.g., piped input), actions are automatically denied to prevent accidental approval in non-interactive contexts.\n\n## Authentication Vault\n\nStore credentials locally and reference them by name. The LLM never sees passwords.\n\n```bash\n# Save credentials (encrypted if AGENT_BROWSER_ENCRYPTION_KEY is set)\n# Recommended: pipe password via stdin to avoid shell history / process listing exposure\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\n\n# Or pass directly (a warning will be shown)\nagent-browser auth save github --url https://github.com/login --username user --password pass\n\n# Login using saved credentials\nagent-browser auth login github\n\n# List saved profiles (names and URLs only, no secrets)\nagent-browser auth list\n\n# Show profile metadata\nagent-browser auth show github\n\n# Delete a profile\nagent-browser auth delete github\n```\n\n`auth login` filters matching controls by their layout size, computed visibility and opacity, and disabled/readonly state, including custom CSS selectors. If a selected credential field is replaced or redirects focus before entry, the command fails without submitting.\n\n`auth login` navigates with the `load` lifecycle event and then waits for form selectors to appear before filling/clicking. This makes delayed SPA login pages more reliable while avoiding `networkidle` hangs on pages with long-lived background requests.\n\nIf a login form depends on state established by an in-page click, challenge clearance, consent dismissal, or another setup step, use `--no-navigate` to retain the active document:\n\n```bash\nagent-browser open https://example.com/\nagent-browser click \"a[href='/login']\"\nagent-browser auth login work --no-navigate\n```\n\nNo-navigation mode requires an existing active top-level HTTP(S) page. It compares the page origin with the effective credential URL by scheme, host, and effective port before either credential is filled, and rechecks before each credential-bearing fill. Paths, queries, and fragments may differ. The flag suppresses only the initial navigation; selector waits, fills, the submit click, and submit-triggered navigation remain enabled. A command-level `--url` takes precedence over profile or provider URL metadata and becomes the origin constraint.\n\nCustom selectors can be specified if auto-detection fails:\n\n```bash\nagent-browser auth save myapp \\\n --url https://app.example.com/login \\\n --username user --password pass \\\n --username-selector \"#email\" \\\n --password-selector \"#password\" \\\n --submit-selector \"button.login\"\n```\n\nProfiles are stored in `~/.agent-browser/auth/` and always encrypted with AES-256-GCM. If `AGENT_BROWSER_ENCRYPTION_KEY` is not set, a key is auto-generated at `~/.agent-browser/.encryption-key` on first use. Back up this file or set the environment variable explicitly for portability.\n\nFile permissions are enforced on both Unix (`chmod 600`/`700`) and Windows (`icacls` restricted to the current user) to prevent other users from reading encryption keys or auth profiles.\n\n### Plugins\n\nPlugins run out-of-process over the `agent-browser.plugin.v1` stdio JSON protocol. Configure them in `agent-browser.json`:\n\nSee [Plugins](/plugins) for the plugin author protocol and implementation examples. Use `agent-browser plugin add <ref>` to create plugin config automatically.\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"cloud-browser\",\n \"command\": \"agent-browser-plugin-cloud-browser\",\n \"capabilities\": [\"browser.provider\"]\n },\n {\n \"name\": \"stealth\",\n \"command\": \"agent-browser-plugin-stealth\",\n \"capabilities\": [\"launch.mutate\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nInspect configured plugins:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show vault\n```\n\nUse the plugin for login:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\n```\n\nUse a plugin as a browser provider:\n\n```bash\nagent-browser --provider cloud-browser open https://example.com\n```\n\nUse a generic plugin command:\n\n```bash\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\n```\n\nCredential plugins receive `credential.resolve` and return username, password, and optionally URL or selector metadata. Browser provider plugins receive `browser.launch` and return a CDP WebSocket URL. Launch mutator plugins receive `launch.mutate` and can append local launch args, extensions, or init script source before Chrome starts. Generic command plugins receive the request type passed to `plugin run`.\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths so credential, browser-provider, and launch-mutator access stays inside the normal policy gates.\n\nagent-browser keeps browser automation, redaction-sensitive output, and policy enforcement in core. Credential plugin secrets do not appear in command arguments, dashboard events, or normal command output.\n\nGate plugin access with capability actions:\n\n```bash\nagent-browser --confirm-actions plugin:vault:credential.read auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --confirm-actions plugin:cloud-browser:browser.provider --provider cloud-browser open https://example.com\nagent-browser --confirm-actions plugin:stealth:launch.mutate open https://example.com\n```\n\n## Content Boundary Markers\n\nWhen `--content-boundaries` is enabled, all page-sourced output is wrapped in structural markers so LLMs can distinguish tool output from untrusted page content:\n\n```\n--- AGENT_BROWSER_PAGE_CONTENT nonce=a1b2c3d4 origin=https://example.com ---\n[snapshot / text / html / eval output here]\n--- END_AGENT_BROWSER_PAGE_CONTENT nonce=a1b2c3d4 ---\n```\n\nThe nonce is a random value generated per CLI process invocation, making it unpredictable to page content that might attempt to spoof the boundary.\n\nEnable via flag or environment variable:\n\n```bash\nagent-browser --content-boundaries snapshot\n# or\nexport AGENT_BROWSER_CONTENT_BOUNDARIES=1\n```\n\nAffected output types: `snapshot`, `get text`, `get html`, `eval`, `console`.\n\nIn `--json` mode, boundary metadata is injected into the JSON response as a `_boundary` object containing `nonce` and `origin` fields, allowing orchestrators to verify provenance programmatically:\n\n```json\n{\n \"success\": true,\n \"data\": { \"snapshot\": \"...\", \"origin\": \"https://example.com\" },\n \"_boundary\": { \"nonce\": \"a1b2c3d4e5f6...\", \"origin\": \"https://example.com\" }\n}\n```\n\n## Domain Allowlist\n\nRestrict which domains the browser can interact with, preventing redirect-based attacks and data exfiltration:\n\n```bash\nagent-browser --allowed-domains \"example.com,*.example.com,github.com\" open https://example.com\n# or\nexport AGENT_BROWSER_ALLOWED_DOMAINS=\"example.com,*.example.com\"\n```\n\nSupports exact match (`github.com`) and wildcard prefix (`*.example.com`, which also matches the bare domain `example.com`). Both page navigations and sub-resource requests (scripts, images, fetch, XHR, etc.) to non-allowed domains are blocked. WebSocket and EventSource connections are blocked via constructor-level patching, and `sendBeacon` returns `false` for blocked destinations. Dedicated and shared workers are guarded with a bootstrap wrapper; if a page CSP forbids that wrapper, the worker fails closed rather than running without the allowlist guard. WebRTC peer connections are disabled entirely in supported Chromium sessions while the allowlist is active because STUN, TURN, and DNS traffic do not pass through CDP Fetch interception. Locally launched Chrome also uses `disable_non_proxied_udp` as a second layer. Pre-existing CDP sessions, auto-connect, Chrome profiles, direct-page provider plugins, agent-browser restore or state-file replay, raw Chrome args that select profiles, restore sessions, or open startup pages, iOS, and Safari reject this option because agent-browser cannot install equivalent containment before page scripts run. Non-http(s) sub-resources such as data URIs and blobs remain allowed. When a request is blocked, the command returns an error.\n\n> **Note:** WebSocket and EventSource blocking is best-effort because it overrides browser constructors via an init script. If the `eval` action category is allowed, page scripts could theoretically restore those original constructors. The WebRTC replacement is installed as a non-configurable constructor, with the Chrome UDP policy providing defense in depth for local launches. For maximum protection, deny the `eval` category via `--action-policy` and enforce operating-system egress policy when using `--allowed-domains`.\n\nConfig file:\n\n```json\n{\n \"allowedDomains\": [\"example.com\", \"*.example.com\", \"github.com\"]\n}\n```\n\n> **CDN and third-party resources:** The domain filter blocks all sub-resource requests (scripts, stylesheets, images, fonts, fetch/XHR) to non-allowed domains. Most websites load assets from CDN domains. Include these in your allowlist or pages will break. For example:\n>\n> ```bash\n> --allowed-domains \"myapp.com,*.myapp.com,cdn.jsdelivr.net,fonts.googleapis.com,fonts.gstatic.com\"\n> ```\n\n## Action Policy\n\nGate actions using a static policy file. The policy is enforced by the daemon -- denied actions fail immediately.\n\n```bash\nagent-browser --action-policy ./policy.json open https://example.com\n# or\nexport AGENT_BROWSER_ACTION_POLICY=./policy.json\n```\n\nExample policy (permissive with specific denials):\n\n```json\n{\n \"default\": \"allow\",\n \"deny\": [\"eval\", \"download\", \"upload\"]\n}\n```\n\nExample policy (restrictive):\n\n```json\n{\n \"default\": \"deny\",\n \"allow\": [\"navigate\", \"snapshot\", \"click\", \"scroll\", \"wait\", \"get\"]\n}\n```\n\n<table>\n <thead>\n <tr><th>Category</th><th>Actions</th></tr>\n </thead>\n <tbody>\n <tr><td><code>navigate</code></td><td>open, back, forward, reload, tab new</td></tr>\n <tr><td><code>click</code></td><td>click, dblclick, tap</td></tr>\n <tr><td><code>fill</code></td><td>fill, type, keyboard type/inserttext, select, check, uncheck</td></tr>\n <tr><td><code>eval</code></td><td>eval, evalhandle, addscript, addinitscript, addstyle, expose, setcontent</td></tr>\n <tr><td><code>download</code></td><td>download, waitfordownload</td></tr>\n <tr><td><code>upload</code></td><td>upload</td></tr>\n <tr><td><code>snapshot</code></td><td>snapshot, screenshot, pdf, diff</td></tr>\n <tr><td><code>scroll</code></td><td>scroll, scrollintoview</td></tr>\n <tr><td><code>wait</code></td><td>wait, waitforurl, waitforloadstate, waitforfunction</td></tr>\n <tr><td><code>read</code></td><td>read</td></tr>\n <tr><td><code>get</code></td><td>get text/html/url/title, count, isvisible, getbyrole, getbytext, getbylabel, etc.</td></tr>\n <tr><td><code>interact</code></td><td>hover, focus, drag, press, keydown, keyup, mousemove, dispatch</td></tr>\n <tr><td><code>network</code></td><td>network route/unroute, requests, har start/stop</td></tr>\n <tr><td><code>state</code></td><td>state save/load, cookies set, storage set</td></tr>\n </tbody>\n</table>\n\nAuth vault operations keep secrets out of normal command output and LLM context. Domain allowlist restrictions still apply to `auth login` navigations. Plugin-backed logins also expose the capability action `plugin:<name>:credential.read` for policy and confirmation gates.\n\n## Action Confirmation\n\nFor actions that require explicit approval, use `--confirm-actions` to specify categories that require confirmation:\n\n```bash\n# Orchestrator mode: returns confirmation_required response\nagent-browser --confirm-actions eval,download eval \"document.title\"\n\n# Then approve or deny:\nagent-browser confirm c_8f3a1234\nagent-browser deny c_8f3a1234\n```\n\nFor interactive (human-in-the-loop) confirmation:\n\n```bash\nagent-browser --confirm-actions eval,download --confirm-interactive eval \"document.title\"\n# Prompts: Allow? [y/N]\n```\n\nPending confirmations auto-deny after 60 seconds.\n\n> **Non-TTY behavior:** When `--confirm-interactive` is set but stdin is not a TTY (e.g., piped input or running inside an automated pipeline), actions are automatically denied. This prevents accidental approval in non-interactive contexts.\n\n## Output Length Limits\n\nPrevent context flooding by truncating large page outputs:\n\n```bash\nagent-browser --max-output 50000 get text body\n# or\nexport AGENT_BROWSER_MAX_OUTPUT=50000\n```\n\nAffected output types: `snapshot`, `get text`, `get html`, `eval`, `console`.\n\n## Environment Variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_CONTENT_BOUNDARIES</code></td><td>Wrap page output in boundary markers</td></tr>\n <tr><td><code>AGENT_BROWSER_MAX_OUTPUT</code></td><td>Max characters for page output</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOWED_DOMAINS</code></td><td>Comma-separated allowed domain patterns; requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins</td></tr>\n <tr><td><code>AGENT_BROWSER_ACTION_POLICY</code></td><td>Path to action policy JSON file</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_ACTIONS</code></td><td>Comma-separated action categories requiring confirmation</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_INTERACTIVE</code></td><td>Enable interactive confirmation prompts</td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM encryption (auth vault + sessions)</td></tr>\n <tr><td><code>AGENT_BROWSER_PLUGINS</code></td><td>JSON plugin registry override</td></tr>\n </tbody>\n</table>\n\n## Recommended Configuration\n\nFor production AI agent deployments:\n\n```json\n{\n \"contentBoundaries\": true,\n \"maxOutput\": 50000,\n \"allowedDomains\": [\"your-app.com\", \"*.your-app.com\"],\n \"actionPolicy\": \"./policy.json\"\n}\n```\n"
|
||
},
|
||
"docs/src/app/security/layout.tsx": {
|
||
"sha256": "852444d7b979d6060a8c191e995f12a68bdbe0058cd20408b6a882f69634c3e2",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"security\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/selectors/page.mdx": {
|
||
"sha256": "03753b9fd8bdf275ea60aac9980099bdea79ed9136e4c6fcff0c1a7ca700de67",
|
||
"raw": "# Selectors\n\n## Refs (recommended)\n\nRefs provide deterministic element selection from snapshots. Best for AI agents.\n\n```bash\n# 1. Get snapshot with refs\nagent-browser snapshot\n# Output:\n# - heading \"Example Domain\" [ref=e1] [level=1]\n# - button \"Submit\" [ref=e2]\n# - textbox \"Email\" [ref=e3]\n# - link \"Learn more\" [ref=e4]\n\n# 2. Use refs to interact\nagent-browser click @e2 # Click the button\nagent-browser fill @e3 \"test@example.com\" # Fill the textbox\nagent-browser get text @e1 # Get heading text\nagent-browser hover @e4 # Hover the link\n```\n\n### Why refs?\n\n- **Deterministic** - Ref points to exact element from snapshot\n- **Fast** - No DOM re-query needed\n- **AI-friendly** - LLMs can reliably parse and use refs\n\n## CSS selectors\n\n```bash\nagent-browser click \"#id\"\nagent-browser click \".class\"\nagent-browser click \"div > button\"\nagent-browser click \"[data-testid='submit']\"\n```\n\n## Text & XPath\n\n```bash\nagent-browser click \"text=Submit\"\nagent-browser click \"xpath=//button[@type='submit']\"\n```\n\n## Semantic locators\n\nFind elements by role, label, or other semantic properties:\n\n```bash\nagent-browser find role button click --name \"Submit\"\nagent-browser find role heading text --name \"Skills\" # implicit roles work: <h2>=heading, <ul>=list, top-level <header>=banner\nagent-browser find label \"Email\" fill \"test@test.com\"\nagent-browser find placeholder \"Search...\" fill \"query\"\nagent-browser find testid \"submit-btn\" click\n```\n"
|
||
},
|
||
"docs/src/app/selectors/layout.tsx": {
|
||
"sha256": "b144c3c292665210b1b94412be7156eba6096cb5d5e5a3a39d1abbae5375dc56",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"selectors\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/sessions/page.mdx": {
|
||
"sha256": "7c8bc0d5ad8e8efd3cf6224b06e2f5cf18379aeef9692aa30826613fd90d0d4b",
|
||
"raw": "# Sessions\n\nRun multiple isolated browser instances:\n\n```bash\n# Different sessions\nagent-browser --session agent1 open site-a.com\nagent-browser --session agent2 open site-b.com\n\n# Or via environment variable\nAGENT_BROWSER_SESSION=agent1 agent-browser click \"#btn\"\n\n# List active sessions\nagent-browser session list\n# Output:\n# Active sessions:\n# -> default\n# agent1\n\n# Show current session\nagent-browser session\n\n# Generate a stable worktree-scoped session id\nagent-browser session id --scope worktree --prefix next-dev-loop\n\n# Inspect daemon, launch, and restore status\nagent-browser session info --json\n```\n\n## Session isolation\n\nEach session has its own:\n\n- Browser instance\n- Cookies and storage\n- Navigation history\n- Authentication state\n\n## Tab pinning in a shared browser\n\nFull isolation applies when each session launches its own browser. When sessions instead share one Chrome over `--cdp`, only the tab selection separates them. Each session remembers which tab it is bound to (by CDP target id, persisted across daemon restarts), so a restarted daemon reattaches to the session's own tab instead of adopting the most recently active one.\n\nAdd `--pin-tab` (or set `AGENT_BROWSER_PIN_TAB=1`) to make the binding strict:\n\n```bash\nagent-browser --session agent1 --cdp 9222 --pin-tab open https://site-a.com\nagent-browser --session agent2 --cdp 9222 --pin-tab open https://site-b.com\n```\n\nWith `--pin-tab`, a session whose bound tab was closed gets a `tab_gone` error instead of silently acting on another session's tab; run `tab new <url>` or pick a tab from `tab list` to recover. JSON output includes <code>\"code\": \"tab_gone\"</code>, <code>data.targetId</code>, and optional sanitized <code>data.lastUrl</code>. Batch output uses <code>result</code> for the same recovery object. The flag is sticky per session; pass `--no-pin-tab` to turn it off again. See [CDP Mode](/cdp-mode) for details.\n\n## Chrome profile reuse\n\nThe simplest way to reuse your existing login state: pass a Chrome profile name to `--profile`. agent-browser copies the profile to a temp directory (read-only snapshot) and launches Chrome with your existing cookies and sessions.\n\n```bash\n# List available Chrome profiles\nagent-browser profiles\n\n# Reuse your default Chrome profile's login state\nagent-browser --profile Default open https://gmail.com\n\n# Use a named profile (by display name or directory name)\nagent-browser --profile \"Work\" open https://app.example.com\n\n# Or via environment variable\nAGENT_BROWSER_PROFILE=Default agent-browser open https://gmail.com\n```\n\n<table>\n <thead>\n <tr><th>Detail</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td>Supported browsers</td><td>Chrome, Chrome Canary, Chromium, Brave</td></tr>\n <tr><td>What's copied</td><td>Cookies, local storage, extensions state (cache dirs excluded for speed)</td></tr>\n <tr><td>Original profile</td><td>Never modified (read-only snapshot)</td></tr>\n <tr><td>Cleanup</td><td>Temp copy deleted when browser closes</td></tr>\n <tr><td>Windows note</td><td>Close Chrome before using <code>--profile <name></code> if Chrome is running</td></tr>\n </tbody>\n</table>\n\n## Persistent profiles\n\nFor a custom profile directory that persists state across browser restarts, pass a path to `--profile`:\n\n```bash\n# Use a persistent profile directory\nagent-browser --profile ~/.myapp-profile open myapp.com\n\n# Login once, then reuse the authenticated session\nagent-browser --profile ~/.myapp-profile open myapp.com/dashboard\n\n# Or via environment variable\nAGENT_BROWSER_PROFILE=~/.myapp-profile agent-browser open myapp.com\n```\n\nThe profile directory stores:\n\n- Cookies and localStorage\n- IndexedDB data\n- Service workers\n- Browser cache\n- Login sessions\n\n## Import auth from your browser\n\nIf you are already logged in to a site in Chrome, you can grab that auth state and reuse it in agent-browser. This is the fastest way to bypass login flows, OAuth, SSO, or 2FA.\n\n**Step 1:** Start Chrome with remote debugging:\n\n```bash\n# macOS\n\"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\" --remote-debugging-port=9222\n\n# Linux\ngoogle-chrome --remote-debugging-port=9222\n```\n\nLog in to your target site(s) in this Chrome window.\n\n`--remote-debugging-port` exposes full browser control on localhost. Any local process can connect. Only use on trusted machines and close Chrome when done.\n\n**Step 2:** Connect and save the authenticated state:\n\n```bash\nagent-browser --auto-connect state save ./my-auth.json\n```\n\n**Step 3:** Use the saved auth in future sessions:\n\n```bash\n# Load auth at launch\nagent-browser --state ./my-auth.json open https://app.example.com/dashboard\n\n# Or load into an already-launched session\nagent-browser open about:blank\nagent-browser state load ./my-auth.json\nagent-browser open https://app.example.com/dashboard\n```\n\nCombine with `--session <id> --restore` so the imported auth auto-persists across restarts:\n\n```bash\nSESSION=\"$(agent-browser session id --scope worktree --prefix myapp)\"\nagent-browser --session \"$SESSION\" --restore --state ./my-auth.json open https://app.example.com/dashboard\n# From now on, state auto-saves/restores for this session\n```\n\nState files contain session tokens in plaintext. Add them to `.gitignore` and delete when no longer needed. For encryption at rest, see [State encryption](#state-encryption) below.\n\n## Session persistence\n\nUse `--restore` with a stable `--session` to automatically save and restore cookies and localStorage across browser restarts:\n\n```bash\n# Auto-save/load state for this worktree\nSESSION=\"$(agent-browser session id --scope worktree --prefix twitter)\"\nagent-browser --session \"$SESSION\" --restore open twitter.com\n\n# Login once, then state persists automatically\nagent-browser --session \"$SESSION\" --restore click \"#login\"\n\n# Optional validation prevents a bad restore from overwriting the previous good state\nagent-browser --session \"$SESSION\" --restore --restore-check-text Dashboard open twitter.com\n```\n\nState files are stored in `~/.agent-browser/sessions/` and automatically loaded before navigation. With the default `--restore-save auto` policy, failed restore or failed validation skips auto-save.\n\nWhen `--restore` or another restore key is configured, state is saved when the browser closes (explicit `close`, idle timeout, or daemon shutdown) and also periodically while the browser is open, so a browser window you close by hand still leaves a recent save behind. A session ID by itself only isolates the daemon and does not enable persistence; without a restore key, shutdown discards transient browser state and open tabs. Periodic autosave waits for commands to settle, then saves at most once per `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS` (default 30000; set to `0` to save only on close). Idle sessions with configured persistence keep saving on the same interval, so changes the page makes on its own (token refreshes, background requests) are captured too. The daemon exits after one hour without commands or dashboard input by default; `--idle-timeout <time>` or `AGENT_BROWSER_IDLE_TIMEOUT_MS` tunes this, and `0` disables it. Headed, Safari/iOS WebDriver, and user-attached browsers are exempt from the default timeout; provider-owned cloud browsers are not. State saving respects the `--restore-save` policy.\n\n### Restore key rules\n\nSession and restore names must contain only alphanumeric characters, hyphens, and underscores. Use `agent-browser session id` to generate a valid key:\n\n```bash\n# Valid generated key\nagent-browser session id --scope worktree --prefix my-project\n\n# Invalid (will be rejected)\nagent-browser --session \"../bad\" --restore open example.com # path traversal\nagent-browser --session \"my session\" --restore open example.com # spaces\nagent-browser --session \"foo/bar\" --restore open example.com # slashes\n```\n\n## State encryption\n\nEncrypt saved state files (cookies, localStorage) using AES-256-GCM:\n\n```bash\n# Generate a 256-bit key (64 hex characters)\nopenssl rand -hex 32\n\n# Set the encryption key\nexport AGENT_BROWSER_ENCRYPTION_KEY=<your-64-char-hex-key>\n\n# State files are now encrypted automatically\nagent-browser --session secure-session --restore open example.com\n\n# List states shows encryption status\nagent-browser state list\n```\n\n## State auto-expiration\n\nAutomatically delete old state files to prevent accumulation:\n\n```bash\n# Set expiration (default: 30 days)\nexport AGENT_BROWSER_STATE_EXPIRE_DAYS=7\n\n# Manually clean old states\nagent-browser state clean --older-than 7\n```\n\n## State management commands\n\n```bash\n# List all saved states\nagent-browser state list\n\n# Show state summary (cookies, origins, domains)\nagent-browser state show my-session-default.json\n\n# Rename a state file\nagent-browser state rename old-name new-name\n\n# Clear states for a specific session name\nagent-browser state clear my-session\n\n# Clear all saved states\nagent-browser state clear --all\n\n# Manual save/load (for custom paths)\nagent-browser state save ./backup.json\nagent-browser state load ./backup.json\n```\n\n## Authenticated sessions\n\nUse `--headers` to set HTTP headers for a specific origin:\n\n```bash\n# Headers scoped to api.example.com only\nagent-browser open api.example.com --headers '{\"Authorization\": \"Bearer <token>\"}'\n\n# Requests to api.example.com include the auth header\nagent-browser snapshot -i --json\nagent-browser click @e2\n\n# Navigate to another domain - headers NOT sent\nagent-browser open other-site.com\n```\n\nUseful for:\n\n- **Skipping login flows** - Authenticate via headers\n- **Switching users** - Different auth tokens per session\n- **API testing** - Access protected endpoints\n- **Security** - Headers scoped to origin, not leaked\n\n## Multiple origins\n\n```bash\nagent-browser open api.example.com --headers '{\"Authorization\": \"Bearer token1\"}'\nagent-browser open api.acme.com --headers '{\"Authorization\": \"Bearer token2\"}'\n```\n\n## Global headers\n\nFor headers on all domains:\n\n```bash\nagent-browser set headers '{\"X-Custom-Header\": \"value\"}'\n```\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_SESSION</code></td><td>Browser session ID (default: \"default\")</td></tr>\n <tr><td><code>AGENT_BROWSER_NAMESPACE</code></td><td>Namespace for daemon sockets and restore-state directories</td></tr>\n <tr><td><code>AGENT_BROWSER_PIN_TAB</code></td><td>Pin the session to its bound tab (strict tab binding)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE</code></td><td>Auto-save/load state persistence key</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_SAVE</code></td><td>Restore save policy: <code>auto</code>, <code>always</code>, or <code>never</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTOSAVE_INTERVAL_MS</code></td><td>Minimum ms between periodic session autosaves (default: 30000, <code>0</code> disables)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_URL</code></td><td>URL pattern restored state must match</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_TEXT</code></td><td>Page text restored state must contain</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_FN</code></td><td>JavaScript expression restored state must satisfy</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION_NAME</code></td><td>Legacy auto-save/load state persistence name</td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM encryption</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code></td><td>Auto-delete states older than N days (default: 30)</td></tr>\n </tbody>\n</table>\n"
|
||
},
|
||
"docs/src/app/sessions/layout.tsx": {
|
||
"sha256": "ca4eda4ce05782fe5674bab8e3ce40785c1321d45ccd830ca268f3cdfafb9cde",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"sessions\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/skills/page.mdx": {
|
||
"sha256": "8faf0c95a62d5690178b16fb18e93527215eb5444d3a58e9be1bd7325d370e7c",
|
||
"raw": "# Skills\n\nagent-browser ships with skills that teach AI coding agents how to use it for specific workflows. Install a skill and your agent in Cursor, Claude Code, or Codex can automate browser tasks without manual guidance.\n\n## Installation\n\n```bash\nnpx skills add vercel-labs/agent-browser\n```\n\nThis installs a single discovery skill that teaches your agent about agent-browser and directs it to use the `agent-browser skills` CLI command for current instructions. The discovery skill contains trigger words so agents prefer agent-browser over built-in browser tools.\n\n## CLI Command\n\nAgents retrieve skill content at runtime using the `agent-browser skills` command. This always serves content matching the installed CLI version, so instructions never go stale.\n\n<table>\n <thead>\n <tr>\n <th>Command</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code>agent-browser skills</code></td>\n <td>List all available skills (same as <code>skills list</code>)</td>\n </tr>\n <tr>\n <td><code>agent-browser skills list</code></td>\n <td>List all available skills with names and descriptions</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get <name></code></td>\n <td>Output a skill's full content</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get <name> --full</code></td>\n <td>Include references and templates alongside the skill</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get --all</code></td>\n <td>Output every skill</td>\n </tr>\n <tr>\n <td><code>agent-browser skills path [name]</code></td>\n <td>Print the filesystem path to a skill directory</td>\n </tr>\n </tbody>\n</table>\n\nAll commands support `--json` for structured output.\n\nSet the `AGENT_BROWSER_SKILLS_DIR` environment variable to override the skills directory path.\n\n## How It Works\n\nThe discovery skill installed via `npx skills add` is intentionally thin and stable. It makes agents aware of agent-browser, provides trigger words for activation, and points to the `agent-browser skills` command. Actual usage instructions, command references, workflows, and specialized knowledge all live in the CLI-served skills.\n\nThis design solves the version drift problem: the installed SKILL.md rarely changes, while the CLI always serves content matching its own version.\n\n## Available Skills\n\n- **core** — Core browser automation: navigation, snapshots, forms, screenshots, data extraction, sessions, authentication, diffing, and the full command reference. Start here for most browser tasks.\n- **dogfood** — Systematic exploratory testing. Navigates an app like a real user, finds bugs and UX issues, and produces a structured report with screenshots and repro videos.\n- **derive-client** — Reverse-engineer a site's internal API. Records network traffic into a HAR (with response bodies embedded), identifies the real endpoints, and generates a standalone client or CLI that skips the browser entirely.\n- **electron** — Automate any Electron app (VS Code, Slack, Discord, Figma, etc.) by connecting to its built-in Chrome DevTools Protocol port.\n- **slack** — Browser-based Slack automation. Check unreads, navigate channels, search conversations, send messages, and extract data.\n- **vercel-sandbox** — Run agent-browser + headless Chrome inside ephemeral Vercel Sandbox microVMs.\n- **protected-vercel-deployments** — Access and test Vercel deployments behind Vercel Authentication, SSO, or Deployment Protection with short-lived Trusted Sources OIDC tokens.\n- **agentcore** — Run agent-browser on AWS Bedrock AgentCore cloud browsers.\n\nUse `agent-browser skills list` to see all available skills, then `agent-browser skills get <name>` to load one. `agent-browser skills get core --full` is the recommended starting point for most browser tasks.\n\n## eve agents\n\nFor eve agents, mount the [`@agent-browser/eve`](/eve) extension instead of writing browser tools by hand. It gives the agent namespaced browser tools backed by agent-browser inside the eve sandbox.\n\n## Source\n\nAll skill files are in the [`skills/`](https://github.com/vercel-labs/agent-browser/tree/main/skills) and [`skill-data/`](https://github.com/vercel-labs/agent-browser/tree/main/skill-data) directories of the repository. The `skills/` directory holds the discovery stub that `npx skills add` installs; the `skill-data/` directory holds the runtime skill content served by the CLI.\n"
|
||
},
|
||
"docs/src/app/skills/layout.tsx": {
|
||
"sha256": "38e08351fb4e670d3e5dbf89f4b01d0cb13de7007a6301e7c0b75a929a796f8a",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"skills\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/snapshots/page.mdx": {
|
||
"sha256": "999aea629ff9489036f38a65d6fbb42806d333ae6e61ce0efd3aae405f97cb34",
|
||
"raw": "# Snapshots\n\nThe `snapshot` command returns a compact accessibility tree with refs for element interaction.\n\n## Options\n\nFilter output to reduce size:\n\n```bash\nagent-browser snapshot # Full accessibility tree\nagent-browser snapshot -i # Interactive elements only (recommended)\nagent-browser snapshot -c # Compact (remove empty elements)\nagent-browser snapshot -d 3 # Limit depth to 3 levels\nagent-browser snapshot -s \"#main\" # Scope to CSS selector\nagent-browser snapshot -i -c -d 5 # Combine options\n```\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-i, --interactive</code></td><td>Only interactive elements (buttons, links, inputs)</td></tr>\n <tr><td><code>-u, --urls</code></td><td>Include href URLs for link elements</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Remove empty structural elements</td></tr>\n <tr><td><code>-d, --depth</code></td><td>Limit tree depth</td></tr>\n <tr><td><code>-s, --selector</code></td><td>Scope to CSS selector</td></tr>\n </tbody>\n</table>\n\n## Output format\n\nThe default text output is compact and AI-friendly:\n\n```bash\nagent-browser snapshot -i\n# Output:\n# @e1 [heading] \"Example Domain\" [level=1]\n# @e2 [button] \"Submit\"\n# @e3 [input type=\"email\"] placeholder=\"Email\"\n# @e4 [link] \"Learn more\"\n```\n\n## Using refs\n\nRefs from the snapshot map directly to commands:\n\n```bash\nagent-browser click @e2 # Click the Submit button\nagent-browser fill @e3 \"a@b.com\" # Fill the email input\nagent-browser get text @e1 # Get heading text\n```\n\n## Ref lifecycle\n\nSurviving DOM elements retain their refs across snapshots and same-document updates. Replacing an element or navigating its page or iframe invalidates its refs without recycling IDs. Virtual accessibility nodes have snapshot-local refs. Re-snapshot after interactions to observe changes, and always after navigation:\n\n```bash\nagent-browser click @e4 # Navigates to new page\nagent-browser snapshot -i # Get fresh refs\nagent-browser click @e8 # Use a ref from the new snapshot\n```\n\n## Annotated screenshots\n\nFor visual context alongside text snapshots, use `screenshot --annotate` to overlay numbered labels on interactive elements. Each label `[N]` maps to ref `@eN`:\n\nIn native mode, annotated screenshots currently work on the CDP-backed browser path (Chromium/Lightpanda). The Safari/WebDriver backend does not yet support `--annotate`.\n\n```bash\nagent-browser screenshot --annotate ./page.png\n# -> Screenshot saved to ./page.png\n# [1] @e1 button \"Submit\"\n# [2] @e2 link \"Home\"\n# [3] @e3 textbox \"Email\"\nagent-browser click @e2\n```\n\nHeadless Chromium screenshots hide native scrollbars for consistent image output. Pass `--hide-scrollbars false` when launching to keep native scrollbars visible.\n\nAnnotated screenshots also cache refs, so you can interact with elements immediately. This is useful when the text snapshot is insufficient for unlabeled icons, canvas content, or visual layout verification.\n\n## Iframes\n\nSnapshots automatically detect and inline iframe content. Each `Iframe` node in the main frame is resolved and its child accessibility tree is included directly beneath it. Refs assigned to elements inside iframes carry frame context, so interactions work without switching frames first.\n\n```bash\nagent-browser snapshot -i\n# @e1 [heading] \"Checkout\"\n# @e2 [Iframe] \"payment-frame\"\n# @e3 [input] \"Card number\"\n# @e4 [button] \"Pay\"\n\nagent-browser fill @e3 \"4111111111111111\"\nagent-browser click @e4\n```\n\nOnly one level of iframe nesting is expanded. Cross-origin iframes that block accessibility tree access and empty iframes are silently omitted.\n\nTo scope a snapshot to a single iframe, switch into it first:\n\n```bash\nagent-browser frame @e2\nagent-browser snapshot -i # Only elements inside that iframe\nagent-browser frame main # Return to main frame\n```\n\n## Best practices\n\n1. Use `-i` to reduce output to actionable elements\n2. Re-snapshot after page changes to get updated refs\n3. Scope with `-s` for specific page sections\n4. Use `-d` to limit depth on complex pages\n5. Use `screenshot --annotate` when visual context is needed alongside refs\n\n## JSON output\n\nFor programmatic parsing in scripts:\n\n```bash\nagent-browser snapshot --json\n# {\"success\":true,\"data\":{\"snapshot\":\"...\",\"refs\":{\"e1\":{\"role\":\"heading\",\"name\":\"Title\"},...}}}\n```\n\nNote: JSON uses more tokens than text output. The default text format is preferred for AI agents.\n"
|
||
},
|
||
"docs/src/app/snapshots/layout.tsx": {
|
||
"sha256": "8ad62e150f4c361c8a8053230dc01e149da7f473f82a80fec361c4b925250737",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"snapshots\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/streaming/page.mdx": {
|
||
"sha256": "babea87831dd8d66a859f302b89811aecff952c417e68462e6ac05aadc88751a",
|
||
"raw": "# Streaming\n\nStream the browser viewport via WebSocket for live preview or \"pair browsing\" where a human can watch and interact alongside an AI agent.\n\n## Streaming\n\nEvery session automatically starts a WebSocket stream server on an OS-assigned port. The server streams viewport frames and accepts input events (mouse, keyboard, touch).\n\nTo bind to a specific port, set `AGENT_BROWSER_STREAM_PORT`:\n\n```bash\nAGENT_BROWSER_STREAM_PORT=9223 agent-browser open example.com\n```\n\nYou can also manage streaming at runtime:\n\n```bash\nagent-browser stream status # Show streaming state and bound port\nagent-browser stream enable --port 9223 # Re-enable on a specific port\nagent-browser stream disable # Stop streaming for the session\n```\n\n`stream status` returns the enabled state, active port, browser connection state, and whether screencasting is active. `stream disable` tears the server down and removes the session's `.stream` metadata file.\n\nUse [Video Recording](/recording) when you need a saved WebM or MP4 artifact instead of a live WebSocket stream. Recording requires `ffmpeg` on `PATH`.\n\n## Runtime status response\n\n`agent-browser stream status --json` returns data like:\n\n```json\n{\n \"enabled\": true,\n \"port\": 9223,\n \"connected\": true,\n \"screencasting\": true\n}\n```\n\n`connected` reports whether the daemon currently has a browser attached. `screencasting` reports whether frames are actively being produced for the stream server.\n\n## Relationship to screencast commands\n\n`stream enable` creates the WebSocket server and keeps it available for the session. WebSocket clients then trigger live frame delivery automatically.\n\nThe lower-level `screencast_start` and `screencast_stop` commands still control explicit CDP screencasts directly. Use them when you want a screencast without the WebSocket runtime server.\n\n## WebSocket protocol\n\nConnect to `ws://localhost:9223` to receive frames and send input.\n\nFrame encoding is set per daemon with `AGENT_BROWSER_STREAM_QUALITY` (0 to 100), `AGENT_BROWSER_STREAM_MAX_WIDTH` and `AGENT_BROWSER_STREAM_MAX_HEIGHT`. The live stream requests jpeg. An explicit `screencast_start` reconfigures the same underlying screencast, so a client can see the format change mid-stream. Width and height cap the frame and default to the session viewport. On a busy page at 1280x720, quality 80 costs about 54 KB per frame, quality 20 about 25 KB, and quality 20 at 640x360 about 9 KB.\n\nBrowser clients must load from `localhost`, `127.0.0.1`, `::1` or `file://`. Any other origin gets a 403 on the upgrade and needs a proxy.\n\n### Frame messages\n\nThe server sends frame messages with base64-encoded images:\n\n```json\n{\n \"type\": \"frame\",\n \"seq\": 41,\n \"data\": \"<base64-encoded-jpeg>\",\n \"metadata\": {\n \"deviceWidth\": 1280,\n \"deviceHeight\": 720,\n \"pageScaleFactor\": 1,\n \"offsetTop\": 0,\n \"scrollOffsetX\": 0,\n \"scrollOffsetY\": 0,\n \"timestamp\": 1785038682238\n }\n}\n```\n\n`seq` is a monotonic frame id. It is what an ack pacing client echoes back, and it keeps climbing across browser relaunches so a long-lived client never sees an id go backwards.\n\n`metadata.timestamp` is the capture time in epoch milliseconds. Comparing it against the clock when the frame is drawn gives the age of what is on screen, which is the number worth watching on a constrained link.\n\n### URL messages\n\nOn Chrome, the server sends URL updates for full-document, History API, and fragment navigation in the active tab's main frame:\n\n```json\n{\n \"type\": \"url\",\n \"url\": \"https://example.com/dashboard#activity\",\n \"timestamp\": 1785038682238\n}\n```\n\nNavigation inside child frames or background tabs does not emit a URL message or replace the active tab's cached URL.\n\n### Status messages\n\nConnection and screencast status:\n\n```json\n{\n \"type\": \"status\",\n \"connected\": true,\n \"screencasting\": true,\n \"viewportWidth\": 1280,\n \"viewportHeight\": 720\n}\n```\n\n### Frame delivery\n\nFrames are delivered latest-first: the server holds only the newest frame and reads it at send time, so every frame produced while an earlier one is still being written is skipped instead of queued. The application never builds a backlog.\n\nIn the default push pacing the transport underneath still can: frames already accepted by the socket are delivered in order, so a client that stops reading entirely drains whatever the kernel buffered before the writer blocked. Ack pacing removes that window (see below). Status, console, and tab messages flow through a separate ordered channel, so they are never replaced by a newer message the way frames are. They are not unconditionally durable: a client that falls far enough behind can lag out of that channel and lose messages, so treat console output as a live feed rather than an audit log.\n\nInput handling is independent of frame delivery. Each connection reads input on its own task, so clicks and keystrokes dispatch to the browser immediately even while a large frame is mid-write to a slow client. Events go to the browser without waiting for its reply, so a click stays responsive behind a burst of mouse moves, and ordering is preserved.\n\n### Client configuration\n\nA client can cap its own frame rate by sending a `config` message at any time:\n\n```json\n{\n \"type\": \"config\",\n \"maxFps\": 10\n}\n```\n\n`maxFps` caps how many frames per second the server sends to this client (1 to 120). Set `0` to remove the cap (the default). Each client controls its own rate; other connected clients are unaffected.\n\n### Ack pacing\n\nPush pacing hands each frame to the socket as soon as the rate allows, so a client that stalls drains what the transport buffered. To get one frame at a time instead, opt into ack pacing:\n\n```json\n{\n \"type\": \"config\",\n \"pacing\": \"ack\"\n}\n```\n\nThe server then keeps at most one frame in flight and waits for the client to acknowledge it:\n\n```json\n{\n \"type\": \"ack\",\n \"seq\": 41\n}\n```\n\nEvery `frame` message carries a monotonic `seq`. Echo the id of the frame you finished rendering. While an ack is outstanding, newer frames replace each other in the server and never reach the socket, so a client that stalls for ten seconds and resumes receives the current page rather than ten seconds of history. This mirrors how Chrome paces its own screencast upstream with `Page.screencastFrameAck`.\n\nUnder ack pacing one frame is in flight at a time, so the rate is one frame per transfer plus one acknowledgement round trip. Both the link's bandwidth and its latency bound it, and a link whose bandwidth-delay product exceeds a single frame goes underused. That headroom is the cost of the freshness guarantee.\n\nAck pacing bounds one hop. With a proxy in the path, forward the renderer's acks; acks generated on receipt leave frames queued on the far side.\n\nAcks are cumulative: acknowledging a newer id covers every older one, so a client that skips ids still unblocks delivery. A client that opts in and then stops acknowledging simply stops receiving frames, while status, tabs, url, and console keep flowing. Send `{\"type\":\"config\",\"pacing\":\"push\"}` to return to the default.\n\n`pacing` and `maxFps` are independent and compose: pacing bounds how much is in flight, `maxFps` bounds the rate. A preview on a constrained link usually wants both.\n\nA `config` message cannot cover the connection's opening frame, because the server sends the most recent frame as soon as the client connects. To have pacing apply from the very first frame, declare it on the URL instead:\n\n```\nws://127.0.0.1:<port>/?pacing=ack&maxFps=10\n```\n\nA `config` message sent later still wins. An unrecognized or unparsable value on the URL is ignored rather than failing the connection.\n\n## Input injection\n\nSend input events to control the browser remotely. Mouse, keyboard, and touch input reset the daemon idle timer, so an actively controlled dashboard or streaming session is not shut down by the default timeout.\n\n### Mouse events\n\n```json\n// Click\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mousePressed\",\n \"x\": 100,\n \"y\": 200,\n \"button\": \"left\",\n \"clickCount\": 1\n}\n\n// Release\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseReleased\",\n \"x\": 100,\n \"y\": 200,\n \"button\": \"left\"\n}\n\n// Move\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseMoved\",\n \"x\": 150,\n \"y\": 250\n}\n\n// Scroll\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseWheel\",\n \"x\": 100,\n \"y\": 200,\n \"deltaX\": 0,\n \"deltaY\": 100\n}\n```\n\n### Keyboard events\n\n```json\n// Key down\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyDown\",\n \"key\": \"Enter\",\n \"code\": \"Enter\"\n}\n\n// Key up\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyUp\",\n \"key\": \"Enter\",\n \"code\": \"Enter\"\n}\n\n// Type character\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"char\",\n \"text\": \"a\"\n}\n\n// With modifiers (1=Alt, 2=Ctrl, 4=Meta, 8=Shift)\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyDown\",\n \"key\": \"c\",\n \"code\": \"KeyC\",\n \"modifiers\": 2\n}\n```\n\n### Touch events\n\n```json\n// Touch start\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchStart\",\n \"touchPoints\": [{ \"x\": 100, \"y\": 200 }]\n}\n\n// Touch move\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchMove\",\n \"touchPoints\": [{ \"x\": 150, \"y\": 250 }]\n}\n\n// Touch end\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchEnd\",\n \"touchPoints\": []\n}\n\n// Multi-touch (pinch zoom)\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchStart\",\n \"touchPoints\": [\n { \"x\": 100, \"y\": 200, \"id\": 0 },\n { \"x\": 200, \"y\": 200, \"id\": 1 }\n ]\n}\n```\n\n## Programmatic API\n\nFor advanced use, control streaming directly via the TypeScript API:\n\n```typescript\nimport { BrowserManager } from 'agent-browser';\n\nconst browser = new BrowserManager();\nawait browser.launch({ headless: true });\nawait browser.navigate('https://example.com');\n\n// Start screencast with callback\nawait browser.startScreencast((frame) => {\n console.log('Frame:', frame.metadata.deviceWidth, 'x', frame.metadata.deviceHeight);\n // frame.data is base64-encoded image\n}, {\n format: 'jpeg', // or 'png'\n quality: 80, // 0-100, jpeg only\n maxWidth: 1280,\n maxHeight: 720,\n everyNthFrame: 1\n});\n\n// Inject mouse event\nawait browser.injectMouseEvent({\n type: 'mousePressed',\n x: 100,\n y: 200,\n button: 'left',\n clickCount: 1\n});\n\n// Inject keyboard event\nawait browser.injectKeyboardEvent({\n type: 'keyDown',\n key: 'Enter',\n code: 'Enter'\n});\n\n// Inject touch event\nawait browser.injectTouchEvent({\n type: 'touchStart',\n touchPoints: [{ x: 100, y: 200 }]\n});\n\n// Check if screencasting\nconsole.log('Active:', browser.isScreencasting());\n\n// Stop screencast\nawait browser.stopScreencast();\n```\n\n## Use cases\n\n- **Pair browsing** - Human watches and assists AI agent in real-time\n- **Remote preview** - View browser output in a separate UI\n- **Recording** - Capture frames for video generation\n- **Mobile testing** - Inject touch events for mobile emulation\n- **Accessibility testing** - Manual interaction during automated tests\n"
|
||
},
|
||
"docs/src/app/streaming/layout.tsx": {
|
||
"sha256": "1e624df819deac5efc8f7a32ccc92b1ff9dbfa9c185e537db01a651e1bbab2d4",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"streaming\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/webgpu/page.mdx": {
|
||
"sha256": "cd6645fda964714ddbdc5104957b6ed9ff40f4635405d730697c8cb52a71ac1d",
|
||
"raw": "# WebGPU\n\nTake screenshots and record video of WebGPU pages — three.js `WebGPURenderer`, Babylon.js, or raw WebGPU — with headless Chrome.\n\nHeadless Chrome does not expose WebGPU by default. Without setup this fails silently: the page loads, the screenshot command succeeds, and the canvas is black. The `--webgpu` flag enables a launch preset that makes WebGPU work, including in GPU-less containers and CI.\n\n## Quick start\n\n```bash\nagent-browser --webgpu open https://my-webgpu-app.example.com\nagent-browser screenshot app.png\n```\n\nAlso available as the `AGENT_BROWSER_WEBGPU` environment variable or `\"webgpu\": true` in `agent-browser.json`.\n\n## What the preset does\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Flags applied</th></tr>\n </thead>\n <tbody>\n <tr><td>All</td><td><code>--enable-unsafe-webgpu</code> (WebGPU is hidden in headless and GPU-blocklisted environments by default)</td></tr>\n <tr><td>Linux</td><td><code>--enable-features=Vulkan --use-angle=vulkan --use-vulkan=swiftshader --use-webgpu-adapter=swiftshader --disable-vulkan-surface</code> — WebGPU through SwiftShader's software Vulkan; no GPU required</td></tr>\n </tbody>\n</table>\n\nmacOS uses the hardware Metal backend and Windows uses D3D — nothing extra to install on either.\n\n## Platform support\n\n<table>\n <thead>\n <tr><th>Platform</th><th>WebGPU rendering (headless)</th><th>Screenshots of WebGPU canvases</th></tr>\n </thead>\n <tbody>\n <tr><td>macOS</td><td>works</td><td>works headless</td></tr>\n <tr><td>Windows</td><td>works (hardware D3D)</td><td>headless captures black — use <code>--headed</code> on a logged-in desktop</td></tr>\n <tr><td>Linux</td><td>works (SwiftShader Vulkan)</td><td>headless capture not supported upstream — add <code>--headed</code> (virtual display starts automatically)</td></tr>\n </tbody>\n</table>\n\nThe Windows/Linux screenshot gap is an upstream headless-Chrome limitation: WebGPU canvas *presentation* never reaches the headless compositor even though rendering works (verifiable by pixel readback). No flag combination is known to fix it.\n\nOn Linux, `--headed` is all you need even on displayless servers and containers: when no `DISPLAY` is set and Xvfb is installed (`apt-get install -y xvfb`), agent-browser starts a private virtual display for the browser and tears it down with it (`AGENT_BROWSER_NO_XVFB=1` opts out):\n\n```bash\nagent-browser --webgpu --headed open https://my-webgpu-app.example.com\nagent-browser screenshot app.png # real WebGPU pixels, no display hardware\n```\n\nOn Windows, the headed session must run in a logged-in desktop session — launching from an ssh/service context is not enough (schedule the launch on the interactive desktop with `schtasks /IT`, then drive the session from anywhere).\n\n## Verify with doctor\n\n```bash\nagent-browser doctor --webgpu\n```\n\nThe probe launches a scratch session with the preset and pixel-checks two stages separately — WebGPU failures are silent black, so only pixel assertions prove anything:\n\n1. **render** — requests an adapter (with retries for cold-start nulls), clears an offscreen texture red through a real render pass, and reads the buffer back. Reports the adapter in use.\n2. **screenshot** — decodes an actual screenshot of a presenting canvas, proving the capture path end to end.\n\n```\nWebGPU probe\n pass WebGPU rendered and read back pixels in 1.61s (nvidia ampere)\n fail WebGPU renders, but headless screenshots miss the canvas (expected red, got rgb(0,0,0)); this is a known headless Chrome limitation on this platform\n fix: run WebGPU sessions with --headed on a logged-in desktop for screenshots\n```\n\nOn macOS both checks pass headless; on Windows/Linux the second check tells you when the platform needs `--headed` for capture. Run `agent-browser doctor --webgpu --headed` to validate that path itself — on displayless Linux the probe starts its own Xvfb, so both checks should pass.\n\n## Linux, containers, and CI\n\nThe SwiftShader Vulkan path needs the system Vulkan loader and Mesa ICD. Without them `requestAdapter()` returns `null`:\n\n```bash\napt-get install -y libvulkan1 mesa-vulkan-drivers\n```\n\nContainer recipe (xvfb only needed for the screenshot path):\n\n```dockerfile\nFROM node:22-bookworm-slim\nRUN apt-get update && apt-get install -y \\\n ca-certificates libvulkan1 mesa-vulkan-drivers xvfb xauth \\\n && rm -rf /var/lib/apt/lists/*\nRUN npm install -g agent-browser \\\n && agent-browser install\n```\n\nNo real GPU or `/dev/dri` is required. To prefer hardware Vulkan on a Linux machine that has working drivers, override both the Vulkan driver and the adapter — the preset pins `--use-vulkan=swiftshader`, so overriding only the adapter still enumerates SwiftShader (user args win over the preset):\n\n```bash\nagent-browser --webgpu --args \"--use-vulkan=native,--use-webgpu-adapter=default\" open ...\n```\n\n## Gotchas\n\n**Secure contexts only.** `navigator.gpu` exists only in secure contexts: `https://`, `http://localhost`, and `file://` qualify; a plain `http://` LAN address does not, regardless of flags.\n\n**Don't screenshot too early.** WebGPU apps initialize asynchronously — three.js `WebGPURenderer` awaits an async `init()` before the first frame. A screenshot at page `load` captures a blank canvas with no error. Wait for an app-specific ready signal, or give the render loop a couple of frames:\n\n```bash\nagent-browser eval \"new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)))\"\nagent-browser screenshot app.png\n```\n\n**three.js falls back silently.** When no WebGPU adapter is available, `WebGPURenderer` switches to its WebGL2 backend without an error. To check what a page actually got:\n\n```bash\nagent-browser eval \"document.querySelector('canvas').getContext('webgpu') ? 'webgpu' : 'webgl-fallback'\"\n```\n\n**Custom pixel readbacks: avoid canvas snapshots.** `drawImage(webgpuCanvas, ...)` depends on presentation timing and reads transparent black on some platforms even when rendering works. Render to an offscreen texture and read it back with `copyTextureToBuffer` + `mapAsync` — deterministic on every platform (this is how the doctor probe proves rendering).\n\n**SwiftShader is a CPU rasterizer.** Simple scenes render fine; heavy scenes run at single-digit FPS. That rarely matters for screenshots, but for smooth video of complex scenes use hardware (macOS/Windows, or Linux with real Vulkan drivers and `--use-vulkan=native,--use-webgpu-adapter=default`).\n"
|
||
},
|
||
"docs/src/app/webgpu/layout.tsx": {
|
||
"sha256": "2a5f608be3a328492175a8338837ed99e3c837018eafc889a05d7bbf696e362e",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"webgpu\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/app/webmcp/page.mdx": {
|
||
"sha256": "05f9ab0409bd23c0088ea29a373502eab6b35ea561c84e696657e66cf9204417",
|
||
"raw": "# WebMCP\n\nWebMCP support is experimental. agent-browser enables Chrome's current WebMCP launch features by default for locally managed Chrome sessions. Pass `--no-webmcp` or set `AGENT_BROWSER_NO_WEBMCP=1` to opt out.\n\nBrowser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain only names, brief descriptions, origins, and frame IDs. Choose a relevant tool, then fetch its full schema with `agent-browser webmcp list <tool> --frame <frame-id> --json` before invoking it. Schemas and annotations are never included proactively. Unchanged catalogs and pages without tools add no context. JSON output adds:\n\n```json\n{\n \"data\": {\n \"webmcp\": {\n \"experimental\": true,\n \"untrusted\": true,\n \"status\": \"ready\",\n \"available\": true,\n \"toolCount\": 1,\n \"tools\": [{\n \"name\": \"search\",\n \"description\": \"Search products\",\n \"frameId\": \"frame-id\",\n \"origin\": \"https://example.com\"\n }],\n \"truncated\": false\n }\n }\n}\n```\n\n```bash\nagent-browser open https://example.com # Announces brief tool summary\nagent-browser webmcp list search --json # Fetch only the selected schema\nagent-browser webmcp invoke search --params '{\"query\":\"browser agents\"}'\nagent-browser webmcp invoke slow_tool --params @input.json --detach\nagent-browser webmcp result <invocation-id>\nagent-browser webmcp cancel <invocation-id>\n```\n\nJSON exposes updates as `data.webmcp`; CLI and MCP text use the same summaries. An omitted field means no update. A one-time `status: \"ready\"` update with `tools: []` clears previously advertised tools; `status: \"unavailable\"` invalidates them when observation fails. Every emitted summary replaces earlier availability, including schema-only changes. After conversation compaction or joining an existing browser session, use `webmcp list` to recover context. Administrative commands and explicit metadata requests do not append duplicate summaries.\n\nAutomatic summaries are limited to 16 tools and 4 KiB of JSON, with descriptions shortened to 160 bytes plus a truncation marker. Names and frame identities are never cut into unusable identifiers; oversized records are omitted. `truncated: true` indicates shortened descriptions or omitted tools. `webmcp list --json` retrieves the full catalog; `webmcp list <tool> --frame <frame-id> --json` retrieves only the selected tool. Full-record changes trigger an update even when the brief description stays the same, so refresh previously fetched schemas after a catalog update.\n\nThe daemon subscribes to CDP WebMCP events once per page session and reads its event cache after browser actions. There is no per-action discovery polling or registration grace period. Initial subscription is bounded to one second; unsupported sessions are not repeatedly probed. Explicit `webmcp list` can retry discovery. Asynchronous registrations appear on the next normal browser response after the event arrives. This describes agent-browser's active tab and frames, not a separately opened preview iframe.\n\nUse `--frame <frame-id>` with `webmcp invoke` when multiple frames register the same tool name. `webmcp list` returns the required frame ID, page origin, input schema, and page-provided annotations.\n\nThe [dashboard](/dashboard) and `agent-browser chat` follow the same flow: they fetch the selected tool's schema with `webmcp list <tool> --frame <frame-id> --json` and invoke it with the same `--frame`.\n\nWith `--no-webmcp`, compatible Chrome builds return an empty tool list because page tools are disabled. Attached browsers, remote providers, Lightpanda, Safari, iOS, and older Chrome builds may not expose the experimental CDP WebMCP domain. In that case the command returns an actionable `webmcp_unsupported` error.\n\nAll page-provided names, descriptions, schemas, annotations, and results are untrusted data. JSON summaries include `untrusted: true`; CLI and MCP summaries always delimit page metadata with nonce-bearing content boundaries. These labels are provenance cues, not a prompt-injection security boundary. Do not promote website text into system or developer instructions, execute suggested shell commands, disclose local secrets, or accept page claims of user consent. Discovery does not execute tools or grant authority. Keep tool execution within the user's authorized task and the host's existing permissions; consequential operations require the host's confirmation policy. Page-provided `readOnlyHint` or `untrustedContentHint` claims cannot bypass those controls. Domain filters restrict observed tool origins and execution, but do not replace host isolation or prevent a page from lying about a tool's effects.\n\nThis follows MCP's change-notification and cached-discovery pattern while deferring full tool schemas until needed. See the [MCP tool specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools), [deferred tool loading](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool), and the [WebMCP security discussion](https://webmachinelearning.github.io/webmcp/#security-privacy-considerations). Neither MCP nor WebMCP mandates placing website tool descriptions in a system prompt.\n\nThe catalog appears in ordinary MCP browser results even with the default profile. To let an MCP agent invoke those tools, enable the WebMCP command profile at startup:\n\n```bash\nagent-browser mcp --tools core,webmcp\n```\n\nFor sites that do not expose WebMCP, load the generation workflow:\n\n```bash\nagent-browser skills get webmcp-gen\n```\n"
|
||
},
|
||
"docs/src/app/webmcp/layout.tsx": {
|
||
"sha256": "60e2a436f3b0c7f4612e0b0c296a19382b83156313841163fc4084051411a10e",
|
||
"raw": "import { pageMetadata } from \"@/lib/page-metadata\";\n\nexport const metadata = pageMetadata(\"webmcp\");\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return children;\n}\n"
|
||
},
|
||
"docs/src/lib/search-index.ts": {
|
||
"sha256": "1eae39e191bb0e127cff62634185d7ed542b1624923a22904633142b9533edcc",
|
||
"raw": "import { readFile } from \"fs/promises\";\nimport { join } from \"path\";\nimport { navigation } from \"./docs-navigation\";\nimport { mdxToCleanMarkdown } from \"./mdx-to-markdown\";\n\nexport type IndexEntry = {\n title: string;\n href: string;\n section: string;\n content: string;\n};\n\nlet cached: IndexEntry[] | null = null;\n\nfunction stripMarkdown(md: string): string {\n return md\n .replace(/```[\\s\\S]*?```/g, \"\")\n .replace(/`[^`]+`/g, \"\")\n .replace(/\\[([^\\]]+)\\]\\([^)]+\\)/g, \"$1\")\n .replace(/^#{1,6}\\s+/gm, \"\")\n .replace(/\\*{1,3}([^*]+)\\*{1,3}/g, \"$1\")\n .replace(/<[^>]+>/g, \"\")\n .replace(/\\n{3,}/g, \"\\n\\n\")\n .trim();\n}\n\nfunction mdxFileForSlug(slug: string): string {\n const docsRoot = join(process.cwd(), \"src\", \"app\");\n if (slug === \"/\") {\n return join(docsRoot, \"page.mdx\");\n }\n const rest = slug.replace(/^\\//, \"\");\n return join(docsRoot, ...rest.split(\"/\"), \"page.mdx\");\n}\n\nexport async function getSearchIndex(): Promise<IndexEntry[]> {\n if (cached) return cached;\n\n const entries: IndexEntry[] = [];\n\n for (const section of navigation) {\n for (const item of section.items) {\n try {\n const raw = await readFile(mdxFileForSlug(item.href), \"utf-8\");\n const md = mdxToCleanMarkdown(raw);\n const content = stripMarkdown(md);\n entries.push({\n title: item.name,\n href: item.href,\n section: section.title ?? \"\",\n content,\n });\n } catch {\n entries.push({\n title: item.name,\n href: item.href,\n section: section.title ?? \"\",\n content: \"\",\n });\n }\n }\n }\n\n cached = entries;\n return entries;\n}\n"
|
||
},
|
||
"docs/src/app/api/search/route.ts": {
|
||
"sha256": "2b4cb00bc4b279cf06584395c45c708d5ae7907f4342a075f010c6c2f3bc5feb",
|
||
"raw": "import { NextRequest, NextResponse } from \"next/server\";\nimport { getSearchIndex } from \"@/lib/search-index\";\n\nexport async function GET(req: NextRequest) {\n const q = req.nextUrl.searchParams.get(\"q\")?.trim().toLowerCase();\n\n if (!q) {\n return NextResponse.json({ results: [] });\n }\n\n const index = await getSearchIndex();\n const terms = q.split(/\\s+/).filter(Boolean);\n\n const results = index\n .map((entry) => {\n const titleLower = entry.title.toLowerCase();\n const contentLower = entry.content.toLowerCase();\n\n const titleMatch = terms.every((t) => titleLower.includes(t));\n const contentMatch = terms.every((t) => contentLower.includes(t));\n\n if (!titleMatch && !contentMatch) return null;\n\n let snippet = \"\";\n if (contentMatch) {\n const firstTermIdx = Math.min(\n ...terms.map((t) => {\n const idx = contentLower.indexOf(t);\n return idx === -1 ? Infinity : idx;\n }),\n );\n if (firstTermIdx !== Infinity) {\n const start = Math.max(0, firstTermIdx - 40);\n const end = Math.min(entry.content.length, firstTermIdx + 120);\n snippet =\n (start > 0 ? \"...\" : \"\") +\n entry.content.slice(start, end).replace(/\\n/g, \" \") +\n (end < entry.content.length ? \"...\" : \"\");\n }\n }\n\n return {\n title: entry.title,\n href: entry.href,\n section: entry.section,\n snippet,\n score: titleMatch ? 2 : 1,\n };\n })\n .filter(\n (\n r,\n ): r is {\n title: string;\n href: string;\n section: string;\n snippet: string;\n score: number;\n } => r !== null,\n )\n .sort((a, b) => b.score - a.score)\n .slice(0, 20)\n .map(({ score: _, ...rest }) => rest);\n\n return NextResponse.json(\n { results },\n { headers: { \"Cache-Control\": \"public, max-age=60\" } },\n );\n}\n"
|
||
},
|
||
"docs/src/app/api/docs-markdown/route.ts": {
|
||
"sha256": "667e77c734fac600de7abfe15946f1f34623668f1d7fba177bf186582c8d898b",
|
||
"raw": "import { readFile } from \"fs/promises\";\nimport { join } from \"path\";\nimport { NextRequest, NextResponse } from \"next/server\";\nimport { mdxToCleanMarkdown } from \"@/lib/mdx-to-markdown\";\n\nexport async function GET(req: NextRequest) {\n const { searchParams } = new URL(req.url);\n const docPath = searchParams.get(\"path\");\n\n if (!docPath) {\n return NextResponse.json(\n { error: \"Missing ?path= parameter\" },\n { status: 400 },\n );\n }\n\n const normalized = docPath\n .replace(/^\\//, \"\")\n .replace(/\\.\\./g, \"\")\n .replace(/[^a-zA-Z0-9/_-]/g, \"\");\n\n const slug = normalized;\n const filePath = slug\n ? join(process.cwd(), \"src\", \"app\", ...slug.split(\"/\"), \"page.mdx\")\n : join(process.cwd(), \"src\", \"app\", \"page.mdx\");\n\n try {\n const raw = await readFile(filePath, \"utf-8\");\n const markdown = mdxToCleanMarkdown(raw);\n\n return new NextResponse(markdown, {\n headers: {\n \"Content-Type\": \"text/markdown; charset=utf-8\",\n \"Cache-Control\": \"public, max-age=3600\",\n },\n });\n } catch {\n return NextResponse.json({ error: \"Page not found\" }, { status: 404 });\n }\n}\n"
|
||
}
|
||
},
|
||
"pages": [
|
||
{
|
||
"path": "/cdp-mode",
|
||
"source": "docs/src/app/cdp-mode/page.mdx",
|
||
"layout": "docs/src/app/cdp-mode/layout.tsx",
|
||
"sourceSha256": "a5e4190a8520dddd7807bcb485ee65b9c1f9b338b9157e65d95e8d97c58d1bf0",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# CDP Mode\n",
|
||
"markdownTitle": "CDP Mode",
|
||
"title": "CDP Mode | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "CDP Mode | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "CDP Mode - agent-browser",
|
||
"twitterTitle": "CDP Mode | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "CDP Mode",
|
||
"id": "cdp-mode"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Remote WebSocket URLs",
|
||
"id": "remote-websocket-urls"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Auto-Connect",
|
||
"id": "auto-connect"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Tab pinning",
|
||
"id": "tab-pinning"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Color scheme",
|
||
"id": "color-scheme"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Use cases",
|
||
"id": "use-cases"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Global options",
|
||
"id": "global-options"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Cloud providers",
|
||
"id": "cloud-providers"
|
||
}
|
||
],
|
||
"content": [
|
||
"Connect to an existing browser via Chrome DevTools Protocol:",
|
||
"# Start Chrome with: google-chrome --remote-debugging-port=9222 # Connect once, then run commands without --cdp agent-browser connect 9222 agent-browser snapshot agent-browser tab agent-browser close # Or pass --cdp on each command agent-browser --cdp 9222 snapshot",
|
||
"Connect to remote browser services via WebSocket URL:",
|
||
"# Connect to remote browser service agent-browser --cdp \"wss://browser-service.com/cdp?token=...\" snapshot # Works with any CDP-compatible service agent-browser --cdp \"ws://localhost:9222/devtools/browser/abc123\" open example.com",
|
||
"The --cdp flag accepts either:",
|
||
"A port number (e.g., 9222) for local connections via http://localhost:{port}",
|
||
"A full WebSocket URL (e.g., wss://... or ws://...) for remote browser services",
|
||
"Root WebSocket endpoints accept query strings with or without an explicit slash, so both wss://browser-service.com?token=... and wss://browser-service.com/?token=... work.",
|
||
"Use --auto-connect to automatically discover and connect to a running Chrome instance without specifying a port:",
|
||
"# Auto-discover running Chrome with remote debugging agent-browser --auto-connect open example.com agent-browser --auto-connect snapshot # Or via environment variable AGENT_BROWSER_AUTO_CONNECT=1 agent-browser snapshot",
|
||
"Auto-connect discovers Chrome by:",
|
||
"Reading Chrome's DevToolsActivePort file from the default user data directory and connecting to its WebSocket endpoint, then HTTP discovery (/json/version, /json/list) for older Chrome versions",
|
||
"Falling back to probing common debugging ports (9222, 9229)",
|
||
"Chrome 144+ shows a remote-debugging permission prompt on the first connection. Auto-connect waits up to 20 seconds for approval. If the prompt is still open after that, the command fails with a message asking you to approve it and retry, without opening a second prompt.",
|
||
"This is useful when:",
|
||
"Chrome 144+ has remote debugging enabled via chrome://inspect/#remote-debugging (which uses a dynamic port)",
|
||
"You want a zero-configuration connection to your existing browser",
|
||
"You don't want to track which port Chrome is using",
|
||
"When several sessions share one browser over CDP, each session remembers which tab it is bound to (by CDP target id, persisted across daemon restarts). A restarted daemon reattaches to the session's own tab instead of adopting whatever tab is currently active, which in a shared browser is usually another session's.",
|
||
"Pass --pin-tab (or set AGENT_BROWSER_PIN_TAB=1) to make the binding strict:",
|
||
"# Two agents sharing one Chrome, each pinned to its own tab agent-browser --session agent1 --cdp 9222 --pin-tab open https://site-a.com agent-browser --session agent2 --cdp 9222 --pin-tab open https://site-b.com",
|
||
"With --pin-tab:",
|
||
"Attaching with no binding opens a fresh tab instead of adopting an existing one",
|
||
"If the bound tab is closed, commands fail with a tab_gone error instead of silently acting on another tab. JSON responses carry \"code\": \"tab_gone\", data.targetId, and optional data.lastUrl",
|
||
"tab list, tab new, and tab <ref> still work in that state, so an agent can recover by binding a new tab",
|
||
"Tabs opened by other sessions or the user never steal the pinned session's active tab",
|
||
"The flag is sticky per session: pass it once and later commands and daemon restarts keep the strict semantics. Pass --no-pin-tab to explicitly turn the pin off again. See Sessions for the multi-session workflow and Commands for tab refs by CDP target id.",
|
||
"The structured lastUrl is emitted only for sanitized HTTP(S) URLs and about:blank. Credentials, query strings, and fragments are removed from HTTP(S) URLs, while opaque URLs such as data: are omitted. Batch JSON exposes the recovery object under result.",
|
||
"When re-running a shared-tab script such as the repro from #1530, add --pin-tab to the first command for every session. Without it, open intentionally preserves the legacy behavior and navigates the shared active tab, so the original script still collides. The same rule applies when sessions attach with --auto-connect instead of --cdp.",
|
||
"Use --color-scheme to set a persistent preference when connecting via CDP:",
|
||
"agent-browser --cdp 9222 --color-scheme dark open https://example.com agent-browser --cdp 9222 snapshot # stays in dark mode",
|
||
"Or set it globally via config or environment variable:",
|
||
"AGENT_BROWSER_COLOR_SCHEME=dark agent-browser --cdp 9222 open https://example.com",
|
||
"This enables control of:",
|
||
"Electron apps",
|
||
"Chrome/Chromium with remote debugging",
|
||
"WebView2 applications",
|
||
"Remote browser services (via WebSocket URL)",
|
||
"Any browser exposing a CDP endpoint",
|
||
"Option",
|
||
"Description",
|
||
"--session <name>",
|
||
"Use isolated session",
|
||
"--profile <path>",
|
||
"Persistent browser profile directory",
|
||
"-p <provider>",
|
||
"Browser provider (browserbase, browseruse, kernel, browserless, agentcore, or a configured browser.provider plugin)",
|
||
"--headers <json>",
|
||
"HTTP headers scoped to origin",
|
||
"--executable-path",
|
||
"Custom browser executable",
|
||
"--args <args>",
|
||
"--user-agent <ua>",
|
||
"Custom User-Agent string",
|
||
"--proxy <url>",
|
||
"Proxy server URL",
|
||
"--proxy-bypass <hosts>",
|
||
"Hosts to bypass proxy",
|
||
"--json",
|
||
"JSON output for scripts",
|
||
"--name, -n",
|
||
"Locator name filter",
|
||
"--exact",
|
||
"Exact, case-sensitive match (accessible name for role)",
|
||
"--headed",
|
||
"Show browser window",
|
||
"--cdp <port|url>",
|
||
"CDP connection (port or WebSocket URL)",
|
||
"--auto-connect",
|
||
"Auto-discover and connect to running Chrome",
|
||
"--pin-tab",
|
||
"Pin the session to its bound tab (strict tab binding)",
|
||
"--no-pin-tab",
|
||
"Disable a sticky pin previously enabled with --pin-tab",
|
||
"--color-scheme <scheme>",
|
||
"Persistent color scheme (dark, light, no-preference)",
|
||
"--debug",
|
||
"Debug output",
|
||
"Use the -p flag to connect to a cloud browser provider or configured browser.provider plugin instead of launching a local browser:",
|
||
"agent-browser -p browserbase open https://example.com",
|
||
"See the Providers section for setup and configuration of each built-in provider: Browser Use, Browserbase, Browserless, Kernel, and AgentCore."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/sessions",
|
||
"text": "Sessions"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/commands",
|
||
"text": "Commands"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/providers/browser-use",
|
||
"text": "Providers"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/providers/browser-use",
|
||
"text": "Browser Use"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/providers/browserbase",
|
||
"text": "Browserbase"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/providers/browserless",
|
||
"text": "Browserless"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/providers/kernel",
|
||
"text": "Kernel"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/providers/agentcore",
|
||
"text": "AgentCore"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# CDP Mode\n\nConnect to an existing browser via Chrome DevTools Protocol:\n\n```bash\n# Start Chrome with: google-chrome --remote-debugging-port=9222\n\n# Connect once, then run commands without --cdp\nagent-browser connect 9222\nagent-browser snapshot\nagent-browser tab\nagent-browser close\n\n# Or pass --cdp on each command\nagent-browser --cdp 9222 snapshot\n```\n\n## Remote WebSocket URLs\n\nConnect to remote browser services via WebSocket URL:\n\n```bash\n# Connect to remote browser service\nagent-browser --cdp \"wss://browser-service.com/cdp?token=...\" snapshot\n\n# Works with any CDP-compatible service\nagent-browser --cdp \"ws://localhost:9222/devtools/browser/abc123\" open example.com\n```\n\nThe `--cdp` flag accepts either:\n\n- A port number (e.g., `9222`) for local connections via `http://localhost:{port}`\n- A full WebSocket URL (e.g., `wss://...` or `ws://...`) for remote browser services\n\nRoot WebSocket endpoints accept query strings with or without an explicit slash, so both `wss://browser-service.com?token=...` and `wss://browser-service.com/?token=...` work.\n\n## Auto-Connect\n\nUse `--auto-connect` to automatically discover and connect to a running Chrome instance without specifying a port:\n\n```bash\n# Auto-discover running Chrome with remote debugging\nagent-browser --auto-connect open example.com\nagent-browser --auto-connect snapshot\n\n# Or via environment variable\nAGENT_BROWSER_AUTO_CONNECT=1 agent-browser snapshot\n```\n\nAuto-connect discovers Chrome by:\n\n1. Reading Chrome's `DevToolsActivePort` file from the default user data directory and connecting to its WebSocket endpoint, then HTTP discovery (`/json/version`, `/json/list`) for older Chrome versions\n2. Falling back to probing common debugging ports (9222, 9229)\n\nChrome 144+ shows a remote-debugging permission prompt on the first connection. Auto-connect waits up to 20 seconds for approval. If the prompt is still open after that, the command fails with a message asking you to approve it and retry, without opening a second prompt.\n\nThis is useful when:\n\n- Chrome 144+ has remote debugging enabled via `chrome://inspect/#remote-debugging` (which uses a dynamic port)\n- You want a zero-configuration connection to your existing browser\n- You don't want to track which port Chrome is using\n\n## Tab pinning\n\nWhen several sessions share one browser over CDP, each session remembers which tab it is bound to (by CDP target id, persisted across daemon restarts). A restarted daemon reattaches to the session's own tab instead of adopting whatever tab is currently active, which in a shared browser is usually another session's.\n\nPass `--pin-tab` (or set `AGENT_BROWSER_PIN_TAB=1`) to make the binding strict:\n\n```bash\n# Two agents sharing one Chrome, each pinned to its own tab\nagent-browser --session agent1 --cdp 9222 --pin-tab open https://site-a.com\nagent-browser --session agent2 --cdp 9222 --pin-tab open https://site-b.com\n```\n\nWith `--pin-tab`:\n\n- Attaching with no binding opens a fresh tab instead of adopting an existing one\n- If the bound tab is closed, commands fail with a `tab_gone` error instead of silently acting on another tab. JSON responses carry <code>\"code\": \"tab_gone\"</code>, <code>data.targetId</code>, and optional <code>data.lastUrl</code>\n- `tab list`, `tab new`, and `tab <ref>` still work in that state, so an agent can recover by binding a new tab\n- Tabs opened by other sessions or the user never steal the pinned session's active tab\n\nThe flag is sticky per session: pass it once and later commands and daemon restarts keep the strict semantics. Pass `--no-pin-tab` to explicitly turn the pin off again. See [Sessions](/sessions) for the multi-session workflow and [Commands](/commands) for tab refs by CDP target id.\n\nThe structured <code>lastUrl</code> is emitted only for sanitized HTTP(S) URLs and <code>about:blank</code>. Credentials, query strings, and fragments are removed from HTTP(S) URLs, while opaque URLs such as <code>data:</code> are omitted. Batch JSON exposes the recovery object under <code>result</code>.\n\nWhen re-running a shared-tab script such as the repro from #1530, add `--pin-tab` to the first command for every session. Without it, `open` intentionally preserves the legacy behavior and navigates the shared active tab, so the original script still collides. The same rule applies when sessions attach with `--auto-connect` instead of `--cdp`.\n\n## Color scheme\n\nUse `--color-scheme` to set a persistent preference when connecting via CDP:\n\n```bash\nagent-browser --cdp 9222 --color-scheme dark open https://example.com\nagent-browser --cdp 9222 snapshot # stays in dark mode\n```\n\nOr set it globally via config or environment variable:\n\n```bash\nAGENT_BROWSER_COLOR_SCHEME=dark agent-browser --cdp 9222 open https://example.com\n```\n\n## Use cases\n\nThis enables control of:\n\n- Electron apps\n- Chrome/Chromium with remote debugging\n- WebView2 applications\n- Remote browser services (via WebSocket URL)\n- Any browser exposing a CDP endpoint\n\n## Global options\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--session <name></code></td><td>Use isolated session</td></tr>\n <tr><td><code>--profile <path></code></td><td>Persistent browser profile directory</td></tr>\n <tr><td><code>-p <provider></code></td><td>Browser provider (<code>browserbase</code>, <code>browseruse</code>, <code>kernel</code>, <code>browserless</code>, <code>agentcore</code>, or a configured <code>browser.provider</code> plugin)</td></tr>\n <tr><td><code>--headers <json></code></td><td>HTTP headers scoped to origin</td></tr>\n <tr><td><code>--executable-path</code></td><td>Custom browser executable</td></tr>\n <tr><td><code>--args <args></code></td><td>Browser launch args. Commas inside a value are kept.</td></tr>\n <tr><td><code>--user-agent <ua></code></td><td>Custom User-Agent string</td></tr>\n <tr><td><code>--proxy <url></code></td><td>Proxy server URL</td></tr>\n <tr><td><code>--proxy-bypass <hosts></code></td><td>Hosts to bypass proxy</td></tr>\n <tr><td><code>--json</code></td><td>JSON output for scripts</td></tr>\n <tr><td><code>--name, -n</code></td><td>Locator name filter</td></tr>\n <tr><td><code>--exact</code></td><td>Exact, case-sensitive match (accessible name for role)</td></tr>\n <tr><td><code>--headed</code></td><td>Show browser window</td></tr>\n <tr><td><code>{\"--cdp <port|url>\"}</code></td><td>CDP connection (port or WebSocket URL)</td></tr>\n <tr><td><code>--auto-connect</code></td><td>Auto-discover and connect to running Chrome</td></tr>\n <tr><td><code>--pin-tab</code></td><td>Pin the session to its bound tab (strict tab binding)</td></tr>\n <tr><td><code>--no-pin-tab</code></td><td>Disable a sticky pin previously enabled with <code>--pin-tab</code></td></tr>\n <tr><td><code>--color-scheme <scheme></code></td><td>Persistent color scheme (<code>dark</code>, <code>light</code>, <code>no-preference</code>)</td></tr>\n <tr><td><code>--debug</code></td><td>Debug output</td></tr>\n </tbody>\n</table>\n\n## Cloud providers\n\nUse the `-p` flag to connect to a cloud browser provider or configured `browser.provider` plugin instead of launching a local browser:\n\n```bash\nagent-browser -p browserbase open https://example.com\n```\n\nSee the [Providers](/providers/browser-use) section for setup and configuration of each built-in provider: [Browser Use](/providers/browser-use), [Browserbase](/providers/browserbase), [Browserless](/providers/browserless), [Kernel](/providers/kernel), and [AgentCore](/providers/agentcore).",
|
||
"legacyMarkdownSha256": "24282dd9432e9a0f531903d2f8456831f2c1e36ba94bbe55900b872e6677f966",
|
||
"modernMarkdown": "# CDP Mode\n\nConnect to an existing browser via Chrome DevTools Protocol:\n\n```bash\n# Start Chrome with: google-chrome --remote-debugging-port=9222\n\n# Connect once, then run commands without --cdp\nagent-browser connect 9222\nagent-browser snapshot\nagent-browser tab\nagent-browser close\n\n# Or pass --cdp on each command\nagent-browser --cdp 9222 snapshot\n```\n\n## Remote WebSocket URLs\n\nConnect to remote browser services via WebSocket URL:\n\n```bash\n# Connect to remote browser service\nagent-browser --cdp \"wss://browser-service.com/cdp?token=...\" snapshot\n\n# Works with any CDP-compatible service\nagent-browser --cdp \"ws://localhost:9222/devtools/browser/abc123\" open example.com\n```\n\nThe `--cdp` flag accepts either:\n\n- A port number (e.g., `9222`) for local connections via `http://localhost:{port}`\n- A full WebSocket URL (e.g., `wss://...` or `ws://...`) for remote browser services\n\nRoot WebSocket endpoints accept query strings with or without an explicit slash, so both `wss://browser-service.com?token=...` and `wss://browser-service.com/?token=...` work.\n\n## Auto-Connect\n\nUse `--auto-connect` to automatically discover and connect to a running Chrome instance without specifying a port:\n\n```bash\n# Auto-discover running Chrome with remote debugging\nagent-browser --auto-connect open example.com\nagent-browser --auto-connect snapshot\n\n# Or via environment variable\nAGENT_BROWSER_AUTO_CONNECT=1 agent-browser snapshot\n```\n\nAuto-connect discovers Chrome by:\n\n1. Reading Chrome's `DevToolsActivePort` file from the default user data directory and connecting to its WebSocket endpoint, then HTTP discovery (`/json/version`, `/json/list`) for older Chrome versions\n2. Falling back to probing common debugging ports (9222, 9229)\n\nChrome 144+ shows a remote-debugging permission prompt on the first connection. Auto-connect waits up to 20 seconds for approval. If the prompt is still open after that, the command fails with a message asking you to approve it and retry, without opening a second prompt.\n\nThis is useful when:\n\n- Chrome 144+ has remote debugging enabled via `chrome://inspect/#remote-debugging` (which uses a dynamic port)\n- You want a zero-configuration connection to your existing browser\n- You don't want to track which port Chrome is using\n\n## Tab pinning\n\nWhen several sessions share one browser over CDP, each session remembers which tab it is bound to (by CDP target id, persisted across daemon restarts). A restarted daemon reattaches to the session's own tab instead of adopting whatever tab is currently active, which in a shared browser is usually another session's.\n\nPass `--pin-tab` (or set `AGENT_BROWSER_PIN_TAB=1`) to make the binding strict:\n\n```bash\n# Two agents sharing one Chrome, each pinned to its own tab\nagent-browser --session agent1 --cdp 9222 --pin-tab open https://site-a.com\nagent-browser --session agent2 --cdp 9222 --pin-tab open https://site-b.com\n```\n\nWith `--pin-tab`:\n\n- Attaching with no binding opens a fresh tab instead of adopting an existing one\n- If the bound tab is closed, commands fail with a `tab_gone` error instead of silently acting on another tab. JSON responses carry <code>\"code\": \"tab_gone\"</code>, <code>data.targetId</code>, and optional <code>data.lastUrl</code>\n- `tab list`, `tab new`, and `tab <ref>` still work in that state, so an agent can recover by binding a new tab\n- Tabs opened by other sessions or the user never steal the pinned session's active tab\n\nThe flag is sticky per session: pass it once and later commands and daemon restarts keep the strict semantics. Pass `--no-pin-tab` to explicitly turn the pin off again. See [Sessions](/sessions) for the multi-session workflow and [Commands](/commands) for tab refs by CDP target id.\n\nThe structured <code>lastUrl</code> is emitted only for sanitized HTTP(S) URLs and <code>about:blank</code>. Credentials, query strings, and fragments are removed from HTTP(S) URLs, while opaque URLs such as <code>data:</code> are omitted. Batch JSON exposes the recovery object under <code>result</code>.\n\nWhen re-running a shared-tab script such as the repro from #1530, add `--pin-tab` to the first command for every session. Without it, `open` intentionally preserves the legacy behavior and navigates the shared active tab, so the original script still collides. The same rule applies when sessions attach with `--auto-connect` instead of `--cdp`.\n\n## Color scheme\n\nUse `--color-scheme` to set a persistent preference when connecting via CDP:\n\n```bash\nagent-browser --cdp 9222 --color-scheme dark open https://example.com\nagent-browser --cdp 9222 snapshot # stays in dark mode\n```\n\nOr set it globally via config or environment variable:\n\n```bash\nAGENT_BROWSER_COLOR_SCHEME=dark agent-browser --cdp 9222 open https://example.com\n```\n\n## Use cases\n\nThis enables control of:\n\n- Electron apps\n- Chrome/Chromium with remote debugging\n- WebView2 applications\n- Remote browser services (via WebSocket URL)\n- Any browser exposing a CDP endpoint\n\n## Global options\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--session <name></code></td><td>Use isolated session</td></tr>\n <tr><td><code>--profile <path></code></td><td>Persistent browser profile directory</td></tr>\n <tr><td><code>-p <provider></code></td><td>Browser provider (<code>browserbase</code>, <code>browseruse</code>, <code>kernel</code>, <code>browserless</code>, <code>agentcore</code>, or a configured <code>browser.provider</code> plugin)</td></tr>\n <tr><td><code>--headers <json></code></td><td>HTTP headers scoped to origin</td></tr>\n <tr><td><code>--executable-path</code></td><td>Custom browser executable</td></tr>\n <tr><td><code>--args <args></code></td><td>Browser launch args. Commas inside a value are kept.</td></tr>\n <tr><td><code>--user-agent <ua></code></td><td>Custom User-Agent string</td></tr>\n <tr><td><code>--proxy <url></code></td><td>Proxy server URL</td></tr>\n <tr><td><code>--proxy-bypass <hosts></code></td><td>Hosts to bypass proxy</td></tr>\n <tr><td><code>--json</code></td><td>JSON output for scripts</td></tr>\n <tr><td><code>--name, -n</code></td><td>Locator name filter</td></tr>\n <tr><td><code>--exact</code></td><td>Exact, case-sensitive match (accessible name for role)</td></tr>\n <tr><td><code>--headed</code></td><td>Show browser window</td></tr>\n <tr><td><code>{\"--cdp <port|url>\"}</code></td><td>CDP connection (port or WebSocket URL)</td></tr>\n <tr><td><code>--auto-connect</code></td><td>Auto-discover and connect to running Chrome</td></tr>\n <tr><td><code>--pin-tab</code></td><td>Pin the session to its bound tab (strict tab binding)</td></tr>\n <tr><td><code>--no-pin-tab</code></td><td>Disable a sticky pin previously enabled with <code>--pin-tab</code></td></tr>\n <tr><td><code>--color-scheme <scheme></code></td><td>Persistent color scheme (<code>dark</code>, <code>light</code>, <code>no-preference</code>)</td></tr>\n <tr><td><code>--debug</code></td><td>Debug output</td></tr>\n </tbody>\n</table>\n\n## Cloud providers\n\nUse the `-p` flag to connect to a cloud browser provider or configured `browser.provider` plugin instead of launching a local browser:\n\n```bash\nagent-browser -p browserbase open https://example.com\n```\n\nSee the [Providers](/providers/browser-use) section for setup and configuration of each built-in provider: [Browser Use](/providers/browser-use), [Browserbase](/providers/browserbase), [Browserless](/providers/browserless), [Kernel](/providers/kernel), and [AgentCore](/providers/agentcore).",
|
||
"modernMarkdownSha256": "24282dd9432e9a0f531903d2f8456831f2c1e36ba94bbe55900b872e6677f966",
|
||
"navigation": {
|
||
"title": "CDP Mode",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/changelog",
|
||
"source": "docs/src/app/changelog/page.mdx",
|
||
"layout": "docs/src/app/changelog/layout.tsx",
|
||
"sourceSha256": "08e1d72305ad419da0c0218f3b9b629e8bf3bbcfb3c4ce45753e12bb1d1f4eb2",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Changelog\n",
|
||
"markdownTitle": "Changelog",
|
||
"title": "Changelog | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Changelog | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Changelog - agent-browser",
|
||
"twitterTitle": "Changelog | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Changelog",
|
||
"id": "changelog"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.38.2",
|
||
"id": "v0382"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.38.1",
|
||
"id": "v0381"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.38.0",
|
||
"id": "v0380"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.37.1",
|
||
"id": "v0371"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.37.0",
|
||
"id": "v0370"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.36.0",
|
||
"id": "v0360"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.35.2",
|
||
"id": "v0352"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Security",
|
||
"id": "security"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.35.1",
|
||
"id": "v0351"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.35.0",
|
||
"id": "v0350"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.34.0",
|
||
"id": "v0340"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.33.2",
|
||
"id": "v0332"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Behavior Changes",
|
||
"id": "behavior-changes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.33.1",
|
||
"id": "v0331"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Behavior Changes",
|
||
"id": "behavior-changes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.33.0",
|
||
"id": "v0330"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.32.4",
|
||
"id": "v0324"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.32.3",
|
||
"id": "v0323"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.32.2",
|
||
"id": "v0322"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.32.1",
|
||
"id": "v0321"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.32.0",
|
||
"id": "v0320"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Security",
|
||
"id": "security"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.31.2",
|
||
"id": "v0312"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.31.1",
|
||
"id": "v0311"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.31.0",
|
||
"id": "v0310"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.30.1",
|
||
"id": "v0301"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.30.0",
|
||
"id": "v0300"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.29.1",
|
||
"id": "v0291"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.29.0",
|
||
"id": "v0290"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.28.0",
|
||
"id": "v0280"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Infrastructure",
|
||
"id": "infrastructure"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.27.3",
|
||
"id": "v0273"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.27.2",
|
||
"id": "v0272"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Infrastructure",
|
||
"id": "infrastructure"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.27.1",
|
||
"id": "v0271"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.27.0",
|
||
"id": "v0270"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Infrastructure",
|
||
"id": "infrastructure"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.26.0",
|
||
"id": "v0260"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.25.5",
|
||
"id": "v0255"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.25.4",
|
||
"id": "v0254"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.25.3",
|
||
"id": "v0253"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.25.2",
|
||
"id": "v0252"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.25.1",
|
||
"id": "v0251"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.25.0",
|
||
"id": "v0250"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.24.1",
|
||
"id": "v0241"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.24.0",
|
||
"id": "v0240"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.23.4",
|
||
"id": "v0234"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.23.3",
|
||
"id": "v0233"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.23.2",
|
||
"id": "v0232"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.23.1",
|
||
"id": "v0231"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.23.0",
|
||
"id": "v0230"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.22.3",
|
||
"id": "v0223"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.22.2",
|
||
"id": "v0222"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.22.1",
|
||
"id": "v0221"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.22.0",
|
||
"id": "v0220"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Breaking Changes",
|
||
"id": "breaking-changes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.21.4",
|
||
"id": "v0214"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.21.3",
|
||
"id": "v0213"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Performance",
|
||
"id": "performance"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.21.2",
|
||
"id": "v0212"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.21.1",
|
||
"id": "v0211"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.21.0",
|
||
"id": "v0210"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Commands",
|
||
"id": "new-commands"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.20.0",
|
||
"id": "v0200"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Full Native Rust",
|
||
"id": "full-native-rust"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.19.0",
|
||
"id": "v0190"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.18.0",
|
||
"id": "v0180"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.17.1",
|
||
"id": "v0171"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.17.0",
|
||
"id": "v0170"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Performance",
|
||
"id": "performance"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.16.0",
|
||
"id": "v0160"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Architecture",
|
||
"id": "architecture"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "What's Supported",
|
||
"id": "whats-supported"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Known Limitations",
|
||
"id": "known-limitations"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.15.0",
|
||
"id": "v0150"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Environment Variables",
|
||
"id": "environment-variables"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.14.0",
|
||
"id": "v0140"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.13.0",
|
||
"id": "v0130"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.12.0",
|
||
"id": "v0120"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.11.1",
|
||
"id": "v0111"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.11.0",
|
||
"id": "v0110"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.10.0",
|
||
"id": "v0100"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.9.4",
|
||
"id": "v094"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.9.3",
|
||
"id": "v093"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.9.2",
|
||
"id": "v092"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.9.1",
|
||
"id": "v091"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.9.0",
|
||
"id": "v090"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.10",
|
||
"id": "v0810"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.9",
|
||
"id": "v089"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.8",
|
||
"id": "v088"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.7",
|
||
"id": "v087"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.6",
|
||
"id": "v086"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.5",
|
||
"id": "v085"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.4",
|
||
"id": "v084"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.3",
|
||
"id": "v083"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.2",
|
||
"id": "v082"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.1",
|
||
"id": "v081"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Improvements",
|
||
"id": "improvements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.8.0",
|
||
"id": "v080"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Security",
|
||
"id": "security"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.7.1",
|
||
"id": "v071"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.7.0",
|
||
"id": "v070"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "v0.6.0",
|
||
"id": "v060"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "New Features",
|
||
"id": "new-features"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Bug Fixes",
|
||
"id": "bug-fixes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Protocol Alignment",
|
||
"id": "protocol-alignment"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Documentation",
|
||
"id": "documentation"
|
||
}
|
||
],
|
||
"content": [
|
||
"October 1, 2026",
|
||
"Fixed auth vault login to pick usable controls when hidden duplicates exist, and to bind credential entry to the selected field so replaced fields or redirected focus are rejected before submitting (#2014)",
|
||
"Fixed chat mode to allow webmcp, skills, and other top-level browser commands, so the model uses page WebMCP tools instead of falling back to eval (#2015)",
|
||
"Fixed Kernel profiles so KERNEL_PROFILE_NAME sessions send the profile as an object instead of failing with a 400, and added KERNEL_PROFILE_SAVE_CHANGES to opt into saving changes back (#2004)",
|
||
"Fixed Chrome freezing after launch by draining its stderr for the browser's lifetime, so a full log pipe no longer blocks the browser (#2003)",
|
||
"Fixed Browser Use by switching to Cloud V4, which creates, attaches to, and stops the same browser with bounded timeouts (#1879)",
|
||
"Fixed Vercel Sandbox shared memory detection by measuring /dev/shm capacity and adding --disable-dev-shm-usage below 256 MiB, so Chrome no longer terminates renderers on the undersized mount (#1890)",
|
||
"Upgraded the eve integration from eve 0.47.3 to 0.57.0, so apps on eve 0.50 and later build again (#1945)",
|
||
"Updated the contact sheet example with the loading-flash demo output (#1871)",
|
||
"September 16, 2026",
|
||
"Fixed recording cursor and mouse movement timing so cursor rendering stays synchronized with page content during drags and timed mouse moves (#1869)",
|
||
"Added Vercel Labs product and project status badges to the README (#1868)",
|
||
"Added conditional screenshots with screenshot --if-changed to skip unchanged captures and --threshold <0-1> to tolerate small pixel differences. Screenshot history is scoped to each tab and capture mode, and unchanged captures omit the image path to save tokens (#1813)",
|
||
"Added automatic snapshot deltas with snapshot --delta, which returns a full baseline followed by an unchanged revision or compact structural changes. Use --full to refresh the baseline (#1811)",
|
||
"Added persistent snapshot refs for surviving DOM elements across same-document changes. Replaced elements and navigated pages or iframes invalidate their refs without recycling identifiers (#1812)",
|
||
"Added human-like pointer movement with session --input-mode, per-action --human for clicks and drags, and reproducible curved mouse move paths (#1810)",
|
||
"Added recording presentation tools: --cursor renders an animated pointer and click ripple, while --contact-sheet saves a timestamped PNG summary of visual changes (#1807, #1808)",
|
||
"Added stateful auth vault login with auth login --no-navigate, which fills an already prepared login page after verifying its origin against the credential URL (#1771)",
|
||
"Added WebMCP catalog updates to normal browser responses. Concise, content-bounded summaries appear on initial discovery and catalog changes, while full schemas remain opt-in (#1842)",
|
||
"Improved recording frame timing by holding the latest Chrome frame between repaints so the output duration follows the requested frame rate (#1806)",
|
||
"Fixed CDP transport recovery and shutdown so malformed transport messages do not strand unrelated commands and failed initialization disconnects cleanly (#1739)",
|
||
"Fixed dropdown label matching to normalize whitespace, including non-breaking spaces, when selecting options by visible label (#1736)",
|
||
"Clarified reliable browser wait strategies by recommending page-specific selectors, text, URLs, or JavaScript conditions and reserving networkidle for pages known to become quiet (#1834)",
|
||
"September 8, 2026",
|
||
"Fixed Windows headless Chrome desktop artifacts by isolating owned headless Chrome on a private desktop and ensuring its process tree is cleaned up when the daemon exits or is forcibly terminated. Headed and externally connected browsers retain their existing desktop behavior (#1498, #1820)",
|
||
"September 7, 2026",
|
||
"Added higher-quality video recording: record start and record restart now capture the current active page at 30 fps by default, support --fps 1-60, use Page.startScreencast for smoother motion, and preserve wall-clock timing. WebM and MP4 output are documented, and doctor reports the ffmpeg recording dependencies (#1763, #1776, #1778)",
|
||
"Added WebMCP availability output so navigation responses advertise when a page exposes allowed WebMCP tools, including availability metadata for CLI, JSON, and MCP clients (#1760)",
|
||
"Added session setup inheritance for new tabs. Tabs opened with tab new or through page clicks now inherit the active session's headers, credentials, user agent, locale, timezone, geolocation, offline mode, routes, color scheme, and init scripts before their first navigation (#1777)",
|
||
"Fixed recording startup validation so missing ffmpeg, extensionless output paths, and invalid recording options fail before browser or recording state changes. Failed replacements preserve the active take, and ffmpeg errors now include useful diagnostics (#1778)",
|
||
"Fixed recording navigation state so URL navigation during recording clears stale element refs, frame scope, and page WebMCP state like normal navigation (#1776)",
|
||
"September 1, 2026",
|
||
"Added experimental WebMCP support for discovering and invoking tools provided by the current page, including frame-aware tool selection, detached results, cancellation, bounded metadata and output handling, and an opt-in MCP tool profile. WebMCP is enabled by default for locally managed Chrome and can be disabled with --no-webmcp or AGENT_BROWSER_NO_WEBMCP.",
|
||
"Added a WebMCP generation skill that helps agents expose existing page workflows as validated page tools while recording safety constraints, deterministic checks, and fallback behavior.",
|
||
"Updated the eve integration to 0.47.3 and raised its compatibility floor to 0.39.1.",
|
||
"Updated brace-expansion dependency resolutions across the project lockfiles.",
|
||
"Removed the obsolete Lightpanda session timeout argument so launches use the current supported server options.",
|
||
"August 31, 2026",
|
||
"Hardened dashboard origin validation and reverse-proxy access with same-origin provenance enforcement that defends against DNS rebinding, form/header smuggling, and cross-origin requests. Reverse-proxied origins now require exact HTTPS allowlisting and generated token authentication, while tokenless IPv4 and IPv6 loopback access remains supported. Dashboard options are validated strictly, and CLI and MCP lifecycle behavior is aligned (#1738)",
|
||
"Fixed root remote CDP WebSocket URLs with query strings to insert the required slash before the query while preserving the encoded query (#1735)",
|
||
"August 26, 2026",
|
||
"Fixed Windows ARM64 launcher selection to prefer a native ARM64 executable when present and fall back to the published x64 executable through Windows emulation when it is not (#1725)",
|
||
"Fixed stream URL tracking to emit active main-frame URL updates for full-document, History API, and fragment navigation, while rebinding correctly after active-tab changes and ignoring child-frame or background-tab navigation (#1682)",
|
||
"Fixed snapshot diff element references by resetting ref numbering for each diff, invalidating refs across URL navigations, and preserving the previous refs when a diff fails (#1719)",
|
||
"Updated Rust dependencies to rustls-webpki 0.103.13 and quinn-proto 0.11.17 (#1723, #1720)",
|
||
"August 24, 2026",
|
||
"Added private proxy CA trust for locally launched Chromium on Linux. Use --ca-cert <path>, AGENT_BROWSER_CA_CERT, or caCert in config and MCP to import a PEM bundle or DER certificate into an isolated NSS trust store without disabling hostname, validity, or unrelated-authority verification. The effective CA persists across commands in a running session, equivalent certificate content reuses Chromium, and --no-ca-cert explicitly clears retained trust. Unsupported launch modes and conflicting CA options return actionable errors (#1669)",
|
||
"Added a bundled protected Vercel deployments skill that guides agents through short-lived Trusted Sources OIDC authentication, authorized automation bypasses, and explicit human handoffs for dashboard-only configuration (#1705)",
|
||
"August 10, 2026",
|
||
"Added persistent session-to-tab binding for shared Chrome sessions. Named sessions connected through --cdp or --auto-connect now remember their CDP target across commands and daemon restarts, and CDP target ids can be used directly as tab references. Start each session with --pin-tab to make the binding strict, so a tab closed externally returns a stable tab_gone error instead of silently adopting a neighboring tab. JSON output includes data.targetId and an optional sanitized data.lastUrl; batch exposes the same recovery data under result (#1589)",
|
||
"Added a Remote Agent Browser provider guide covering Vercel authentication, disposable and stable sessions, custom VCR images, snapshots, and live-view URLs (#1648)",
|
||
"Fixed parallel sessions sharing one Chrome hijacking each other's tabs. Event-discovered targets no longer steal a pinned session's active tab, re-attach restores the persisted target instead of selecting index 0, and preliminary plus existing-daemon --cdp and --auto-connect paths preserve explicit pin enable and disable. Agent skill guidance now requires a named --session before the first command (#1589)",
|
||
"Fixed agent-browser doctor hanging on Chrome version detection. Windows reads the version from the executable resource table without spawning Chrome; other platforms bound the version subprocess with a deadline, kill, and reap so inherited output handles cannot block forever or leave an orphan browser (#1641)",
|
||
"July 31, 2026",
|
||
"Added input priority and per-client delivery settings to the stream server: each WebSocket connection now splits into a reader task and a writer loop, so clicks and keystrokes dispatch to the browser without queueing behind a frame write. Adds a per-client {\"type\":\"config\",\"maxFps\":N} cap (1 to 120, 0 uncapped) and opt-in ack pacing via {\"type\":\"config\",\"pacing\":\"ack\"} with {\"type\":\"ack\",\"seq\":N}, which keeps one frame in flight so a stalled client never drains a backlog. Both settings can also be declared on the connection URL (?pacing=ack&maxFps=10), the only way to cover the opening frame. Every frame now carries a monotonic seq (#1594)",
|
||
"Added configurable stream encoding: frames were hardcoded to jpeg quality 80 at the session viewport, so frame rate was the only bandwidth lever. AGENT_BROWSER_STREAM_QUALITY, AGENT_BROWSER_STREAM_MAX_WIDTH and AGENT_BROWSER_STREAM_MAX_HEIGHT are read once per daemon and cut bytes without dropping frames: on a busy page at 1280x720, quality 20 takes a frame from 54 KB to 25 KB, and quality 20 at 640x360 takes it to 9 KB, frame rate unchanged in both. Width and height default to the session viewport, so a larger viewport is never downscaled unless both are set (#1626)",
|
||
"Frame delivery is now latest-wins. The stream server holds only the newest frame and reads it at send time, so frames produced while an earlier one is still being written are skipped. A client that assumed it received every frame from the WebSocket now receives fewer. Nothing in this repo consumes the stream that way, since record captures through CDP and the dashboard is a viewer, so this affects external consumers only (#1594)",
|
||
"metadata.timestamp now carries a real value. It was always 0, because CDP sends the capture time as a float in seconds and the code read it as an integer. It is now epoch milliseconds, so a client can measure how stale the frame it is drawing is. A client that treated 0 as unknown is unaffected (#1594)",
|
||
"Fixed keyboard input over the stream, which worked in none of the three shapes the docs publish: an absent key, code, or text reached CDP as an explicit null, which rejects the whole command, so every key release and every non-printable key was silently dropped, the dashboard's own payloads included (#1594)",
|
||
"Fixed click latency behind mouse movement: input dispatch awaited Chrome's reply before reading the next message, so a click sat one round trip behind every queued mouse move. After a 300-event sweep a click landed 2471ms late; it now lands in 6ms (#1627)",
|
||
"Fixed stream disable returning while a slow client's input reader was still running (#1594)",
|
||
"July 28, 2026",
|
||
"The daemon now ships a default idle timeout of 1 hour: after an hour with no commands or dashboard input it saves configured restore state, closes the browser, and exits, so integrations that die without calling close no longer leak the daemon and its Chrome tree indefinitely. Sessions without --restore or another restore key discard transient browser state and open tabs when they shut down. Set AGENT_BROWSER_IDLE_TIMEOUT_MS=0 to restore the old always-persist behavior, or any other value to tune it. Dashboard mouse, keyboard, and touch input reset the timer. The default never closes headed browsers, including Safari and iOS WebDriver sessions, or user-attached browsers that may be in direct human use. Provider-owned cloud browsers remain eligible for cleanup, and an explicitly configured timeout applies to all browsers, as before (#1605)",
|
||
"Fixed tab recovery and selection to avoid daemon hangs on Memory Saver-discarded tabs by selecting a live renderer on CDP connect, reviving tabs on switch or after close, treating dialog-blocked tabs as live, preserving refs on rejected operations, and surfacing recovery state across CLI, JSON, and MCP output (#1543)",
|
||
"Fixed a11y selector errors to report invalid CSS selectors cleanly instead of exposing raw browser evaluation stack traces in text and JSON output (#1604)",
|
||
"July 23, 2026",
|
||
"Added axe-core accessibility audits with agent-browser a11y [url], WCAG tag filtering, selector scoping, iframe-aware text and JSON results, an embedded offline and CSP-safe audit engine, and a matching MCP tool (#1596)",
|
||
"July 22, 2026",
|
||
"Fixed find role to match implicit ARIA roles and browser-computed accessible names through the accessibility tree, so semantic elements like <h2> (heading) and <ul> (list) resolve, with case-insensitive substring name matching that mirrors Playwright's getByRole (#1552)",
|
||
"Fixed element-not-found errors to preserve the locator detail (selector, role, name, or index) instead of flattening every miss into one generic message, and aligned the advertised find actions with the set the dispatcher actually accepts (#1553)",
|
||
"July 19, 2026",
|
||
"Added HAR response body capture with text bodies embedded by default and configurable all, text, and none content modes across the CLI and MCP surfaces (#1578)",
|
||
"Added a derive-client skill for recording browser traffic and generating reusable API clients from HAR request and response data (#1578)",
|
||
"July 17, 2026",
|
||
"Updated eve extension packaging for eve 0.25.1, adopting the new source and dist extension manifest format, updating the eve example to stable AI SDK releases, and keeping extension tests aligned with eve's scoped config registry (#1570)",
|
||
"July 16, 2026",
|
||
"Widened eve compatibility for @agent-browser/eve to accept eve 0.23 and future major releases without peer-resolution warnings (#1563)",
|
||
"Standardized eve branding to use lowercase styling across the docs, examples, package readmes, and release notes (#1557)",
|
||
"July 15, 2026",
|
||
"eve extension - Added @agent-browser/eve, an eve extension that mounts the agent-browser tool set with namespaced browser tools, sandbox bootstrap helpers, docs, examples, CI, and release packaging (#1547)",
|
||
"Hardened domain allowlists by blocking WebRTC bypasses, applying network containment across launch modes, workers, popups, restored state, and reused daemon sessions, rejecting unsafe startup arguments, and adding Chrome regression coverage (#1546)",
|
||
"Fixed completed-page waits so load and DOMContentLoaded waits resolve immediately when the current document is already ready, with structured eve wait timeout handling and focused coverage (#1554)",
|
||
"July 13, 2026",
|
||
"WebGPU launch preset - Added --webgpu across the CLI, config, environment, and MCP surfaces, with hardware backends on macOS and Windows, software Vulkan on Linux, automatic Xvfb for displayless headed sessions, and a doctor --webgpu render and screenshot probe (#1529)",
|
||
"Added periodic restore-state autosaves while the browser remains open, preserving recent state after a browser window is closed by hand and capturing background page changes while honoring the restore save policy. The interval is configurable with AGENT_BROWSER_AUTOSAVE_INTERVAL_MS (#1509)",
|
||
"June 26, 2026",
|
||
"Fixed the React renderer so it picks the react-dom renderer instead of hardcoding renderer id 1, which prevented reading an empty tree on Next.js 16.3 Turbopack (#1491)",
|
||
"June 25, 2026",
|
||
"Restore workflow - Added --restore, --restore-save, restore validation flags, worktree-scoped session id, session info, and --namespace so agent runs can use stable, isolated, automatically restored browser state without managing state files by hand (#1486)",
|
||
"Hardened session lifecycle handling with explicit daemon and browser compatibility checks, lifecycle status output, MCP support for restore options, and safer auto-save behavior that avoids overwriting good state after a failed restore or failed validation (#1486)",
|
||
"Fixed restore lifecycle edge cases around switching restore keys with a live browser, daemon configuration startup races, launch mode validation, and clearing restore failures after an explicit state load (#1486)",
|
||
"June 24, 2026",
|
||
"Fixed URL waits so wait --url and waitforurl honor glob patterns such as **/dashboard against the full active URL (#1483)",
|
||
"Read command - Added agent-browser read [url] and the matching MCP tool for agent-readable text extraction. URL reads prefer Markdown, try .md and nearby llms.txt docs, support outlines, filters, raw and JSON output, headers, and domain/output safeguards; omitting the URL reads the rendered active tab DOM with current browser state (#1480)",
|
||
"June 20, 2026",
|
||
"Defaulted sandbox system dependency installs so the eve and Vercel sandbox helpers install Chromium's required libraries unless explicitly disabled, making first-run sandbox setup simpler (#1469)",
|
||
"Sandbox package - Added @agent-browser/sandbox with shared, eve, and Vercel Sandbox helpers, example projects, and docs for running agent-browser in hosted sandbox environments (#1465)",
|
||
"Updated sandbox release flow so the new package stays version-synced with the CLI release and publishes from the correct workspace path (#1465)",
|
||
"Reflowed documentation prose across the README, docs site, examples, and skills so Markdown and MDX wrap naturally in editors and renderers (#1466)",
|
||
"June 16, 2026",
|
||
"MCP server - Added agent-browser mcp, a stdio Model Context Protocol server with typed tools, paginated discovery, protocol negotiation, and startup tool profiles. The default core profile keeps context small, while --tools all exposes full CLI parity and composed profiles such as core,network,react are supported (#1454)",
|
||
"Plugin system - Added out-of-process plugin support over the agent-browser.plugin.v1 stdio protocol, with plugin add/list/show/run, manifest discovery, npm and GitHub refs, credential providers, browser provider plugins, launch mutators, custom command capabilities, config and env registry support, and capability-scoped policy gates (#1452)",
|
||
"Added context footprint eval coverage for CLI skills, MCP core, and MCP full-profile surfaces, plus MCP parity tests to keep tool behavior aligned with the CLI (#1454)",
|
||
"June 12, 2026",
|
||
"Fixed Windows ARM64 installs by falling back to the Windows x64 binary during postinstall, avoiding failed downloads for a native ARM64 artifact that is not published (#1269)",
|
||
"June 10, 2026",
|
||
"Fixed click reliability by scrolling off-viewport elements into view before resolving coordinates, handling JavaScript dialogs promptly, recovering mouse state after dialog-opening clicks, and detecting click interception by overlays before dispatching input (#1432, #1434)",
|
||
"Fixed frame-scoped selectors and waits so CSS-selector actions and wait respect the selected iframe, including cross-process iframes, with translated click coordinates (#1432)",
|
||
"Fixed wait timeout handling so the documented 25s default is used, --timeout is honored across wait variants, and long waits receive an appropriate client read budget (#1432)",
|
||
"Fixed agent-facing form commands so find label matches aria-label and aria-labelledby, select errors when no option matches, and type parses --clear and --delay instead of typing them as text (#1432)",
|
||
"Cut warm CLI command latency from about 150ms to about 1ms by removing the unconditional daemon settle sleep and retrying once when a stale daemon socket is discovered (#1432)",
|
||
"Extended daemon respawn and retry handling to batch commands so batches recover from a daemon exit after the initial liveness check (#1432)",
|
||
"Pinned GNU Linux release artifacts to glibc 2.28 with zigbuild, added a release guard for newer GLIBC symbols, and aligned Docker release helpers with the pinned target (#1417)",
|
||
"June 1, 2026",
|
||
"Improved vitals command output formatting for better readability (#1404)",
|
||
"Surfaced agent-browser feature coverage in documentation (#1403)",
|
||
"May 7, 2026",
|
||
"React introspection - First-class React DevTools integration with new react tree, react inspect <fiberId>, react renders start|stop, and react suspense commands for full component-tree visibility, per-fiber props/hooks/state inspection, render profiling with mount/re-render counts and change details, and Suspense boundary classification with root-cause grouping and recommendations. React DevTools hook is vendored (MIT) and embedded in the binary with zero runtime dependencies (#1257)",
|
||
"Web Vitals - New vitals [url] command that reports Core Web Vitals (LCP, CLS, TTFB, FCP, INP) plus React hydration phases for any page (#1257)",
|
||
"SPA navigation - New pushstate <url> command for client-side SPA navigations without a full page load (#1257)",
|
||
"Init scripts and feature flags - New --init-script <path> flag (repeatable; env AGENT_BROWSER_INIT_SCRIPTS) to register scripts before first navigation, and --enable <feature> flag (repeatable; env AGENT_BROWSER_ENABLE) for built-in init scripts such as react-devtools (#1257)",
|
||
"Network route resource type filter - network route now accepts --resource-type <csv> to filter intercepted requests by CDP resource type (#1257)",
|
||
"cURL cookie import - cookies set --curl <file> auto-detects JSON, cURL, and Cookie-header formats for bulk cookie import (#1257)",
|
||
"Dashboard proxy support - The observability dashboard now works from proxied origins via a same-origin proxy, enabling deployment behind reverse proxies and path-based routing (#1111)",
|
||
"Fixed doctor command generating duplicate check ids when called multiple times in the same process (#1330)",
|
||
"Switched npm publishing to trusted publishing via GitHub Actions OIDC, removing the need for manually managed npm tokens (#1273)",
|
||
"April 16, 2026",
|
||
"doctor command - Added agent-browser doctor for one-shot diagnosis of an install. Checks environment, Chrome, running daemons, config files, security, providers, and network connectivity; auto-cleans stale daemon sidecar files on every run; and performs a live headless launch test. Supports --offline to skip network probes, --quick to skip the launch test, --fix for opt-in repairs (install missing Chrome, close version-mismatched daemons, prune expired state files), and --json for structured output (#1254)",
|
||
"Stable tab ids and labels - Tabs now have stable string ids like t1, t2, t3 that don't shift when other tabs close or popups appear. Tabs can be created with a memorable label via tab new --label <name> [<url>], and labels are interchangeable with t<N> ids everywhere a tab ref is accepted (tab <id|label>, tab close <id|label>). Bare-integer input is rejected with a teaching error so agents can't mistake stable handles for positional indices (#892, #1249, #1250)",
|
||
"core skill - Renamed the built-in agent-browser skill to core and replaced its ~40-line discovery stub with a ~420-line usage guide covering the core snapshot-ref-act loop, reading, interacting, waiting, common workflows, troubleshooting, and global flags. agent-browser skills get core now returns content agents can use directly; --full adds references and templates. Added a hidden: frontmatter flag so the original agent-browser stub stays reachable for npx skills add discovery without polluting skills list (#1253)",
|
||
"JSON Schema for config files - Added agent-browser.schema.json describing every config option with types and descriptions, enabling IDE autocomplete and validation when referenced via $schema in agent-browser.json or ~/.agent-browser/config.json. The schema is served from the docs site at https://agent-browser.dev/schema.json (#1242, #1248)",
|
||
"Fixed --state / AGENT_BROWSER_STATE not actually loading saved browser state (cookies and localStorage) at launch. The flag had been fully plumbed through parsing, env propagation, and validation since the native Rust rewrite, but the load step was never wired up. Storage state now loads after launch across all four paths: explicit launch, auto-connect, provider, and local Chrome (#1241)",
|
||
"--help output now shows the skills section first so agents discover skills get core (the canonical usage guide) before the core command list (#1251)",
|
||
"Fixed --auto-connect CDP discovery preferring HTTP endpoint discovery over the DevToolsActivePort websocket path, which could fail on some setups. The CLI now reads the websocket path from DevToolsActivePort first and only falls back to HTTP discovery (#1218)",
|
||
"Fixed recording context viewport not inheriting the active viewport dimensions, causing recordings to use default resolution instead of the configured viewport (#1208)",
|
||
"Fixed get box and get styles printing no data in text mode (#1231, #1233)",
|
||
"Fixed active page changing when closing or removing earlier tabs. The previously focused page is now preserved correctly (#1220)",
|
||
"April 12, 2026",
|
||
"skills command - Added agent-browser skills command for discovering and installing agent skills, with built-in evaluation support for testing skills against live browser sessions (#1225, #1227)",
|
||
"Fixed custom viewport dimensions not being used in streaming frame metadata and image resolution (#1033)",
|
||
"Fixed --ignore-https-errors not being re-applied to recording contexts, causing TLS errors during screen recordings (#1178)",
|
||
"Fixed duplicate option numbering in the auth skill documentation (#1161)",
|
||
"The docs site header now dynamically fetches the GitHub star count (#1202)",
|
||
"April 7, 2026",
|
||
"Fixed hidden radio/checkbox inputs missing from snapshot refs when a <label> wraps a display:none <input type=\"radio\"> or <input type=\"checkbox\">. Chrome excludes these inputs from the accessibility tree entirely, making it impossible for AI agents to identify radio buttons and checkboxes via refs. Hidden inputs inside elements are now detected during cursor-interactive scanning and their parent nodes are promoted to the correct role with proper name and checked state (#1085)",
|
||
"Added clickable heading anchors to the docs site, making it easy to link directly to any section (#1175)",
|
||
"April 6, 2026",
|
||
"Fixed Chrome being killed after ~10s idle on Linux caused by PR_SET_PDEATHSIG tracking the blocking thread that spawned Chrome rather than the daemon process. When Tokio reaped the idle thread, the kernel sent SIGKILL to Chrome even though the daemon was still alive (#1157, #1173)",
|
||
"Embedded dashboard - The observability dashboard is now bundled directly into the CLI binary using rust-embed, eliminating the need for dashboard install. The dashboard is available immediately after installing agent-browser (#1169)",
|
||
"AI chat command - Added chat command for AI-powered browser automation. Supports single-shot mode (chat \"open google.com\") and an interactive REPL. The AI agent can execute any agent-browser command via tool calls. Requires AI_GATEWAY_API_KEY. Configure the model with --model or AI_GATEWAY_MODEL (#1160, #1163)",
|
||
"Dashboard AI chat - The observability dashboard now includes a built-in AI chat interface for conversational browser control alongside live session views (#1160, #1163)",
|
||
"snapshot --urls - New -u/--urls flag to include href URLs for link elements in snapshot output, giving agents direct access to link targets without additional queries (#1160)",
|
||
"Batch argument mode - The batch command now accepts commands as inline arguments in addition to reading from stdin, simplifying single-invocation multi-command workflows (#1160)",
|
||
"Fixed getByRole matching wrong elements (e.g. <link> stylesheet elements instead of <a> anchors) by rewriting the implementation to use the CDP accessibility tree with ref-based element resolution instead of CSS selectors (#1145)",
|
||
"Fixed upload command not supporting accessibility tree refs (@eN) for file upload element selection (#1156)",
|
||
"Fixed AGENT_BROWSER_DEFAULT_TIMEOUT not being applied to wait commands. The environment variable now propagates to all wait variants (wait, wait --url, wait --text, wait --load, wait --fn, wait --download) (#1153)",
|
||
"Fixed dashboard download error handling with improved retry logic for more reliable dashboard installation (#1154)",
|
||
"April 4, 2026",
|
||
"Chrome profile login state reuse - --profile <name> now resolves Chrome profile names (e.g. Default, Profile 1) and copies the profile to a temp directory to reuse login state, cookies, and extensions without modifying the original. Added profiles command to list available Chrome profiles with --json support (#1131)",
|
||
"Fixed --ignore-https-errors not passing --ignore-certificate-errors as a Chrome launch flag, causing TLS errors like ERR_SSL_PROTOCOL_ERROR to be rejected at the network layer before CDP could intervene (#1132)",
|
||
"Fixed orphaned Chrome processes on daemon exit by spawning Chrome in its own process group and killing the entire group on shutdown. On Linux, PR_SET_PDEATHSIG ensures Chrome is killed even if the daemon is OOM-killed (#1137)",
|
||
"Fixed CDP attach hang on Chrome 144+ when connecting to real browser sessions. Targets paused waiting for the debugger after attach are now resumed with Runtime.runIfWaitingForDebugger (#1133)",
|
||
"Fixed stale daemon after upgrade silently reusing the old daemon process with broken CDP behavior. The daemon now writes a .version sidecar file and auto-restarts on version mismatch (#1134)",
|
||
"Fixed stale daemon/socket recovery where close --all failed to clean up zombie daemons and stale files. Unreachable daemons are now force-killed and orphaned socket/pid files are removed (#1136)",
|
||
"Fixed idle timeout not being respected because the sleep future was recreated on every select loop iteration, preventing the deadline from being reached (#1110)",
|
||
"Fixed browser not relaunching when launch options change (e.g. adding extensions to config.json) between consecutive launch commands (#996)",
|
||
"Fixed auto_launch() not honouring AGENT_BROWSER_PROVIDER for cloud providers, causing non-launch commands to fall back to local Chrome instead of connecting via the provider API (#1126)",
|
||
"Fixed HAR capture missing API requests under heavy traffic by increasing the CDP broadcast buffer from 256 to 4096 events, reducing the drain interval from 500ms to 100ms, and enabling network tracking in cross-origin iframes (#1135)",
|
||
"April 2, 2026",
|
||
"AWS Bedrock AgentCore provider - Added AWS Bedrock AgentCore as a cloud browser provider. Connect with --provider agentcore or AGENT_BROWSER_PROVIDER=agentcore. Uses lightweight manual SigV4 signing for authentication with support for the full AWS credential provider chain (environment variables, AWS CLI, SSO, IAM roles). Configure with AGENTCORE_REGION, AGENTCORE_PROFILE_ID, and AGENTCORE_BROWSER_ID environment variables. Returns session ID and Live View URL in the launch response (#397)",
|
||
"Added AgentCore provider page to docs site, README options table, SKILL.md, and dashboard provider icons (#1120)",
|
||
"March 31, 2026",
|
||
"Fixed daemon hang on Linux caused by a waitpid(-1) race condition in the SIGCHLD handler that stole exit statuses from Rust's Child handles, leaving the daemon in a broken state. Replaced the global signal handler with targeted crash detection via the existing drain interval (#1098)",
|
||
"March 30, 2026",
|
||
"Fixed drag and drop not working because mouseMoved events during the drag omitted the buttons bitmask, causing the browser to see event.buttons === 0 and never fire dragstart/dragover/drop (#1087)",
|
||
"Dashboard session creation - Sessions can now be created directly from the dashboard UI. A new session dialog provides a unified selector grid for local engines (Chrome, Lightpanda) and cloud providers (Browserbase, Browserless, Browser Use, Kernel) with async creation, loading state, and error display (#1092)",
|
||
"Dashboard provider icons - The session sidebar now shows the provider or engine icon for each session, making it easy to identify which backend a session is using (#1092)",
|
||
"Fixed Browser Use provider using an intermediate API call instead of connecting directly via WSS, which caused connection failures (#1092)",
|
||
"Fixed Browserbase provider not sending an explicit JSON body and Content-Type header, causing session creation to fail (#1092)",
|
||
"Fixed provider navigation hanging because wait_for_lifecycle waited for page load events that remote providers may not emit. Navigation with --provider now automatically sets waitUntil=none (#1092)",
|
||
"Fixed remote CDP connections timing out by increasing the CDP connect timeout from 10s to 25s for cloud providers (#1092)",
|
||
"Fixed zombie daemon processes not being cleaned up when a provider connection fails during session creation from the dashboard (#1092)",
|
||
"Auto-dismissal for alert and beforeunload dialogs - JavaScript alert() and beforeunload dialogs are now automatically accepted to prevent the agent from blocking indefinitely. confirm and prompt dialogs still require explicit dialog accept/dismiss commands. Disable with --no-auto-dialog flag or AGENT_BROWSER_NO_AUTO_DIALOG environment variable (#1075)",
|
||
"Puppeteer browser cache fallback - Chrome discovery now searches ~/.cache/puppeteer/chrome/ (or PUPPETEER_CACHE_DIR) for Chrome binaries, so users with an existing Puppeteer installation can use agent-browser without a separate install step (#1088)",
|
||
"Console output improvements - console.log of objects now shows the actual object preview (e.g. {userId: \"abc\", count: 42}) instead of \"Object\". JSON output includes a raw args array for programmatic access (#1040)",
|
||
"Fixed same-document navigation (e.g. SPA hash routing) hanging forever because wait_for_lifecycle waited for a Page.loadEventFired that never fires on same-document navigations (#1059)",
|
||
"Fixed save_state only capturing cookies and localStorage for the current origin, silently dropping cross-domain data (e.g. SSO/CAS auth cookies). Now uses Network.getAllCookies and collects localStorage from all visited origins (#1064)",
|
||
"Fixed externally opened tabs not appearing in tab list when using --cdp mode. Tabs opened by the user or another CDP client are now detected and tracked (#1042)",
|
||
"Fixed dashboard server not picking up installed files without a restart. dashboard install now takes effect immediately on a running server (#1066)",
|
||
"Fixed Windows Chrome extraction failing because zip path normalization used forward slashes while the extraction code expected backslashes (#1088)",
|
||
"March 27, 2026",
|
||
"Observability dashboard - Added a local web UI (dashboard) that shows live browser viewports, command activity feeds, console output, network requests, storage, and extensions for all sessions. Manage it with dashboard start, dashboard stop, and dashboard install. The dashboard runs as a standalone background process and all sessions stream to it automatically (#1034)",
|
||
"agent-browser dashboard install agent-browser dashboard start agent-browser open example.com # session appears in dashboard agent-browser dashboard stop",
|
||
"Runtime stream management - Added stream enable, stream disable, and stream status commands to control WebSocket streaming at runtime. Streaming is now always enabled by default; AGENT_BROWSER_STREAM_PORT overrides the port instead of toggling the feature (#951)",
|
||
"Close all sessions - Added close --all flag to close every active browser session at once",
|
||
"Fixed Lightpanda engine compatibility (#1050)",
|
||
"Fixed Windows daemon TCP bind failing when Hyper-V reserves the port by falling back to an OS-assigned port and writing it to a .port file (#1041)",
|
||
"Fixed Windows dashboard relay using Unix socket instead of TCP (#1038)",
|
||
"Fixed radio/checkbox elements being dropped from compact snapshot tree because the ref= check required a leading [ that those elements lack (#1008)",
|
||
"March 25, 2026",
|
||
"Re-apply download behavior on recording context - Fixed an issue where downloads were silently dropped in recording contexts because Browser.setDownloadBehavior set at launch only applied to the default context. The download behavior is now re-applied when a new recording context is created (#1019)",
|
||
"Reap zombie Chrome process and fast-detect crash for auto-restart - Added a non-blocking process-exit check before attempting CDP connection checks. This prevents a 3-second CDP timeout when Chrome has already crashed or exited, enabling faster detection and auto-restart of the browser (#1023)",
|
||
"Route keyboard type through text input - Fixed keyboard type subaction to correctly route through the text input handler, and added support for an insertText subaction using Input.insertText (#1014)",
|
||
"Handle --clear flag in console command - Fixed the console command to accept and process a clear parameter, allowing console event history to be cleared (#1015)",
|
||
"March 24, 2026",
|
||
"Dialog status command - Added dialog status command to check whether a JavaScript dialog is currently open (#999)",
|
||
"Dialog warning field - Command responses now include a warning field when a JavaScript dialog is pending, indicating the dialog type and message (#999)",
|
||
"Standard proxy environment variables - The proxy setting now automatically falls back to standard environment variables (HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and their lowercase variants), with NO_PROXY/no_proxy respected for bypass rules (#1000)",
|
||
"Font packages for --with-deps - Installing with --with-deps now includes CJK and emoji font packages on Linux (Debian, RPM, and yum-based distros) to prevent missing glyphs when rendering international content (#1002)",
|
||
"Fixed state show always failing with \"Missing 'path' parameter\" due to a mismatched JSON field name (#994)",
|
||
"Fixed console command returning only Done due to a JSON field name mismatch in the response (#986)",
|
||
"Fixed browser-domain CDP events being dropped during downloads due to a sessionId mismatch (#998)",
|
||
"Fixed proxy authentication by handling credentials via the CDP Fetch.authRequired event rather than passing them inline (#1000)",
|
||
"Fixed modifier key chords (e.g. Control+a, Shift+Enter, Control+Shift+a) not being handled correctly when using press. Modifier keys are now parsed and forwarded as CDP modifier bitmasks rather than treated as part of the key name (#980)",
|
||
"Fixed query parameters being dropped from --cdp HTTP URLs (e.g. http://host:9222?mode=Hello). Query strings are now preserved and forwarded to the remote CDP endpoint (#982)",
|
||
"March 23, 2026",
|
||
"Cross-origin iframe support - Added support for snapshots and interactions within cross-origin iframes via Target.setAutoAttach (#949)",
|
||
"Network request detail and filtering - Added network request <requestId> command to view full request/response detail, and new filtering options for network requests including --type (e.g. xhr,fetch), --method (e.g. POST), and --status (e.g. 2xx, 400-499) (#935)",
|
||
"agent-browser network requests --type xhr,fetch --method POST agent-browser network request <requestId>",
|
||
"Snapshot usability - Reduced AI cognitive load by filtering semantic noise from snapshot output; cursor-interactive elements are now included by default, making the -C flag unnecessary (#968)",
|
||
"Upgrade command - Improved robustness of installation method detection in the upgrade command (#960)",
|
||
"Target tracking - Enhanced target tracking and page information handling for more reliable browser session management (#969)",
|
||
"Fixed viewport dimensions being reported incorrectly in streaming status messages and screencast (#952)",
|
||
"Fixed find command flags such as --exact and --name leaking into fill values when used with fill actions (#955)",
|
||
"Fixed state commands incorrectly starting the daemon when no session_name is provided (#677, #964)",
|
||
"Fixed auto-connect triggering when the daemon is already running, preventing duplicate connections (#971)",
|
||
"Fixed Enter key press not working by adding a text field to keyDown events (#972)",
|
||
"Fixed download command to properly handle absolute paths and correctly click target elements (#970)",
|
||
"The -C / --cursor flag for snapshot is deprecated; cursor-interactive elements are now included by default and the flag has no additional effect (#968)",
|
||
"March 20, 2026",
|
||
"Auth login readiness - agent-browser auth login now navigates with load, waits for usable login form selectors, and uses staged username detection (targeted email/username selectors first, then broad text-input fallback). This reduces SPA timing failures, avoids false matches on unrelated text fields, and prevents networkidle hangs on pages with continuous background requests.",
|
||
"WebSocket keepalive for remote browsers - Added WebSocket Ping frames and TCP SO_KEEPALIVE to prevent CDP connections from being silently dropped by intermediate proxies during idle periods (#936)",
|
||
"XPath selector support - Fixed element resolution to correctly handle the xpath= selector prefix (#908)",
|
||
"Fast-path for identical snapshots - Short-circuits the Myers diff algorithm when comparing a snapshot to itself, avoiding unnecessary computation in retry and loop workloads (#922)",
|
||
"March 18, 2026",
|
||
"Deduplicate text content in snapshots - Fixed an issue where duplicate text content appeared in page snapshots (#909)",
|
||
"Native mouse drag state - Fixed incorrect raw native mouse drag state not being properly tracked across down, move, and up events (#872)",
|
||
"Chrome headless launch failures - Fixed browser launch failures caused by the --enable-unsafe-swiftshader flag in Chrome headless mode (#915)",
|
||
"Origin-scoped --headers persistence - Restored correct persistence of origin-scoped headers set via --headers across navigation commands (#894)",
|
||
"Relative URLs in WebSocket domain filter - Fixed handling of relative URLs in the WebSocket domain filter script (#624)",
|
||
"HAR 1.2 network capture - Added commands to capture and export network traffic in HAR 1.2 format, including accurate request/response timing, headers, body sizes, and resource types sourced from Chrome DevTools Protocol events (#864)",
|
||
"Built-in upgrade command - Added agent-browser upgrade to self-update the CLI; automatically detects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command (#898)",
|
||
"agent-browser upgrade",
|
||
"March 17, 2026",
|
||
"batch -- Execute multiple commands in a single invocation. Pipe a JSON array of string arrays to stdin and receive results sequentially. Supports --bail to stop on first error and --json for structured output.",
|
||
"echo '[[\"open\",\"example.com\"],[\"snapshot\"]]' | agent-browser batch --json",
|
||
"network har start/stop -- Capture and export network traffic in HAR 1.2 format.",
|
||
"agent-browser network har start # ... interact with the page ... agent-browser network har stop ./trace.har",
|
||
"iframe support -- CLI interactions and snapshots now traverse into iframe content, enabling automation of cross-frame pages.",
|
||
"--idle-timeout flag -- Automatically shut down the daemon after a period of inactivity. Accepts human-friendly formats such as 10s, 3m, 1h, or raw milliseconds. Also available as AGENT_BROWSER_IDLE_TIMEOUT_MS.",
|
||
"Cursor-interactive elements in snapshots -- Cursor-interactive elements are now embedded directly into the snapshot tree for richer context.",
|
||
"Brave Browser auto-connect -- Auto-discovery of Brave Browser for CDP connections on macOS, Linux, and Windows.",
|
||
"linux-musl (Alpine) builds -- Pre-built binaries for linux-musl targeting both x64 and arm64, enabling native support for Alpine Linux and other musl-based distributions.",
|
||
"WebSocket fallback for CDP discovery -- When HTTP-based CDP endpoint discovery fails, the CLI now falls back to a WebSocket connection automatically.",
|
||
"--full/-f refactored to command-level flag -- Moved from a global flag to a per-command flag for clearer scoping.",
|
||
"Enhanced Chrome launch -- Added --user-data-dir support and configurable launch timeout for more reliable browser startup. Chrome now retries launching up to 3 times on transient startup failures.",
|
||
"Consecutive --auto-connect commands -- Multiple consecutive auto-connect commands no longer require a full browser relaunch; external connections are correctly identified and reused.",
|
||
"Batched CDP calls -- snapshot -C and screenshot --annotate now batch CDP calls instead of issuing sequential round-trips per element, preventing timeouts on high-latency WSS connections.",
|
||
"Fixed remote CDP (WSS) snapshot and screenshot hangs by removing WebSocket message/frame size limits",
|
||
"Fixed Material Design check/uncheck falling back to JS .click() for overlay-based controls",
|
||
"Fixed punctuation characters being dropped in the type command",
|
||
"Fixed WebSocket streaming by keeping the StreamServer instance alive",
|
||
"Filtered internal Chrome targets (chrome://, devtools://) from auto-connect discovery",
|
||
"Fixed snapshot --selector scoping to the matched element's subtree",
|
||
"Fixed network idle detection returning prematurely for cached pages",
|
||
"Fixed daemon panic on broken stderr pipe during Chrome launch",
|
||
"Fixed broadcast channel lag being treated as stream closure",
|
||
"Fixed daemon liveness detection for PID namespace isolation (e.g. unshare)",
|
||
"Fixed Ubuntu dependency install accidentally removing system packages",
|
||
"March 13, 2026",
|
||
"agent-browser is now 100% native Rust. The Node.js/Playwright daemon has been completely removed -- no Node.js runtime or Playwright dependency is required to run the daemon. The Rust native daemon is now the only implementation.",
|
||
"Metric",
|
||
"Node.js",
|
||
"Rust",
|
||
"Cold start",
|
||
"1002ms",
|
||
"617ms",
|
||
"1.6x faster",
|
||
"Daemon memory",
|
||
"143 MB",
|
||
"8 MB",
|
||
"18x less",
|
||
"Install size",
|
||
"710 MB",
|
||
"7 MB",
|
||
"99x smaller",
|
||
"npm install -g agent-browser # 7 MB install agent-browser install # download Chrome agent-browser open example.com agent-browser snapshot",
|
||
"Benchmarks -- Added benchmark suite for comparing native vs Node.js daemon performance across cold start, warm start, memory, and install size.",
|
||
"Chromium installer hardened -- Fixed zip path traversal vulnerability in Chrome for Testing installer.",
|
||
"Fixed --headed false flag not being respected in CLI",
|
||
"Fixed \"not found\" error pattern in to_ai_friendly_error incorrectly catching non-element errors",
|
||
"Fixed storage local key lookup parsing and text output",
|
||
"Fixed Lightpanda engine launch with release binaries",
|
||
"Hardened Lightpanda startup timeouts",
|
||
"Browserless.io provider -- Added browserless.io as a browser provider, supported in both Node.js and native daemon paths. Connect to remote Browserless instances using the --provider browserless flag or AGENT_BROWSER_PROVIDER=browserless environment variable.",
|
||
"export BROWSERLESS_API_KEY=\"your-api-key\" agent-browser --provider browserless open example.com agent-browser --provider browserless screenshot ./page.png",
|
||
"clipboard command -- Read from and write to the browser clipboard. Supports read, write, copy (simulates Ctrl+C), and paste (simulates Ctrl+V) operations.",
|
||
"agent-browser clipboard read agent-browser clipboard write \"Hello, World!\" agent-browser clipboard copy agent-browser clipboard paste",
|
||
"Screenshot output configuration -- New global flags for persistent screenshot settings: --screenshot-dir, --screenshot-quality, and --screenshot-format. Also available as environment variables AGENT_BROWSER_SCREENSHOT_DIR, AGENT_BROWSER_SCREENSHOT_QUALITY, and AGENT_BROWSER_SCREENSHOT_FORMAT.",
|
||
"agent-browser screenshot --screenshot-dir ./shots agent-browser screenshot --screenshot-format jpeg --screenshot-quality 80",
|
||
"Fixed wait --text not working in native daemon path",
|
||
"Fixed BrowserManager.navigate() and package entry point",
|
||
"Fixed extensions not being loaded from config.json",
|
||
"Fixed scroll on page load",
|
||
"Fixed HTML retrieval by using browser.getLocator() for selector operations",
|
||
"March 12, 2026",
|
||
"inspect command -- Opens Chrome DevTools for the active page by launching a local proxy server that forwards the DevTools frontend to the browser's CDP WebSocket. Agent commands continue to work while DevTools is open.",
|
||
"agent-browser open example.com agent-browser inspect # opens DevTools in your browser agent-browser click \"Submit\" # commands still work while DevTools is open",
|
||
"get cdp-url subcommand -- Retrieve the Chrome DevTools Protocol WebSocket URL for the active page, useful for connecting external debugging tools.",
|
||
"agent-browser get cdp-url",
|
||
"Screenshot annotate -- The --annotate flag overlays numbered labels on interactive elements in screenshots.",
|
||
"KERNEL_API_KEY now optional -- External credential injection no longer requires KERNEL_API_KEY to be set, making it easier to use Kernel with pre-configured environments.",
|
||
"Browserbase simplified -- Removed the BROWSERBASE_PROJECT_ID requirement, reducing setup friction for Browserbase users.",
|
||
"Fixed Browserbase API using incorrect endpoint to release sessions",
|
||
"Fixed CDP connect paths using hardcoded 10s timeout instead of the configurable default timeout",
|
||
"Fixed lone Unicode surrogates causing errors by sanitizing with toWellFormed()",
|
||
"Fixed CDP connection failure on IPv6-first systems",
|
||
"Fixed recordings not inheriting the current viewport settings",
|
||
"March 9, 2026",
|
||
"Viewport scale factor -- Added support for device scale factor (retina display) in the viewport command via an optional scale parameter.",
|
||
"Webview target support -- Added webview target type support for better Electron application compatibility. The pages list now includes target type information.",
|
||
"March 8, 2026",
|
||
"Lightpanda browser engine support -- Added --engine <name> flag to select the browser engine (chrome by default, or lightpanda), implying --native mode. Configurable via AGENT_BROWSER_ENGINE environment variable.",
|
||
"agent-browser --engine lightpanda open example.com",
|
||
"Dialog dismiss command -- Added support for dismiss subcommand in dialog command parsing.",
|
||
"Daemon startup error reporting -- Daemon startup errors are now surfaced directly instead of showing an opaque timeout message.",
|
||
"CDP port discovery -- Replaced hand-rolled HTTP client with reqwest for more reliable CDP port discovery.",
|
||
"Chrome extensions -- Extensions now load correctly by forcing headed mode when extensions are present.",
|
||
"Google Translate bar suppression -- Suppressed the Google Translate bar in native headless mode to avoid interference.",
|
||
"Auth cookie persistence -- Auth cookies are now persisted on browser close in native mode.",
|
||
"Fixed native auth login failing due to incompatible encryption format.",
|
||
"Added benchmarks to the CLI codebase.",
|
||
"March 3, 2026",
|
||
"Native Rust daemon (experimental). A pure Rust daemon that communicates with Chrome directly via the Chrome DevTools Protocol (CDP), eliminating Node.js and Playwright dependencies entirely. Enable with --native, AGENT_BROWSER_NATIVE=1, or \"native\": true in your config file. Supports 150+ commands with full parity to the default Node.js daemon.",
|
||
"# Via flag agent-browser --native open example.com # Via environment variable export AGENT_BROWSER_NATIVE=1 agent-browser open example.com",
|
||
"Or add to agent-browser.json:",
|
||
"{\"native\": true}",
|
||
"Default (Node.js)",
|
||
"Native (--native)",
|
||
"Runtime",
|
||
"Node.js + Playwright",
|
||
"Pure Rust binary",
|
||
"Protocol",
|
||
"Playwright protocol",
|
||
"Direct CDP / WebDriver",
|
||
"Larger (Node.js + npm deps)",
|
||
"Smaller (single binary)",
|
||
"Browser support",
|
||
"Chromium, Firefox, WebKit",
|
||
"Chromium, Safari (via WebDriver)",
|
||
"Stability",
|
||
"Stable",
|
||
"Experimental",
|
||
"All core commands work in native mode: navigation, interaction (click, fill, type, press, hover, scroll, drag), observation (snapshot, screenshot, eval), state management (cookies, storage, state save/load), tabs, emulation (viewport, device, timezone, locale, geolocation), streaming, diffing, recording, and profiling.",
|
||
"The native daemon also includes a WebDriver backend for Safari and iOS support.",
|
||
"Firefox and WebKit are not yet supported (Chromium and Safari only)",
|
||
"Playwright trace format is not available (uses Chrome's built-in tracing)",
|
||
"HAR export is not available",
|
||
"Network route interception uses CDP Fetch domain instead of Playwright's route API",
|
||
"The native and Node.js daemons share the same session socket. Use agent-browser close before switching between modes.",
|
||
"See the Native Mode page for full details.",
|
||
"February 25, 2026",
|
||
"Authentication vault -- Store credentials locally (always AES-256-GCM encrypted) and reference them by name. The LLM never sees passwords. Commands: auth save, auth login, auth list, auth show, auth delete. Passwords can be piped via stdin (--password-stdin) to avoid shell history exposure.",
|
||
"Content boundary markers -- --content-boundaries wraps page-sourced output in structural delimiters with a per-process CSPRNG nonce, so LLMs can distinguish trusted tool output from untrusted page content. In --json mode, a _boundary object is injected with nonce and origin fields.",
|
||
"Domain allowlist -- --allowed-domains restricts navigation, sub-resource requests, WebSocket connections, and EventSource streams to trusted domains. Supports exact match and wildcard prefix patterns (e.g., *.example.com).",
|
||
"Action policy -- --action-policy gates actions using a static JSON policy file with allow/deny lists across 13 action categories. Auth vault operations bypass policy enforcement.",
|
||
"Action confirmation -- --confirm-actions requires explicit approval for sensitive action categories. New confirm and deny commands for orchestrator use. --confirm-interactive enables human-in-the-loop terminal prompts (auto-denies if stdin is not a TTY). Pending confirmations auto-deny after 60 seconds.",
|
||
"Output length limits -- --max-output truncates large page outputs to prevent LLM context flooding.",
|
||
"--download-path option -- Set a default download directory via flag, AGENT_BROWSER_DOWNLOAD_PATH env var, or downloadPath config key. Without it, downloads go to a temporary directory deleted when the browser closes.",
|
||
"--selector flag for scroll -- Scroll within a specific container element instead of the page: agent-browser scroll down 500 --selector \"div.scroll-container\"",
|
||
"# Auth vault echo \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin agent-browser auth login github # Security flags agent-browser --content-boundaries --allowed-domains \"example.com,*.example.com\" --max-output 50000 open https://example.com # Download path agent-browser --download-path ./downloads open https://example.com # Scroll within container agent-browser scroll down 500 --selector \"div.content\"",
|
||
"Six new environment variables for security configuration: AGENT_BROWSER_CONTENT_BOUNDARIES, AGENT_BROWSER_MAX_OUTPUT, AGENT_BROWSER_ALLOWED_DOMAINS, AGENT_BROWSER_ACTION_POLICY, AGENT_BROWSER_CONFIRM_ACTIONS, AGENT_BROWSER_CONFIRM_INTERACTIVE.",
|
||
"February 23, 2026",
|
||
"keyboard command -- Type with real keystrokes, insert text, and press shortcuts at the currently focused element without needing a selector (keyboard type, keyboard inserttext).",
|
||
"--color-scheme flag -- Persistent dark/light mode preference across browser sessions via flag or AGENT_BROWSER_COLOR_SCHEME env var.",
|
||
"agent-browser keyboard type \"Hello world\" agent-browser keyboard inserttext \"pasted text\" agent-browser --color-scheme dark open https://example.com",
|
||
"Fixed IPC EAGAIN errors (os error 35/11) with backpressure-aware socket writes, command serialization, and lowered default Playwright timeout to 25s (configurable via AGENT_BROWSER_DEFAULT_TIMEOUT).",
|
||
"Fixed remote debugging (CDP) reconnection.",
|
||
"Fixed state load failing when no browser is running.",
|
||
"Fixed --annotate flag warning appearing when not explicitly passed via CLI.",
|
||
"February 20, 2026",
|
||
"Diff commands -- Compare snapshots, screenshots, and URLs between page states. Run visual pixel diffs against baseline images, compare accessibility tree snapshots with customizable depth and selectors, and diff two URLs side-by-side with optional screenshot comparison.",
|
||
"agent-browser diff snapshot agent-browser diff screenshot --baseline before.png agent-browser diff url https://staging.example.com https://prod.example.com",
|
||
"February 18, 2026",
|
||
"Annotated screenshots -- --annotate flag overlays numbered labels on interactive elements and prints a legend mapping each label to its element ref. Enables multimodal AI models to reason about visual layout while using the same @eN refs for subsequent interactions. Also settable via AGENT_BROWSER_ANNOTATE env var.",
|
||
"agent-browser screenshot --annotate",
|
||
"Added documentation for command chaining with && across README, CLI help output, docs, and skill files.",
|
||
"February 17, 2026",
|
||
"Configuration file support -- Automatic loading from user (~/.agent-browser/config.json) and project (./agent-browser.json) directories with priority-based merging.",
|
||
"Profiler commands -- Chrome DevTools profiling with profiler start and profiler stop.",
|
||
"Browser extension loading -- --extension flag to load browser extensions.",
|
||
"Storage state management -- state save and state load commands for auth state persistence.",
|
||
"iOS device emulation -- --device flag for device emulation.",
|
||
"Enhanced click -- --new-tab option for click commands.",
|
||
"Enhanced find -- Additional actions and filtering options.",
|
||
"CDP WebSocket URLs -- --cdp now accepts WebSocket URLs in addition to ports.",
|
||
"February 13, 2026",
|
||
"Session persistence - Automatic save/restore of cookies and localStorage across browser restarts using --session-name flag",
|
||
"Encrypted state - Optional AES-256-GCM encryption for saved session state data",
|
||
"State management commands - New commands for listing, showing, renaming, clearing, and cleaning up session state files",
|
||
"New tab on click - Added --new-tab option for click commands to open links in new tabs",
|
||
"# Persist session state agent-browser --session-name myapp open https://example.com # Manage saved states agent-browser state list agent-browser state show myapp agent-browser state clear myapp",
|
||
"Fixed all Clippy lint warnings in the Rust CLI",
|
||
"February 12, 2026",
|
||
"Added support for custom executable path in CLI browser launch options",
|
||
"Documentation site UI improvements including a new chat component with sheet-based interface",
|
||
"February 10, 2026",
|
||
"Migrated documentation site to MDX for improved content authoring",
|
||
"Added AI-powered docs chat feature",
|
||
"Updated README with Homebrew installation instructions for macOS users",
|
||
"February 5, 2026",
|
||
"--allow-file-access flag - Enable opening and interacting with local file:// URLs (PDFs, HTML files) by passing Chromium flags that allow JavaScript access to local files",
|
||
"-C/--cursor flag for snapshots - Include cursor-interactive elements like divs with onclick handlers or cursor:pointer styles",
|
||
"agent-browser --allow-file-access open file:///path/to/document.pdf agent-browser snapshot -C",
|
||
"February 3, 2026",
|
||
"iOS Simulator support - Mobile Safari testing via Appium with real device and simulator support",
|
||
"# List available iOS simulators agent-browser device list # Launch on iOS device agent-browser -p ios --device \"iPhone 16 Pro\" open https://example.com # Touch interactions agent-browser tap @e1 agent-browser swipe up",
|
||
"February 2, 2026",
|
||
"Added --stdin flag for eval command to read JavaScript from stdin, enabling heredoc usage for multiline scripts",
|
||
"Fixed binary permission issues on macOS/Linux when postinstall scripts don't run",
|
||
"Added --stdin flag for eval command to read JavaScript from stdin",
|
||
"Added base64 encoding support for the eval command with -b/--base64 flag to avoid shell escaping issues",
|
||
"Updated documentation with AI agent setup instructions",
|
||
"Fixed browser launch options not being passed correctly when using persistent profiles",
|
||
"Added pre-flight checks for socket path length limits and directory write permissions",
|
||
"Improved error handling to properly exit with failure status when browser launch fails",
|
||
"January 31, 2026",
|
||
"Improved daemon connection reliability with automatic retry logic for transient errors",
|
||
"CLI now cleans up stale socket and PID files before starting a new daemon",
|
||
"January 29, 2026",
|
||
"Fixed version synchronization to automatically update Cargo.lock alongside Cargo.toml during releases",
|
||
"Made the CLI binary executable in the npm package",
|
||
"January 27, 2026",
|
||
"Fixed \"Daemon not found\" error when running through AI agents by resolving symlinks in the executable path",
|
||
"Replaced shell-based CLI wrappers with a cross-platform Node.js wrapper to enable npx support on Windows",
|
||
"Added postinstall logic to patch npm bin entry on global installs for zero-overhead native binary invocation",
|
||
"Added CI tests to verify global installation across all platforms",
|
||
"January 26, 2026",
|
||
"Fixed the Windows CMD wrapper to use the native binary directly instead of routing through Node.js",
|
||
"Added retry logic to CI install command for transient browser installation failures",
|
||
"Improved release workflow to validate binary file sizes and ensure binaries are executable after npm install",
|
||
"Updated documentation site with a new mobile navigation system",
|
||
"Kernel cloud browser provider - Connect to Kernel (kernel.sh) for remote browser infrastructure with stealth mode and persistent profiles",
|
||
"# Via -p flag agent-browser -p kernel open https://example.com # Via environment variable export AGENT_BROWSER_PROVIDER=kernel export KERNEL_API_KEY=your-api-key agent-browser open https://example.com # With persistent profile export KERNEL_PROFILE_NAME=my-profile agent-browser open https://example.com",
|
||
"Ignore HTTPS certificate errors - New flag for working with self-signed certificates and development environments",
|
||
"agent-browser --ignore-https-errors open https://localhost:3000",
|
||
"Enhanced cookie management - Extended cookies set command with additional flags for setting cookies before page load",
|
||
"agent-browser cookies set session_id \"abc123\" --url https://app.example.com --httpOnly --secure agent-browser cookies set token \"xyz\" --domain .example.com --path /api --expires 1735689600",
|
||
"Fixed tab list command not recognizing new pages opened via clicks or target=\"_blank\" links",
|
||
"Fixed check command hanging indefinitely",
|
||
"Fixed set device not applying deviceScaleFactor - HiDPI screenshots now work correctly",
|
||
"Fixed state load and profile persistence not working in v0.7.6",
|
||
"Screenshots now save to temp directory when no path is provided",
|
||
"Daemon and stream server now reject cross-origin connections",
|
||
"January 23, 2026",
|
||
"Fix native binary distribution - Native binaries for all platforms (Linux x64/arm64, macOS x64/arm64, Windows x64) are now included in the npm package. Previously, the release workflow published to npm before building binaries, causing \"No binary found\" errors on installation.",
|
||
"Cloud browser providers - Connect to Browserbase or Browser Use for remote browser infrastructure",
|
||
"# Via -p flag (recommended) agent-browser -p browserbase open https://example.com agent-browser -p browseruse open https://example.com # Via environment variable export AGENT_BROWSER_PROVIDER=browserbase agent-browser open https://example.com",
|
||
"Persistent browser profiles - Store cookies, localStorage, and login sessions across browser restarts",
|
||
"agent-browser --profile ~/.myapp-profile open myapp.com # Login persists across restarts",
|
||
"Remote CDP WebSocket URLs - Connect to remote browser services via WebSocket",
|
||
"agent-browser --cdp \"wss://browser-service.com/cdp?token=...\" snapshot",
|
||
"download command - Trigger downloads and wait for completion",
|
||
"agent-browser download @e1 ./file.pdf agent-browser wait --download ./output.zip --timeout 30000",
|
||
"Browser launch configuration - Fine-grained control over browser startup",
|
||
"agent-browser --args \"--disable-gpu,--no-sandbox\" open example.com agent-browser --user-agent \"Custom UA\" open example.com agent-browser --proxy-bypass \"localhost,*.internal\" open example.com",
|
||
"Enhanced skills - Hierarchical structure with references and templates for Claude Code",
|
||
"Screenshot command now supports refs and has improved error messages",
|
||
"WebSocket URLs work in connect command",
|
||
"Fixed socket file location (uses ~/.agent-browser instead of TMPDIR)",
|
||
"Windows binary path fix (.exe extension)",
|
||
"State load and path-based actions now show correct output messages",
|
||
"Added Claude Code marketplace plugin installation instructions",
|
||
"Updated skill documentation with references and templates",
|
||
"Improved error documentation",
|
||
"January 18, 2026",
|
||
"Video recording - Record browser sessions to WebM using Playwright's native recording",
|
||
"agent-browser record start ./demo.webm agent-browser click @e1 agent-browser record stop",
|
||
"connect command - Connect to a browser via CDP and persist the connection for subsequent commands",
|
||
"agent-browser connect 9222 agent-browser snapshot # No --cdp needed after connect",
|
||
"--proxy flag - Configure browser proxy with optional authentication",
|
||
"agent-browser --proxy http://user:pass@proxy.com:8080 open example.com",
|
||
"get styles command - Extract computed styles from elements",
|
||
"agent-browser get styles \"button\"",
|
||
"Claude marketplace plugin - Added .claude-plugin/marketplace.json for Claude Code integration",
|
||
"Enhanced network output - network requests now shows method, URL, and resource type",
|
||
"--version flag - Display CLI version",
|
||
"Fix Windows daemon startup and port calculation",
|
||
"Support libasound2t64 on newer Ubuntu versions (24.04+)",
|
||
"Prevent CDP timeout on empty URL tabs",
|
||
"Output screenshot as base64 when no path provided",
|
||
"Resolve refs in get value command",
|
||
"Support URL parameter in tab new command",
|
||
"Allow about:, data:, and file: URL schemes",
|
||
"Detect stale unix socket by attempting connection",
|
||
"Respect AGENT_BROWSER_HEADED environment variable",
|
||
"Handle SIGPIPE to prevent panic when piping to head/tail",
|
||
"Fix null path validation in screenshot command",
|
||
"These changes align the CLI with the daemon protocol for consistency:",
|
||
"select command now uses values field (supports multiple selections)",
|
||
"frame main uses mainframe action",
|
||
"mouse wheel uses wheel action",
|
||
"set media uses emulatemedia action",
|
||
"Console output uses messages field",
|
||
"Expanded SKILL.md with comprehensive command reference",
|
||
"Updated README with new commands and options",
|
||
"Updated CDP mode documentation with connect workflow"
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/native-mode",
|
||
"text": "Native Mode"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Changelog\n\n## v0.38.2\n\n<p className=\"text-[#888] text-sm\">October 1, 2026</p>\n\n### Bug Fixes\n\n- Fixed **auth vault login** to pick usable controls when hidden duplicates exist, and to bind credential entry to the selected field so replaced fields or redirected focus are rejected before submitting (#2014)\n- Fixed **chat mode** to allow `webmcp`, `skills`, and other top-level browser commands, so the model uses page WebMCP tools instead of falling back to `eval` (#2015)\n- Fixed **Kernel profiles** so `KERNEL_PROFILE_NAME` sessions send the profile as an object instead of failing with a 400, and added `KERNEL_PROFILE_SAVE_CHANGES` to opt into saving changes back (#2004)\n- Fixed **Chrome freezing after launch** by draining its stderr for the browser's lifetime, so a full log pipe no longer blocks the browser (#2003)\n- Fixed **Browser Use** by switching to Cloud V4, which creates, attaches to, and stops the same browser with bounded timeouts (#1879)\n- Fixed **Vercel Sandbox shared memory detection** by measuring `/dev/shm` capacity and adding `--disable-dev-shm-usage` below 256 MiB, so Chrome no longer terminates renderers on the undersized mount (#1890)\n\n### Improvements\n\n- Upgraded the **eve integration** from eve 0.47.3 to 0.57.0, so apps on eve 0.50 and later build again (#1945)\n\n### Documentation\n\n- Updated the **contact sheet example** with the loading-flash demo output (#1871)\n\n---\n\n## v0.38.1\n\n<p className=\"text-[#888] text-sm\">September 16, 2026</p>\n\n### Bug Fixes\n\n- Fixed **recording cursor and mouse movement timing** so cursor rendering stays synchronized with page content during drags and timed mouse moves (#1869)\n\n### Documentation\n\n- Added Vercel Labs product and project status badges to the README (#1868)\n\n---\n\n## v0.38.0\n\n<p className=\"text-[#888] text-sm\">September 16, 2026</p>\n\n### New Features\n\n- Added **conditional screenshots** with `screenshot --if-changed` to skip unchanged captures and `--threshold <0-1>` to tolerate small pixel differences. Screenshot history is scoped to each tab and capture mode, and unchanged captures omit the image path to save tokens (#1813)\n- Added **automatic snapshot deltas** with `snapshot --delta`, which returns a full baseline followed by an unchanged revision or compact structural changes. Use `--full` to refresh the baseline (#1811)\n- Added **persistent snapshot refs** for surviving DOM elements across same-document changes. Replaced elements and navigated pages or iframes invalidate their refs without recycling identifiers (#1812)\n- Added **human-like pointer movement** with session `--input-mode`, per-action `--human` for clicks and drags, and reproducible curved `mouse move` paths (#1810)\n- Added **recording presentation tools**: `--cursor` renders an animated pointer and click ripple, while `--contact-sheet` saves a timestamped PNG summary of visual changes (#1807, #1808)\n- Added **stateful auth vault login** with `auth login --no-navigate`, which fills an already prepared login page after verifying its origin against the credential URL (#1771)\n- Added **WebMCP catalog updates** to normal browser responses. Concise, content-bounded summaries appear on initial discovery and catalog changes, while full schemas remain opt-in (#1842)\n\n### Improvements\n\n- Improved **recording frame timing** by holding the latest Chrome frame between repaints so the output duration follows the requested frame rate (#1806)\n\n### Bug Fixes\n\n- Fixed **CDP transport recovery and shutdown** so malformed transport messages do not strand unrelated commands and failed initialization disconnects cleanly (#1739)\n- Fixed **dropdown label matching** to normalize whitespace, including non-breaking spaces, when selecting options by visible label (#1736)\n\n### Documentation\n\n- Clarified **reliable browser wait strategies** by recommending page-specific selectors, text, URLs, or JavaScript conditions and reserving `networkidle` for pages known to become quiet (#1834)\n\n---\n\n## v0.37.1\n\n<p className=\"text-[#888] text-sm\">September 8, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows headless Chrome desktop artifacts** by isolating owned headless Chrome on a private desktop and ensuring its process tree is cleaned up when the daemon exits or is forcibly terminated. Headed and externally connected browsers retain their existing desktop behavior (#1498, #1820)\n\n---\n\n## v0.37.0\n\n<p className=\"text-[#888] text-sm\">September 7, 2026</p>\n\n### New Features\n\n- Added **higher-quality video recording**: `record start` and `record restart` now capture the current active page at 30 fps by default, support `--fps 1-60`, use `Page.startScreencast` for smoother motion, and preserve wall-clock timing. WebM and MP4 output are documented, and `doctor` reports the ffmpeg recording dependencies (#1763, #1776, #1778)\n- Added **WebMCP availability output** so navigation responses advertise when a page exposes allowed WebMCP tools, including availability metadata for CLI, JSON, and MCP clients (#1760)\n- Added **session setup inheritance for new tabs**. Tabs opened with `tab new` or through page clicks now inherit the active session's headers, credentials, user agent, locale, timezone, geolocation, offline mode, routes, color scheme, and init scripts before their first navigation (#1777)\n\n### Bug Fixes\n\n- Fixed **recording startup validation** so missing ffmpeg, extensionless output paths, and invalid recording options fail before browser or recording state changes. Failed replacements preserve the active take, and ffmpeg errors now include useful diagnostics (#1778)\n- Fixed **recording navigation state** so URL navigation during recording clears stale element refs, frame scope, and page WebMCP state like normal navigation (#1776)\n\n---\n\n## v0.36.0\n\n<p className=\"text-[#888] text-sm\">September 1, 2026</p>\n\n### New Features\n\n- Added experimental **WebMCP support** for discovering and invoking tools provided by the current page, including frame-aware tool selection, detached results, cancellation, bounded metadata and output handling, and an opt-in MCP tool profile. WebMCP is enabled by default for locally managed Chrome and can be disabled with `--no-webmcp` or `AGENT_BROWSER_NO_WEBMCP`.\n- Added a **WebMCP generation skill** that helps agents expose existing page workflows as validated page tools while recording safety constraints, deterministic checks, and fallback behavior.\n\n### Improvements\n\n- Updated the **eve integration** to 0.47.3 and raised its compatibility floor to 0.39.1.\n- Updated **brace-expansion dependency resolutions** across the project lockfiles.\n\n### Bug Fixes\n\n- Removed the obsolete **Lightpanda session timeout** argument so launches use the current supported server options.\n\n---\n\n## v0.35.2\n\n<p className=\"text-[#888] text-sm\">August 31, 2026</p>\n\n### Security\n\n- Hardened **dashboard origin validation and reverse-proxy access** with same-origin provenance enforcement that defends against DNS rebinding, form/header smuggling, and cross-origin requests. Reverse-proxied origins now require exact HTTPS allowlisting and generated token authentication, while tokenless IPv4 and IPv6 loopback access remains supported. Dashboard options are validated strictly, and CLI and MCP lifecycle behavior is aligned (#1738)\n\n### Bug Fixes\n\n- Fixed **root remote CDP WebSocket URLs with query strings** to insert the required slash before the query while preserving the encoded query (#1735)\n\n---\n\n## v0.35.1\n\n<p className=\"text-[#888] text-sm\">August 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows ARM64 launcher selection** to prefer a native ARM64 executable when present and fall back to the published x64 executable through Windows emulation when it is not (#1725)\n- Fixed **stream URL tracking** to emit active main-frame URL updates for full-document, History API, and fragment navigation, while rebinding correctly after active-tab changes and ignoring child-frame or background-tab navigation (#1682)\n- Fixed **snapshot diff element references** by resetting ref numbering for each diff, invalidating refs across URL navigations, and preserving the previous refs when a diff fails (#1719)\n\n### Improvements\n\n- Updated **Rust dependencies** to `rustls-webpki` 0.103.13 and `quinn-proto` 0.11.17 (#1723, #1720)\n\n---\n\n## v0.35.0\n\n<p className=\"text-[#888] text-sm\">August 24, 2026</p>\n\n### New Features\n\n- Added **private proxy CA trust for locally launched Chromium on Linux**. Use `--ca-cert <path>`, `AGENT_BROWSER_CA_CERT`, or `caCert` in config and MCP to import a PEM bundle or DER certificate into an isolated NSS trust store without disabling hostname, validity, or unrelated-authority verification. The effective CA persists across commands in a running session, equivalent certificate content reuses Chromium, and `--no-ca-cert` explicitly clears retained trust. Unsupported launch modes and conflicting CA options return actionable errors (#1669)\n\n### Improvements\n\n- Added a bundled **protected Vercel deployments skill** that guides agents through short-lived Trusted Sources OIDC authentication, authorized automation bypasses, and explicit human handoffs for dashboard-only configuration (#1705)\n\n---\n\n## v0.34.0\n\n<p className=\"text-[#888] text-sm\">August 10, 2026</p>\n\n### New Features\n\n- Added **persistent session-to-tab binding for shared Chrome sessions**. Named sessions connected through `--cdp` or `--auto-connect` now remember their CDP target across commands and daemon restarts, and CDP target ids can be used directly as tab references. Start each session with `--pin-tab` to make the binding strict, so a tab closed externally returns a stable `tab_gone` error instead of silently adopting a neighboring tab. JSON output includes `data.targetId` and an optional sanitized `data.lastUrl`; batch exposes the same recovery data under `result` (#1589)\n\n### Improvements\n\n- Added a **Remote Agent Browser provider guide** covering Vercel authentication, disposable and stable sessions, custom VCR images, snapshots, and live-view URLs (#1648)\n\n### Bug Fixes\n\n- Fixed **parallel sessions sharing one Chrome hijacking each other's tabs**. Event-discovered targets no longer steal a pinned session's active tab, re-attach restores the persisted target instead of selecting index 0, and preliminary plus existing-daemon `--cdp` and `--auto-connect` paths preserve explicit pin enable and disable. Agent skill guidance now requires a named `--session` before the first command (#1589)\n- Fixed **`agent-browser doctor` hanging on Chrome version detection**. Windows reads the version from the executable resource table without spawning Chrome; other platforms bound the version subprocess with a deadline, kill, and reap so inherited output handles cannot block forever or leave an orphan browser (#1641)\n\n---\n\n## v0.33.2\n\n<p className=\"text-[#888] text-sm\">July 31, 2026</p>\n\n### New Features\n\n- Added **input priority and per-client delivery settings** to the stream server: each WebSocket connection now splits into a reader task and a writer loop, so clicks and keystrokes dispatch to the browser without queueing behind a frame write. Adds a per-client `{\"type\":\"config\",\"maxFps\":N}` cap (1 to 120, `0` uncapped) and opt-in ack pacing via `{\"type\":\"config\",\"pacing\":\"ack\"}` with `{\"type\":\"ack\",\"seq\":N}`, which keeps one frame in flight so a stalled client never drains a backlog. Both settings can also be declared on the connection URL (`?pacing=ack&maxFps=10`), the only way to cover the opening frame. Every frame now carries a monotonic `seq` (#1594)\n- Added **configurable stream encoding**: frames were hardcoded to jpeg quality 80 at the session viewport, so frame rate was the only bandwidth lever. `AGENT_BROWSER_STREAM_QUALITY`, `AGENT_BROWSER_STREAM_MAX_WIDTH` and `AGENT_BROWSER_STREAM_MAX_HEIGHT` are read once per daemon and cut bytes without dropping frames: on a busy page at 1280x720, quality 20 takes a frame from 54 KB to 25 KB, and quality 20 at 640x360 takes it to 9 KB, frame rate unchanged in both. Width and height default to the session viewport, so a larger viewport is never downscaled unless both are set (#1626)\n\n### Behavior Changes\n\n- **Frame delivery is now latest-wins.** The stream server holds only the newest frame and reads it at send time, so frames produced while an earlier one is still being written are skipped. A client that assumed it received every frame from the WebSocket now receives fewer. Nothing in this repo consumes the stream that way, since `record` captures through CDP and the dashboard is a viewer, so this affects external consumers only (#1594)\n- **`metadata.timestamp` now carries a real value.** It was always 0, because CDP sends the capture time as a float in seconds and the code read it as an integer. It is now epoch milliseconds, so a client can measure how stale the frame it is drawing is. A client that treated 0 as unknown is unaffected (#1594)\n\n### Bug Fixes\n\n- Fixed **keyboard input over the stream**, which worked in none of the three shapes the docs publish: an absent `key`, `code`, or `text` reached CDP as an explicit null, which rejects the whole command, so every key release and every non-printable key was silently dropped, the dashboard's own payloads included (#1594)\n- Fixed **click latency behind mouse movement**: input dispatch awaited Chrome's reply before reading the next message, so a click sat one round trip behind every queued mouse move. After a 300-event sweep a click landed 2471ms late; it now lands in 6ms (#1627)\n- Fixed **`stream disable`** returning while a slow client's input reader was still running (#1594)\n\n---\n\n## v0.33.1\n\n<p className=\"text-[#888] text-sm\">July 28, 2026</p>\n\n### Behavior Changes\n\n- The daemon now ships a **default idle timeout of 1 hour**: after an hour with no commands or dashboard input it saves configured restore state, closes the browser, and exits, so integrations that die without calling `close` no longer leak the daemon and its Chrome tree indefinitely. Sessions without `--restore` or another restore key discard transient browser state and open tabs when they shut down. Set `AGENT_BROWSER_IDLE_TIMEOUT_MS=0` to restore the old always-persist behavior, or any other value to tune it. Dashboard mouse, keyboard, and touch input reset the timer. The default never closes headed browsers, including Safari and iOS WebDriver sessions, or user-attached browsers that may be in direct human use. Provider-owned cloud browsers remain eligible for cleanup, and an explicitly configured timeout applies to all browsers, as before (#1605)\n\n### Bug Fixes\n\n- Fixed **tab recovery and selection** to avoid daemon hangs on Memory Saver-discarded tabs by selecting a live renderer on CDP connect, reviving tabs on switch or after close, treating dialog-blocked tabs as live, preserving refs on rejected operations, and surfacing recovery state across CLI, JSON, and MCP output (#1543)\n- Fixed **a11y selector errors** to report invalid CSS selectors cleanly instead of exposing raw browser evaluation stack traces in text and JSON output (#1604)\n\n---\n\n## v0.33.0\n\n<p className=\"text-[#888] text-sm\">July 23, 2026</p>\n\n### New Features\n\n- Added **axe-core accessibility audits** with `agent-browser a11y [url]`, WCAG tag filtering, selector scoping, iframe-aware text and JSON results, an embedded offline and CSP-safe audit engine, and a matching MCP tool (#1596)\n\n---\n\n## v0.32.4\n\n<p className=\"text-[#888] text-sm\">July 22, 2026</p>\n\n### Bug Fixes\n\n- Fixed **find role** to match implicit ARIA roles and browser-computed accessible names through the accessibility tree, so semantic elements like `<h2>` (heading) and `<ul>` (list) resolve, with case-insensitive substring name matching that mirrors Playwright's `getByRole` (#1552)\n- Fixed **element-not-found errors** to preserve the locator detail (selector, role, name, or index) instead of flattening every miss into one generic message, and aligned the advertised `find` actions with the set the dispatcher actually accepts (#1553)\n\n---\n\n## v0.32.3\n\n<p className=\"text-[#888] text-sm\">July 19, 2026</p>\n\n### New Features\n\n- Added **HAR response body capture** with text bodies embedded by default and configurable `all`, `text`, and `none` content modes across the CLI and MCP surfaces (#1578)\n- Added a **derive-client skill** for recording browser traffic and generating reusable API clients from HAR request and response data (#1578)\n\n---\n\n## v0.32.2\n\n<p className=\"text-[#888] text-sm\">July 17, 2026</p>\n\n### Improvements\n\n- Updated **eve extension packaging** for eve 0.25.1, adopting the new source and dist extension manifest format, updating the eve example to stable AI SDK releases, and keeping extension tests aligned with eve's scoped config registry (#1570)\n\n---\n\n## v0.32.1\n\n<p className=\"text-[#888] text-sm\">July 16, 2026</p>\n\n### Improvements\n\n- Widened **eve compatibility** for `@agent-browser/eve` to accept eve 0.23 and future major releases without peer-resolution warnings (#1563)\n\n### Documentation\n\n- Standardized **eve branding** to use lowercase styling across the docs, examples, package readmes, and release notes (#1557)\n\n---\n\n## v0.32.0\n\n<p className=\"text-[#888] text-sm\">July 15, 2026</p>\n\n### New Features\n\n- **eve extension** - Added `@agent-browser/eve`, an eve extension that mounts the agent-browser tool set with namespaced browser tools, sandbox bootstrap helpers, docs, examples, CI, and release packaging (#1547)\n\n### Security\n\n- Hardened **domain allowlists** by blocking WebRTC bypasses, applying network containment across launch modes, workers, popups, restored state, and reused daemon sessions, rejecting unsafe startup arguments, and adding Chrome regression coverage (#1546)\n\n### Bug Fixes\n\n- Fixed **completed-page waits** so load and DOMContentLoaded waits resolve immediately when the current document is already ready, with structured eve wait timeout handling and focused coverage (#1554)\n\n---\n\n## v0.31.2\n\n<p className=\"text-[#888] text-sm\">July 13, 2026</p>\n\n### New Features\n\n- **WebGPU launch preset** - Added `--webgpu` across the CLI, config, environment, and MCP surfaces, with hardware backends on macOS and Windows, software Vulkan on Linux, automatic Xvfb for displayless headed sessions, and a `doctor --webgpu` render and screenshot probe (#1529)\n\n### Improvements\n\n- Added periodic **restore-state autosaves** while the browser remains open, preserving recent state after a browser window is closed by hand and capturing background page changes while honoring the restore save policy. The interval is configurable with `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS` (#1509)\n\n---\n\n## v0.31.1\n\n<p className=\"text-[#888] text-sm\">June 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed the **React renderer** so it picks the react-dom renderer instead of hardcoding renderer id 1, which prevented reading an empty tree on Next.js 16.3 Turbopack (#1491)\n\n---\n\n## v0.31.0\n\n<p className=\"text-[#888] text-sm\">June 25, 2026</p>\n\n### New Features\n\n- **Restore workflow** - Added `--restore`, `--restore-save`, restore validation flags, worktree-scoped `session id`, `session info`, and `--namespace` so agent runs can use stable, isolated, automatically restored browser state without managing state files by hand (#1486)\n\n### Improvements\n\n- Hardened **session lifecycle handling** with explicit daemon and browser compatibility checks, lifecycle status output, MCP support for restore options, and safer auto-save behavior that avoids overwriting good state after a failed restore or failed validation (#1486)\n\n### Bug Fixes\n\n- Fixed **restore lifecycle edge cases** around switching restore keys with a live browser, daemon configuration startup races, launch mode validation, and clearing restore failures after an explicit state load (#1486)\n\n---\n\n## v0.30.1\n\n<p className=\"text-[#888] text-sm\">June 24, 2026</p>\n\n### Bug Fixes\n\n- Fixed **URL waits** so `wait --url` and `waitforurl` honor glob patterns such as `**/dashboard` against the full active URL (#1483)\n\n---\n\n## v0.30.0\n\n<p className=\"text-[#888] text-sm\">June 24, 2026</p>\n\n### New Features\n\n- **Read command** - Added `agent-browser read [url]` and the matching MCP tool for agent-readable text extraction. URL reads prefer Markdown, try `.md` and nearby `llms.txt` docs, support outlines, filters, raw and JSON output, headers, and domain/output safeguards; omitting the URL reads the rendered active tab DOM with current browser state (#1480)\n\n---\n\n## v0.29.1\n\n<p className=\"text-[#888] text-sm\">June 20, 2026</p>\n\n### Improvements\n\n- Defaulted **sandbox system dependency installs** so the eve and Vercel sandbox helpers install Chromium's required libraries unless explicitly disabled, making first-run sandbox setup simpler (#1469)\n\n---\n\n## v0.29.0\n\n<p className=\"text-[#888] text-sm\">June 20, 2026</p>\n\n### New Features\n\n- **Sandbox package** - Added `@agent-browser/sandbox` with shared, eve, and Vercel Sandbox helpers, example projects, and docs for running agent-browser in hosted sandbox environments (#1465)\n\n### Improvements\n\n- Updated **sandbox release flow** so the new package stays version-synced with the CLI release and publishes from the correct workspace path (#1465)\n- Reflowed **documentation prose** across the README, docs site, examples, and skills so Markdown and MDX wrap naturally in editors and renderers (#1466)\n\n---\n\n## v0.28.0\n\n<p className=\"text-[#888] text-sm\">June 16, 2026</p>\n\n### New Features\n\n- **MCP server** - Added `agent-browser mcp`, a stdio Model Context Protocol server with typed tools, paginated discovery, protocol negotiation, and startup tool profiles. The default `core` profile keeps context small, while `--tools all` exposes full CLI parity and composed profiles such as `core,network,react` are supported (#1454)\n- **Plugin system** - Added out-of-process plugin support over the `agent-browser.plugin.v1` stdio protocol, with `plugin add/list/show/run`, manifest discovery, npm and GitHub refs, credential providers, browser provider plugins, launch mutators, custom command capabilities, config and env registry support, and capability-scoped policy gates (#1452)\n\n### Infrastructure\n\n- Added **context footprint eval coverage** for CLI skills, MCP core, and MCP full-profile surfaces, plus MCP parity tests to keep tool behavior aligned with the CLI (#1454)\n\n---\n\n## v0.27.3\n\n<p className=\"text-[#888] text-sm\">June 12, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows ARM64 installs** by falling back to the Windows x64 binary during postinstall, avoiding failed downloads for a native ARM64 artifact that is not published (#1269)\n\n---\n\n## v0.27.2\n\n<p className=\"text-[#888] text-sm\">June 10, 2026</p>\n\n### Bug Fixes\n\n- Fixed **click reliability** by scrolling off-viewport elements into view before resolving coordinates, handling JavaScript dialogs promptly, recovering mouse state after dialog-opening clicks, and detecting click interception by overlays before dispatching input (#1432, #1434)\n- Fixed **frame-scoped selectors and waits** so CSS-selector actions and `wait` respect the selected iframe, including cross-process iframes, with translated click coordinates (#1432)\n- Fixed **wait timeout handling** so the documented 25s default is used, `--timeout` is honored across wait variants, and long waits receive an appropriate client read budget (#1432)\n- Fixed **agent-facing form commands** so `find label` matches `aria-label` and `aria-labelledby`, `select` errors when no option matches, and `type` parses `--clear` and `--delay` instead of typing them as text (#1432)\n\n### Improvements\n\n- Cut **warm CLI command latency** from about 150ms to about 1ms by removing the unconditional daemon settle sleep and retrying once when a stale daemon socket is discovered (#1432)\n- Extended **daemon respawn and retry** handling to batch commands so batches recover from a daemon exit after the initial liveness check (#1432)\n\n### Infrastructure\n\n- Pinned **GNU Linux release artifacts** to glibc 2.28 with zigbuild, added a release guard for newer GLIBC symbols, and aligned Docker release helpers with the pinned target (#1417)\n\n---\n\n## v0.27.1\n\n<p className=\"text-[#888] text-sm\">June 1, 2026</p>\n\n### Improvements\n\n- Improved **`vitals` command** output formatting for better readability (#1404)\n\n### Documentation\n\n- Surfaced agent-browser feature coverage in documentation (#1403)\n\n---\n\n## v0.27.0\n\n<p className=\"text-[#888] text-sm\">May 7, 2026</p>\n\n### New Features\n\n- **React introspection** - First-class React DevTools integration with new `react tree`, `react inspect <fiberId>`, `react renders start|stop`, and `react suspense` commands for full component-tree visibility, per-fiber props/hooks/state inspection, render profiling with mount/re-render counts and change details, and Suspense boundary classification with root-cause grouping and recommendations. React DevTools hook is vendored (MIT) and embedded in the binary with zero runtime dependencies (#1257)\n- **Web Vitals** - New `vitals [url]` command that reports Core Web Vitals (LCP, CLS, TTFB, FCP, INP) plus React hydration phases for any page (#1257)\n- **SPA navigation** - New `pushstate <url>` command for client-side SPA navigations without a full page load (#1257)\n- **Init scripts and feature flags** - New `--init-script <path>` flag (repeatable; env `AGENT_BROWSER_INIT_SCRIPTS`) to register scripts before first navigation, and `--enable <feature>` flag (repeatable; env `AGENT_BROWSER_ENABLE`) for built-in init scripts such as `react-devtools` (#1257)\n- **Network route resource type filter** - `network route` now accepts `--resource-type <csv>` to filter intercepted requests by CDP resource type (#1257)\n- **cURL cookie import** - `cookies set --curl <file>` auto-detects JSON, cURL, and Cookie-header formats for bulk cookie import (#1257)\n- **Dashboard proxy support** - The observability dashboard now works from proxied origins via a same-origin proxy, enabling deployment behind reverse proxies and path-based routing (#1111)\n\n### Bug Fixes\n\n- Fixed **`doctor` command** generating duplicate check ids when called multiple times in the same process (#1330)\n\n### Infrastructure\n\n- Switched npm publishing to **trusted publishing** via GitHub Actions OIDC, removing the need for manually managed npm tokens (#1273)\n\n---\n\n## v0.26.0\n\n<p className=\"text-[#888] text-sm\">April 16, 2026</p>\n\n### New Features\n\n- **`doctor` command** - Added `agent-browser doctor` for one-shot diagnosis of an install. Checks environment, Chrome, running daemons, config files, security, providers, and network connectivity; auto-cleans stale daemon sidecar files on every run; and performs a live headless launch test. Supports `--offline` to skip network probes, `--quick` to skip the launch test, `--fix` for opt-in repairs (install missing Chrome, close version-mismatched daemons, prune expired state files), and `--json` for structured output (#1254)\n- **Stable tab ids and labels** - Tabs now have stable string ids like `t1`, `t2`, `t3` that don't shift when other tabs close or popups appear. Tabs can be created with a memorable label via `tab new --label <name> [<url>]`, and labels are interchangeable with `t<N>` ids everywhere a tab ref is accepted (`tab <id|label>`, `tab close <id|label>`). Bare-integer input is rejected with a teaching error so agents can't mistake stable handles for positional indices (#892, #1249, #1250)\n- **`core` skill** - Renamed the built-in `agent-browser` skill to `core` and replaced its ~40-line discovery stub with a ~420-line usage guide covering the core snapshot-ref-act loop, reading, interacting, waiting, common workflows, troubleshooting, and global flags. `agent-browser skills get core` now returns content agents can use directly; `--full` adds references and templates. Added a `hidden:` frontmatter flag so the original `agent-browser` stub stays reachable for `npx skills add` discovery without polluting `skills list` (#1253)\n- **JSON Schema for config files** - Added `agent-browser.schema.json` describing every config option with types and descriptions, enabling IDE autocomplete and validation when referenced via `$schema` in `agent-browser.json` or `~/.agent-browser/config.json`. The schema is served from the docs site at `https://agent-browser.dev/schema.json` (#1242, #1248)\n\n### Bug Fixes\n\n- Fixed **`--state` / `AGENT_BROWSER_STATE`** not actually loading saved browser state (cookies and localStorage) at launch. The flag had been fully plumbed through parsing, env propagation, and validation since the native Rust rewrite, but the load step was never wired up. Storage state now loads after launch across all four paths: explicit launch, auto-connect, provider, and local Chrome (#1241)\n\n### Documentation\n\n- `--help` output now shows the **skills** section first so agents discover `skills get core` (the canonical usage guide) before the core command list (#1251)\n\n---\n\n## v0.25.5\n\n<p className=\"text-[#888] text-sm\">April 16, 2026</p>\n\n### Bug Fixes\n\n- Fixed **`--auto-connect` CDP discovery** preferring HTTP endpoint discovery over the DevToolsActivePort websocket path, which could fail on some setups. The CLI now reads the websocket path from DevToolsActivePort first and only falls back to HTTP discovery (#1218)\n- Fixed **recording context viewport** not inheriting the active viewport dimensions, causing recordings to use default resolution instead of the configured viewport (#1208)\n- Fixed **`get box` and `get styles`** printing no data in text mode (#1231, #1233)\n- Fixed **active page changing** when closing or removing earlier tabs. The previously focused page is now preserved correctly (#1220)\n\n---\n\n## v0.25.4\n\n<p className=\"text-[#888] text-sm\">April 12, 2026</p>\n\n### New Features\n\n- **`skills` command** - Added `agent-browser skills` command for discovering and installing agent skills, with built-in evaluation support for testing skills against live browser sessions (#1225, #1227)\n\n### Bug Fixes\n\n- Fixed **custom viewport dimensions** not being used in streaming frame metadata and image resolution (#1033)\n- Fixed **`--ignore-https-errors`** not being re-applied to recording contexts, causing TLS errors during screen recordings (#1178)\n- Fixed **duplicate option numbering** in the auth skill documentation (#1161)\n\n### Documentation\n\n- The docs site header now **dynamically fetches** the GitHub star count (#1202)\n\n---\n\n## v0.25.3\n\n<p className=\"text-[#888] text-sm\">April 7, 2026</p>\n\n### Bug Fixes\n\n- Fixed **hidden radio/checkbox inputs missing from snapshot refs** when a `<label>` wraps a `display:none` `<input type=\"radio\">` or `<input type=\"checkbox\">`. Chrome excludes these inputs from the accessibility tree entirely, making it impossible for AI agents to identify radio buttons and checkboxes via refs. Hidden inputs inside elements are now detected during cursor-interactive scanning and their parent nodes are promoted to the correct role with proper name and checked state (#1085)\n\n### Documentation\n\n- Added **clickable heading anchors** to the docs site, making it easy to link directly to any section (#1175)\n\n---\n\n## v0.25.2\n\n<p className=\"text-[#888] text-sm\">April 6, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Chrome being killed after ~10s idle on Linux** caused by `PR_SET_PDEATHSIG` tracking the blocking thread that spawned Chrome rather than the daemon process. When Tokio reaped the idle thread, the kernel sent SIGKILL to Chrome even though the daemon was still alive (#1157, #1173)\n\n---\n\n## v0.25.1\n\n<p className=\"text-[#888] text-sm\">April 6, 2026</p>\n\n### Improvements\n\n- **Embedded dashboard** - The observability dashboard is now bundled directly into the CLI binary using `rust-embed`, eliminating the need for `dashboard install`. The dashboard is available immediately after installing agent-browser (#1169)\n\n---\n\n## v0.25.0\n\n<p className=\"text-[#888] text-sm\">April 6, 2026</p>\n\n### New Features\n\n- **AI chat command** - Added `chat` command for AI-powered browser automation. Supports single-shot mode (`chat \"open google.com\"`) and an interactive REPL. The AI agent can execute any agent-browser command via tool calls. Requires `AI_GATEWAY_API_KEY`. Configure the model with `--model` or `AI_GATEWAY_MODEL` (#1160, #1163)\n- **Dashboard AI chat** - The observability dashboard now includes a built-in AI chat interface for conversational browser control alongside live session views (#1160, #1163)\n- **`snapshot --urls`** - New `-u`/`--urls` flag to include href URLs for link elements in snapshot output, giving agents direct access to link targets without additional queries (#1160)\n- **Batch argument mode** - The `batch` command now accepts commands as inline arguments in addition to reading from stdin, simplifying single-invocation multi-command workflows (#1160)\n\n### Bug Fixes\n\n- Fixed **`getByRole`** matching wrong elements (e.g. `<link>` stylesheet elements instead of `<a>` anchors) by rewriting the implementation to use the CDP accessibility tree with ref-based element resolution instead of CSS selectors (#1145)\n- Fixed **`upload` command** not supporting accessibility tree refs (`@eN`) for file upload element selection (#1156)\n- Fixed **`AGENT_BROWSER_DEFAULT_TIMEOUT`** not being applied to `wait` commands. The environment variable now propagates to all wait variants (`wait`, `wait --url`, `wait --text`, `wait --load`, `wait --fn`, `wait --download`) (#1153)\n- Fixed **dashboard download** error handling with improved retry logic for more reliable dashboard installation (#1154)\n\n---\n\n## v0.24.1\n\n<p className=\"text-[#888] text-sm\">April 4, 2026</p>\n\n### New Features\n\n- **Chrome profile login state reuse** - `--profile <name>` now resolves Chrome profile names (e.g. `Default`, `Profile 1`) and copies the profile to a temp directory to reuse login state, cookies, and extensions without modifying the original. Added `profiles` command to list available Chrome profiles with `--json` support (#1131)\n\n### Bug Fixes\n\n- Fixed **`--ignore-https-errors`** not passing `--ignore-certificate-errors` as a Chrome launch flag, causing TLS errors like `ERR_SSL_PROTOCOL_ERROR` to be rejected at the network layer before CDP could intervene (#1132)\n- Fixed **orphaned Chrome processes** on daemon exit by spawning Chrome in its own process group and killing the entire group on shutdown. On Linux, `PR_SET_PDEATHSIG` ensures Chrome is killed even if the daemon is OOM-killed (#1137)\n- Fixed **CDP attach hang on Chrome 144+** when connecting to real browser sessions. Targets paused waiting for the debugger after attach are now resumed with `Runtime.runIfWaitingForDebugger` (#1133)\n- Fixed **stale daemon after upgrade** silently reusing the old daemon process with broken CDP behavior. The daemon now writes a `.version` sidecar file and auto-restarts on version mismatch (#1134)\n- Fixed **stale daemon/socket recovery** where `close --all` failed to clean up zombie daemons and stale files. Unreachable daemons are now force-killed and orphaned socket/pid files are removed (#1136)\n- Fixed **idle timeout** not being respected because the sleep future was recreated on every select loop iteration, preventing the deadline from being reached (#1110)\n- Fixed **browser not relaunching** when launch options change (e.g. adding extensions to `config.json`) between consecutive launch commands (#996)\n- Fixed **`auto_launch()`** not honouring `AGENT_BROWSER_PROVIDER` for cloud providers, causing non-launch commands to fall back to local Chrome instead of connecting via the provider API (#1126)\n- Fixed **HAR capture missing API requests** under heavy traffic by increasing the CDP broadcast buffer from 256 to 4096 events, reducing the drain interval from 500ms to 100ms, and enabling network tracking in cross-origin iframes (#1135)\n\n---\n\n## v0.24.0\n\n<p className=\"text-[#888] text-sm\">April 2, 2026</p>\n\n### New Features\n\n- **AWS Bedrock AgentCore provider** - Added AWS Bedrock AgentCore as a cloud browser provider. Connect with `--provider agentcore` or `AGENT_BROWSER_PROVIDER=agentcore`. Uses lightweight manual SigV4 signing for authentication with support for the full AWS credential provider chain (environment variables, AWS CLI, SSO, IAM roles). Configure with `AGENTCORE_REGION`, `AGENTCORE_PROFILE_ID`, and `AGENTCORE_BROWSER_ID` environment variables. Returns session ID and Live View URL in the launch response (#397)\n\n### Documentation\n\n- Added AgentCore provider page to docs site, README options table, SKILL.md, and dashboard provider icons (#1120)\n\n---\n\n## v0.23.4\n\n<p className=\"text-[#888] text-sm\">March 31, 2026</p>\n\n### Bug Fixes\n\n- Fixed **daemon hang on Linux** caused by a `waitpid(-1)` race condition in the SIGCHLD handler that stole exit statuses from Rust's `Child` handles, leaving the daemon in a broken state. Replaced the global signal handler with targeted crash detection via the existing drain interval (#1098)\n\n---\n\n## v0.23.3\n\n<p className=\"text-[#888] text-sm\">March 30, 2026</p>\n\n### Bug Fixes\n\n- Fixed **drag and drop** not working because `mouseMoved` events during the drag omitted the `buttons` bitmask, causing the browser to see `event.buttons === 0` and never fire `dragstart`/`dragover`/`drop` (#1087)\n\n---\n\n## v0.23.2\n\n<p className=\"text-[#888] text-sm\">March 30, 2026</p>\n\n### New Features\n\n- **Dashboard session creation** - Sessions can now be created directly from the dashboard UI. A new session dialog provides a unified selector grid for local engines (Chrome, Lightpanda) and cloud providers (Browserbase, Browserless, Browser Use, Kernel) with async creation, loading state, and error display (#1092)\n- **Dashboard provider icons** - The session sidebar now shows the provider or engine icon for each session, making it easy to identify which backend a session is using (#1092)\n\n### Bug Fixes\n\n- Fixed **Browser Use** provider using an intermediate API call instead of connecting directly via WSS, which caused connection failures (#1092)\n- Fixed **Browserbase** provider not sending an explicit JSON body and `Content-Type` header, causing session creation to fail (#1092)\n- Fixed **provider navigation** hanging because `wait_for_lifecycle` waited for page load events that remote providers may not emit. Navigation with `--provider` now automatically sets `waitUntil=none` (#1092)\n- Fixed **remote CDP connections** timing out by increasing the CDP connect timeout from 10s to 25s for cloud providers (#1092)\n- Fixed **zombie daemon processes** not being cleaned up when a provider connection fails during session creation from the dashboard (#1092)\n\n---\n\n## v0.23.1\n\n<p className=\"text-[#888] text-sm\">March 30, 2026</p>\n\n### New Features\n\n- **Auto-dismissal for alert and beforeunload dialogs** - JavaScript `alert()` and `beforeunload` dialogs are now automatically accepted to prevent the agent from blocking indefinitely. `confirm` and `prompt` dialogs still require explicit `dialog accept/dismiss` commands. Disable with `--no-auto-dialog` flag or `AGENT_BROWSER_NO_AUTO_DIALOG` environment variable (#1075)\n- **Puppeteer browser cache fallback** - Chrome discovery now searches `~/.cache/puppeteer/chrome/` (or `PUPPETEER_CACHE_DIR`) for Chrome binaries, so users with an existing Puppeteer installation can use agent-browser without a separate install step (#1088)\n- **Console output improvements** - `console.log` of objects now shows the actual object preview (e.g. `{userId: \"abc\", count: 42}`) instead of `\"Object\"`. JSON output includes a raw `args` array for programmatic access (#1040)\n\n### Bug Fixes\n\n- Fixed **same-document navigation** (e.g. SPA hash routing) hanging forever because `wait_for_lifecycle` waited for a `Page.loadEventFired` that never fires on same-document navigations (#1059)\n- Fixed **save_state** only capturing cookies and localStorage for the current origin, silently dropping cross-domain data (e.g. SSO/CAS auth cookies). Now uses `Network.getAllCookies` and collects localStorage from all visited origins (#1064)\n- Fixed **externally opened tabs** not appearing in `tab list` when using `--cdp` mode. Tabs opened by the user or another CDP client are now detected and tracked (#1042)\n- Fixed **dashboard server** not picking up installed files without a restart. `dashboard install` now takes effect immediately on a running server (#1066)\n- Fixed **Windows Chrome extraction** failing because zip path normalization used forward slashes while the extraction code expected backslashes (#1088)\n\n---\n\n## v0.23.0\n\n<p className=\"text-[#888] text-sm\">March 27, 2026</p>\n\n### New Features\n\n- **Observability dashboard** - Added a local web UI (`dashboard`) that shows live browser viewports, command activity feeds, console output, network requests, storage, and extensions for all sessions. Manage it with `dashboard start`, `dashboard stop`, and `dashboard install`. The dashboard runs as a standalone background process and all sessions stream to it automatically (#1034)\n\n```bash\nagent-browser dashboard install\nagent-browser dashboard start\nagent-browser open example.com # session appears in dashboard\nagent-browser dashboard stop\n```\n\n- **Runtime stream management** - Added `stream enable`, `stream disable`, and `stream status` commands to control WebSocket streaming at runtime. Streaming is now always enabled by default; `AGENT_BROWSER_STREAM_PORT` overrides the port instead of toggling the feature (#951)\n- **Close all sessions** - Added `close --all` flag to close every active browser session at once\n\n### Bug Fixes\n\n- Fixed **Lightpanda engine** compatibility (#1050)\n- Fixed **Windows daemon TCP bind** failing when Hyper-V reserves the port by falling back to an OS-assigned port and writing it to a `.port` file (#1041)\n- Fixed **Windows dashboard relay** using Unix socket instead of TCP (#1038)\n- Fixed **radio/checkbox elements** being dropped from compact snapshot tree because the `ref=` check required a leading `[` that those elements lack (#1008)\n\n---\n\n## v0.22.3\n\n<p className=\"text-[#888] text-sm\">March 25, 2026</p>\n\n### Bug Fixes\n\n- **Re-apply download behavior on recording context** - Fixed an issue where downloads were silently dropped in recording contexts because `Browser.setDownloadBehavior` set at launch only applied to the default context. The download behavior is now re-applied when a new recording context is created (#1019)\n- **Reap zombie Chrome process and fast-detect crash for auto-restart** - Added a non-blocking process-exit check before attempting CDP connection checks. This prevents a 3-second CDP timeout when Chrome has already crashed or exited, enabling faster detection and auto-restart of the browser (#1023)\n- **Route keyboard `type` through text input** - Fixed keyboard `type` subaction to correctly route through the text input handler, and added support for an `insertText` subaction using `Input.insertText` (#1014)\n- **Handle `--clear` flag in `console` command** - Fixed the `console` command to accept and process a `clear` parameter, allowing console event history to be cleared (#1015)\n\n---\n\n## v0.22.2\n\n<p className=\"text-[#888] text-sm\">March 24, 2026</p>\n\n### New Features\n\n- **Dialog status command** - Added `dialog status` command to check whether a JavaScript dialog is currently open (#999)\n- **Dialog warning field** - Command responses now include a `warning` field when a JavaScript dialog is pending, indicating the dialog type and message (#999)\n\n### Improvements\n\n- **Standard proxy environment variables** - The proxy setting now automatically falls back to standard environment variables (`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and their lowercase variants), with `NO_PROXY`/`no_proxy` respected for bypass rules (#1000)\n- **Font packages for `--with-deps`** - Installing with `--with-deps` now includes CJK and emoji font packages on Linux (Debian, RPM, and yum-based distros) to prevent missing glyphs when rendering international content (#1002)\n\n### Bug Fixes\n\n- Fixed `state show` always failing with \"Missing 'path' parameter\" due to a mismatched JSON field name (#994)\n- Fixed `console` command returning only `Done` due to a JSON field name mismatch in the response (#986)\n- Fixed browser-domain CDP events being dropped during downloads due to a `sessionId` mismatch (#998)\n- Fixed proxy authentication by handling credentials via the CDP `Fetch.authRequired` event rather than passing them inline (#1000)\n\n---\n\n## v0.22.1\n\n<p className=\"text-[#888] text-sm\">March 24, 2026</p>\n\n### Bug Fixes\n\n- Fixed **modifier key chords** (e.g. `Control+a`, `Shift+Enter`, `Control+Shift+a`) not being handled correctly when using `press`. Modifier keys are now parsed and forwarded as CDP modifier bitmasks rather than treated as part of the key name (#980)\n- Fixed **query parameters being dropped** from `--cdp` HTTP URLs (e.g. `http://host:9222?mode=Hello`). Query strings are now preserved and forwarded to the remote CDP endpoint (#982)\n\n---\n\n## v0.22.0\n\n<p className=\"text-[#888] text-sm\">March 23, 2026</p>\n\n### New Features\n\n- **Cross-origin iframe support** - Added support for snapshots and interactions within cross-origin iframes via `Target.setAutoAttach` (#949)\n- **Network request detail and filtering** - Added `network request <requestId>` command to view full request/response detail, and new filtering options for `network requests` including `--type` (e.g. `xhr,fetch`), `--method` (e.g. `POST`), and `--status` (e.g. `2xx`, `400-499`) (#935)\n\n```bash\nagent-browser network requests --type xhr,fetch --method POST\nagent-browser network request <requestId>\n```\n\n### Improvements\n\n- **Snapshot usability** - Reduced AI cognitive load by filtering semantic noise from snapshot output; cursor-interactive elements are now included by default, making the `-C` flag unnecessary (#968)\n- **Upgrade command** - Improved robustness of installation method detection in the upgrade command (#960)\n- **Target tracking** - Enhanced target tracking and page information handling for more reliable browser session management (#969)\n\n### Bug Fixes\n\n- Fixed **viewport dimensions** being reported incorrectly in streaming status messages and screencast (#952)\n- Fixed **`find` command** flags such as `--exact` and `--name` leaking into fill values when used with fill actions (#955)\n- Fixed **state commands** incorrectly starting the daemon when no `session_name` is provided (#677, #964)\n- Fixed **auto-connect** triggering when the daemon is already running, preventing duplicate connections (#971)\n- Fixed **Enter key press** not working by adding a text field to `keyDown` events (#972)\n- Fixed **download command** to properly handle absolute paths and correctly click target elements (#970)\n\n### Breaking Changes\n\n- The `-C` / `--cursor` flag for `snapshot` is deprecated; cursor-interactive elements are now included by default and the flag has no additional effect (#968)\n\n---\n\n## v0.21.4\n\n<p className=\"text-[#888] text-sm\">March 20, 2026</p>\n\n### Bug Fixes\n\n- **Auth login readiness** - `agent-browser auth login` now navigates with `load`, waits for usable login form selectors, and uses staged username detection (targeted email/username selectors first, then broad text-input fallback). This reduces SPA timing failures, avoids false matches on unrelated text fields, and prevents `networkidle` hangs on pages with continuous background requests.\n\n---\n\n## v0.21.3\n\n<p className=\"text-[#888] text-sm\">March 20, 2026</p>\n\n### Bug Fixes\n\n- **WebSocket keepalive for remote browsers** - Added WebSocket Ping frames and TCP `SO_KEEPALIVE` to prevent CDP connections from being silently dropped by intermediate proxies during idle periods (#936)\n- **XPath selector support** - Fixed element resolution to correctly handle the `xpath=` selector prefix (#908)\n\n### Performance\n\n- **Fast-path for identical snapshots** - Short-circuits the Myers diff algorithm when comparing a snapshot to itself, avoiding unnecessary computation in retry and loop workloads (#922)\n\n---\n\n## v0.21.2\n\n<p className=\"text-[#888] text-sm\">March 18, 2026</p>\n\n### Bug Fixes\n\n- **Deduplicate text content in snapshots** - Fixed an issue where duplicate text content appeared in page snapshots (#909)\n- **Native mouse drag state** - Fixed incorrect raw native mouse drag state not being properly tracked across `down`, `move`, and `up` events (#872)\n- **Chrome headless launch failures** - Fixed browser launch failures caused by the `--enable-unsafe-swiftshader` flag in Chrome headless mode (#915)\n- **Origin-scoped `--headers` persistence** - Restored correct persistence of origin-scoped headers set via `--headers` across navigation commands (#894)\n- **Relative URLs in WebSocket domain filter** - Fixed handling of relative URLs in the WebSocket domain filter script (#624)\n\n---\n\n## v0.21.1\n\n<p className=\"text-[#888] text-sm\">March 18, 2026</p>\n\n### New Features\n\n- **HAR 1.2 network capture** - Added commands to capture and export network traffic in HAR 1.2 format, including accurate request/response timing, headers, body sizes, and resource types sourced from Chrome DevTools Protocol events (#864)\n- **Built-in `upgrade` command** - Added `agent-browser upgrade` to self-update the CLI; automatically detects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command (#898)\n\n```bash\nagent-browser upgrade\n```\n\n---\n\n## v0.21.0\n\n<p className=\"text-[#888] text-sm\">March 17, 2026</p>\n\n### New Commands\n\n- **`batch`** -- Execute multiple commands in a single invocation. Pipe a JSON array of string arrays to stdin and receive results sequentially. Supports `--bail` to stop on first error and `--json` for structured output.\n\n```bash\necho '[[\"open\",\"example.com\"],[\"snapshot\"]]' | agent-browser batch --json\n```\n\n- **`network har start/stop`** -- Capture and export network traffic in HAR 1.2 format.\n\n```bash\nagent-browser network har start\n# ... interact with the page ...\nagent-browser network har stop ./trace.har\n```\n\n### New Features\n\n- **iframe support** -- CLI interactions and snapshots now traverse into iframe content, enabling automation of cross-frame pages.\n- **`--idle-timeout` flag** -- Automatically shut down the daemon after a period of inactivity. Accepts human-friendly formats such as `10s`, `3m`, `1h`, or raw milliseconds. Also available as `AGENT_BROWSER_IDLE_TIMEOUT_MS`.\n- **Cursor-interactive elements in snapshots** -- Cursor-interactive elements are now embedded directly into the snapshot tree for richer context.\n- **Brave Browser auto-connect** -- Auto-discovery of Brave Browser for CDP connections on macOS, Linux, and Windows.\n- **linux-musl (Alpine) builds** -- Pre-built binaries for linux-musl targeting both x64 and arm64, enabling native support for Alpine Linux and other musl-based distributions.\n- **WebSocket fallback for CDP discovery** -- When HTTP-based CDP endpoint discovery fails, the CLI now falls back to a WebSocket connection automatically.\n\n### Improvements\n\n- **`--full`/`-f` refactored to command-level flag** -- Moved from a global flag to a per-command flag for clearer scoping.\n- **Enhanced Chrome launch** -- Added `--user-data-dir` support and configurable launch timeout for more reliable browser startup. Chrome now retries launching up to 3 times on transient startup failures.\n- **Consecutive `--auto-connect` commands** -- Multiple consecutive auto-connect commands no longer require a full browser relaunch; external connections are correctly identified and reused.\n- **Batched CDP calls** -- `snapshot -C` and `screenshot --annotate` now batch CDP calls instead of issuing sequential round-trips per element, preventing timeouts on high-latency WSS connections.\n\n### Bug Fixes\n\n- Fixed remote CDP (WSS) snapshot and screenshot hangs by removing WebSocket message/frame size limits\n- Fixed Material Design `check`/`uncheck` falling back to JS `.click()` for overlay-based controls\n- Fixed punctuation characters being dropped in the `type` command\n- Fixed WebSocket streaming by keeping the StreamServer instance alive\n- Filtered internal Chrome targets (`chrome://`, `devtools://`) from auto-connect discovery\n- Fixed `snapshot --selector` scoping to the matched element's subtree\n- Fixed network idle detection returning prematurely for cached pages\n- Fixed daemon panic on broken stderr pipe during Chrome launch\n- Fixed broadcast channel lag being treated as stream closure\n- Fixed daemon liveness detection for PID namespace isolation (e.g. `unshare`)\n- Fixed Ubuntu dependency install accidentally removing system packages\n\n---\n\n## v0.20.0\n\n<p className=\"text-[#888] text-sm\">March 13, 2026</p>\n\n### Full Native Rust\n\nagent-browser is now 100% native Rust. The Node.js/Playwright daemon has been completely removed -- no Node.js runtime or Playwright dependency is required to run the daemon. The Rust native daemon is now the only implementation.\n\n<table>\n <thead>\n <tr>\n <th>Metric</th>\n <th>Node.js</th>\n <th>Rust</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Cold start</td>\n <td>1002ms</td>\n <td>617ms</td>\n <td>1.6x faster</td>\n </tr>\n <tr>\n <td>Daemon memory</td>\n <td>143 MB</td>\n <td>8 MB</td>\n <td>18x less</td>\n </tr>\n <tr>\n <td>Install size</td>\n <td>710 MB</td>\n <td>7 MB</td>\n <td>99x smaller</td>\n </tr>\n </tbody>\n</table>\n\n```bash\nnpm install -g agent-browser # 7 MB install\nagent-browser install # download Chrome\nagent-browser open example.com\nagent-browser snapshot\n```\n\n### Improvements\n\n- **Benchmarks** -- Added benchmark suite for comparing native vs Node.js daemon performance across cold start, warm start, memory, and install size.\n- **Chromium installer hardened** -- Fixed zip path traversal vulnerability in Chrome for Testing installer.\n\n### Bug Fixes\n\n- Fixed `--headed false` flag not being respected in CLI\n- Fixed \"not found\" error pattern in `to_ai_friendly_error` incorrectly catching non-element errors\n- Fixed storage local key lookup parsing and text output\n- Fixed Lightpanda engine launch with release binaries\n- Hardened Lightpanda startup timeouts\n\n---\n\n## v0.19.0\n\n<p className=\"text-[#888] text-sm\">March 13, 2026</p>\n\n### New Features\n\n- **Browserless.io provider** -- Added browserless.io as a browser provider, supported in both Node.js and native daemon paths. Connect to remote Browserless instances using the `--provider browserless` flag or `AGENT_BROWSER_PROVIDER=browserless` environment variable.\n\n```bash\nagent-browser --provider browserless open example.com\nagent-browser --provider browserless screenshot ./page.png\n```\n\n- **`clipboard` command** -- Read from and write to the browser clipboard. Supports `read`, `write`, `copy` (simulates Ctrl+C), and `paste` (simulates Ctrl+V) operations.\n\n```bash\nagent-browser clipboard read\nagent-browser clipboard write \"Hello, World!\"\nagent-browser clipboard copy\nagent-browser clipboard paste\n```\n\n- **Screenshot output configuration** -- New global flags for persistent screenshot settings: `--screenshot-dir`, `--screenshot-quality`, and `--screenshot-format`. Also available as environment variables `AGENT_BROWSER_SCREENSHOT_DIR`, `AGENT_BROWSER_SCREENSHOT_QUALITY`, and `AGENT_BROWSER_SCREENSHOT_FORMAT`.\n\n```bash\nagent-browser screenshot --screenshot-dir ./shots\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80\n```\n\n### Bug Fixes\n\n- Fixed `wait --text` not working in native daemon path\n- Fixed `BrowserManager.navigate()` and package entry point\n- Fixed extensions not being loaded from `config.json`\n- Fixed scroll on page load\n- Fixed HTML retrieval by using `browser.getLocator()` for selector operations\n\n---\n\n## v0.18.0\n\n<p className=\"text-[#888] text-sm\">March 12, 2026</p>\n\n### New Features\n\n- **`inspect` command** -- Opens Chrome DevTools for the active page by launching a local proxy server that forwards the DevTools frontend to the browser's CDP WebSocket. Agent commands continue to work while DevTools is open.\n\n```bash\nagent-browser open example.com\nagent-browser inspect # opens DevTools in your browser\nagent-browser click \"Submit\" # commands still work while DevTools is open\n```\n\n- **`get cdp-url` subcommand** -- Retrieve the Chrome DevTools Protocol WebSocket URL for the active page, useful for connecting external debugging tools.\n\n```bash\nagent-browser get cdp-url\n```\n\n- **Screenshot annotate** -- The `--annotate` flag overlays numbered labels on interactive elements in screenshots.\n\n### Improvements\n\n- **KERNEL_API_KEY now optional** -- External credential injection no longer requires `KERNEL_API_KEY` to be set, making it easier to use Kernel with pre-configured environments.\n- **Browserbase simplified** -- Removed the `BROWSERBASE_PROJECT_ID` requirement, reducing setup friction for Browserbase users.\n\n### Bug Fixes\n\n- Fixed Browserbase API using incorrect endpoint to release sessions\n- Fixed CDP connect paths using hardcoded 10s timeout instead of the configurable default timeout\n- Fixed lone Unicode surrogates causing errors by sanitizing with `toWellFormed()`\n- Fixed CDP connection failure on IPv6-first systems\n- Fixed recordings not inheriting the current viewport settings\n\n---\n\n## v0.17.1\n\n<p className=\"text-[#888] text-sm\">March 9, 2026</p>\n\n### Improvements\n\n- **Viewport scale factor** -- Added support for device scale factor (retina display) in the viewport command via an optional `scale` parameter.\n- **Webview target support** -- Added webview target type support for better Electron application compatibility. The pages list now includes target type information.\n\n---\n\n## v0.17.0\n\n<p className=\"text-[#888] text-sm\">March 8, 2026</p>\n\n### New Features\n\n- **Lightpanda browser engine support** -- Added `--engine <name>` flag to select the browser engine (`chrome` by default, or `lightpanda`), implying `--native` mode. Configurable via `AGENT_BROWSER_ENGINE` environment variable.\n\n```bash\nagent-browser --engine lightpanda open example.com\n```\n\n- **Dialog dismiss command** -- Added support for `dismiss` subcommand in dialog command parsing.\n\n### Improvements\n\n- **Daemon startup error reporting** -- Daemon startup errors are now surfaced directly instead of showing an opaque timeout message.\n- **CDP port discovery** -- Replaced hand-rolled HTTP client with `reqwest` for more reliable CDP port discovery.\n- **Chrome extensions** -- Extensions now load correctly by forcing headed mode when extensions are present.\n- **Google Translate bar suppression** -- Suppressed the Google Translate bar in native headless mode to avoid interference.\n- **Auth cookie persistence** -- Auth cookies are now persisted on browser close in native mode.\n\n### Bug Fixes\n\n- Fixed native auth login failing due to incompatible encryption format.\n\n### Performance\n\n- Added benchmarks to the CLI codebase.\n\n---\n\n## v0.16.0\n\n<p className=\"text-[#888] text-sm\">March 3, 2026</p>\n\n### New Features\n\n- **Native Rust daemon (experimental).** A pure Rust daemon that communicates with Chrome directly via the Chrome DevTools Protocol (CDP), eliminating Node.js and Playwright dependencies entirely. Enable with `--native`, `AGENT_BROWSER_NATIVE=1`, or `\"native\": true` in your config file. Supports 150+ commands with full parity to the default Node.js daemon.\n\n```bash\n# Via flag\nagent-browser --native open example.com\n\n# Via environment variable\nagent-browser open example.com\n```\n\nOr add to `agent-browser.json`:\n\n```json\n{\"native\": true}\n```\n\n### Architecture\n\n<table>\n <thead>\n <tr><th></th><th>Default (Node.js)</th><th>Native (<code>--native</code>)</th></tr>\n </thead>\n <tbody>\n <tr><td><strong>Runtime</strong></td><td>Node.js + Playwright</td><td>Pure Rust binary</td></tr>\n <tr><td><strong>Protocol</strong></td><td>Playwright protocol</td><td>Direct CDP / WebDriver</td></tr>\n <tr><td><strong>Install size</strong></td><td>Larger (Node.js + npm deps)</td><td>Smaller (single binary)</td></tr>\n <tr><td><strong>Browser support</strong></td><td>Chromium, Firefox, WebKit</td><td>Chromium, Safari (via WebDriver)</td></tr>\n <tr><td><strong>Stability</strong></td><td>Stable</td><td>Experimental</td></tr>\n </tbody>\n</table>\n\n### What's Supported\n\nAll core commands work in native mode: navigation, interaction (click, fill, type, press, hover, scroll, drag), observation (snapshot, screenshot, eval), state management (cookies, storage, state save/load), tabs, emulation (viewport, device, timezone, locale, geolocation), streaming, diffing, recording, and profiling.\n\nThe native daemon also includes a WebDriver backend for Safari and iOS support.\n\n### Known Limitations\n\n- Firefox and WebKit are not yet supported (Chromium and Safari only)\n- Playwright trace format is not available (uses Chrome's built-in tracing)\n- HAR export is not available\n- Network route interception uses CDP Fetch domain instead of Playwright's route API\n- The native and Node.js daemons share the same session socket. Use `agent-browser close` before switching between modes.\n\nSee the [Native Mode](/native-mode) page for full details.\n\n---\n\n## v0.15.0\n\n<p className=\"text-[#888] text-sm\">February 25, 2026</p>\n\n### New Features\n\n- **Authentication vault** -- Store credentials locally (always AES-256-GCM encrypted) and reference them by name. The LLM never sees passwords. Commands: `auth save`, `auth login`, `auth list`, `auth show`, `auth delete`. Passwords can be piped via stdin (`--password-stdin`) to avoid shell history exposure.\n- **Content boundary markers** -- `--content-boundaries` wraps page-sourced output in structural delimiters with a per-process CSPRNG nonce, so LLMs can distinguish trusted tool output from untrusted page content. In `--json` mode, a `_boundary` object is injected with `nonce` and `origin` fields.\n- **Domain allowlist** -- `--allowed-domains` restricts navigation, sub-resource requests, WebSocket connections, and EventSource streams to trusted domains. Supports exact match and wildcard prefix patterns (e.g., `*.example.com`).\n- **Action policy** -- `--action-policy` gates actions using a static JSON policy file with `allow`/`deny` lists across 13 action categories. Auth vault operations bypass policy enforcement.\n- **Action confirmation** -- `--confirm-actions` requires explicit approval for sensitive action categories. New `confirm` and `deny` commands for orchestrator use. `--confirm-interactive` enables human-in-the-loop terminal prompts (auto-denies if stdin is not a TTY). Pending confirmations auto-deny after 60 seconds.\n- **Output length limits** -- `--max-output` truncates large page outputs to prevent LLM context flooding.\n- **`--download-path` option** -- Set a default download directory via flag, `AGENT_BROWSER_DOWNLOAD_PATH` env var, or `downloadPath` config key. Without it, downloads go to a temporary directory deleted when the browser closes.\n- **`--selector` flag for scroll** -- Scroll within a specific container element instead of the page: `agent-browser scroll down 500 --selector \"div.scroll-container\"`\n\n```bash\n# Auth vault\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\nagent-browser auth login github\n\n# Security flags\nagent-browser --content-boundaries --allowed-domains \"example.com,*.example.com\" --max-output 50000 open https://example.com\n\n# Download path\nagent-browser --download-path ./downloads open https://example.com\n\n# Scroll within container\nagent-browser scroll down 500 --selector \"div.content\"\n```\n\n### Environment Variables\n\nSix new environment variables for security configuration: `AGENT_BROWSER_CONTENT_BOUNDARIES`, `AGENT_BROWSER_MAX_OUTPUT`, `AGENT_BROWSER_ALLOWED_DOMAINS`, `AGENT_BROWSER_ACTION_POLICY`, `AGENT_BROWSER_CONFIRM_ACTIONS`, `AGENT_BROWSER_CONFIRM_INTERACTIVE`.\n\n---\n\n## v0.14.0\n\n<p className=\"text-[#888] text-sm\">February 23, 2026</p>\n\n### New Features\n\n- **`keyboard` command** -- Type with real keystrokes, insert text, and press shortcuts at the currently focused element without needing a selector (`keyboard type`, `keyboard inserttext`).\n- **`--color-scheme` flag** -- Persistent dark/light mode preference across browser sessions via flag or `AGENT_BROWSER_COLOR_SCHEME` env var.\n\n```bash\nagent-browser keyboard type \"Hello world\"\nagent-browser keyboard inserttext \"pasted text\"\nagent-browser --color-scheme dark open https://example.com\n```\n\n### Bug Fixes\n\n- Fixed IPC EAGAIN errors (os error 35/11) with backpressure-aware socket writes, command serialization, and lowered default Playwright timeout to 25s (configurable via `AGENT_BROWSER_DEFAULT_TIMEOUT`).\n- Fixed remote debugging (CDP) reconnection.\n- Fixed state load failing when no browser is running.\n- Fixed `--annotate` flag warning appearing when not explicitly passed via CLI.\n\n---\n\n## v0.13.0\n\n<p className=\"text-[#888] text-sm\">February 20, 2026</p>\n\n### New Features\n\n- **Diff commands** -- Compare snapshots, screenshots, and URLs between page states. Run visual pixel diffs against baseline images, compare accessibility tree snapshots with customizable depth and selectors, and diff two URLs side-by-side with optional screenshot comparison.\n\n```bash\nagent-browser diff snapshot\nagent-browser diff screenshot --baseline before.png\nagent-browser diff url https://staging.example.com https://prod.example.com\n```\n\n---\n\n## v0.12.0\n\n<p className=\"text-[#888] text-sm\">February 18, 2026</p>\n\n### New Features\n\n- **Annotated screenshots** -- `--annotate` flag overlays numbered labels on interactive elements and prints a legend mapping each label to its element ref. Enables multimodal AI models to reason about visual layout while using the same `@eN` refs for subsequent interactions. Also settable via `AGENT_BROWSER_ANNOTATE` env var.\n\n```bash\nagent-browser screenshot --annotate\n```\n\n---\n\n## v0.11.1\n\n<p className=\"text-[#888] text-sm\">February 18, 2026</p>\n\n### Documentation\n\n- Added documentation for command chaining with `&&` across README, CLI help output, docs, and skill files.\n\n---\n\n## v0.11.0\n\n<p className=\"text-[#888] text-sm\">February 17, 2026</p>\n\n### New Features\n\n- **Configuration file support** -- Automatic loading from user (`~/.agent-browser/config.json`) and project (`./agent-browser.json`) directories with priority-based merging.\n- **Profiler commands** -- Chrome DevTools profiling with `profiler start` and `profiler stop`.\n- **Browser extension loading** -- `--extension` flag to load browser extensions.\n- **Storage state management** -- `state save` and `state load` commands for auth state persistence.\n- **iOS device emulation** -- `--device` flag for device emulation.\n- **Enhanced click** -- `--new-tab` option for click commands.\n- **Enhanced find** -- Additional actions and filtering options.\n- **CDP WebSocket URLs** -- `--cdp` now accepts WebSocket URLs in addition to ports.\n\n---\n\n## v0.10.0\n\n<p className=\"text-[#888] text-sm\">February 13, 2026</p>\n\n### New Features\n\n- **Session persistence** - Automatic save/restore of cookies and localStorage across browser restarts using `--session-name` flag\n- **Encrypted state** - Optional AES-256-GCM encryption for saved session state data\n- **State management commands** - New commands for listing, showing, renaming, clearing, and cleaning up session state files\n- **New tab on click** - Added `--new-tab` option for click commands to open links in new tabs\n\n```bash\n# Persist session state\nagent-browser --session-name myapp open https://example.com\n\n# Manage saved states\nagent-browser state list\nagent-browser state show myapp\nagent-browser state clear myapp\n```\n\n---\n\n## v0.9.4\n\n<p className=\"text-[#888] text-sm\">February 13, 2026</p>\n\n### Bug Fixes\n\n- Fixed all Clippy lint warnings in the Rust CLI\n\n---\n\n## v0.9.3\n\n<p className=\"text-[#888] text-sm\">February 12, 2026</p>\n\n### Improvements\n\n- Added support for custom executable path in CLI browser launch options\n- Documentation site UI improvements including a new chat component with sheet-based interface\n\n---\n\n## v0.9.2\n\n<p className=\"text-[#888] text-sm\">February 10, 2026</p>\n\n### Improvements\n\n- Migrated documentation site to MDX for improved content authoring\n- Added AI-powered docs chat feature\n- Updated README with Homebrew installation instructions for macOS users\n\n---\n\n## v0.9.1\n\n<p className=\"text-[#888] text-sm\">February 5, 2026</p>\n\n### New Features\n\n- **`--allow-file-access` flag** - Enable opening and interacting with local `file://` URLs (PDFs, HTML files) by passing Chromium flags that allow JavaScript access to local files\n- **`-C`/`--cursor` flag for snapshots** - Include cursor-interactive elements like divs with onclick handlers or `cursor:pointer` styles\n\n```bash\nagent-browser --allow-file-access open file:///path/to/document.pdf\nagent-browser snapshot -C\n```\n\n---\n\n## v0.9.0\n\n<p className=\"text-[#888] text-sm\">February 3, 2026</p>\n\n### New Features\n\n- **iOS Simulator support** - Mobile Safari testing via Appium with real device and simulator support\n\n```bash\n# List available iOS simulators\nagent-browser device list\n\n# Launch on iOS device\nagent-browser -p ios --device \"iPhone 16 Pro\" open https://example.com\n\n# Touch interactions\nagent-browser tap @e1\nagent-browser swipe up\n```\n\n---\n\n## v0.8.10\n\n<p className=\"text-[#888] text-sm\">February 2, 2026</p>\n\n### Improvements\n\n- Added `--stdin` flag for eval command to read JavaScript from stdin, enabling heredoc usage for multiline scripts\n- Fixed binary permission issues on macOS/Linux when postinstall scripts don't run\n\n---\n\n## v0.8.9\n\n<p className=\"text-[#888] text-sm\">February 2, 2026</p>\n\n### Improvements\n\n- Added `--stdin` flag for eval command to read JavaScript from stdin\n\n---\n\n## v0.8.8\n\n<p className=\"text-[#888] text-sm\">February 2, 2026</p>\n\n### Improvements\n\n- Added base64 encoding support for the eval command with `-b`/`--base64` flag to avoid shell escaping issues\n- Updated documentation with AI agent setup instructions\n\n---\n\n## v0.8.7\n\n<p className=\"text-[#888] text-sm\">February 2, 2026</p>\n\n### Bug Fixes\n\n- Fixed browser launch options not being passed correctly when using persistent profiles\n- Added pre-flight checks for socket path length limits and directory write permissions\n- Improved error handling to properly exit with failure status when browser launch fails\n\n---\n\n## v0.8.6\n\n<p className=\"text-[#888] text-sm\">January 31, 2026</p>\n\n### Bug Fixes\n\n- Improved daemon connection reliability with automatic retry logic for transient errors\n- CLI now cleans up stale socket and PID files before starting a new daemon\n\n---\n\n## v0.8.5\n\n<p className=\"text-[#888] text-sm\">January 29, 2026</p>\n\n### Bug Fixes\n\n- Fixed version synchronization to automatically update Cargo.lock alongside Cargo.toml during releases\n- Made the CLI binary executable in the npm package\n\n---\n\n## v0.8.4\n\n<p className=\"text-[#888] text-sm\">January 27, 2026</p>\n\n### Bug Fixes\n\n- Fixed \"Daemon not found\" error when running through AI agents by resolving symlinks in the executable path\n\n---\n\n## v0.8.3\n\n<p className=\"text-[#888] text-sm\">January 27, 2026</p>\n\n### Improvements\n\n- Replaced shell-based CLI wrappers with a cross-platform Node.js wrapper to enable npx support on Windows\n- Added postinstall logic to patch npm bin entry on global installs for zero-overhead native binary invocation\n- Added CI tests to verify global installation across all platforms\n\n---\n\n## v0.8.2\n\n<p className=\"text-[#888] text-sm\">January 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed the Windows CMD wrapper to use the native binary directly instead of routing through Node.js\n- Added retry logic to CI install command for transient browser installation failures\n\n---\n\n## v0.8.1\n\n<p className=\"text-[#888] text-sm\">January 26, 2026</p>\n\n### Improvements\n\n- Improved release workflow to validate binary file sizes and ensure binaries are executable after npm install\n- Updated documentation site with a new mobile navigation system\n\n---\n\n## v0.8.0\n\n<p className=\"text-[#888] text-sm\">January 26, 2026</p>\n\n### New Features\n\n- **Kernel cloud browser provider** - Connect to Kernel (kernel.sh) for remote browser infrastructure with stealth mode and persistent profiles\n\n```bash\n# Via -p flag\nagent-browser -p kernel open https://example.com\n\n# Via environment variable\nagent-browser open https://example.com\n\n# With persistent profile\nagent-browser open https://example.com\n```\n\n- **Ignore HTTPS certificate errors** - New flag for working with self-signed certificates and development environments\n\n```bash\nagent-browser --ignore-https-errors open https://localhost:3000\n```\n\n- **Enhanced cookie management** - Extended `cookies set` command with additional flags for setting cookies before page load\n\n```bash\nagent-browser cookies set session_id \"abc123\" --url https://app.example.com --httpOnly --secure\nagent-browser cookies set token \"xyz\" --domain .example.com --path /api --expires 1735689600\n```\n\n### Bug Fixes\n\n- Fixed tab list command not recognizing new pages opened via clicks or `target=\"_blank\"` links\n- Fixed `check` command hanging indefinitely\n- Fixed `set device` not applying deviceScaleFactor - HiDPI screenshots now work correctly\n- Fixed state load and profile persistence not working in v0.7.6\n- Screenshots now save to temp directory when no path is provided\n\n### Security\n\n- Daemon and stream server now reject cross-origin connections\n\n---\n\n## v0.7.1\n\n<p className=\"text-[#888] text-sm\">January 23, 2026</p>\n\n### Bug Fixes\n\n- **Fix native binary distribution** - Native binaries for all platforms (Linux x64/arm64, macOS x64/arm64, Windows x64) are now included in the npm package. Previously, the release workflow published to npm before building binaries, causing \"No binary found\" errors on installation.\n\n---\n\n## v0.7.0\n\n<p className=\"text-[#888] text-sm\">January 23, 2026</p>\n\n### New Features\n\n- **Cloud browser providers** - Connect to Browserbase or Browser Use for remote browser infrastructure\n\n```bash\n# Via -p flag (recommended)\nagent-browser -p browserbase open https://example.com\nagent-browser -p browseruse open https://example.com\n\n# Via environment variable\nagent-browser open https://example.com\n```\n\n- **Persistent browser profiles** - Store cookies, localStorage, and login sessions across browser restarts\n\n```bash\nagent-browser --profile ~/.myapp-profile open myapp.com\n# Login persists across restarts\n```\n\n- **Remote CDP WebSocket URLs** - Connect to remote browser services via WebSocket\n\n```bash\nagent-browser --cdp \"wss://browser-service.com/cdp?token=...\" snapshot\n```\n\n- **`download` command** - Trigger downloads and wait for completion\n\n```bash\nagent-browser download @e1 ./file.pdf\nagent-browser wait --download ./output.zip --timeout 30000\n```\n\n- **Browser launch configuration** - Fine-grained control over browser startup\n\n```bash\nagent-browser --args \"--disable-gpu,--no-sandbox\" open example.com\nagent-browser --user-agent \"Custom UA\" open example.com\nagent-browser --proxy-bypass \"localhost,*.internal\" open example.com\n```\n\n- **Enhanced skills** - Hierarchical structure with references and templates for Claude Code\n\n### Bug Fixes\n\n- Screenshot command now supports refs and has improved error messages\n- WebSocket URLs work in `connect` command\n- Fixed socket file location (uses `~/.agent-browser` instead of TMPDIR)\n- Windows binary path fix (.exe extension)\n- State load and path-based actions now show correct output messages\n\n### Documentation\n\n- Added Claude Code marketplace plugin installation instructions\n- Updated skill documentation with references and templates\n- Improved error documentation\n\n---\n\n## v0.6.0\n\n<p className=\"text-[#888] text-sm\">January 18, 2026</p>\n\n### New Features\n\n- **Video recording** - Record browser sessions to WebM using Playwright's native recording\n\n```bash\nagent-browser record start ./demo.webm\nagent-browser click @e1\nagent-browser record stop\n```\n\n- **`connect` command** - Connect to a browser via CDP and persist the connection for subsequent commands\n\n```bash\nagent-browser connect 9222\nagent-browser snapshot # No --cdp needed after connect\n```\n\n- **`--proxy` flag** - Configure browser proxy with optional authentication\n\n```bash\nagent-browser --proxy http://user:pass@proxy.com:8080 open example.com\n```\n\n- **`get styles` command** - Extract computed styles from elements\n\n```bash\nagent-browser get styles \"button\"\n```\n\n- **Claude marketplace plugin** - Added `.claude-plugin/marketplace.json` for Claude Code integration\n- **Enhanced network output** - `network requests` now shows method, URL, and resource type\n- **`--version` flag** - Display CLI version\n\n### Bug Fixes\n\n- Fix Windows daemon startup and port calculation\n- Support `libasound2t64` on newer Ubuntu versions (24.04+)\n- Prevent CDP timeout on empty URL tabs\n- Output screenshot as base64 when no path provided\n- Resolve refs in `get value` command\n- Support URL parameter in `tab new` command\n- Allow `about:`, `data:`, and `file:` URL schemes\n- Detect stale unix socket by attempting connection\n- Respect `AGENT_BROWSER_HEADED` environment variable\n- Handle SIGPIPE to prevent panic when piping to `head`/`tail`\n- Fix null path validation in screenshot command\n\n### Protocol Alignment\n\nThese changes align the CLI with the daemon protocol for consistency:\n\n- `select` command now uses `values` field (supports multiple selections)\n- `frame main` uses `mainframe` action\n- `mouse wheel` uses `wheel` action\n- `set media` uses `emulatemedia` action\n- Console output uses `messages` field\n\n### Documentation\n\n- Expanded SKILL.md with comprehensive command reference\n- Updated README with new commands and options\n- Updated CDP mode documentation with `connect` workflow",
|
||
"legacyMarkdownSha256": "cfc8814fe4dc5715e196d005cd8d36bf7e1e86986439457d1a315eceebe5e588",
|
||
"modernMarkdown": "# Changelog\n\n## v0.38.2\n\n<p>October 1, 2026</p>\n\n### Bug Fixes\n\n- Fixed **auth vault login** to pick usable controls when hidden duplicates exist, and to bind credential entry to the selected field so replaced fields or redirected focus are rejected before submitting (#2014)\n- Fixed **chat mode** to allow `webmcp`, `skills`, and other top-level browser commands, so the model uses page WebMCP tools instead of falling back to `eval` (#2015)\n- Fixed **Kernel profiles** so `KERNEL_PROFILE_NAME` sessions send the profile as an object instead of failing with a 400, and added `KERNEL_PROFILE_SAVE_CHANGES` to opt into saving changes back (#2004)\n- Fixed **Chrome freezing after launch** by draining its stderr for the browser's lifetime, so a full log pipe no longer blocks the browser (#2003)\n- Fixed **Browser Use** by switching to Cloud V4, which creates, attaches to, and stops the same browser with bounded timeouts (#1879)\n- Fixed **Vercel Sandbox shared memory detection** by measuring `/dev/shm` capacity and adding `--disable-dev-shm-usage` below 256 MiB, so Chrome no longer terminates renderers on the undersized mount (#1890)\n\n### Improvements\n\n- Upgraded the **eve integration** from eve 0.47.3 to 0.57.0, so apps on eve 0.50 and later build again (#1945)\n\n### Documentation\n\n- Updated the **contact sheet example** with the loading-flash demo output (#1871)\n\n---\n\n## v0.38.1\n\n<p>September 16, 2026</p>\n\n### Bug Fixes\n\n- Fixed **recording cursor and mouse movement timing** so cursor rendering stays synchronized with page content during drags and timed mouse moves (#1869)\n\n### Documentation\n\n- Added Vercel Labs product and project status badges to the README (#1868)\n\n---\n\n## v0.38.0\n\n<p>September 16, 2026</p>\n\n### New Features\n\n- Added **conditional screenshots** with `screenshot --if-changed` to skip unchanged captures and `--threshold <0-1>` to tolerate small pixel differences. Screenshot history is scoped to each tab and capture mode, and unchanged captures omit the image path to save tokens (#1813)\n- Added **automatic snapshot deltas** with `snapshot --delta`, which returns a full baseline followed by an unchanged revision or compact structural changes. Use `--full` to refresh the baseline (#1811)\n- Added **persistent snapshot refs** for surviving DOM elements across same-document changes. Replaced elements and navigated pages or iframes invalidate their refs without recycling identifiers (#1812)\n- Added **human-like pointer movement** with session `--input-mode`, per-action `--human` for clicks and drags, and reproducible curved `mouse move` paths (#1810)\n- Added **recording presentation tools**: `--cursor` renders an animated pointer and click ripple, while `--contact-sheet` saves a timestamped PNG summary of visual changes (#1807, #1808)\n- Added **stateful auth vault login** with `auth login --no-navigate`, which fills an already prepared login page after verifying its origin against the credential URL (#1771)\n- Added **WebMCP catalog updates** to normal browser responses. Concise, content-bounded summaries appear on initial discovery and catalog changes, while full schemas remain opt-in (#1842)\n\n### Improvements\n\n- Improved **recording frame timing** by holding the latest Chrome frame between repaints so the output duration follows the requested frame rate (#1806)\n\n### Bug Fixes\n\n- Fixed **CDP transport recovery and shutdown** so malformed transport messages do not strand unrelated commands and failed initialization disconnects cleanly (#1739)\n- Fixed **dropdown label matching** to normalize whitespace, including non-breaking spaces, when selecting options by visible label (#1736)\n\n### Documentation\n\n- Clarified **reliable browser wait strategies** by recommending page-specific selectors, text, URLs, or JavaScript conditions and reserving `networkidle` for pages known to become quiet (#1834)\n\n---\n\n## v0.37.1\n\n<p>September 8, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows headless Chrome desktop artifacts** by isolating owned headless Chrome on a private desktop and ensuring its process tree is cleaned up when the daemon exits or is forcibly terminated. Headed and externally connected browsers retain their existing desktop behavior (#1498, #1820)\n\n---\n\n## v0.37.0\n\n<p>September 7, 2026</p>\n\n### New Features\n\n- Added **higher-quality video recording**: `record start` and `record restart` now capture the current active page at 30 fps by default, support `--fps 1-60`, use `Page.startScreencast` for smoother motion, and preserve wall-clock timing. WebM and MP4 output are documented, and `doctor` reports the ffmpeg recording dependencies (#1763, #1776, #1778)\n- Added **WebMCP availability output** so navigation responses advertise when a page exposes allowed WebMCP tools, including availability metadata for CLI, JSON, and MCP clients (#1760)\n- Added **session setup inheritance for new tabs**. Tabs opened with `tab new` or through page clicks now inherit the active session's headers, credentials, user agent, locale, timezone, geolocation, offline mode, routes, color scheme, and init scripts before their first navigation (#1777)\n\n### Bug Fixes\n\n- Fixed **recording startup validation** so missing ffmpeg, extensionless output paths, and invalid recording options fail before browser or recording state changes. Failed replacements preserve the active take, and ffmpeg errors now include useful diagnostics (#1778)\n- Fixed **recording navigation state** so URL navigation during recording clears stale element refs, frame scope, and page WebMCP state like normal navigation (#1776)\n\n---\n\n## v0.36.0\n\n<p>September 1, 2026</p>\n\n### New Features\n\n- Added experimental **WebMCP support** for discovering and invoking tools provided by the current page, including frame-aware tool selection, detached results, cancellation, bounded metadata and output handling, and an opt-in MCP tool profile. WebMCP is enabled by default for locally managed Chrome and can be disabled with `--no-webmcp` or `AGENT_BROWSER_NO_WEBMCP`.\n- Added a **WebMCP generation skill** that helps agents expose existing page workflows as validated page tools while recording safety constraints, deterministic checks, and fallback behavior.\n\n### Improvements\n\n- Updated the **eve integration** to 0.47.3 and raised its compatibility floor to 0.39.1.\n- Updated **brace-expansion dependency resolutions** across the project lockfiles.\n\n### Bug Fixes\n\n- Removed the obsolete **Lightpanda session timeout** argument so launches use the current supported server options.\n\n---\n\n## v0.35.2\n\n<p>August 31, 2026</p>\n\n### Security\n\n- Hardened **dashboard origin validation and reverse-proxy access** with same-origin provenance enforcement that defends against DNS rebinding, form/header smuggling, and cross-origin requests. Reverse-proxied origins now require exact HTTPS allowlisting and generated token authentication, while tokenless IPv4 and IPv6 loopback access remains supported. Dashboard options are validated strictly, and CLI and MCP lifecycle behavior is aligned (#1738)\n\n### Bug Fixes\n\n- Fixed **root remote CDP WebSocket URLs with query strings** to insert the required slash before the query while preserving the encoded query (#1735)\n\n---\n\n## v0.35.1\n\n<p>August 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows ARM64 launcher selection** to prefer a native ARM64 executable when present and fall back to the published x64 executable through Windows emulation when it is not (#1725)\n- Fixed **stream URL tracking** to emit active main-frame URL updates for full-document, History API, and fragment navigation, while rebinding correctly after active-tab changes and ignoring child-frame or background-tab navigation (#1682)\n- Fixed **snapshot diff element references** by resetting ref numbering for each diff, invalidating refs across URL navigations, and preserving the previous refs when a diff fails (#1719)\n\n### Improvements\n\n- Updated **Rust dependencies** to `rustls-webpki` 0.103.13 and `quinn-proto` 0.11.17 (#1723, #1720)\n\n---\n\n## v0.35.0\n\n<p>August 24, 2026</p>\n\n### New Features\n\n- Added **private proxy CA trust for locally launched Chromium on Linux**. Use `--ca-cert <path>`, `AGENT_BROWSER_CA_CERT`, or `caCert` in config and MCP to import a PEM bundle or DER certificate into an isolated NSS trust store without disabling hostname, validity, or unrelated-authority verification. The effective CA persists across commands in a running session, equivalent certificate content reuses Chromium, and `--no-ca-cert` explicitly clears retained trust. Unsupported launch modes and conflicting CA options return actionable errors (#1669)\n\n### Improvements\n\n- Added a bundled **protected Vercel deployments skill** that guides agents through short-lived Trusted Sources OIDC authentication, authorized automation bypasses, and explicit human handoffs for dashboard-only configuration (#1705)\n\n---\n\n## v0.34.0\n\n<p>August 10, 2026</p>\n\n### New Features\n\n- Added **persistent session-to-tab binding for shared Chrome sessions**. Named sessions connected through `--cdp` or `--auto-connect` now remember their CDP target across commands and daemon restarts, and CDP target ids can be used directly as tab references. Start each session with `--pin-tab` to make the binding strict, so a tab closed externally returns a stable `tab_gone` error instead of silently adopting a neighboring tab. JSON output includes `data.targetId` and an optional sanitized `data.lastUrl`; batch exposes the same recovery data under `result` (#1589)\n\n### Improvements\n\n- Added a **Remote Agent Browser provider guide** covering Vercel authentication, disposable and stable sessions, custom VCR images, snapshots, and live-view URLs (#1648)\n\n### Bug Fixes\n\n- Fixed **parallel sessions sharing one Chrome hijacking each other's tabs**. Event-discovered targets no longer steal a pinned session's active tab, re-attach restores the persisted target instead of selecting index 0, and preliminary plus existing-daemon `--cdp` and `--auto-connect` paths preserve explicit pin enable and disable. Agent skill guidance now requires a named `--session` before the first command (#1589)\n- Fixed **`agent-browser doctor` hanging on Chrome version detection**. Windows reads the version from the executable resource table without spawning Chrome; other platforms bound the version subprocess with a deadline, kill, and reap so inherited output handles cannot block forever or leave an orphan browser (#1641)\n\n---\n\n## v0.33.2\n\n<p>July 31, 2026</p>\n\n### New Features\n\n- Added **input priority and per-client delivery settings** to the stream server: each WebSocket connection now splits into a reader task and a writer loop, so clicks and keystrokes dispatch to the browser without queueing behind a frame write. Adds a per-client `{\"type\":\"config\",\"maxFps\":N}` cap (1 to 120, `0` uncapped) and opt-in ack pacing via `{\"type\":\"config\",\"pacing\":\"ack\"}` with `{\"type\":\"ack\",\"seq\":N}`, which keeps one frame in flight so a stalled client never drains a backlog. Both settings can also be declared on the connection URL (`?pacing=ack&maxFps=10`), the only way to cover the opening frame. Every frame now carries a monotonic `seq` (#1594)\n- Added **configurable stream encoding**: frames were hardcoded to jpeg quality 80 at the session viewport, so frame rate was the only bandwidth lever. `AGENT_BROWSER_STREAM_QUALITY`, `AGENT_BROWSER_STREAM_MAX_WIDTH` and `AGENT_BROWSER_STREAM_MAX_HEIGHT` are read once per daemon and cut bytes without dropping frames: on a busy page at 1280x720, quality 20 takes a frame from 54 KB to 25 KB, and quality 20 at 640x360 takes it to 9 KB, frame rate unchanged in both. Width and height default to the session viewport, so a larger viewport is never downscaled unless both are set (#1626)\n\n### Behavior Changes\n\n- **Frame delivery is now latest-wins.** The stream server holds only the newest frame and reads it at send time, so frames produced while an earlier one is still being written are skipped. A client that assumed it received every frame from the WebSocket now receives fewer. Nothing in this repo consumes the stream that way, since `record` captures through CDP and the dashboard is a viewer, so this affects external consumers only (#1594)\n- **`metadata.timestamp` now carries a real value.** It was always 0, because CDP sends the capture time as a float in seconds and the code read it as an integer. It is now epoch milliseconds, so a client can measure how stale the frame it is drawing is. A client that treated 0 as unknown is unaffected (#1594)\n\n### Bug Fixes\n\n- Fixed **keyboard input over the stream**, which worked in none of the three shapes the docs publish: an absent `key`, `code`, or `text` reached CDP as an explicit null, which rejects the whole command, so every key release and every non-printable key was silently dropped, the dashboard's own payloads included (#1594)\n- Fixed **click latency behind mouse movement**: input dispatch awaited Chrome's reply before reading the next message, so a click sat one round trip behind every queued mouse move. After a 300-event sweep a click landed 2471ms late; it now lands in 6ms (#1627)\n- Fixed **`stream disable`** returning while a slow client's input reader was still running (#1594)\n\n---\n\n## v0.33.1\n\n<p>July 28, 2026</p>\n\n### Behavior Changes\n\n- The daemon now ships a **default idle timeout of 1 hour**: after an hour with no commands or dashboard input it saves configured restore state, closes the browser, and exits, so integrations that die without calling `close` no longer leak the daemon and its Chrome tree indefinitely. Sessions without `--restore` or another restore key discard transient browser state and open tabs when they shut down. Set `AGENT_BROWSER_IDLE_TIMEOUT_MS=0` to restore the old always-persist behavior, or any other value to tune it. Dashboard mouse, keyboard, and touch input reset the timer. The default never closes headed browsers, including Safari and iOS WebDriver sessions, or user-attached browsers that may be in direct human use. Provider-owned cloud browsers remain eligible for cleanup, and an explicitly configured timeout applies to all browsers, as before (#1605)\n\n### Bug Fixes\n\n- Fixed **tab recovery and selection** to avoid daemon hangs on Memory Saver-discarded tabs by selecting a live renderer on CDP connect, reviving tabs on switch or after close, treating dialog-blocked tabs as live, preserving refs on rejected operations, and surfacing recovery state across CLI, JSON, and MCP output (#1543)\n- Fixed **a11y selector errors** to report invalid CSS selectors cleanly instead of exposing raw browser evaluation stack traces in text and JSON output (#1604)\n\n---\n\n## v0.33.0\n\n<p>July 23, 2026</p>\n\n### New Features\n\n- Added **axe-core accessibility audits** with `agent-browser a11y [url]`, WCAG tag filtering, selector scoping, iframe-aware text and JSON results, an embedded offline and CSP-safe audit engine, and a matching MCP tool (#1596)\n\n---\n\n## v0.32.4\n\n<p>July 22, 2026</p>\n\n### Bug Fixes\n\n- Fixed **find role** to match implicit ARIA roles and browser-computed accessible names through the accessibility tree, so semantic elements like `<h2>` (heading) and `<ul>` (list) resolve, with case-insensitive substring name matching that mirrors Playwright's `getByRole` (#1552)\n- Fixed **element-not-found errors** to preserve the locator detail (selector, role, name, or index) instead of flattening every miss into one generic message, and aligned the advertised `find` actions with the set the dispatcher actually accepts (#1553)\n\n---\n\n## v0.32.3\n\n<p>July 19, 2026</p>\n\n### New Features\n\n- Added **HAR response body capture** with text bodies embedded by default and configurable `all`, `text`, and `none` content modes across the CLI and MCP surfaces (#1578)\n- Added a **derive-client skill** for recording browser traffic and generating reusable API clients from HAR request and response data (#1578)\n\n---\n\n## v0.32.2\n\n<p>July 17, 2026</p>\n\n### Improvements\n\n- Updated **eve extension packaging** for eve 0.25.1, adopting the new source and dist extension manifest format, updating the eve example to stable AI SDK releases, and keeping extension tests aligned with eve's scoped config registry (#1570)\n\n---\n\n## v0.32.1\n\n<p>July 16, 2026</p>\n\n### Improvements\n\n- Widened **eve compatibility** for `@agent-browser/eve` to accept eve 0.23 and future major releases without peer-resolution warnings (#1563)\n\n### Documentation\n\n- Standardized **eve branding** to use lowercase styling across the docs, examples, package readmes, and release notes (#1557)\n\n---\n\n## v0.32.0\n\n<p>July 15, 2026</p>\n\n### New Features\n\n- **eve extension** - Added `@agent-browser/eve`, an eve extension that mounts the agent-browser tool set with namespaced browser tools, sandbox bootstrap helpers, docs, examples, CI, and release packaging (#1547)\n\n### Security\n\n- Hardened **domain allowlists** by blocking WebRTC bypasses, applying network containment across launch modes, workers, popups, restored state, and reused daemon sessions, rejecting unsafe startup arguments, and adding Chrome regression coverage (#1546)\n\n### Bug Fixes\n\n- Fixed **completed-page waits** so load and DOMContentLoaded waits resolve immediately when the current document is already ready, with structured eve wait timeout handling and focused coverage (#1554)\n\n---\n\n## v0.31.2\n\n<p>July 13, 2026</p>\n\n### New Features\n\n- **WebGPU launch preset** - Added `--webgpu` across the CLI, config, environment, and MCP surfaces, with hardware backends on macOS and Windows, software Vulkan on Linux, automatic Xvfb for displayless headed sessions, and a `doctor --webgpu` render and screenshot probe (#1529)\n\n### Improvements\n\n- Added periodic **restore-state autosaves** while the browser remains open, preserving recent state after a browser window is closed by hand and capturing background page changes while honoring the restore save policy. The interval is configurable with `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS` (#1509)\n\n---\n\n## v0.31.1\n\n<p>June 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed the **React renderer** so it picks the react-dom renderer instead of hardcoding renderer id 1, which prevented reading an empty tree on Next.js 16.3 Turbopack (#1491)\n\n---\n\n## v0.31.0\n\n<p>June 25, 2026</p>\n\n### New Features\n\n- **Restore workflow** - Added `--restore`, `--restore-save`, restore validation flags, worktree-scoped `session id`, `session info`, and `--namespace` so agent runs can use stable, isolated, automatically restored browser state without managing state files by hand (#1486)\n\n### Improvements\n\n- Hardened **session lifecycle handling** with explicit daemon and browser compatibility checks, lifecycle status output, MCP support for restore options, and safer auto-save behavior that avoids overwriting good state after a failed restore or failed validation (#1486)\n\n### Bug Fixes\n\n- Fixed **restore lifecycle edge cases** around switching restore keys with a live browser, daemon configuration startup races, launch mode validation, and clearing restore failures after an explicit state load (#1486)\n\n---\n\n## v0.30.1\n\n<p>June 24, 2026</p>\n\n### Bug Fixes\n\n- Fixed **URL waits** so `wait --url` and `waitforurl` honor glob patterns such as `**/dashboard` against the full active URL (#1483)\n\n---\n\n## v0.30.0\n\n<p>June 24, 2026</p>\n\n### New Features\n\n- **Read command** - Added `agent-browser read [url]` and the matching MCP tool for agent-readable text extraction. URL reads prefer Markdown, try `.md` and nearby `llms.txt` docs, support outlines, filters, raw and JSON output, headers, and domain/output safeguards; omitting the URL reads the rendered active tab DOM with current browser state (#1480)\n\n---\n\n## v0.29.1\n\n<p>June 20, 2026</p>\n\n### Improvements\n\n- Defaulted **sandbox system dependency installs** so the eve and Vercel sandbox helpers install Chromium's required libraries unless explicitly disabled, making first-run sandbox setup simpler (#1469)\n\n---\n\n## v0.29.0\n\n<p>June 20, 2026</p>\n\n### New Features\n\n- **Sandbox package** - Added `@agent-browser/sandbox` with shared, eve, and Vercel Sandbox helpers, example projects, and docs for running agent-browser in hosted sandbox environments (#1465)\n\n### Improvements\n\n- Updated **sandbox release flow** so the new package stays version-synced with the CLI release and publishes from the correct workspace path (#1465)\n- Reflowed **documentation prose** across the README, docs site, examples, and skills so Markdown and MDX wrap naturally in editors and renderers (#1466)\n\n---\n\n## v0.28.0\n\n<p>June 16, 2026</p>\n\n### New Features\n\n- **MCP server** - Added `agent-browser mcp`, a stdio Model Context Protocol server with typed tools, paginated discovery, protocol negotiation, and startup tool profiles. The default `core` profile keeps context small, while `--tools all` exposes full CLI parity and composed profiles such as `core,network,react` are supported (#1454)\n- **Plugin system** - Added out-of-process plugin support over the `agent-browser.plugin.v1` stdio protocol, with `plugin add/list/show/run`, manifest discovery, npm and GitHub refs, credential providers, browser provider plugins, launch mutators, custom command capabilities, config and env registry support, and capability-scoped policy gates (#1452)\n\n### Infrastructure\n\n- Added **context footprint eval coverage** for CLI skills, MCP core, and MCP full-profile surfaces, plus MCP parity tests to keep tool behavior aligned with the CLI (#1454)\n\n---\n\n## v0.27.3\n\n<p>June 12, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Windows ARM64 installs** by falling back to the Windows x64 binary during postinstall, avoiding failed downloads for a native ARM64 artifact that is not published (#1269)\n\n---\n\n## v0.27.2\n\n<p>June 10, 2026</p>\n\n### Bug Fixes\n\n- Fixed **click reliability** by scrolling off-viewport elements into view before resolving coordinates, handling JavaScript dialogs promptly, recovering mouse state after dialog-opening clicks, and detecting click interception by overlays before dispatching input (#1432, #1434)\n- Fixed **frame-scoped selectors and waits** so CSS-selector actions and `wait` respect the selected iframe, including cross-process iframes, with translated click coordinates (#1432)\n- Fixed **wait timeout handling** so the documented 25s default is used, `--timeout` is honored across wait variants, and long waits receive an appropriate client read budget (#1432)\n- Fixed **agent-facing form commands** so `find label` matches `aria-label` and `aria-labelledby`, `select` errors when no option matches, and `type` parses `--clear` and `--delay` instead of typing them as text (#1432)\n\n### Improvements\n\n- Cut **warm CLI command latency** from about 150ms to about 1ms by removing the unconditional daemon settle sleep and retrying once when a stale daemon socket is discovered (#1432)\n- Extended **daemon respawn and retry** handling to batch commands so batches recover from a daemon exit after the initial liveness check (#1432)\n\n### Infrastructure\n\n- Pinned **GNU Linux release artifacts** to glibc 2.28 with zigbuild, added a release guard for newer GLIBC symbols, and aligned Docker release helpers with the pinned target (#1417)\n\n---\n\n## v0.27.1\n\n<p>June 1, 2026</p>\n\n### Improvements\n\n- Improved **`vitals` command** output formatting for better readability (#1404)\n\n### Documentation\n\n- Surfaced agent-browser feature coverage in documentation (#1403)\n\n---\n\n## v0.27.0\n\n<p>May 7, 2026</p>\n\n### New Features\n\n- **React introspection** - First-class React DevTools integration with new `react tree`, `react inspect <fiberId>`, `react renders start|stop`, and `react suspense` commands for full component-tree visibility, per-fiber props/hooks/state inspection, render profiling with mount/re-render counts and change details, and Suspense boundary classification with root-cause grouping and recommendations. React DevTools hook is vendored (MIT) and embedded in the binary with zero runtime dependencies (#1257)\n- **Web Vitals** - New `vitals [url]` command that reports Core Web Vitals (LCP, CLS, TTFB, FCP, INP) plus React hydration phases for any page (#1257)\n- **SPA navigation** - New `pushstate <url>` command for client-side SPA navigations without a full page load (#1257)\n- **Init scripts and feature flags** - New `--init-script <path>` flag (repeatable; env `AGENT_BROWSER_INIT_SCRIPTS`) to register scripts before first navigation, and `--enable <feature>` flag (repeatable; env `AGENT_BROWSER_ENABLE`) for built-in init scripts such as `react-devtools` (#1257)\n- **Network route resource type filter** - `network route` now accepts `--resource-type <csv>` to filter intercepted requests by CDP resource type (#1257)\n- **cURL cookie import** - `cookies set --curl <file>` auto-detects JSON, cURL, and Cookie-header formats for bulk cookie import (#1257)\n- **Dashboard proxy support** - The observability dashboard now works from proxied origins via a same-origin proxy, enabling deployment behind reverse proxies and path-based routing (#1111)\n\n### Bug Fixes\n\n- Fixed **`doctor` command** generating duplicate check ids when called multiple times in the same process (#1330)\n\n### Infrastructure\n\n- Switched npm publishing to **trusted publishing** via GitHub Actions OIDC, removing the need for manually managed npm tokens (#1273)\n\n---\n\n## v0.26.0\n\n<p>April 16, 2026</p>\n\n### New Features\n\n- **`doctor` command** - Added `agent-browser doctor` for one-shot diagnosis of an install. Checks environment, Chrome, running daemons, config files, security, providers, and network connectivity; auto-cleans stale daemon sidecar files on every run; and performs a live headless launch test. Supports `--offline` to skip network probes, `--quick` to skip the launch test, `--fix` for opt-in repairs (install missing Chrome, close version-mismatched daemons, prune expired state files), and `--json` for structured output (#1254)\n- **Stable tab ids and labels** - Tabs now have stable string ids like `t1`, `t2`, `t3` that don't shift when other tabs close or popups appear. Tabs can be created with a memorable label via `tab new --label <name> [<url>]`, and labels are interchangeable with `t<N>` ids everywhere a tab ref is accepted (`tab <id|label>`, `tab close <id|label>`). Bare-integer input is rejected with a teaching error so agents can't mistake stable handles for positional indices (#892, #1249, #1250)\n- **`core` skill** - Renamed the built-in `agent-browser` skill to `core` and replaced its ~40-line discovery stub with a ~420-line usage guide covering the core snapshot-ref-act loop, reading, interacting, waiting, common workflows, troubleshooting, and global flags. `agent-browser skills get core` now returns content agents can use directly; `--full` adds references and templates. Added a `hidden:` frontmatter flag so the original `agent-browser` stub stays reachable for `npx skills add` discovery without polluting `skills list` (#1253)\n- **JSON Schema for config files** - Added `agent-browser.schema.json` describing every config option with types and descriptions, enabling IDE autocomplete and validation when referenced via `$schema` in `agent-browser.json` or `~/.agent-browser/config.json`. The schema is served from the docs site at `https://agent-browser.dev/schema.json` (#1242, #1248)\n\n### Bug Fixes\n\n- Fixed **`--state` / `AGENT_BROWSER_STATE`** not actually loading saved browser state (cookies and localStorage) at launch. The flag had been fully plumbed through parsing, env propagation, and validation since the native Rust rewrite, but the load step was never wired up. Storage state now loads after launch across all four paths: explicit launch, auto-connect, provider, and local Chrome (#1241)\n\n### Documentation\n\n- `--help` output now shows the **skills** section first so agents discover `skills get core` (the canonical usage guide) before the core command list (#1251)\n\n---\n\n## v0.25.5\n\n<p>April 16, 2026</p>\n\n### Bug Fixes\n\n- Fixed **`--auto-connect` CDP discovery** preferring HTTP endpoint discovery over the DevToolsActivePort websocket path, which could fail on some setups. The CLI now reads the websocket path from DevToolsActivePort first and only falls back to HTTP discovery (#1218)\n- Fixed **recording context viewport** not inheriting the active viewport dimensions, causing recordings to use default resolution instead of the configured viewport (#1208)\n- Fixed **`get box` and `get styles`** printing no data in text mode (#1231, #1233)\n- Fixed **active page changing** when closing or removing earlier tabs. The previously focused page is now preserved correctly (#1220)\n\n---\n\n## v0.25.4\n\n<p>April 12, 2026</p>\n\n### New Features\n\n- **`skills` command** - Added `agent-browser skills` command for discovering and installing agent skills, with built-in evaluation support for testing skills against live browser sessions (#1225, #1227)\n\n### Bug Fixes\n\n- Fixed **custom viewport dimensions** not being used in streaming frame metadata and image resolution (#1033)\n- Fixed **`--ignore-https-errors`** not being re-applied to recording contexts, causing TLS errors during screen recordings (#1178)\n- Fixed **duplicate option numbering** in the auth skill documentation (#1161)\n\n### Documentation\n\n- The docs site header now **dynamically fetches** the GitHub star count (#1202)\n\n---\n\n## v0.25.3\n\n<p>April 7, 2026</p>\n\n### Bug Fixes\n\n- Fixed **hidden radio/checkbox inputs missing from snapshot refs** when a `<label>` wraps a `display:none` `<input type=\"radio\">` or `<input type=\"checkbox\">`. Chrome excludes these inputs from the accessibility tree entirely, making it impossible for AI agents to identify radio buttons and checkboxes via refs. Hidden inputs inside elements are now detected during cursor-interactive scanning and their parent nodes are promoted to the correct role with proper name and checked state (#1085)\n\n### Documentation\n\n- Added **clickable heading anchors** to the docs site, making it easy to link directly to any section (#1175)\n\n---\n\n## v0.25.2\n\n<p>April 6, 2026</p>\n\n### Bug Fixes\n\n- Fixed **Chrome being killed after ~10s idle on Linux** caused by `PR_SET_PDEATHSIG` tracking the blocking thread that spawned Chrome rather than the daemon process. When Tokio reaped the idle thread, the kernel sent SIGKILL to Chrome even though the daemon was still alive (#1157, #1173)\n\n---\n\n## v0.25.1\n\n<p>April 6, 2026</p>\n\n### Improvements\n\n- **Embedded dashboard** - The observability dashboard is now bundled directly into the CLI binary using `rust-embed`, eliminating the need for `dashboard install`. The dashboard is available immediately after installing agent-browser (#1169)\n\n---\n\n## v0.25.0\n\n<p>April 6, 2026</p>\n\n### New Features\n\n- **AI chat command** - Added `chat` command for AI-powered browser automation. Supports single-shot mode (`chat \"open google.com\"`) and an interactive REPL. The AI agent can execute any agent-browser command via tool calls. Requires `AI_GATEWAY_API_KEY`. Configure the model with `--model` or `AI_GATEWAY_MODEL` (#1160, #1163)\n- **Dashboard AI chat** - The observability dashboard now includes a built-in AI chat interface for conversational browser control alongside live session views (#1160, #1163)\n- **`snapshot --urls`** - New `-u`/`--urls` flag to include href URLs for link elements in snapshot output, giving agents direct access to link targets without additional queries (#1160)\n- **Batch argument mode** - The `batch` command now accepts commands as inline arguments in addition to reading from stdin, simplifying single-invocation multi-command workflows (#1160)\n\n### Bug Fixes\n\n- Fixed **`getByRole`** matching wrong elements (e.g. `<link>` stylesheet elements instead of `<a>` anchors) by rewriting the implementation to use the CDP accessibility tree with ref-based element resolution instead of CSS selectors (#1145)\n- Fixed **`upload` command** not supporting accessibility tree refs (`@eN`) for file upload element selection (#1156)\n- Fixed **`AGENT_BROWSER_DEFAULT_TIMEOUT`** not being applied to `wait` commands. The environment variable now propagates to all wait variants (`wait`, `wait --url`, `wait --text`, `wait --load`, `wait --fn`, `wait --download`) (#1153)\n- Fixed **dashboard download** error handling with improved retry logic for more reliable dashboard installation (#1154)\n\n---\n\n## v0.24.1\n\n<p>April 4, 2026</p>\n\n### New Features\n\n- **Chrome profile login state reuse** - `--profile <name>` now resolves Chrome profile names (e.g. `Default`, `Profile 1`) and copies the profile to a temp directory to reuse login state, cookies, and extensions without modifying the original. Added `profiles` command to list available Chrome profiles with `--json` support (#1131)\n\n### Bug Fixes\n\n- Fixed **`--ignore-https-errors`** not passing `--ignore-certificate-errors` as a Chrome launch flag, causing TLS errors like `ERR_SSL_PROTOCOL_ERROR` to be rejected at the network layer before CDP could intervene (#1132)\n- Fixed **orphaned Chrome processes** on daemon exit by spawning Chrome in its own process group and killing the entire group on shutdown. On Linux, `PR_SET_PDEATHSIG` ensures Chrome is killed even if the daemon is OOM-killed (#1137)\n- Fixed **CDP attach hang on Chrome 144+** when connecting to real browser sessions. Targets paused waiting for the debugger after attach are now resumed with `Runtime.runIfWaitingForDebugger` (#1133)\n- Fixed **stale daemon after upgrade** silently reusing the old daemon process with broken CDP behavior. The daemon now writes a `.version` sidecar file and auto-restarts on version mismatch (#1134)\n- Fixed **stale daemon/socket recovery** where `close --all` failed to clean up zombie daemons and stale files. Unreachable daemons are now force-killed and orphaned socket/pid files are removed (#1136)\n- Fixed **idle timeout** not being respected because the sleep future was recreated on every select loop iteration, preventing the deadline from being reached (#1110)\n- Fixed **browser not relaunching** when launch options change (e.g. adding extensions to `config.json`) between consecutive launch commands (#996)\n- Fixed **`auto_launch()`** not honouring `AGENT_BROWSER_PROVIDER` for cloud providers, causing non-launch commands to fall back to local Chrome instead of connecting via the provider API (#1126)\n- Fixed **HAR capture missing API requests** under heavy traffic by increasing the CDP broadcast buffer from 256 to 4096 events, reducing the drain interval from 500ms to 100ms, and enabling network tracking in cross-origin iframes (#1135)\n\n---\n\n## v0.24.0\n\n<p>April 2, 2026</p>\n\n### New Features\n\n- **AWS Bedrock AgentCore provider** - Added AWS Bedrock AgentCore as a cloud browser provider. Connect with `--provider agentcore` or `AGENT_BROWSER_PROVIDER=agentcore`. Uses lightweight manual SigV4 signing for authentication with support for the full AWS credential provider chain (environment variables, AWS CLI, SSO, IAM roles). Configure with `AGENTCORE_REGION`, `AGENTCORE_PROFILE_ID`, and `AGENTCORE_BROWSER_ID` environment variables. Returns session ID and Live View URL in the launch response (#397)\n\n### Documentation\n\n- Added AgentCore provider page to docs site, README options table, SKILL.md, and dashboard provider icons (#1120)\n\n---\n\n## v0.23.4\n\n<p>March 31, 2026</p>\n\n### Bug Fixes\n\n- Fixed **daemon hang on Linux** caused by a `waitpid(-1)` race condition in the SIGCHLD handler that stole exit statuses from Rust's `Child` handles, leaving the daemon in a broken state. Replaced the global signal handler with targeted crash detection via the existing drain interval (#1098)\n\n---\n\n## v0.23.3\n\n<p>March 30, 2026</p>\n\n### Bug Fixes\n\n- Fixed **drag and drop** not working because `mouseMoved` events during the drag omitted the `buttons` bitmask, causing the browser to see `event.buttons === 0` and never fire `dragstart`/`dragover`/`drop` (#1087)\n\n---\n\n## v0.23.2\n\n<p>March 30, 2026</p>\n\n### New Features\n\n- **Dashboard session creation** - Sessions can now be created directly from the dashboard UI. A new session dialog provides a unified selector grid for local engines (Chrome, Lightpanda) and cloud providers (Browserbase, Browserless, Browser Use, Kernel) with async creation, loading state, and error display (#1092)\n- **Dashboard provider icons** - The session sidebar now shows the provider or engine icon for each session, making it easy to identify which backend a session is using (#1092)\n\n### Bug Fixes\n\n- Fixed **Browser Use** provider using an intermediate API call instead of connecting directly via WSS, which caused connection failures (#1092)\n- Fixed **Browserbase** provider not sending an explicit JSON body and `Content-Type` header, causing session creation to fail (#1092)\n- Fixed **provider navigation** hanging because `wait_for_lifecycle` waited for page load events that remote providers may not emit. Navigation with `--provider` now automatically sets `waitUntil=none` (#1092)\n- Fixed **remote CDP connections** timing out by increasing the CDP connect timeout from 10s to 25s for cloud providers (#1092)\n- Fixed **zombie daemon processes** not being cleaned up when a provider connection fails during session creation from the dashboard (#1092)\n\n---\n\n## v0.23.1\n\n<p>March 30, 2026</p>\n\n### New Features\n\n- **Auto-dismissal for alert and beforeunload dialogs** - JavaScript `alert()` and `beforeunload` dialogs are now automatically accepted to prevent the agent from blocking indefinitely. `confirm` and `prompt` dialogs still require explicit `dialog accept/dismiss` commands. Disable with `--no-auto-dialog` flag or `AGENT_BROWSER_NO_AUTO_DIALOG` environment variable (#1075)\n- **Puppeteer browser cache fallback** - Chrome discovery now searches `~/.cache/puppeteer/chrome/` (or `PUPPETEER_CACHE_DIR`) for Chrome binaries, so users with an existing Puppeteer installation can use agent-browser without a separate install step (#1088)\n- **Console output improvements** - `console.log` of objects now shows the actual object preview (e.g. `{userId: \"abc\", count: 42}`) instead of `\"Object\"`. JSON output includes a raw `args` array for programmatic access (#1040)\n\n### Bug Fixes\n\n- Fixed **same-document navigation** (e.g. SPA hash routing) hanging forever because `wait_for_lifecycle` waited for a `Page.loadEventFired` that never fires on same-document navigations (#1059)\n- Fixed **save_state** only capturing cookies and localStorage for the current origin, silently dropping cross-domain data (e.g. SSO/CAS auth cookies). Now uses `Network.getAllCookies` and collects localStorage from all visited origins (#1064)\n- Fixed **externally opened tabs** not appearing in `tab list` when using `--cdp` mode. Tabs opened by the user or another CDP client are now detected and tracked (#1042)\n- Fixed **dashboard server** not picking up installed files without a restart. `dashboard install` now takes effect immediately on a running server (#1066)\n- Fixed **Windows Chrome extraction** failing because zip path normalization used forward slashes while the extraction code expected backslashes (#1088)\n\n---\n\n## v0.23.0\n\n<p>March 27, 2026</p>\n\n### New Features\n\n- **Observability dashboard** - Added a local web UI (`dashboard`) that shows live browser viewports, command activity feeds, console output, network requests, storage, and extensions for all sessions. Manage it with `dashboard start`, `dashboard stop`, and `dashboard install`. The dashboard runs as a standalone background process and all sessions stream to it automatically (#1034)\n\n```bash\nagent-browser dashboard install\nagent-browser dashboard start\nagent-browser open example.com # session appears in dashboard\nagent-browser dashboard stop\n```\n\n- **Runtime stream management** - Added `stream enable`, `stream disable`, and `stream status` commands to control WebSocket streaming at runtime. Streaming is now always enabled by default; `AGENT_BROWSER_STREAM_PORT` overrides the port instead of toggling the feature (#951)\n- **Close all sessions** - Added `close --all` flag to close every active browser session at once\n\n### Bug Fixes\n\n- Fixed **Lightpanda engine** compatibility (#1050)\n- Fixed **Windows daemon TCP bind** failing when Hyper-V reserves the port by falling back to an OS-assigned port and writing it to a `.port` file (#1041)\n- Fixed **Windows dashboard relay** using Unix socket instead of TCP (#1038)\n- Fixed **radio/checkbox elements** being dropped from compact snapshot tree because the `ref=` check required a leading `[` that those elements lack (#1008)\n\n---\n\n## v0.22.3\n\n<p>March 25, 2026</p>\n\n### Bug Fixes\n\n- **Re-apply download behavior on recording context** - Fixed an issue where downloads were silently dropped in recording contexts because `Browser.setDownloadBehavior` set at launch only applied to the default context. The download behavior is now re-applied when a new recording context is created (#1019)\n- **Reap zombie Chrome process and fast-detect crash for auto-restart** - Added a non-blocking process-exit check before attempting CDP connection checks. This prevents a 3-second CDP timeout when Chrome has already crashed or exited, enabling faster detection and auto-restart of the browser (#1023)\n- **Route keyboard `type` through text input** - Fixed keyboard `type` subaction to correctly route through the text input handler, and added support for an `insertText` subaction using `Input.insertText` (#1014)\n- **Handle `--clear` flag in `console` command** - Fixed the `console` command to accept and process a `clear` parameter, allowing console event history to be cleared (#1015)\n\n---\n\n## v0.22.2\n\n<p>March 24, 2026</p>\n\n### New Features\n\n- **Dialog status command** - Added `dialog status` command to check whether a JavaScript dialog is currently open (#999)\n- **Dialog warning field** - Command responses now include a `warning` field when a JavaScript dialog is pending, indicating the dialog type and message (#999)\n\n### Improvements\n\n- **Standard proxy environment variables** - The proxy setting now automatically falls back to standard environment variables (`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and their lowercase variants), with `NO_PROXY`/`no_proxy` respected for bypass rules (#1000)\n- **Font packages for `--with-deps`** - Installing with `--with-deps` now includes CJK and emoji font packages on Linux (Debian, RPM, and yum-based distros) to prevent missing glyphs when rendering international content (#1002)\n\n### Bug Fixes\n\n- Fixed `state show` always failing with \"Missing 'path' parameter\" due to a mismatched JSON field name (#994)\n- Fixed `console` command returning only `Done` due to a JSON field name mismatch in the response (#986)\n- Fixed browser-domain CDP events being dropped during downloads due to a `sessionId` mismatch (#998)\n- Fixed proxy authentication by handling credentials via the CDP `Fetch.authRequired` event rather than passing them inline (#1000)\n\n---\n\n## v0.22.1\n\n<p>March 24, 2026</p>\n\n### Bug Fixes\n\n- Fixed **modifier key chords** (e.g. `Control+a`, `Shift+Enter`, `Control+Shift+a`) not being handled correctly when using `press`. Modifier keys are now parsed and forwarded as CDP modifier bitmasks rather than treated as part of the key name (#980)\n- Fixed **query parameters being dropped** from `--cdp` HTTP URLs (e.g. `http://host:9222?mode=Hello`). Query strings are now preserved and forwarded to the remote CDP endpoint (#982)\n\n---\n\n## v0.22.0\n\n<p>March 23, 2026</p>\n\n### New Features\n\n- **Cross-origin iframe support** - Added support for snapshots and interactions within cross-origin iframes via `Target.setAutoAttach` (#949)\n- **Network request detail and filtering** - Added `network request <requestId>` command to view full request/response detail, and new filtering options for `network requests` including `--type` (e.g. `xhr,fetch`), `--method` (e.g. `POST`), and `--status` (e.g. `2xx`, `400-499`) (#935)\n\n```bash\nagent-browser network requests --type xhr,fetch --method POST\nagent-browser network request <requestId>\n```\n\n### Improvements\n\n- **Snapshot usability** - Reduced AI cognitive load by filtering semantic noise from snapshot output; cursor-interactive elements are now included by default, making the `-C` flag unnecessary (#968)\n- **Upgrade command** - Improved robustness of installation method detection in the upgrade command (#960)\n- **Target tracking** - Enhanced target tracking and page information handling for more reliable browser session management (#969)\n\n### Bug Fixes\n\n- Fixed **viewport dimensions** being reported incorrectly in streaming status messages and screencast (#952)\n- Fixed **`find` command** flags such as `--exact` and `--name` leaking into fill values when used with fill actions (#955)\n- Fixed **state commands** incorrectly starting the daemon when no `session_name` is provided (#677, #964)\n- Fixed **auto-connect** triggering when the daemon is already running, preventing duplicate connections (#971)\n- Fixed **Enter key press** not working by adding a text field to `keyDown` events (#972)\n- Fixed **download command** to properly handle absolute paths and correctly click target elements (#970)\n\n### Breaking Changes\n\n- The `-C` / `--cursor` flag for `snapshot` is deprecated; cursor-interactive elements are now included by default and the flag has no additional effect (#968)\n\n---\n\n## v0.21.4\n\n<p>March 20, 2026</p>\n\n### Bug Fixes\n\n- **Auth login readiness** - `agent-browser auth login` now navigates with `load`, waits for usable login form selectors, and uses staged username detection (targeted email/username selectors first, then broad text-input fallback). This reduces SPA timing failures, avoids false matches on unrelated text fields, and prevents `networkidle` hangs on pages with continuous background requests.\n\n---\n\n## v0.21.3\n\n<p>March 20, 2026</p>\n\n### Bug Fixes\n\n- **WebSocket keepalive for remote browsers** - Added WebSocket Ping frames and TCP `SO_KEEPALIVE` to prevent CDP connections from being silently dropped by intermediate proxies during idle periods (#936)\n- **XPath selector support** - Fixed element resolution to correctly handle the `xpath=` selector prefix (#908)\n\n### Performance\n\n- **Fast-path for identical snapshots** - Short-circuits the Myers diff algorithm when comparing a snapshot to itself, avoiding unnecessary computation in retry and loop workloads (#922)\n\n---\n\n## v0.21.2\n\n<p>March 18, 2026</p>\n\n### Bug Fixes\n\n- **Deduplicate text content in snapshots** - Fixed an issue where duplicate text content appeared in page snapshots (#909)\n- **Native mouse drag state** - Fixed incorrect raw native mouse drag state not being properly tracked across `down`, `move`, and `up` events (#872)\n- **Chrome headless launch failures** - Fixed browser launch failures caused by the `--enable-unsafe-swiftshader` flag in Chrome headless mode (#915)\n- **Origin-scoped `--headers` persistence** - Restored correct persistence of origin-scoped headers set via `--headers` across navigation commands (#894)\n- **Relative URLs in WebSocket domain filter** - Fixed handling of relative URLs in the WebSocket domain filter script (#624)\n\n---\n\n## v0.21.1\n\n<p>March 18, 2026</p>\n\n### New Features\n\n- **HAR 1.2 network capture** - Added commands to capture and export network traffic in HAR 1.2 format, including accurate request/response timing, headers, body sizes, and resource types sourced from Chrome DevTools Protocol events (#864)\n- **Built-in `upgrade` command** - Added `agent-browser upgrade` to self-update the CLI; automatically detects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command (#898)\n\n```bash\nagent-browser upgrade\n```\n\n---\n\n## v0.21.0\n\n<p>March 17, 2026</p>\n\n### New Commands\n\n- **`batch`** -- Execute multiple commands in a single invocation. Pipe a JSON array of string arrays to stdin and receive results sequentially. Supports `--bail` to stop on first error and `--json` for structured output.\n\n```bash\necho '[[\"open\",\"example.com\"],[\"snapshot\"]]' | agent-browser batch --json\n```\n\n- **`network har start/stop`** -- Capture and export network traffic in HAR 1.2 format.\n\n```bash\nagent-browser network har start\n# ... interact with the page ...\nagent-browser network har stop ./trace.har\n```\n\n### New Features\n\n- **iframe support** -- CLI interactions and snapshots now traverse into iframe content, enabling automation of cross-frame pages.\n- **`--idle-timeout` flag** -- Automatically shut down the daemon after a period of inactivity. Accepts human-friendly formats such as `10s`, `3m`, `1h`, or raw milliseconds. Also available as `AGENT_BROWSER_IDLE_TIMEOUT_MS`.\n- **Cursor-interactive elements in snapshots** -- Cursor-interactive elements are now embedded directly into the snapshot tree for richer context.\n- **Brave Browser auto-connect** -- Auto-discovery of Brave Browser for CDP connections on macOS, Linux, and Windows.\n- **linux-musl (Alpine) builds** -- Pre-built binaries for linux-musl targeting both x64 and arm64, enabling native support for Alpine Linux and other musl-based distributions.\n- **WebSocket fallback for CDP discovery** -- When HTTP-based CDP endpoint discovery fails, the CLI now falls back to a WebSocket connection automatically.\n\n### Improvements\n\n- **`--full`/`-f` refactored to command-level flag** -- Moved from a global flag to a per-command flag for clearer scoping.\n- **Enhanced Chrome launch** -- Added `--user-data-dir` support and configurable launch timeout for more reliable browser startup. Chrome now retries launching up to 3 times on transient startup failures.\n- **Consecutive `--auto-connect` commands** -- Multiple consecutive auto-connect commands no longer require a full browser relaunch; external connections are correctly identified and reused.\n- **Batched CDP calls** -- `snapshot -C` and `screenshot --annotate` now batch CDP calls instead of issuing sequential round-trips per element, preventing timeouts on high-latency WSS connections.\n\n### Bug Fixes\n\n- Fixed remote CDP (WSS) snapshot and screenshot hangs by removing WebSocket message/frame size limits\n- Fixed Material Design `check`/`uncheck` falling back to JS `.click()` for overlay-based controls\n- Fixed punctuation characters being dropped in the `type` command\n- Fixed WebSocket streaming by keeping the StreamServer instance alive\n- Filtered internal Chrome targets (`chrome://`, `devtools://`) from auto-connect discovery\n- Fixed `snapshot --selector` scoping to the matched element's subtree\n- Fixed network idle detection returning prematurely for cached pages\n- Fixed daemon panic on broken stderr pipe during Chrome launch\n- Fixed broadcast channel lag being treated as stream closure\n- Fixed daemon liveness detection for PID namespace isolation (e.g. `unshare`)\n- Fixed Ubuntu dependency install accidentally removing system packages\n\n---\n\n## v0.20.0\n\n<p>March 13, 2026</p>\n\n### Full Native Rust\n\nagent-browser is now 100% native Rust. The Node.js/Playwright daemon has been completely removed -- no Node.js runtime or Playwright dependency is required to run the daemon. The Rust native daemon is now the only implementation.\n\n<table>\n <thead>\n <tr>\n <th>Metric</th>\n <th>Node.js</th>\n <th>Rust</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Cold start</td>\n <td>1002ms</td>\n <td>617ms</td>\n <td>1.6x faster</td>\n </tr>\n <tr>\n <td>Daemon memory</td>\n <td>143 MB</td>\n <td>8 MB</td>\n <td>18x less</td>\n </tr>\n <tr>\n <td>Install size</td>\n <td>710 MB</td>\n <td>7 MB</td>\n <td>99x smaller</td>\n </tr>\n </tbody>\n</table>\n\n```bash\nnpm install -g agent-browser # 7 MB install\nagent-browser install # download Chrome\nagent-browser open example.com\nagent-browser snapshot\n```\n\n### Improvements\n\n- **Benchmarks** -- Added benchmark suite for comparing native vs Node.js daemon performance across cold start, warm start, memory, and install size.\n- **Chromium installer hardened** -- Fixed zip path traversal vulnerability in Chrome for Testing installer.\n\n### Bug Fixes\n\n- Fixed `--headed false` flag not being respected in CLI\n- Fixed \"not found\" error pattern in `to_ai_friendly_error` incorrectly catching non-element errors\n- Fixed storage local key lookup parsing and text output\n- Fixed Lightpanda engine launch with release binaries\n- Hardened Lightpanda startup timeouts\n\n---\n\n## v0.19.0\n\n<p>March 13, 2026</p>\n\n### New Features\n\n- **Browserless.io provider** -- Added browserless.io as a browser provider, supported in both Node.js and native daemon paths. Connect to remote Browserless instances using the `--provider browserless` flag or `AGENT_BROWSER_PROVIDER=browserless` environment variable.\n\n```bash\nexport BROWSERLESS_API_KEY=\"your-api-key\"\nagent-browser --provider browserless open example.com\nagent-browser --provider browserless screenshot ./page.png\n```\n\n- **`clipboard` command** -- Read from and write to the browser clipboard. Supports `read`, `write`, `copy` (simulates Ctrl+C), and `paste` (simulates Ctrl+V) operations.\n\n```bash\nagent-browser clipboard read\nagent-browser clipboard write \"Hello, World!\"\nagent-browser clipboard copy\nagent-browser clipboard paste\n```\n\n- **Screenshot output configuration** -- New global flags for persistent screenshot settings: `--screenshot-dir`, `--screenshot-quality`, and `--screenshot-format`. Also available as environment variables `AGENT_BROWSER_SCREENSHOT_DIR`, `AGENT_BROWSER_SCREENSHOT_QUALITY`, and `AGENT_BROWSER_SCREENSHOT_FORMAT`.\n\n```bash\nagent-browser screenshot --screenshot-dir ./shots\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80\n```\n\n### Bug Fixes\n\n- Fixed `wait --text` not working in native daemon path\n- Fixed `BrowserManager.navigate()` and package entry point\n- Fixed extensions not being loaded from `config.json`\n- Fixed scroll on page load\n- Fixed HTML retrieval by using `browser.getLocator()` for selector operations\n\n---\n\n## v0.18.0\n\n<p>March 12, 2026</p>\n\n### New Features\n\n- **`inspect` command** -- Opens Chrome DevTools for the active page by launching a local proxy server that forwards the DevTools frontend to the browser's CDP WebSocket. Agent commands continue to work while DevTools is open.\n\n```bash\nagent-browser open example.com\nagent-browser inspect # opens DevTools in your browser\nagent-browser click \"Submit\" # commands still work while DevTools is open\n```\n\n- **`get cdp-url` subcommand** -- Retrieve the Chrome DevTools Protocol WebSocket URL for the active page, useful for connecting external debugging tools.\n\n```bash\nagent-browser get cdp-url\n```\n\n- **Screenshot annotate** -- The `--annotate` flag overlays numbered labels on interactive elements in screenshots.\n\n### Improvements\n\n- **KERNEL_API_KEY now optional** -- External credential injection no longer requires `KERNEL_API_KEY` to be set, making it easier to use Kernel with pre-configured environments.\n- **Browserbase simplified** -- Removed the `BROWSERBASE_PROJECT_ID` requirement, reducing setup friction for Browserbase users.\n\n### Bug Fixes\n\n- Fixed Browserbase API using incorrect endpoint to release sessions\n- Fixed CDP connect paths using hardcoded 10s timeout instead of the configurable default timeout\n- Fixed lone Unicode surrogates causing errors by sanitizing with `toWellFormed()`\n- Fixed CDP connection failure on IPv6-first systems\n- Fixed recordings not inheriting the current viewport settings\n\n---\n\n## v0.17.1\n\n<p>March 9, 2026</p>\n\n### Improvements\n\n- **Viewport scale factor** -- Added support for device scale factor (retina display) in the viewport command via an optional `scale` parameter.\n- **Webview target support** -- Added webview target type support for better Electron application compatibility. The pages list now includes target type information.\n\n---\n\n## v0.17.0\n\n<p>March 8, 2026</p>\n\n### New Features\n\n- **Lightpanda browser engine support** -- Added `--engine <name>` flag to select the browser engine (`chrome` by default, or `lightpanda`), implying `--native` mode. Configurable via `AGENT_BROWSER_ENGINE` environment variable.\n\n```bash\nagent-browser --engine lightpanda open example.com\n```\n\n- **Dialog dismiss command** -- Added support for `dismiss` subcommand in dialog command parsing.\n\n### Improvements\n\n- **Daemon startup error reporting** -- Daemon startup errors are now surfaced directly instead of showing an opaque timeout message.\n- **CDP port discovery** -- Replaced hand-rolled HTTP client with `reqwest` for more reliable CDP port discovery.\n- **Chrome extensions** -- Extensions now load correctly by forcing headed mode when extensions are present.\n- **Google Translate bar suppression** -- Suppressed the Google Translate bar in native headless mode to avoid interference.\n- **Auth cookie persistence** -- Auth cookies are now persisted on browser close in native mode.\n\n### Bug Fixes\n\n- Fixed native auth login failing due to incompatible encryption format.\n\n### Performance\n\n- Added benchmarks to the CLI codebase.\n\n---\n\n## v0.16.0\n\n<p>March 3, 2026</p>\n\n### New Features\n\n- **Native Rust daemon (experimental).** A pure Rust daemon that communicates with Chrome directly via the Chrome DevTools Protocol (CDP), eliminating Node.js and Playwright dependencies entirely. Enable with `--native`, `AGENT_BROWSER_NATIVE=1`, or `\"native\": true` in your config file. Supports 150+ commands with full parity to the default Node.js daemon.\n\n```bash\n# Via flag\nagent-browser --native open example.com\n\n# Via environment variable\nexport AGENT_BROWSER_NATIVE=1\nagent-browser open example.com\n```\n\nOr add to `agent-browser.json`:\n\n```json\n{\"native\": true}\n```\n\n### Architecture\n\n<table>\n <thead>\n <tr><th></th><th>Default (Node.js)</th><th>Native (<code>--native</code>)</th></tr>\n </thead>\n <tbody>\n <tr><td><strong>Runtime</strong></td><td>Node.js + Playwright</td><td>Pure Rust binary</td></tr>\n <tr><td><strong>Protocol</strong></td><td>Playwright protocol</td><td>Direct CDP / WebDriver</td></tr>\n <tr><td><strong>Install size</strong></td><td>Larger (Node.js + npm deps)</td><td>Smaller (single binary)</td></tr>\n <tr><td><strong>Browser support</strong></td><td>Chromium, Firefox, WebKit</td><td>Chromium, Safari (via WebDriver)</td></tr>\n <tr><td><strong>Stability</strong></td><td>Stable</td><td>Experimental</td></tr>\n </tbody>\n</table>\n\n### What's Supported\n\nAll core commands work in native mode: navigation, interaction (click, fill, type, press, hover, scroll, drag), observation (snapshot, screenshot, eval), state management (cookies, storage, state save/load), tabs, emulation (viewport, device, timezone, locale, geolocation), streaming, diffing, recording, and profiling.\n\nThe native daemon also includes a WebDriver backend for Safari and iOS support.\n\n### Known Limitations\n\n- Firefox and WebKit are not yet supported (Chromium and Safari only)\n- Playwright trace format is not available (uses Chrome's built-in tracing)\n- HAR export is not available\n- Network route interception uses CDP Fetch domain instead of Playwright's route API\n- The native and Node.js daemons share the same session socket. Use `agent-browser close` before switching between modes.\n\nSee the [Native Mode](/native-mode) page for full details.\n\n---\n\n## v0.15.0\n\n<p>February 25, 2026</p>\n\n### New Features\n\n- **Authentication vault** -- Store credentials locally (always AES-256-GCM encrypted) and reference them by name. The LLM never sees passwords. Commands: `auth save`, `auth login`, `auth list`, `auth show`, `auth delete`. Passwords can be piped via stdin (`--password-stdin`) to avoid shell history exposure.\n- **Content boundary markers** -- `--content-boundaries` wraps page-sourced output in structural delimiters with a per-process CSPRNG nonce, so LLMs can distinguish trusted tool output from untrusted page content. In `--json` mode, a `_boundary` object is injected with `nonce` and `origin` fields.\n- **Domain allowlist** -- `--allowed-domains` restricts navigation, sub-resource requests, WebSocket connections, and EventSource streams to trusted domains. Supports exact match and wildcard prefix patterns (e.g., `*.example.com`).\n- **Action policy** -- `--action-policy` gates actions using a static JSON policy file with `allow`/`deny` lists across 13 action categories. Auth vault operations bypass policy enforcement.\n- **Action confirmation** -- `--confirm-actions` requires explicit approval for sensitive action categories. New `confirm` and `deny` commands for orchestrator use. `--confirm-interactive` enables human-in-the-loop terminal prompts (auto-denies if stdin is not a TTY). Pending confirmations auto-deny after 60 seconds.\n- **Output length limits** -- `--max-output` truncates large page outputs to prevent LLM context flooding.\n- **`--download-path` option** -- Set a default download directory via flag, `AGENT_BROWSER_DOWNLOAD_PATH` env var, or `downloadPath` config key. Without it, downloads go to a temporary directory deleted when the browser closes.\n- **`--selector` flag for scroll** -- Scroll within a specific container element instead of the page: `agent-browser scroll down 500 --selector \"div.scroll-container\"`\n\n```bash\n# Auth vault\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\nagent-browser auth login github\n\n# Security flags\nagent-browser --content-boundaries --allowed-domains \"example.com,*.example.com\" --max-output 50000 open https://example.com\n\n# Download path\nagent-browser --download-path ./downloads open https://example.com\n\n# Scroll within container\nagent-browser scroll down 500 --selector \"div.content\"\n```\n\n### Environment Variables\n\nSix new environment variables for security configuration: `AGENT_BROWSER_CONTENT_BOUNDARIES`, `AGENT_BROWSER_MAX_OUTPUT`, `AGENT_BROWSER_ALLOWED_DOMAINS`, `AGENT_BROWSER_ACTION_POLICY`, `AGENT_BROWSER_CONFIRM_ACTIONS`, `AGENT_BROWSER_CONFIRM_INTERACTIVE`.\n\n---\n\n## v0.14.0\n\n<p>February 23, 2026</p>\n\n### New Features\n\n- **`keyboard` command** -- Type with real keystrokes, insert text, and press shortcuts at the currently focused element without needing a selector (`keyboard type`, `keyboard inserttext`).\n- **`--color-scheme` flag** -- Persistent dark/light mode preference across browser sessions via flag or `AGENT_BROWSER_COLOR_SCHEME` env var.\n\n```bash\nagent-browser keyboard type \"Hello world\"\nagent-browser keyboard inserttext \"pasted text\"\nagent-browser --color-scheme dark open https://example.com\n```\n\n### Bug Fixes\n\n- Fixed IPC EAGAIN errors (os error 35/11) with backpressure-aware socket writes, command serialization, and lowered default Playwright timeout to 25s (configurable via `AGENT_BROWSER_DEFAULT_TIMEOUT`).\n- Fixed remote debugging (CDP) reconnection.\n- Fixed state load failing when no browser is running.\n- Fixed `--annotate` flag warning appearing when not explicitly passed via CLI.\n\n---\n\n## v0.13.0\n\n<p>February 20, 2026</p>\n\n### New Features\n\n- **Diff commands** -- Compare snapshots, screenshots, and URLs between page states. Run visual pixel diffs against baseline images, compare accessibility tree snapshots with customizable depth and selectors, and diff two URLs side-by-side with optional screenshot comparison.\n\n```bash\nagent-browser diff snapshot\nagent-browser diff screenshot --baseline before.png\nagent-browser diff url https://staging.example.com https://prod.example.com\n```\n\n---\n\n## v0.12.0\n\n<p>February 18, 2026</p>\n\n### New Features\n\n- **Annotated screenshots** -- `--annotate` flag overlays numbered labels on interactive elements and prints a legend mapping each label to its element ref. Enables multimodal AI models to reason about visual layout while using the same `@eN` refs for subsequent interactions. Also settable via `AGENT_BROWSER_ANNOTATE` env var.\n\n```bash\nagent-browser screenshot --annotate\n```\n\n---\n\n## v0.11.1\n\n<p>February 18, 2026</p>\n\n### Documentation\n\n- Added documentation for command chaining with `&&` across README, CLI help output, docs, and skill files.\n\n---\n\n## v0.11.0\n\n<p>February 17, 2026</p>\n\n### New Features\n\n- **Configuration file support** -- Automatic loading from user (`~/.agent-browser/config.json`) and project (`./agent-browser.json`) directories with priority-based merging.\n- **Profiler commands** -- Chrome DevTools profiling with `profiler start` and `profiler stop`.\n- **Browser extension loading** -- `--extension` flag to load browser extensions.\n- **Storage state management** -- `state save` and `state load` commands for auth state persistence.\n- **iOS device emulation** -- `--device` flag for device emulation.\n- **Enhanced click** -- `--new-tab` option for click commands.\n- **Enhanced find** -- Additional actions and filtering options.\n- **CDP WebSocket URLs** -- `--cdp` now accepts WebSocket URLs in addition to ports.\n\n---\n\n## v0.10.0\n\n<p>February 13, 2026</p>\n\n### New Features\n\n- **Session persistence** - Automatic save/restore of cookies and localStorage across browser restarts using `--session-name` flag\n- **Encrypted state** - Optional AES-256-GCM encryption for saved session state data\n- **State management commands** - New commands for listing, showing, renaming, clearing, and cleaning up session state files\n- **New tab on click** - Added `--new-tab` option for click commands to open links in new tabs\n\n```bash\n# Persist session state\nagent-browser --session-name myapp open https://example.com\n\n# Manage saved states\nagent-browser state list\nagent-browser state show myapp\nagent-browser state clear myapp\n```\n\n---\n\n## v0.9.4\n\n<p>February 13, 2026</p>\n\n### Bug Fixes\n\n- Fixed all Clippy lint warnings in the Rust CLI\n\n---\n\n## v0.9.3\n\n<p>February 12, 2026</p>\n\n### Improvements\n\n- Added support for custom executable path in CLI browser launch options\n- Documentation site UI improvements including a new chat component with sheet-based interface\n\n---\n\n## v0.9.2\n\n<p>February 10, 2026</p>\n\n### Improvements\n\n- Migrated documentation site to MDX for improved content authoring\n- Added AI-powered docs chat feature\n- Updated README with Homebrew installation instructions for macOS users\n\n---\n\n## v0.9.1\n\n<p>February 5, 2026</p>\n\n### New Features\n\n- **`--allow-file-access` flag** - Enable opening and interacting with local `file://` URLs (PDFs, HTML files) by passing Chromium flags that allow JavaScript access to local files\n- **`-C`/`--cursor` flag for snapshots** - Include cursor-interactive elements like divs with onclick handlers or `cursor:pointer` styles\n\n```bash\nagent-browser --allow-file-access open file:///path/to/document.pdf\nagent-browser snapshot -C\n```\n\n---\n\n## v0.9.0\n\n<p>February 3, 2026</p>\n\n### New Features\n\n- **iOS Simulator support** - Mobile Safari testing via Appium with real device and simulator support\n\n```bash\n# List available iOS simulators\nagent-browser device list\n\n# Launch on iOS device\nagent-browser -p ios --device \"iPhone 16 Pro\" open https://example.com\n\n# Touch interactions\nagent-browser tap @e1\nagent-browser swipe up\n```\n\n---\n\n## v0.8.10\n\n<p>February 2, 2026</p>\n\n### Improvements\n\n- Added `--stdin` flag for eval command to read JavaScript from stdin, enabling heredoc usage for multiline scripts\n- Fixed binary permission issues on macOS/Linux when postinstall scripts don't run\n\n---\n\n## v0.8.9\n\n<p>February 2, 2026</p>\n\n### Improvements\n\n- Added `--stdin` flag for eval command to read JavaScript from stdin\n\n---\n\n## v0.8.8\n\n<p>February 2, 2026</p>\n\n### Improvements\n\n- Added base64 encoding support for the eval command with `-b`/`--base64` flag to avoid shell escaping issues\n- Updated documentation with AI agent setup instructions\n\n---\n\n## v0.8.7\n\n<p>February 2, 2026</p>\n\n### Bug Fixes\n\n- Fixed browser launch options not being passed correctly when using persistent profiles\n- Added pre-flight checks for socket path length limits and directory write permissions\n- Improved error handling to properly exit with failure status when browser launch fails\n\n---\n\n## v0.8.6\n\n<p>January 31, 2026</p>\n\n### Bug Fixes\n\n- Improved daemon connection reliability with automatic retry logic for transient errors\n- CLI now cleans up stale socket and PID files before starting a new daemon\n\n---\n\n## v0.8.5\n\n<p>January 29, 2026</p>\n\n### Bug Fixes\n\n- Fixed version synchronization to automatically update Cargo.lock alongside Cargo.toml during releases\n- Made the CLI binary executable in the npm package\n\n---\n\n## v0.8.4\n\n<p>January 27, 2026</p>\n\n### Bug Fixes\n\n- Fixed \"Daemon not found\" error when running through AI agents by resolving symlinks in the executable path\n\n---\n\n## v0.8.3\n\n<p>January 27, 2026</p>\n\n### Improvements\n\n- Replaced shell-based CLI wrappers with a cross-platform Node.js wrapper to enable npx support on Windows\n- Added postinstall logic to patch npm bin entry on global installs for zero-overhead native binary invocation\n- Added CI tests to verify global installation across all platforms\n\n---\n\n## v0.8.2\n\n<p>January 26, 2026</p>\n\n### Bug Fixes\n\n- Fixed the Windows CMD wrapper to use the native binary directly instead of routing through Node.js\n- Added retry logic to CI install command for transient browser installation failures\n\n---\n\n## v0.8.1\n\n<p>January 26, 2026</p>\n\n### Improvements\n\n- Improved release workflow to validate binary file sizes and ensure binaries are executable after npm install\n- Updated documentation site with a new mobile navigation system\n\n---\n\n## v0.8.0\n\n<p>January 26, 2026</p>\n\n### New Features\n\n- **Kernel cloud browser provider** - Connect to Kernel (kernel.sh) for remote browser infrastructure with stealth mode and persistent profiles\n\n```bash\n# Via -p flag\nagent-browser -p kernel open https://example.com\n\n# Via environment variable\nexport AGENT_BROWSER_PROVIDER=kernel\nexport KERNEL_API_KEY=your-api-key\nagent-browser open https://example.com\n\n# With persistent profile\nexport KERNEL_PROFILE_NAME=my-profile\nagent-browser open https://example.com\n```\n\n- **Ignore HTTPS certificate errors** - New flag for working with self-signed certificates and development environments\n\n```bash\nagent-browser --ignore-https-errors open https://localhost:3000\n```\n\n- **Enhanced cookie management** - Extended `cookies set` command with additional flags for setting cookies before page load\n\n```bash\nagent-browser cookies set session_id \"abc123\" --url https://app.example.com --httpOnly --secure\nagent-browser cookies set token \"xyz\" --domain .example.com --path /api --expires 1735689600\n```\n\n### Bug Fixes\n\n- Fixed tab list command not recognizing new pages opened via clicks or `target=\"_blank\"` links\n- Fixed `check` command hanging indefinitely\n- Fixed `set device` not applying deviceScaleFactor - HiDPI screenshots now work correctly\n- Fixed state load and profile persistence not working in v0.7.6\n- Screenshots now save to temp directory when no path is provided\n\n### Security\n\n- Daemon and stream server now reject cross-origin connections\n\n---\n\n## v0.7.1\n\n<p>January 23, 2026</p>\n\n### Bug Fixes\n\n- **Fix native binary distribution** - Native binaries for all platforms (Linux x64/arm64, macOS x64/arm64, Windows x64) are now included in the npm package. Previously, the release workflow published to npm before building binaries, causing \"No binary found\" errors on installation.\n\n---\n\n## v0.7.0\n\n<p>January 23, 2026</p>\n\n### New Features\n\n- **Cloud browser providers** - Connect to Browserbase or Browser Use for remote browser infrastructure\n\n```bash\n# Via -p flag (recommended)\nagent-browser -p browserbase open https://example.com\nagent-browser -p browseruse open https://example.com\n\n# Via environment variable\nexport AGENT_BROWSER_PROVIDER=browserbase\nagent-browser open https://example.com\n```\n\n- **Persistent browser profiles** - Store cookies, localStorage, and login sessions across browser restarts\n\n```bash\nagent-browser --profile ~/.myapp-profile open myapp.com\n# Login persists across restarts\n```\n\n- **Remote CDP WebSocket URLs** - Connect to remote browser services via WebSocket\n\n```bash\nagent-browser --cdp \"wss://browser-service.com/cdp?token=...\" snapshot\n```\n\n- **`download` command** - Trigger downloads and wait for completion\n\n```bash\nagent-browser download @e1 ./file.pdf\nagent-browser wait --download ./output.zip --timeout 30000\n```\n\n- **Browser launch configuration** - Fine-grained control over browser startup\n\n```bash\nagent-browser --args \"--disable-gpu,--no-sandbox\" open example.com\nagent-browser --user-agent \"Custom UA\" open example.com\nagent-browser --proxy-bypass \"localhost,*.internal\" open example.com\n```\n\n- **Enhanced skills** - Hierarchical structure with references and templates for Claude Code\n\n### Bug Fixes\n\n- Screenshot command now supports refs and has improved error messages\n- WebSocket URLs work in `connect` command\n- Fixed socket file location (uses `~/.agent-browser` instead of TMPDIR)\n- Windows binary path fix (.exe extension)\n- State load and path-based actions now show correct output messages\n\n### Documentation\n\n- Added Claude Code marketplace plugin installation instructions\n- Updated skill documentation with references and templates\n- Improved error documentation\n\n---\n\n## v0.6.0\n\n<p>January 18, 2026</p>\n\n### New Features\n\n- **Video recording** - Record browser sessions to WebM using Playwright's native recording\n\n```bash\nagent-browser record start ./demo.webm\nagent-browser click @e1\nagent-browser record stop\n```\n\n- **`connect` command** - Connect to a browser via CDP and persist the connection for subsequent commands\n\n```bash\nagent-browser connect 9222\nagent-browser snapshot # No --cdp needed after connect\n```\n\n- **`--proxy` flag** - Configure browser proxy with optional authentication\n\n```bash\nagent-browser --proxy http://user:pass@proxy.com:8080 open example.com\n```\n\n- **`get styles` command** - Extract computed styles from elements\n\n```bash\nagent-browser get styles \"button\"\n```\n\n- **Claude marketplace plugin** - Added `.claude-plugin/marketplace.json` for Claude Code integration\n- **Enhanced network output** - `network requests` now shows method, URL, and resource type\n- **`--version` flag** - Display CLI version\n\n### Bug Fixes\n\n- Fix Windows daemon startup and port calculation\n- Support `libasound2t64` on newer Ubuntu versions (24.04+)\n- Prevent CDP timeout on empty URL tabs\n- Output screenshot as base64 when no path provided\n- Resolve refs in `get value` command\n- Support URL parameter in `tab new` command\n- Allow `about:`, `data:`, and `file:` URL schemes\n- Detect stale unix socket by attempting connection\n- Respect `AGENT_BROWSER_HEADED` environment variable\n- Handle SIGPIPE to prevent panic when piping to `head`/`tail`\n- Fix null path validation in screenshot command\n\n### Protocol Alignment\n\nThese changes align the CLI with the daemon protocol for consistency:\n\n- `select` command now uses `values` field (supports multiple selections)\n- `frame main` uses `mainframe` action\n- `mouse wheel` uses `wheel` action\n- `set media` uses `emulatemedia` action\n- Console output uses `messages` field\n\n### Documentation\n\n- Expanded SKILL.md with comprehensive command reference\n- Updated README with new commands and options\n- Updated CDP mode documentation with `connect` workflow",
|
||
"modernMarkdownSha256": "42c68690a6bdad334a3ae3996ef8cf8db972beb4f2d367efad13544eb22f4e13",
|
||
"navigation": {
|
||
"title": "Changelog",
|
||
"section": ""
|
||
}
|
||
},
|
||
{
|
||
"path": "/commands",
|
||
"source": "docs/src/app/commands/page.mdx",
|
||
"layout": "docs/src/app/commands/layout.tsx",
|
||
"sourceSha256": "1fc7444d202ebe41f008b120dd530e21734f3a33adf1d6671ed2a6707a24985c",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Commands\n",
|
||
"markdownTitle": "Commands",
|
||
"title": "Commands | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Commands | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Commands - agent-browser",
|
||
"twitterTitle": "Commands | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Commands",
|
||
"id": "commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Core",
|
||
"id": "core"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Get info",
|
||
"id": "get-info"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Read agent-friendly text",
|
||
"id": "read-agent-friendly-text"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Check state",
|
||
"id": "check-state"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Find elements",
|
||
"id": "find-elements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Wait",
|
||
"id": "wait"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Downloads",
|
||
"id": "downloads"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Mouse",
|
||
"id": "mouse"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Clipboard",
|
||
"id": "clipboard"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Settings",
|
||
"id": "settings"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Cookies & storage",
|
||
"id": "cookies-storage"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Network",
|
||
"id": "network"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Tabs & frames",
|
||
"id": "tabs-frames"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Stable tab ids and labels",
|
||
"id": "stable-tab-ids-and-labels"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Discarded tab revival",
|
||
"id": "discarded-tab-revival"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Snapshot deltas",
|
||
"id": "snapshot-deltas"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Iframe support",
|
||
"id": "iframe-support"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Dialogs",
|
||
"id": "dialogs"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Streaming",
|
||
"id": "streaming"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Debug",
|
||
"id": "debug"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Auth vault",
|
||
"id": "auth-vault"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Confirmation",
|
||
"id": "confirmation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "State management",
|
||
"id": "state-management"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Sessions",
|
||
"id": "sessions"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Chrome profiles",
|
||
"id": "chrome-profiles"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Dashboard",
|
||
"id": "dashboard"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Doctor",
|
||
"id": "doctor"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Chat",
|
||
"id": "chat"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Navigation",
|
||
"id": "navigation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Pre-navigation setup",
|
||
"id": "pre-navigation-setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "React / Web Vitals",
|
||
"id": "react-web-vitals"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Accessibility audits",
|
||
"id": "accessibility-audits"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Init scripts",
|
||
"id": "init-scripts"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Global options",
|
||
"id": "global-options"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Batch execution",
|
||
"id": "batch-execution"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "MCP server",
|
||
"id": "mcp-server"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Command chaining",
|
||
"id": "command-chaining"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Local files",
|
||
"id": "local-files"
|
||
}
|
||
],
|
||
"content": [
|
||
"agent-browser open # Launch browser (no nav); stays on about:blank agent-browser open <url> # Launch + navigate (aliases: goto, navigate) agent-browser read [url] # Fetch agent-readable text, or read rendered active-tab DOM agent-browser click <sel> # Click element (--new-tab to open in new tab) agent-browser dblclick <sel> # Double-click agent-browser fill <sel> <text> # Clear and fill agent-browser type <sel> <text> # Type into element agent-browser press <key> # Press key (Enter, Tab, Control+a) (alias: key) agent-browser keyboard type <text> # Type at current focus (no selector needed) agent-browser keyboard inserttext <text> # Insert text without key events agent-browser keydown <key> # Hold key down agent-browser keyup <key> # Release key agent-browser hover <sel> # Hover element agent-browser focus <sel> # Focus element agent-browser select <sel> <val> # Select dropdown by value or visible label agent-browser check <sel> # Check checkbox agent-browser uncheck <sel> # Uncheck checkbox agent-browser scroll <dir> [px] # Scroll (up/down/left/right, --selector <sel>) agent-browser scrollintoview <sel> # Scroll element into view agent-browser drag <src> <dst> # Drag and drop agent-browser upload <sel> <files> # Upload files agent-browser screenshot [path] # Screenshot (--full for full page) agent-browser screenshot --annotate # Annotated screenshot with numbered element labels agent-browser screenshot --if-changed # Recommended: skip unchanged images to save tokens agent-browser screenshot --threshold 0.01 # Ignore changes affecting at most 1% of pixels agent-browser screenshot --screenshot-dir ./shots # Save to custom directory agent-browser screenshot --screenshot-format jpeg --screenshot-quality 80 agent-browser pdf <path> # Save page as PDF agent-browser snapshot # Accessibility tree with refs agent-browser eval <js> # Run JavaScript agent-browser connect <port|url> # Connect to browser via CDP agent-browser stream enable [--port <port>] # Start runtime WebSocket streaming agent-browser webmcp list # List experimental page tools agent-browser webmcp invoke <tool> --params @input.json agent-browser stream status # Show runtime streaming state and bound port agent-browser stream disable # Stop runtime WebSocket streaming agent-browser close # Close browser (aliases: quit, exit) agent-browser close --all # Close all active sessions agent-browser mcp # Start an MCP stdio server",
|
||
"Browser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain only names, brief descriptions, origins, and frame IDs. Choose a relevant tool, then fetch its full schema with agent-browser webmcp list <tool> --frame <frame-id> --json before invoking it. Schemas and annotations are never included proactively. Unchanged catalogs and pages without tools add no context. JSON exposes updates as data.webmcp; CLI and MCP text include the same bounded summary. See WebMCP for update semantics and security.",
|
||
"Clicks fail before dispatch when another element covers the target's click point. The error names the covering element, for example covered by <div#consent-banner>. Dismiss or interact with that element, take a fresh snapshot, then retry the original action.",
|
||
"Headless Chromium screenshots hide native scrollbars for consistent image output. Pass --hide-scrollbars false when launching to keep native scrollbars visible.",
|
||
"agent-browser get text <sel> # Get text content agent-browser get html <sel> # Get innerHTML agent-browser get value <sel> # Get input value agent-browser get attr <sel> <attr> # Get attribute agent-browser get title # Get page title agent-browser get url # Get current URL agent-browser get cdp-url # Get CDP WebSocket URL agent-browser get count <sel> # Count matching elements agent-browser get box <sel> # Get bounding box agent-browser get styles <sel> # Get computed styles",
|
||
"agent-browser read agent-browser read https://example.com/article agent-browser read https://example.com/article --filter overview agent-browser read https://example.com/article --outline agent-browser read https://docs.example.com --llms index --filter auth agent-browser read https://docs.example.com --llms full --filter auth agent-browser read example.com/article --require-md agent-browser read https://example.com/article --json",
|
||
"read fetches a URL without launching Chrome. Omit the URL to read the rendered DOM of the active tab in the current browser session, including browser auth state and client-side updates. Explicit URL reads send Accept: text/markdown by default, try the same URL with .md appended when the first response is not markdown, walk ancestor paths toward / to find the nearest llms.txt for a matching docs link, print markdown or plain text when available, and fall back to readable text extracted from HTML. --llms and --require-md with no URL use the active tab URL because they depend on HTTP resources. read does not read llms-full.txt unless you ask for it.",
|
||
"Options: --raw prints the response body without HTML extraction, --require-md fails unless the server returns Content-Type: text/markdown, --outline prints a compact heading outline for one page, --llms index prints a compact nearest-ancestor llms.txt link list, --llms full reads the nearest-ancestor llms-full.txt, --filter <text> narrows page sections, llms links/sections, or outline headings, and --timeout <ms> changes the request timeout. Global safeguards such as --allowed-domains, --content-boundaries, and --max-output also apply to read fetches and output.",
|
||
"agent-browser is visible <sel> # Check if visible agent-browser is enabled <sel> # Check if enabled agent-browser is checked <sel> # Check if checked",
|
||
"Semantic locators with actions (click, fill, check, hover, text):",
|
||
"agent-browser find role <role> <action> [value] agent-browser find text <text> <action> [value] agent-browser find label <label> <action> [value] agent-browser find placeholder <ph> <action> [value] agent-browser find alt <text> <action> [value] agent-browser find title <text> <action> [value] agent-browser find testid <id> <action> [value] agent-browser find first <sel> <action> [value] agent-browser find last <sel> <action> [value] agent-browser find nth <n> <sel> <action> [value]",
|
||
"Options:",
|
||
"--name <name>: filter role by accessible name",
|
||
"--exact: exact, case-sensitive match. For role it applies to the accessible name, whose default is a case-insensitive substring.",
|
||
"Examples:",
|
||
"agent-browser find role button click --name \"Submit\" agent-browser find role heading text --name \"Skills\" # implicit roles work: <h2>=heading, <ul>=list, top-level <header>=banner agent-browser find label \"Email\" fill \"test@test.com\" agent-browser find alt \"Logo\" click agent-browser find first \".item\" click agent-browser find last \".item\" text agent-browser find nth 2 \".card\" hover",
|
||
"agent-browser wait <selector> # Wait for element agent-browser wait <ms> # Wait for time agent-browser wait --text \"Welcome\" # Wait for text (substring match) agent-browser wait --url \"**/dash\" # Wait for URL pattern agent-browser wait --load domcontentloaded # Wait for DOMContentLoaded agent-browser wait --load load # Wait for the load event agent-browser wait --load networkidle # Use only for pages known to become quiet agent-browser wait --fn \"condition\" # Wait for JS condition agent-browser wait --download [path] # Wait for download agent-browser wait --fn \"!document.body.innerText.includes('Loading...')\" # Wait for text to disappear agent-browser wait \"#spinner\" --state hidden # Wait for element to disappear",
|
||
"After a page change, prefer a selector, text, URL, or JavaScript condition that represents the state you need. Use networkidle only when the page is known to become quiet, because SSE, WebSockets, polling, and long-polling can keep it from resolving.",
|
||
"agent-browser download <sel> <path> # Click element to trigger download agent-browser wait --download [path] # Wait for any download to complete",
|
||
"Use --download-path <dir> (or AGENT_BROWSER_DOWNLOAD_PATH env) to set a default download directory. Without it, downloads go to a temporary directory that is deleted when the browser closes.",
|
||
"See Files & Clipboard for upload, download, local file, screenshot, PDF, and clipboard workflows.",
|
||
"agent-browser mouse move <x> <y> # Move mouse instantly agent-browser mouse move 600 400 --duration 250 --steps 24 agent-browser mouse move 600 400 --human --seed 42 agent-browser mouse down [button] # Press button agent-browser mouse up [button] # Release button agent-browser mouse wheel <dy> [dx] # Scroll wheel",
|
||
"Use --human with click, drag, or mouse move for curved, eased movement from the current cursor position. For mouse move, --duration sets the target total milliseconds including browser response time, --steps sets the number of events, and --seed makes the path reproducible. A slow browser can still extend the requested duration.",
|
||
"agent-browser clipboard read # Read text from clipboard agent-browser clipboard write \"Hello, World!\" # Write text to clipboard agent-browser clipboard copy # Copy current selection (Ctrl+C) agent-browser clipboard paste # Paste from clipboard (Ctrl+V)",
|
||
"See Files & Clipboard for clipboard, upload, download, local file, screenshot, and PDF workflows.",
|
||
"agent-browser set viewport <w> <h> [scale] # Set viewport size (scale for retina, e.g. 2) agent-browser set device <name> # Emulate device (\"iPhone 14\") agent-browser set geo <lat> <lng> # Set geolocation agent-browser set offline [on|off] # Toggle offline mode agent-browser set headers <json> # Extra HTTP headers agent-browser set credentials <u> <p> # HTTP basic auth for current and future tabs agent-browser set media [dark|light] # Emulate color scheme (persists for session)",
|
||
"Use --color-scheme for persistent dark/light mode across all commands:",
|
||
"agent-browser --color-scheme dark open https://example.com",
|
||
"agent-browser cookies # Get all cookies agent-browser cookies set <name> <val> # Set cookie agent-browser cookies clear # Clear cookies agent-browser storage local # Get all localStorage agent-browser storage local <key> # Get specific key agent-browser storage local set <k> <v> # Set value agent-browser storage local clear # Clear all agent-browser storage session # Same for sessionStorage",
|
||
"agent-browser network route <url> # Intercept requests agent-browser network route <url> --abort # Block requests agent-browser network route <url> --body <json> # Mock response agent-browser network route '*' --abort --resource-type script # Block scripts only agent-browser network unroute [url] # Remove routes agent-browser network requests # View tracked requests agent-browser network requests --clear # Clear request log agent-browser network requests --filter <pat> # Filter by URL pattern agent-browser network requests --type xhr,fetch # Filter by resource type agent-browser network requests --method POST # Filter by HTTP method agent-browser network requests --status 2xx # Filter by status (200, 2xx, 400-499) agent-browser network request <requestId> # View full request/response detail agent-browser network har start # Start HAR recording (embeds text response bodies) agent-browser network har start --content all # Embed all response bodies (binary as base64) agent-browser network har start --content none # Metadata only, no bodies agent-browser network har stop [output.har] # Stop and save HAR (temp path if omitted)",
|
||
"See Network for pre-navigation routing, request filters, HAR export, and SSR/no-JavaScript debugging.",
|
||
"agent-browser tab # List tabs (each row shows tabId and label) agent-browser tab new [url] # New tab agent-browser tab new --label docs [url] # New tab with a user-assigned label agent-browser tab <t<N>|label> # Switch to a tab by id or label agent-browser tab close [t<N>|label] # Close a tab (defaults to active) agent-browser window new # Open new browser window agent-browser frame <sel> # Switch to iframe by CSS selector agent-browser frame @e3 # Switch to iframe by element ref agent-browser frame main # Back to main frame",
|
||
"Tab ids are stable strings of the form t1, t2, t3. They're never reused within a session, so t2 keeps pointing at the same tab even as other tabs are opened or closed. The t prefix mirrors the @e1 element-ref convention and is not interchangeable with positional integers — agent-browser tab 2 errors with a teaching message; use t2.",
|
||
"You can also assign a memorable label (docs, app, admin) at tab-creation time and use it anywhere an id is accepted:",
|
||
"agent-browser tab new --label docs https://docs.example.com agent-browser tab docs # switch to the docs tab agent-browser snapshot # populate refs for docs agent-browser click @e3 # click uses docs's refs agent-browser tab close docs # close by label",
|
||
"Labels are never auto-generated and never rewritten on navigation — an agent that names a tab docs keeps that name until the tab is closed. Labels are unique within a session; creating a second tab with an existing label errors.",
|
||
"Tabs opened through tab new or click --new-tab inherit the session's setup before their first document loads: user agent, set headers, set credentials, origin-scoped --headers, init scripts, route rules, and emulation overrides (color scheme, timezone, locale, geolocation, offline). Turning offline mode off or setting headers to {} restores the default setup for future tabs.",
|
||
"tab list --json also reports each tab's CDP targetId, and target ids are accepted anywhere a tab ref is accepted (tab <targetId>, tab close <targetId>). Unlike t<N> ids, which are per-daemon counters, target ids stay stable across daemon restarts. Each session is bound to its active tab by target id and returns to it after a daemon restart; with --pin-tab the binding is strict and a closed bound tab produces a tab_gone error instead of a silent fallback. JSON errors include code: \"tab_gone\", data.targetId, and optional sanitized data.lastUrl. Batch output carries the recovery object under result. See CDP Mode for the multi-session workflow.",
|
||
"Refs (@e1, etc.) are scoped to the tab that was active when the snapshot ran, so switch tabs first, then snapshot and interact:",
|
||
"agent-browser tab docs # switch first agent-browser snapshot # refs for docs agent-browser click @e3 # uses docs's refs",
|
||
"Browsers discard background tabs to save memory, leaving a tab with no renderer to drive. Switching to a discarded tab reactivates it, which reloads the page and resets its unsaved state; the switch result adds \"revived\": true so the reload is visible rather than silent. A tab whose page is paused by a JavaScript dialog is alive rather than discarded: the switch leaves it untouched and adds \"dialogBlocked\": true. Resolve the dialog with dialog accept or dialog dismiss and the tab keeps its state. Closing the active tab onto a discarded successor revives it the same way and reports \"activeTabRevived\": true.",
|
||
"agent-browser snapshot --delta agent-browser snapshot --delta --full",
|
||
"snapshot --delta returns full, unchanged, or incremental updates per tab and option set. URL changes or large deltas return full state; --full resets the baseline. Apply a delta’s changes to ref metadata and treeChange to the previous tree: split on newlines, replace deleteCount lines at zero-based startLine with lines, then rejoin. Apply both to baseRevision before advancing to revision.",
|
||
"Iframes are detected automatically during snapshots. Iframe nodes are resolved and their content is inlined beneath the iframe element in the snapshot output. Refs assigned to elements inside iframes carry frame context, so click, fill, and other interactions work without manually switching frames.",
|
||
"agent-browser snapshot -i # @e3 [Iframe] \"payment-frame\" # @e4 [input] \"Card number\" # @e5 [button] \"Pay\" # Interact directly using refs — no frame switch needed agent-browser fill @e4 \"4111111111111111\" agent-browser click @e5 # Or switch frame context for scoped snapshots agent-browser frame @e3 agent-browser snapshot -i # Only elements inside that iframe agent-browser frame main # Return to main frame",
|
||
"The frame command accepts element refs (@e3), CSS selectors (\"#my-iframe\"), or frame name/URL.",
|
||
"agent-browser dialog accept [text] # Accept dialog (with optional prompt text) agent-browser dialog dismiss # Dismiss dialog agent-browser dialog status # Check if a dialog is currently open",
|
||
"By default, alert and beforeunload dialogs are automatically accepted so they never block the agent. confirm and prompt dialogs still require explicit handling. Use --no-auto-dialog (or AGENT_BROWSER_NO_AUTO_DIALOG=1) to disable automatic handling.",
|
||
"When a JavaScript dialog (alert, confirm, prompt) is pending, all command responses include a warning field with the dialog type and message.",
|
||
"agent-browser stream enable # Start runtime WebSocket streaming on an auto-selected port agent-browser stream enable --port 9223 # Bind a specific localhost port agent-browser stream status # Show enabled state, port, browser connection, screencasting agent-browser stream disable # Stop runtime streaming and remove the .stream metadata file",
|
||
"Streaming is enabled automatically for all sessions. Use these commands to check status, re-enable on a specific port, or disable streaming.",
|
||
"Streaming is separate from file-based recordings. Use Video Recording when you need a saved WebM or MP4 artifact.",
|
||
"agent-browser trace start # Start trace agent-browser trace stop [path] # Stop and save trace agent-browser profiler start # Start Chrome DevTools profiling agent-browser profiler stop [path] # Stop and save profile (.json) agent-browser record start <path> # Start video recording (.webm/.mp4, 30 fps; needs ffmpeg) agent-browser record start <path> --fps 60 # Record at 60 fps (--fps accepts 1-60) agent-browser record start <path> --cursor # Include an animated mouse pointer agent-browser record start <path> --contact-sheet # Also save a timestamped PNG summary agent-browser record start <path> --contact-sheet-threshold 0.02 # Tune changed-frame selection agent-browser record stop # Stop and save video agent-browser record restart <path> # Stop current and start new recording agent-browser console # View console messages agent-browser console --json # JSON output with raw CDP args agent-browser console --clear # Clear console log agent-browser errors # View page errors agent-browser errors --clear # Clear error log agent-browser highlight <sel> # Highlight element agent-browser inspect # Open Chrome DevTools for the active page",
|
||
"Recording requires ffmpeg on PATH. See Debugging for console, error, dialog, trace, highlight, and DevTools workflows. See Video Recording for recording requirements and record workflows, and Profiler for performance profiles.",
|
||
"agent-browser auth save <name> [opts] # Save auth profile agent-browser auth login <name> # Login using saved credentials agent-browser auth login <name> --no-navigate # Use active page after origin validation agent-browser auth login <name> --credential-provider <plugin> [--item <ref>] [--url <url>] # Resolve credentials from plugin agent-browser auth login <name> --username-selector <s> --password-selector <s> [--submit-selector <s>] # Override selectors for one login agent-browser auth list # List saved profiles (names and URLs only) agent-browser auth show <name> # Show profile metadata (no passwords) agent-browser auth delete <name> # Delete a saved profile agent-browser plugin add <ref> # Add a plugin from npm or GitHub agent-browser plugin list # List configured plugins agent-browser plugin show <name> # Show one configured plugin agent-browser plugin run <name> <type> --payload <json> # Run an arbitrary plugin request",
|
||
"Save options:",
|
||
"--url <url>: login page URL (required)",
|
||
"--username <user>: username (required)",
|
||
"--password <pass>: password (required unless --password-stdin)",
|
||
"--password-stdin: read password from stdin (recommended to avoid shell history exposure)",
|
||
"--username-selector <sel>: custom CSS selector for username field",
|
||
"--password-selector <sel>: custom CSS selector for password field",
|
||
"--submit-selector <sel>: custom CSS selector for submit button",
|
||
"auth login filters matching controls by their layout size, computed visibility and opacity, and disabled/readonly state, including custom CSS selectors. If a selected credential field is replaced or redirects focus before entry, the command fails without submitting.",
|
||
"auth login navigates with load and then waits for the username/password/submit selectors to appear before interacting. This improves reliability on SPA login pages where fields render after initial page load.",
|
||
"Use --no-navigate after an in-page click, challenge clearance, consent dismissal, or other stateful setup that must survive credential entry:",
|
||
"agent-browser open https://example.com/ agent-browser click \"a[href='/login']\" agent-browser auth login work --no-navigate",
|
||
"The flag suppresses only the initial auth-login navigation. It requires an existing active top-level HTTP(S) page and compares that page with the effective credential URL by scheme, host, and effective port. Paths, queries, and fragments may differ. Waiting, filling, clicking submit, and any submit-triggered navigation are unchanged. A command-level --url overrides profile or provider URL metadata and acts as the expected-origin constraint rather than a navigation destination.",
|
||
"Plugin login options:",
|
||
"--credential-provider <plugin>: resolve credentials from a configured plugin",
|
||
"--item <ref>: provider-specific vault item reference",
|
||
"--url <url>: login URL override",
|
||
"--no-navigate: use the active top-level page after validating it against the effective credential origin",
|
||
"--username-selector <sel>: selector override for this login",
|
||
"--password-selector <sel>: selector override for this login",
|
||
"--submit-selector <sel>: selector override for this login",
|
||
"Credential provider plugins run out-of-process over the agent-browser.plugin.v1 stdio JSON protocol. They return credentials to the daemon for a single login and agent-browser does not save those credentials locally.",
|
||
"Other plugin capabilities use the same protocol:",
|
||
"browser.provider: use the plugin with --provider <name> to return a CDP WebSocket URL",
|
||
"launch.mutate: append local launch args, extensions, or init scripts before Chrome starts",
|
||
"command.run: run arbitrary namespaced requests through agent-browser plugin run",
|
||
"plugin run is for command.run and custom capabilities. Core capabilities and protocol request types use their dedicated command paths.",
|
||
"echo \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin agent-browser auth login github agent-browser plugin add agent-browser-plugin-vault --name vault agent-browser auth login my-app --credential-provider vault --item \"My App\" agent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login agent-browser --provider cloud-browser open https://example.com agent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}' agent-browser auth list",
|
||
"When --confirm-actions is set, certain action categories return a confirmation_required response instead of executing immediately. Use confirm or deny to approve or reject the action.",
|
||
"agent-browser confirm <confirmation-id> # Approve a pending action agent-browser deny <confirmation-id> # Deny a pending action",
|
||
"Pending confirmations auto-deny after 60 seconds.",
|
||
"agent-browser --confirm-actions eval,download eval \"document.title\" # Returns confirmation_required with ID agent-browser confirm c_8f3a1234",
|
||
"agent-browser state save <path> # Save auth state to file agent-browser state load <path> # Load auth state from file agent-browser state list # List saved state files agent-browser state show <file> # Show state summary agent-browser state rename <old> <new> # Rename state file agent-browser state clear [name] # Clear states for session name agent-browser state clear --all # Clear all saved states agent-browser state clean --older-than <days> # Delete old states",
|
||
"agent-browser session # Show current session name agent-browser session list # List active sessions",
|
||
"agent-browser profiles # List available Chrome profiles agent-browser profiles --json # List profiles as JSON agent-browser --profile Default open https://gmail.com # Reuse a profile's login state",
|
||
"agent-browser dashboard [start] # Start the dashboard server (default port: 4848) agent-browser dashboard start --port <n> # Start on a specific port agent-browser dashboard start --allowed-origins <origins> # Allow exact HTTPS reverse-proxied browser origins agent-browser dashboard stop # Stop the dashboard server",
|
||
"Loopback dashboard origins are accepted by default without an access token. For a reverse-proxied or forwarded URL, pass its exact browser origin with --allowed-origins or set AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS. Every configured origin must be a valid exact HTTPS origin. Ports must be integers from 1 to 65535. Unknown options, missing values, invalid ports, and malformed origins fail without starting the server. The command prints private tokenized access URLs only for external origins; open the matching URL once to establish the browser session and do not share it. Open the normal http://localhost:<port> URL for local access. The browser stays on the dashboard origin; per-session tabs, status, and stream traffic are proxied internally, so session ports do not need to be exposed. Stop the running dashboard before changing the port or allowed origins.",
|
||
"Diagnose your install, auto-clean stale daemon files, and optionally repair common problems.",
|
||
"agent-browser doctor # Full diagnosis (env, Chrome, daemons, config, providers, network, launch test) agent-browser doctor --offline --quick # Local-only, fastest agent-browser doctor --fix # Also run destructive repairs (reinstall Chrome, purge old state, ...) agent-browser doctor --webgpu # Also run a live WebGPU render probe (see the WebGPU page) agent-browser doctor --json # Structured JSON output for agents",
|
||
"Exit code is 0 if all checks pass (warnings are fine), 1 if any fail. See the Installation page for the full check catalog.",
|
||
"Use natural language to control the browser via AI. The chat command translates instructions into agent-browser commands, executes them, and streams the AI response. Requires AI_GATEWAY_API_KEY to be set.",
|
||
"agent-browser chat \"open google.com and search for cats\" # Single-shot instruction agent-browser chat # Interactive REPL (type quit to exit) echo \"summarize this page\" | agent-browser chat # Piped input agent-browser -q chat \"summarize this page\" # Quiet: text only, no tool calls shown agent-browser -v chat \"fill in the login form\" # Verbose: show commands and their output agent-browser --model openai/gpt-4o chat \"take a screenshot\" # Override the default AI model agent-browser --json chat \"open example.com\" # Structured JSON output",
|
||
"Chat-specific options:",
|
||
"--model <name> # AI model (or AI_GATEWAY_MODEL env, default: anthropic/claude-sonnet-4.6) -v, --verbose # Show tool commands and their raw output -q, --quiet # Show only the AI text response (hide tool calls)",
|
||
"agent-browser back # Go back agent-browser forward # Go forward agent-browser reload # Reload page agent-browser pushstate <url> # SPA client-side nav; auto-detects window.next.router.push, # falls back to history.pushState + popstate",
|
||
"Some flows need routes, cookies, or init scripts configured before the first navigation (SSR debug, auth on protected origins, etc.). open without a URL launches the browser but stays on about:blank, leaving room to stage state. batch makes it one CLI invocation:",
|
||
"agent-browser batch \\ '[\"open\"]' \\ '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\ '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\ '[\"navigate\",\"http://localhost:3000/target\"]'",
|
||
"React commands require --enable react-devtools at launch (installs the React DevTools hook before any page JS runs). vitals and pushstate work on any site.",
|
||
"agent-browser open --enable react-devtools <url> # Launch with React hook installed agent-browser react tree # Full component tree agent-browser react inspect <fiberId> # Inspect one component agent-browser react renders start # Begin fiber render recording agent-browser react renders stop [--json] # Stop + print profile agent-browser react suspense [--only-dynamic] [--json] # Suspense boundaries + classifier # --only-dynamic hides the \"static\" list agent-browser vitals [url] [--json] # LCP/CLS/TTFB/FCP/INP + hydration",
|
||
"Works on any React app (Next.js, Remix, Vite+React, CRA, TanStack Start, React Native Web, etc.). vitals and pushstate are framework-agnostic.",
|
||
"See React & Web Vitals for full command details and examples.",
|
||
"Run an embedded axe-core audit against the current page or navigate to a URL first. The vendored engine works without a CDN request and runs under strict page CSP. It runs private partial audits across the page's frame tree and merges serialized results without page messaging, so page-provided window.axe values remain intact and iframe violations retain their frame selector paths. Accessibility audits require a CDP browser and are not available with Safari or iOS WebDriver sessions.",
|
||
"agent-browser a11y # Audit the current page agent-browser a11y https://example.com # Navigate, then audit agent-browser a11y --tags wcag2a,wcag2aa # Filter by axe rule tags agent-browser a11y --selector \"#main\" # Scope to a subtree agent-browser a11y https://example.com --json # Structured results",
|
||
"The default output lists violations and incomplete checks with impact, rule ID, fix guidance, and failing-node paths. JSON output preserves axe's target selector path arrays, including nested arrays for shadow DOM boundaries and multiple entries for frame boundaries.",
|
||
"agent-browser open --init-script <path> # Register before first navigation (repeatable) agent-browser addinitscript <js> # Register at runtime (returns identifier) agent-browser removeinitscript <identifier> # Remove from every tab in the session",
|
||
"See Init Scripts & Extensions for launch-time scripts, runtime scripts, built-in React DevTools, and extensions.",
|
||
"--session <name> # Isolated browser session --restore [name] # Auto-save/restore session state, defaults to --session --restore-save <policy> # Restore save policy: auto, always, never --namespace <name> # Isolate daemon sockets and restore-state directories --profile <path> # Persistent browser profile directory --state <path> # Load storage state from JSON file --headers <json> # HTTP headers scoped to URL's origin --executable-path <path> # Custom browser executable --extension <path> # Load browser extension (repeatable) --init-script <path> # Register a page init script before first navigation (repeatable) --enable <feature> # Built-in init scripts: react-devtools (repeatable or comma-list) --args <args> #",
|
||
"--user-agent <ua> # Custom User-Agent string --proxy <url> # Proxy server URL --proxy-bypass <hosts> # Hosts to bypass proxy --ignore-https-errors # Ignore HTTPS certificate errors --ca-cert <path> # Trust a CA for locally launched Chromium on Linux --no-ca-cert # Clear CA trust retained by the running session --allow-file-access # Allow file:// URLs to access local files (Chromium only) --hide-scrollbars <bool> # Hide native scrollbars in headless Chromium screenshots -p, --provider <name> # Browser provider or configured provider plugin --device <name> # iOS device name (e.g., \"iPhone 15 Pro\") --json # JSON output (for scripts) --annotate # Annotated screenshot with numbered element labels --screenshot-dir <path> # Default screenshot output directory (or AGENT_BROWSER_SCREENSHOT_DIR) --screenshot-quality <n> # JPEG quality 0-100 (or AGENT_BROWSER_SCREENSHOT_QUALITY) --screenshot-format <fmt> # Format: png (default), jpeg (or AGENT_BROWSER_SCREENSHOT_FORMAT) --headed # Show browser window (not headless) --webgpu # Enable WebGPU (software Vulkan on Linux, no GPU needed) --no-webmcp # Disable default experimental WebMCP Chrome features (or AGENT_BROWSER_NO_WEBMCP env) --cdp <port|url> # Connect via CDP; root WebSocket query slash is optional --auto-connect # Auto-discover and connect to running Chrome --color-scheme <scheme> # Color scheme: dark, light, no-preference --download-path <path> # Default download directory --content-boundaries # Wrap page output in boundary markers for LLM safety --max-output <chars> # Truncate page output to N characters --allowed-domains <list> # Allowed domains; rejects restore/state replay, profile/session startup args, and direct-page providers --action-policy <path> # Path to action policy JSON file --confirm-actions <list> # Action categories requiring confirmation --confirm-interactive # Interactive confirmation prompts (auto-denies if stdin is not a TTY) --engine <name> # Browser engine: chrome (default), lightpanda, obscura (experimental) --input-mode <mode> # Pointer movement: instant (default), smooth, human --idle-timeout <time> # Auto-shutdown daemon after inactivity (default: 1h; 0 disables) --no-auto-dialog # Disable auto-accept for alert and beforeunload dialogs --model <name> # AI model for chat (or AI_GATEWAY_MODEL env) -v, --verbose # Show tool commands and their raw output (chat) -q, --quiet # Show only AI text responses (chat) --config <path> # Use a custom config file --debug # Debug output",
|
||
"See Configuration for config files and environment variables. See Proxy for proxy server, bypass, and credential settings.",
|
||
"Execute multiple commands in a single invocation. Commands can be passed as quoted arguments or piped as JSON via stdin.",
|
||
"# Argument mode: each quoted argument is a full command agent-browser batch \"open https://example.com\" \"snapshot -i\" \"screenshot\" # With --bail to stop on first error agent-browser batch --bail \"open https://example.com\" \"click @e1\" \"screenshot\" # Stdin mode: pipe commands as JSON echo '[ [\"open\", \"https://example.com\"], [\"snapshot\", \"-i\"], [\"click\", \"@e1\"], [\"screenshot\", \"result.png\"] ]' | agent-browser batch --json",
|
||
"Option",
|
||
"Description",
|
||
"--bail",
|
||
"Stop on first error (default: continue all commands)",
|
||
"--json",
|
||
"Output results as a JSON array",
|
||
"agent-browser mcp agent-browser mcp --tools all agent-browser mcp --tools core,network,react",
|
||
"Starts a Model Context Protocol server over stdio. MCP clients launch this command as a subprocess and exchange newline-delimited JSON-RPC on stdin and stdout. The server defaults to MCP protocol 2025-11-25 and accepts older supported client protocol versions during initialization.",
|
||
"The default tools profile is core, which keeps MCP context small for everyday browser automation. Use --tools all for the full typed CLI parity surface, or combine profiles with commas, such as --tools core,network,react.",
|
||
"Profiles:",
|
||
"core - Default. Navigation, snapshots, interaction, waits, reads, screenshots, JavaScript eval, close, tab basics, and profile discovery",
|
||
"network - Network routes, request inspection, HAR, headers, credentials, offline",
|
||
"state - Cookies, storage, auth, saved state, sessions, profiles, skills",
|
||
"debug - Console/errors, tracing, profiling, recording, accessibility audits, clipboard, plugins, doctor, dashboard, install, upgrade, chat, diff, batch, confirm/deny",
|
||
"tabs - Back/forward/reload, tabs, windows, frames, dialogs",
|
||
"react - React tree/inspect/renders/suspense, vitals, pushstate",
|
||
"mobile - Viewport/device/geolocation/media, touch, swipe, mouse, keyboard",
|
||
"all - Every MCP tool, including the full typed CLI parity surface",
|
||
"Example MCP client config:",
|
||
"{ \"mcpServers\": { \"agent-browser\": { \"command\": \"agent-browser\", \"args\": [\"mcp\"] } } }",
|
||
"With --tools all, the server exposes typed tools across the CLI command surface, including navigation, snapshots, input, waits, screenshots/PDF, get/is/find, mouse, network, storage, cookies, tabs, windows, frames, dialogs, tracing, recording, accessibility audits, clipboard, auth, state, iOS, diff, React, vitals, sessions, skills, plugins, doctor, dashboard, install, upgrade, chat, eval, and close.",
|
||
"Common tools include:",
|
||
"agent_browser_tools_profiles",
|
||
"agent_browser_open",
|
||
"agent_browser_snapshot",
|
||
"agent_browser_click",
|
||
"agent_browser_fill",
|
||
"agent_browser_type",
|
||
"agent_browser_press",
|
||
"agent_browser_wait_for_selector",
|
||
"agent_browser_screenshot",
|
||
"agent_browser_get_url",
|
||
"agent_browser_eval",
|
||
"agent_browser_close",
|
||
"Each tool has typed fields such as url, selector, text, key, session, allowedDomains, and idleTimeout, so MCP clients show meaningful approval prompts instead of raw command arrays. The common allowedDomains array maps to --allowed-domains and activates the same WebRTC containment and launch-mode restrictions. The common idleTimeout string maps to --idle-timeout, accepts values such as 30s, 5m, 1h, or raw milliseconds, and accepts 0 to disable idle shutdown. Each tool also accepts extraArgs for advanced CLI flags and exact CLI parity. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally.",
|
||
"Tool invocations use the same config files and environment variables as the CLI. Use session in the tool arguments, or set AGENT_BROWSER_SESSION, to isolate browser state.",
|
||
"Chain commands with && in a single shell invocation. The browser persists via a background daemon, so chaining works naturally and is more efficient than separate calls:",
|
||
"agent-browser open example.com && agent-browser wait --load domcontentloaded && agent-browser snapshot -i agent-browser fill @e1 \"user@example.com\" && agent-browser fill @e2 \"pass\" && agent-browser click @e3 agent-browser open example.com && agent-browser wait --load load && agent-browser screenshot page.png",
|
||
"Use && when you don't need to read intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs, then interact with those refs).",
|
||
"Open local files (PDFs, HTML) using file:// URLs:",
|
||
"agent-browser --allow-file-access open file:///path/to/document.pdf agent-browser --allow-file-access open file:///path/to/page.html agent-browser screenshot output.png",
|
||
"The --allow-file-access flag enables JavaScript to access other local files. Chromium only.",
|
||
"See Files & Clipboard for local files, uploads, downloads, screenshots, PDFs, and clipboard workflows."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/webmcp",
|
||
"text": "WebMCP"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/files",
|
||
"text": "Files & Clipboard"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/files",
|
||
"text": "Files & Clipboard"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/network",
|
||
"text": "Network"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/cdp-mode",
|
||
"text": "CDP Mode"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/recording",
|
||
"text": "Video Recording"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/debugging",
|
||
"text": "Debugging"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/recording",
|
||
"text": "Video Recording"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/profiler",
|
||
"text": "Profiler"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/installation#doctor",
|
||
"text": "Installation page"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/react",
|
||
"text": "React & Web Vitals"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/init-scripts",
|
||
"text": "Init Scripts & Extensions"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/configuration",
|
||
"text": "Configuration"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/proxy",
|
||
"text": "Proxy"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/files",
|
||
"text": "Files & Clipboard"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Commands\n\n## Core\n\n```bash\nagent-browser open # Launch browser (no nav); stays on about:blank\nagent-browser open <url> # Launch + navigate (aliases: goto, navigate)\nagent-browser read [url] # Fetch agent-readable text, or read rendered active-tab DOM\nagent-browser click <sel> # Click element (--new-tab to open in new tab)\nagent-browser dblclick <sel> # Double-click\nagent-browser fill <sel> <text> # Clear and fill\nagent-browser type <sel> <text> # Type into element\nagent-browser press <key> # Press key (Enter, Tab, Control+a) (alias: key)\nagent-browser keyboard type <text> # Type at current focus (no selector needed)\nagent-browser keyboard inserttext <text> # Insert text without key events\nagent-browser keydown <key> # Hold key down\nagent-browser keyup <key> # Release key\nagent-browser hover <sel> # Hover element\nagent-browser focus <sel> # Focus element\nagent-browser select <sel> <val> # Select dropdown by value or visible label\nagent-browser check <sel> # Check checkbox\nagent-browser uncheck <sel> # Uncheck checkbox\nagent-browser scroll <dir> [px] # Scroll (up/down/left/right, --selector <sel>)\nagent-browser scrollintoview <sel> # Scroll element into view\nagent-browser drag <src> <dst> # Drag and drop\nagent-browser upload <sel> <files> # Upload files\nagent-browser screenshot [path] # Screenshot (--full for full page)\nagent-browser screenshot --annotate # Annotated screenshot with numbered element labels\nagent-browser screenshot --if-changed # Recommended: skip unchanged images to save tokens\nagent-browser screenshot --threshold 0.01 # Ignore changes affecting at most 1% of pixels\nagent-browser screenshot --screenshot-dir ./shots # Save to custom directory\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80\nagent-browser pdf <path> # Save page as PDF\nagent-browser snapshot # Accessibility tree with refs\nagent-browser eval <js> # Run JavaScript\nagent-browser connect <port|url> # Connect to browser via CDP\nagent-browser stream enable [--port <port>] # Start runtime WebSocket streaming\nagent-browser webmcp list # List experimental page tools\nagent-browser webmcp invoke <tool> --params @input.json\nagent-browser stream status # Show runtime streaming state and bound port\nagent-browser stream disable # Stop runtime WebSocket streaming\nagent-browser close # Close browser (aliases: quit, exit)\nagent-browser close --all # Close all active sessions\nagent-browser mcp # Start an MCP stdio server\n```\n\nBrowser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain only names, brief descriptions, origins, and frame IDs. Choose a relevant tool, then fetch its full schema with `agent-browser webmcp list <tool> --frame <frame-id> --json` before invoking it. Schemas and annotations are never included proactively. Unchanged catalogs and pages without tools add no context. JSON exposes updates as `data.webmcp`; CLI and MCP text include the same bounded summary. See [WebMCP](/webmcp) for update semantics and security.\n\nClicks fail before dispatch when another element covers the target's click point. The error names the covering element, for example `covered by <div#consent-banner>`. Dismiss or interact with that element, take a fresh snapshot, then retry the original action.\n\nHeadless Chromium screenshots hide native scrollbars for consistent image output. Pass `--hide-scrollbars false` when launching to keep native scrollbars visible.\n\n## Get info\n\n```bash\nagent-browser get text <sel> # Get text content\nagent-browser get html <sel> # Get innerHTML\nagent-browser get value <sel> # Get input value\nagent-browser get attr <sel> <attr> # Get attribute\nagent-browser get title # Get page title\nagent-browser get url # Get current URL\nagent-browser get cdp-url # Get CDP WebSocket URL\nagent-browser get count <sel> # Count matching elements\nagent-browser get box <sel> # Get bounding box\nagent-browser get styles <sel> # Get computed styles\n```\n\n## Read agent-friendly text\n\n```bash\nagent-browser read\nagent-browser read https://example.com/article\nagent-browser read https://example.com/article --filter overview\nagent-browser read https://example.com/article --outline\nagent-browser read https://docs.example.com --llms index --filter auth\nagent-browser read https://docs.example.com --llms full --filter auth\nagent-browser read example.com/article --require-md\nagent-browser read https://example.com/article --json\n```\n\n`read` fetches a URL without launching Chrome. Omit the URL to read the rendered DOM of the active tab in the current browser session, including browser auth state and client-side updates. Explicit URL reads send `Accept: text/markdown` by default, try the same URL with `.md` appended when the first response is not markdown, walk ancestor paths toward `/` to find the nearest `llms.txt` for a matching docs link, print markdown or plain text when available, and fall back to readable text extracted from HTML. `--llms` and `--require-md` with no URL use the active tab URL because they depend on HTTP resources. `read` does not read `llms-full.txt` unless you ask for it.\n\nOptions: `--raw` prints the response body without HTML extraction, `--require-md` fails unless the server returns `Content-Type: text/markdown`, `--outline` prints a compact heading outline for one page, `--llms index` prints a compact nearest-ancestor `llms.txt` link list, `--llms full` reads the nearest-ancestor `llms-full.txt`, `--filter <text>` narrows page sections, llms links/sections, or outline headings, and `--timeout <ms>` changes the request timeout. Global safeguards such as `--allowed-domains`, `--content-boundaries`, and `--max-output` also apply to read fetches and output.\n\n## Check state\n\n```bash\nagent-browser is visible <sel> # Check if visible\nagent-browser is enabled <sel> # Check if enabled\nagent-browser is checked <sel> # Check if checked\n```\n\n## Find elements\n\nSemantic locators with actions (`click`, `fill`, `check`, `hover`, `text`):\n\n```bash\nagent-browser find role <role> <action> [value]\nagent-browser find text <text> <action> [value]\nagent-browser find label <label> <action> [value]\nagent-browser find placeholder <ph> <action> [value]\nagent-browser find alt <text> <action> [value]\nagent-browser find title <text> <action> [value]\nagent-browser find testid <id> <action> [value]\nagent-browser find first <sel> <action> [value]\nagent-browser find last <sel> <action> [value]\nagent-browser find nth <n> <sel> <action> [value]\n```\n\nOptions:\n\n- `--name <name>`: filter role by accessible name\n- `--exact`: exact, case-sensitive match. For `role` it applies to the accessible name, whose default is a case-insensitive substring.\n\nExamples:\n\n```bash\nagent-browser find role button click --name \"Submit\"\nagent-browser find role heading text --name \"Skills\" # implicit roles work: <h2>=heading, <ul>=list, top-level <header>=banner\nagent-browser find label \"Email\" fill \"test@test.com\"\nagent-browser find alt \"Logo\" click\nagent-browser find first \".item\" click\nagent-browser find last \".item\" text\nagent-browser find nth 2 \".card\" hover\n```\n\n## Wait\n\n```bash\nagent-browser wait <selector> # Wait for element\nagent-browser wait <ms> # Wait for time\nagent-browser wait --text \"Welcome\" # Wait for text (substring match)\nagent-browser wait --url \"**/dash\" # Wait for URL pattern\nagent-browser wait --load domcontentloaded # Wait for DOMContentLoaded\nagent-browser wait --load load # Wait for the load event\nagent-browser wait --load networkidle # Use only for pages known to become quiet\nagent-browser wait --fn \"condition\" # Wait for JS condition\nagent-browser wait --download [path] # Wait for download\nagent-browser wait --fn \"!document.body.innerText.includes('Loading...')\" # Wait for text to disappear\nagent-browser wait \"#spinner\" --state hidden # Wait for element to disappear\n```\n\nAfter a page change, prefer a selector, text, URL, or JavaScript condition that represents the state you need. Use `networkidle` only when the page is known to become quiet, because SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Downloads\n\n```bash\nagent-browser download <sel> <path> # Click element to trigger download\nagent-browser wait --download [path] # Wait for any download to complete\n```\n\nUse `--download-path <dir>` (or `AGENT_BROWSER_DOWNLOAD_PATH` env) to set a default download directory. Without it, downloads go to a temporary directory that is deleted when the browser closes.\n\nSee [Files & Clipboard](/files) for upload, download, local file, screenshot, PDF, and clipboard workflows.\n\n## Mouse\n\n```bash\nagent-browser mouse move <x> <y> # Move mouse instantly\nagent-browser mouse move 600 400 --duration 250 --steps 24\nagent-browser mouse move 600 400 --human --seed 42\nagent-browser mouse down [button] # Press button\nagent-browser mouse up [button] # Release button\nagent-browser mouse wheel <dy> [dx] # Scroll wheel\n```\n\nUse `--human` with `click`, `drag`, or `mouse move` for curved, eased movement from the current cursor position. For `mouse move`, `--duration` sets the target total milliseconds including browser response time, `--steps` sets the number of events, and `--seed` makes the path reproducible. A slow browser can still extend the requested duration.\n\n## Clipboard\n\n```bash\nagent-browser clipboard read # Read text from clipboard\nagent-browser clipboard write \"Hello, World!\" # Write text to clipboard\nagent-browser clipboard copy # Copy current selection (Ctrl+C)\nagent-browser clipboard paste # Paste from clipboard (Ctrl+V)\n```\n\nSee [Files & Clipboard](/files) for clipboard, upload, download, local file, screenshot, and PDF workflows.\n\n## Settings\n\n```bash\nagent-browser set viewport <w> <h> [scale] # Set viewport size (scale for retina, e.g. 2)\nagent-browser set device <name> # Emulate device (\"iPhone 14\")\nagent-browser set geo <lat> <lng> # Set geolocation\nagent-browser set offline [on|off] # Toggle offline mode\nagent-browser set headers <json> # Extra HTTP headers\nagent-browser set credentials <u> <p> # HTTP basic auth for current and future tabs\nagent-browser set media [dark|light] # Emulate color scheme (persists for session)\n```\n\nUse `--color-scheme` for persistent dark/light mode across all commands:\n\n```bash\nagent-browser --color-scheme dark open https://example.com\n```\n\n## Cookies & storage\n\n```bash\nagent-browser cookies # Get all cookies\nagent-browser cookies set <name> <val> # Set cookie\nagent-browser cookies clear # Clear cookies\n\nagent-browser storage local # Get all localStorage\nagent-browser storage local <key> # Get specific key\nagent-browser storage local set <k> <v> # Set value\nagent-browser storage local clear # Clear all\n\nagent-browser storage session # Same for sessionStorage\n```\n\n## Network\n\n```bash\nagent-browser network route <url> # Intercept requests\nagent-browser network route <url> --abort # Block requests\nagent-browser network route <url> --body <json> # Mock response\nagent-browser network route '*' --abort --resource-type script # Block scripts only\nagent-browser network unroute [url] # Remove routes\nagent-browser network requests # View tracked requests\nagent-browser network requests --clear # Clear request log\nagent-browser network requests --filter <pat> # Filter by URL pattern\nagent-browser network requests --type xhr,fetch # Filter by resource type\nagent-browser network requests --method POST # Filter by HTTP method\nagent-browser network requests --status 2xx # Filter by status (200, 2xx, 400-499)\nagent-browser network request <requestId> # View full request/response detail\nagent-browser network har start # Start HAR recording (embeds text response bodies)\nagent-browser network har start --content all # Embed all response bodies (binary as base64)\nagent-browser network har start --content none # Metadata only, no bodies\nagent-browser network har stop [output.har] # Stop and save HAR (temp path if omitted)\n```\n\nSee [Network](/network) for pre-navigation routing, request filters, HAR export, and SSR/no-JavaScript debugging.\n\n## Tabs & frames\n\n```bash\nagent-browser tab # List tabs (each row shows tabId and label)\nagent-browser tab new [url] # New tab\nagent-browser tab new --label docs [url] # New tab with a user-assigned label\nagent-browser tab <t<N>|label> # Switch to a tab by id or label\nagent-browser tab close [t<N>|label] # Close a tab (defaults to active)\nagent-browser window new # Open new browser window\nagent-browser frame <sel> # Switch to iframe by CSS selector\nagent-browser frame @e3 # Switch to iframe by element ref\nagent-browser frame main # Back to main frame\n```\n\n### Stable tab ids and labels\n\nTab ids are stable strings of the form `t1`, `t2`, `t3`. They're never reused within a session, so `t2` keeps pointing at the same tab even as other tabs are opened or closed. The `t` prefix mirrors the `@e1` element-ref convention and is not interchangeable with positional integers — `agent-browser tab 2` errors with a teaching message; use `t2`.\n\nYou can also assign a memorable label (`docs`, `app`, `admin`) at tab-creation time and use it anywhere an id is accepted:\n\n```bash\nagent-browser tab new --label docs https://docs.example.com\nagent-browser tab docs # switch to the docs tab\nagent-browser snapshot # populate refs for docs\nagent-browser click @e3 # click uses docs's refs\nagent-browser tab close docs # close by label\n```\n\nLabels are never auto-generated and never rewritten on navigation — an agent that names a tab `docs` keeps that name until the tab is closed. Labels are unique within a session; creating a second tab with an existing label errors.\n\nTabs opened through `tab new` or `click --new-tab` inherit the session's setup before their first document loads: user agent, `set headers`, `set credentials`, origin-scoped `--headers`, init scripts, `route` rules, and emulation overrides (color scheme, timezone, locale, geolocation, offline). Turning offline mode off or setting headers to `{}` restores the default setup for future tabs.\n\n`tab list --json` also reports each tab's CDP `targetId`, and target ids are accepted anywhere a tab ref is accepted (`tab <targetId>`, `tab close <targetId>`). Unlike `t<N>` ids, which are per-daemon counters, target ids stay stable across daemon restarts. Each session is bound to its active tab by target id and returns to it after a daemon restart; with `--pin-tab` the binding is strict and a closed bound tab produces a `tab_gone` error instead of a silent fallback. JSON errors include <code>code: \"tab_gone\"</code>, <code>data.targetId</code>, and optional sanitized <code>data.lastUrl</code>. Batch output carries the recovery object under <code>result</code>. See [CDP Mode](/cdp-mode) for the multi-session workflow.\n\nRefs (`@e1`, etc.) are scoped to the tab that was active when the snapshot ran, so switch tabs first, then snapshot and interact:\n\n```bash\nagent-browser tab docs # switch first\nagent-browser snapshot # refs for docs\nagent-browser click @e3 # uses docs's refs\n```\n\n### Discarded tab revival\n\nBrowsers discard background tabs to save memory, leaving a tab with no renderer to drive. Switching to a discarded tab reactivates it, which reloads the page and resets its unsaved state; the switch result adds `\"revived\": true` so the reload is visible rather than silent. A tab whose page is paused by a JavaScript dialog is alive rather than discarded: the switch leaves it untouched and adds `\"dialogBlocked\": true`. Resolve the dialog with `dialog accept` or `dialog dismiss` and the tab keeps its state. Closing the active tab onto a discarded successor revives it the same way and reports `\"activeTabRevived\": true`.\n\n### Snapshot deltas\n\n```bash\nagent-browser snapshot --delta\nagent-browser snapshot --delta --full\n```\n\n`snapshot --delta` returns `full`, `unchanged`, or incremental updates per tab and option set. URL changes or large deltas return full state; `--full` resets the baseline. Apply a delta’s `changes` to ref metadata and `treeChange` to the previous tree: split on newlines, replace `deleteCount` lines at zero-based `startLine` with `lines`, then rejoin. Apply both to `baseRevision` before advancing to `revision`.\n\n### Iframe support\n\nIframes are detected automatically during snapshots. `Iframe` nodes are resolved and their content is inlined beneath the iframe element in the snapshot output. Refs assigned to elements inside iframes carry frame context, so `click`, `fill`, and other interactions work without manually switching frames.\n\n```bash\nagent-browser snapshot -i\n# @e3 [Iframe] \"payment-frame\"\n# @e4 [input] \"Card number\"\n# @e5 [button] \"Pay\"\n\n# Interact directly using refs — no frame switch needed\nagent-browser fill @e4 \"4111111111111111\"\nagent-browser click @e5\n\n# Or switch frame context for scoped snapshots\nagent-browser frame @e3\nagent-browser snapshot -i # Only elements inside that iframe\nagent-browser frame main # Return to main frame\n```\n\nThe `frame` command accepts element refs (`@e3`), CSS selectors (`\"#my-iframe\"`), or frame name/URL.\n\n## Dialogs\n\n```bash\nagent-browser dialog accept [text] # Accept dialog (with optional prompt text)\nagent-browser dialog dismiss # Dismiss dialog\nagent-browser dialog status # Check if a dialog is currently open\n```\n\nBy default, `alert` and `beforeunload` dialogs are automatically accepted so they never block the agent. `confirm` and `prompt` dialogs still require explicit handling. Use `--no-auto-dialog` (or `AGENT_BROWSER_NO_AUTO_DIALOG=1`) to disable automatic handling.\n\nWhen a JavaScript dialog (`alert`, `confirm`, `prompt`) is pending, all command responses include a `warning` field with the dialog type and message.\n\n## Streaming\n\n```bash\nagent-browser stream enable # Start runtime WebSocket streaming on an auto-selected port\nagent-browser stream enable --port 9223 # Bind a specific localhost port\nagent-browser stream status # Show enabled state, port, browser connection, screencasting\nagent-browser stream disable # Stop runtime streaming and remove the .stream metadata file\n```\n\nStreaming is enabled automatically for all sessions. Use these commands to check status, re-enable on a specific port, or disable streaming.\n\nStreaming is separate from file-based recordings. Use [Video Recording](/recording) when you need a saved WebM or MP4 artifact.\n\n## Debug\n\n```bash\nagent-browser trace start # Start trace\nagent-browser trace stop [path] # Stop and save trace\nagent-browser profiler start # Start Chrome DevTools profiling\nagent-browser profiler stop [path] # Stop and save profile (.json)\nagent-browser record start <path> # Start video recording (.webm/.mp4, 30 fps; needs ffmpeg)\nagent-browser record start <path> --fps 60 # Record at 60 fps (--fps accepts 1-60)\nagent-browser record start <path> --cursor # Include an animated mouse pointer\nagent-browser record start <path> --contact-sheet # Also save a timestamped PNG summary\nagent-browser record start <path> --contact-sheet-threshold 0.02 # Tune changed-frame selection\nagent-browser record stop # Stop and save video\nagent-browser record restart <path> # Stop current and start new recording\nagent-browser console # View console messages\nagent-browser console --json # JSON output with raw CDP args\nagent-browser console --clear # Clear console log\nagent-browser errors # View page errors\nagent-browser errors --clear # Clear error log\nagent-browser highlight <sel> # Highlight element\nagent-browser inspect # Open Chrome DevTools for the active page\n```\n\nRecording requires `ffmpeg` on `PATH`. See [Debugging](/debugging) for console, error, dialog, trace, highlight, and DevTools workflows. See [Video Recording](/recording) for recording requirements and `record` workflows, and [Profiler](/profiler) for performance profiles.\n\n## Auth vault\n\n```bash\nagent-browser auth save <name> [opts] # Save auth profile\nagent-browser auth login <name> # Login using saved credentials\nagent-browser auth login <name> --no-navigate\n # Use active page after origin validation\nagent-browser auth login <name> --credential-provider <plugin> [--item <ref>] [--url <url>]\n # Resolve credentials from plugin\nagent-browser auth login <name> --username-selector <s> --password-selector <s> [--submit-selector <s>]\n # Override selectors for one login\nagent-browser auth list # List saved profiles (names and URLs only)\nagent-browser auth show <name> # Show profile metadata (no passwords)\nagent-browser auth delete <name> # Delete a saved profile\nagent-browser plugin add <ref> # Add a plugin from npm or GitHub\nagent-browser plugin list # List configured plugins\nagent-browser plugin show <name> # Show one configured plugin\nagent-browser plugin run <name> <type> --payload <json>\n # Run an arbitrary plugin request\n```\n\nSave options:\n\n- `--url <url>`: login page URL (required)\n- `--username <user>`: username (required)\n- `--password <pass>`: password (required unless `--password-stdin`)\n- `--password-stdin`: read password from stdin (recommended to avoid shell history exposure)\n- `--username-selector <sel>`: custom CSS selector for username field\n- `--password-selector <sel>`: custom CSS selector for password field\n- `--submit-selector <sel>`: custom CSS selector for submit button\n\n`auth login` filters matching controls by their layout size, computed visibility and opacity, and disabled/readonly state, including custom CSS selectors. If a selected credential field is replaced or redirects focus before entry, the command fails without submitting.\n\n`auth login` navigates with `load` and then waits for the username/password/submit selectors to appear before interacting. This improves reliability on SPA login pages where fields render after initial page load.\n\nUse `--no-navigate` after an in-page click, challenge clearance, consent dismissal, or other stateful setup that must survive credential entry:\n\n```bash\nagent-browser open https://example.com/\nagent-browser click \"a[href='/login']\"\nagent-browser auth login work --no-navigate\n```\n\nThe flag suppresses only the initial auth-login navigation. It requires an existing active top-level HTTP(S) page and compares that page with the effective credential URL by scheme, host, and effective port. Paths, queries, and fragments may differ. Waiting, filling, clicking submit, and any submit-triggered navigation are unchanged. A command-level `--url` overrides profile or provider URL metadata and acts as the expected-origin constraint rather than a navigation destination.\n\nPlugin login options:\n\n- `--credential-provider <plugin>`: resolve credentials from a configured plugin\n- `--item <ref>`: provider-specific vault item reference\n- `--url <url>`: login URL override\n- `--no-navigate`: use the active top-level page after validating it against the effective credential origin\n- `--username-selector <sel>`: selector override for this login\n- `--password-selector <sel>`: selector override for this login\n- `--submit-selector <sel>`: selector override for this login\n\nCredential provider plugins run out-of-process over the `agent-browser.plugin.v1` stdio JSON protocol. They return credentials to the daemon for a single login and agent-browser does not save those credentials locally.\n\nOther plugin capabilities use the same protocol:\n\n- `browser.provider`: use the plugin with `--provider <name>` to return a CDP WebSocket URL\n- `launch.mutate`: append local launch args, extensions, or init scripts before Chrome starts\n- `command.run`: run arbitrary namespaced requests through `agent-browser plugin run`\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths.\n\n```bash\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\nagent-browser auth login github\nagent-browser plugin add agent-browser-plugin-vault --name vault\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\nagent-browser --provider cloud-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\nagent-browser auth list\n```\n\n## Confirmation\n\nWhen `--confirm-actions` is set, certain action categories return a `confirmation_required` response instead of executing immediately. Use `confirm` or `deny` to approve or reject the action.\n\n```bash\nagent-browser confirm <confirmation-id> # Approve a pending action\nagent-browser deny <confirmation-id> # Deny a pending action\n```\n\nPending confirmations auto-deny after 60 seconds.\n\n```bash\nagent-browser --confirm-actions eval,download eval \"document.title\"\n# Returns confirmation_required with ID\nagent-browser confirm c_8f3a1234\n```\n\n## State management\n\n```bash\nagent-browser state save <path> # Save auth state to file\nagent-browser state load <path> # Load auth state from file\nagent-browser state list # List saved state files\nagent-browser state show <file> # Show state summary\nagent-browser state rename <old> <new> # Rename state file\nagent-browser state clear [name] # Clear states for session name\nagent-browser state clear --all # Clear all saved states\nagent-browser state clean --older-than <days> # Delete old states\n```\n\n## Sessions\n\n```bash\nagent-browser session # Show current session name\nagent-browser session list # List active sessions\n```\n\n## Chrome profiles\n\n```bash\nagent-browser profiles # List available Chrome profiles\nagent-browser profiles --json # List profiles as JSON\nagent-browser --profile Default open https://gmail.com # Reuse a profile's login state\n```\n\n## Dashboard\n\n```bash\nagent-browser dashboard [start] # Start the dashboard server (default port: 4848)\nagent-browser dashboard start --port <n> # Start on a specific port\nagent-browser dashboard start --allowed-origins <origins> # Allow exact HTTPS reverse-proxied browser origins\nagent-browser dashboard stop # Stop the dashboard server\n```\n\nLoopback dashboard origins are accepted by default without an access token. For a reverse-proxied or forwarded URL, pass its exact browser origin with `--allowed-origins` or set `AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS`. Every configured origin must be a valid exact HTTPS origin. Ports must be integers from 1 to 65535. Unknown options, missing values, invalid ports, and malformed origins fail without starting the server. The command prints private tokenized access URLs only for external origins; open the matching URL once to establish the browser session and do not share it. Open the normal `http://localhost:<port>` URL for local access. The browser stays on the dashboard origin; per-session tabs, status, and stream traffic are proxied internally, so session ports do not need to be exposed. Stop the running dashboard before changing the port or allowed origins.\n\n## Doctor\n\nDiagnose your install, auto-clean stale daemon files, and optionally repair common problems.\n\n```bash\nagent-browser doctor # Full diagnosis (env, Chrome, daemons, config, providers, network, launch test)\nagent-browser doctor --offline --quick # Local-only, fastest\nagent-browser doctor --fix # Also run destructive repairs (reinstall Chrome, purge old state, ...)\nagent-browser doctor --webgpu # Also run a live WebGPU render probe (see the WebGPU page)\nagent-browser doctor --json # Structured JSON output for agents\n```\n\nExit code is `0` if all checks pass (warnings are fine), `1` if any fail. See the [Installation page](/installation#doctor) for the full check catalog.\n\n## Chat\n\nUse natural language to control the browser via AI. The `chat` command translates instructions into agent-browser commands, executes them, and streams the AI response. Requires `AI_GATEWAY_API_KEY` to be set.\n\n```bash\nagent-browser chat \"open google.com and search for cats\" # Single-shot instruction\nagent-browser chat # Interactive REPL (type quit to exit)\necho \"summarize this page\" | agent-browser chat # Piped input\nagent-browser -q chat \"summarize this page\" # Quiet: text only, no tool calls shown\nagent-browser -v chat \"fill in the login form\" # Verbose: show commands and their output\nagent-browser --model openai/gpt-4o chat \"take a screenshot\" # Override the default AI model\nagent-browser --json chat \"open example.com\" # Structured JSON output\n```\n\nChat-specific options:\n\n```bash\n--model <name> # AI model (or AI_GATEWAY_MODEL env, default: anthropic/claude-sonnet-4.6)\n-v, --verbose # Show tool commands and their raw output\n-q, --quiet # Show only the AI text response (hide tool calls)\n```\n\n## Navigation\n\n```bash\nagent-browser back # Go back\nagent-browser forward # Go forward\nagent-browser reload # Reload page\nagent-browser pushstate <url> # SPA client-side nav; auto-detects window.next.router.push,\n # falls back to history.pushState + popstate\n```\n\n## Pre-navigation setup\n\nSome flows need routes, cookies, or init scripts configured *before* the first navigation (SSR debug, auth on protected origins, etc.). `open` without a URL launches the browser but stays on `about:blank`, leaving room to stage state. `batch` makes it one CLI invocation:\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\n## React / Web Vitals\n\nReact commands require `--enable react-devtools` at launch (installs the React DevTools hook before any page JS runs). `vitals` and `pushstate` work on any site.\n\n```bash\nagent-browser open --enable react-devtools <url> # Launch with React hook installed\nagent-browser react tree # Full component tree\nagent-browser react inspect <fiberId> # Inspect one component\nagent-browser react renders start # Begin fiber render recording\nagent-browser react renders stop [--json] # Stop + print profile\nagent-browser react suspense [--only-dynamic] [--json] # Suspense boundaries + classifier\n # --only-dynamic hides the \"static\" list\nagent-browser vitals [url] [--json] # LCP/CLS/TTFB/FCP/INP + hydration\n```\n\nWorks on any React app (Next.js, Remix, Vite+React, CRA, TanStack Start, React Native Web, etc.). `vitals` and `pushstate` are framework-agnostic.\n\nSee [React & Web Vitals](/react) for full command details and examples.\n\n## Accessibility audits\n\nRun an embedded axe-core audit against the current page or navigate to a URL first. The vendored engine works without a CDN request and runs under strict page CSP. It runs private partial audits across the page's frame tree and merges serialized results without page messaging, so page-provided `window.axe` values remain intact and iframe violations retain their frame selector paths. Accessibility audits require a CDP browser and are not available with Safari or iOS WebDriver sessions.\n\n```bash\nagent-browser a11y # Audit the current page\nagent-browser a11y https://example.com # Navigate, then audit\nagent-browser a11y --tags wcag2a,wcag2aa # Filter by axe rule tags\nagent-browser a11y --selector \"#main\" # Scope to a subtree\nagent-browser a11y https://example.com --json # Structured results\n```\n\nThe default output lists violations and incomplete checks with impact, rule ID, fix guidance, and failing-node paths. JSON output preserves axe's `target` selector path arrays, including nested arrays for shadow DOM boundaries and multiple entries for frame boundaries.\n\n## Init scripts\n\n```bash\nagent-browser open --init-script <path> # Register before first navigation (repeatable)\nagent-browser addinitscript <js> # Register at runtime (returns identifier)\nagent-browser removeinitscript <identifier> # Remove from every tab in the session\n```\n\nSee [Init Scripts & Extensions](/init-scripts) for launch-time scripts, runtime scripts, built-in React DevTools, and extensions.\n\n## Global options\n\n```bash\n--session <name> # Isolated browser session\n--restore [name] # Auto-save/restore session state, defaults to --session\n--restore-save <policy> # Restore save policy: auto, always, never\n--namespace <name> # Isolate daemon sockets and restore-state directories\n--profile <path> # Persistent browser profile directory\n--state <path> # Load storage state from JSON file\n--headers <json> # HTTP headers scoped to URL's origin\n--executable-path <path> # Custom browser executable\n--extension <path> # Load browser extension (repeatable)\n--init-script <path> # Register a page init script before first navigation (repeatable)\n--enable <feature> # Built-in init scripts: react-devtools (repeatable or comma-list)\n--args <args> # Browser launch args (commas inside a value are kept)\n--user-agent <ua> # Custom User-Agent string\n--proxy <url> # Proxy server URL\n--proxy-bypass <hosts> # Hosts to bypass proxy\n--ignore-https-errors # Ignore HTTPS certificate errors\n--ca-cert <path> # Trust a CA for locally launched Chromium on Linux\n--no-ca-cert # Clear CA trust retained by the running session\n--allow-file-access # Allow file:// URLs to access local files (Chromium only)\n--hide-scrollbars <bool> # Hide native scrollbars in headless Chromium screenshots\n-p, --provider <name> # Browser provider or configured provider plugin\n--device <name> # iOS device name (e.g., \"iPhone 15 Pro\")\n--json # JSON output (for scripts)\n--annotate # Annotated screenshot with numbered element labels\n--screenshot-dir <path> # Default screenshot output directory (or AGENT_BROWSER_SCREENSHOT_DIR)\n--screenshot-quality <n> # JPEG quality 0-100 (or AGENT_BROWSER_SCREENSHOT_QUALITY)\n--screenshot-format <fmt> # Format: png (default), jpeg (or AGENT_BROWSER_SCREENSHOT_FORMAT)\n--headed # Show browser window (not headless)\n--webgpu # Enable WebGPU (software Vulkan on Linux, no GPU needed)\n--no-webmcp # Disable default experimental WebMCP Chrome features (or AGENT_BROWSER_NO_WEBMCP env)\n--cdp <port|url> # Connect via CDP; root WebSocket query slash is optional\n--auto-connect # Auto-discover and connect to running Chrome\n--color-scheme <scheme> # Color scheme: dark, light, no-preference\n--download-path <path> # Default download directory\n--content-boundaries # Wrap page output in boundary markers for LLM safety\n--max-output <chars> # Truncate page output to N characters\n--allowed-domains <list> # Allowed domains; rejects restore/state replay, profile/session startup args, and direct-page providers\n--action-policy <path> # Path to action policy JSON file\n--confirm-actions <list> # Action categories requiring confirmation\n--confirm-interactive # Interactive confirmation prompts (auto-denies if stdin is not a TTY)\n--engine <name> # Browser engine: chrome (default), lightpanda, obscura (experimental)\n--input-mode <mode> # Pointer movement: instant (default), smooth, human\n--idle-timeout <time> # Auto-shutdown daemon after inactivity (default: 1h; 0 disables)\n--no-auto-dialog # Disable auto-accept for alert and beforeunload dialogs\n--model <name> # AI model for chat (or AI_GATEWAY_MODEL env)\n-v, --verbose # Show tool commands and their raw output (chat)\n-q, --quiet # Show only AI text responses (chat)\n--config <path> # Use a custom config file\n--debug # Debug output\n```\n\nSee [Configuration](/configuration) for config files and environment variables. See [Proxy](/proxy) for proxy server, bypass, and credential settings.\n\n## Batch execution\n\nExecute multiple commands in a single invocation. Commands can be passed as quoted arguments or piped as JSON via stdin.\n\n```bash\n# Argument mode: each quoted argument is a full command\nagent-browser batch \"open https://example.com\" \"snapshot -i\" \"screenshot\"\n\n# With --bail to stop on first error\nagent-browser batch --bail \"open https://example.com\" \"click @e1\" \"screenshot\"\n\n# Stdin mode: pipe commands as JSON\necho '[\n [\"open\", \"https://example.com\"],\n [\"snapshot\", \"-i\"],\n [\"click\", \"@e1\"],\n [\"screenshot\", \"result.png\"]\n]' | agent-browser batch --json\n```\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--bail</code></td><td>Stop on first error (default: continue all commands)</td></tr>\n <tr><td><code>--json</code></td><td>Output results as a JSON array</td></tr>\n </tbody>\n</table>\n\n## MCP server\n\n```bash\nagent-browser mcp\nagent-browser mcp --tools all\nagent-browser mcp --tools core,network,react\n```\n\nStarts a Model Context Protocol server over stdio. MCP clients launch this command as a subprocess and exchange newline-delimited JSON-RPC on stdin and stdout. The server defaults to MCP protocol 2025-11-25 and accepts older supported client protocol versions during initialization.\n\nThe default tools profile is `core`, which keeps MCP context small for everyday browser automation. Use `--tools all` for the full typed CLI parity surface, or combine profiles with commas, such as `--tools core,network,react`.\n\nProfiles:\n\n- `core` - Default. Navigation, snapshots, interaction, waits, reads, screenshots, JavaScript eval, close, tab basics, and profile discovery\n- `network` - Network routes, request inspection, HAR, headers, credentials, offline\n- `state` - Cookies, storage, auth, saved state, sessions, profiles, skills\n- `debug` - Console/errors, tracing, profiling, recording, accessibility audits, clipboard, plugins, doctor, dashboard, install, upgrade, chat, diff, batch, confirm/deny\n- `tabs` - Back/forward/reload, tabs, windows, frames, dialogs\n- `react` - React tree/inspect/renders/suspense, vitals, pushstate\n- `mobile` - Viewport/device/geolocation/media, touch, swipe, mouse, keyboard\n- `all` - Every MCP tool, including the full typed CLI parity surface\n\nExample MCP client config:\n\n```json\n{\n \"mcpServers\": {\n \"agent-browser\": {\n \"command\": \"agent-browser\",\n \"args\": [\"mcp\"]\n }\n }\n}\n```\n\nWith `--tools all`, the server exposes typed tools across the CLI command surface, including navigation, snapshots, input, waits, screenshots/PDF, get/is/find, mouse, network, storage, cookies, tabs, windows, frames, dialogs, tracing, recording, accessibility audits, clipboard, auth, state, iOS, diff, React, vitals, sessions, skills, plugins, doctor, dashboard, install, upgrade, chat, eval, and close.\n\nCommon tools include:\n\n- `agent_browser_tools_profiles`\n- `agent_browser_open`\n- `agent_browser_snapshot`\n- `agent_browser_click`\n- `agent_browser_fill`\n- `agent_browser_type`\n- `agent_browser_press`\n- `agent_browser_wait_for_selector`\n- `agent_browser_screenshot`\n- `agent_browser_get_url`\n- `agent_browser_eval`\n- `agent_browser_close`\n\nEach tool has typed fields such as `url`, `selector`, `text`, `key`, `session`, `allowedDomains`, and `idleTimeout`, so MCP clients show meaningful approval prompts instead of raw command arrays. The common `allowedDomains` array maps to `--allowed-domains` and activates the same WebRTC containment and launch-mode restrictions. The common `idleTimeout` string maps to `--idle-timeout`, accepts values such as `30s`, `5m`, `1h`, or raw milliseconds, and accepts `0` to disable idle shutdown. Each tool also accepts `extraArgs` for advanced CLI flags and exact CLI parity. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally.\n\nTool invocations use the same config files and environment variables as the CLI. Use `session` in the tool arguments, or set `AGENT_BROWSER_SESSION`, to isolate browser state.\n\n## Command chaining\n\nChain commands with `&&` in a single shell invocation. The browser persists via a background daemon, so chaining works naturally and is more efficient than separate calls:\n\n```bash\nagent-browser open example.com && agent-browser wait --load domcontentloaded && agent-browser snapshot -i\nagent-browser fill @e1 \"user@example.com\" && agent-browser fill @e2 \"pass\" && agent-browser click @e3\nagent-browser open example.com && agent-browser wait --load load && agent-browser screenshot page.png\n```\n\nUse `&&` when you don't need to read intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs, then interact with those refs).\n\n## Local files\n\nOpen local files (PDFs, HTML) using `file://` URLs:\n\n```bash\nagent-browser --allow-file-access open file:///path/to/document.pdf\nagent-browser --allow-file-access open file:///path/to/page.html\nagent-browser screenshot output.png\n```\n\nThe `--allow-file-access` flag enables JavaScript to access other local files. Chromium only.\n\nSee [Files & Clipboard](/files) for local files, uploads, downloads, screenshots, PDFs, and clipboard workflows.",
|
||
"legacyMarkdownSha256": "04e47da85f79d183fa8ce604cb894f753f04c61034c45d4773577ffe91b3e894",
|
||
"modernMarkdown": "# Commands\n\n## Core\n\n```bash\nagent-browser open # Launch browser (no nav); stays on about:blank\nagent-browser open <url> # Launch + navigate (aliases: goto, navigate)\nagent-browser read [url] # Fetch agent-readable text, or read rendered active-tab DOM\nagent-browser click <sel> # Click element (--new-tab to open in new tab)\nagent-browser dblclick <sel> # Double-click\nagent-browser fill <sel> <text> # Clear and fill\nagent-browser type <sel> <text> # Type into element\nagent-browser press <key> # Press key (Enter, Tab, Control+a) (alias: key)\nagent-browser keyboard type <text> # Type at current focus (no selector needed)\nagent-browser keyboard inserttext <text> # Insert text without key events\nagent-browser keydown <key> # Hold key down\nagent-browser keyup <key> # Release key\nagent-browser hover <sel> # Hover element\nagent-browser focus <sel> # Focus element\nagent-browser select <sel> <val> # Select dropdown by value or visible label\nagent-browser check <sel> # Check checkbox\nagent-browser uncheck <sel> # Uncheck checkbox\nagent-browser scroll <dir> [px] # Scroll (up/down/left/right, --selector <sel>)\nagent-browser scrollintoview <sel> # Scroll element into view\nagent-browser drag <src> <dst> # Drag and drop\nagent-browser upload <sel> <files> # Upload files\nagent-browser screenshot [path] # Screenshot (--full for full page)\nagent-browser screenshot --annotate # Annotated screenshot with numbered element labels\nagent-browser screenshot --if-changed # Recommended: skip unchanged images to save tokens\nagent-browser screenshot --threshold 0.01 # Ignore changes affecting at most 1% of pixels\nagent-browser screenshot --screenshot-dir ./shots # Save to custom directory\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80\nagent-browser pdf <path> # Save page as PDF\nagent-browser snapshot # Accessibility tree with refs\nagent-browser eval <js> # Run JavaScript\nagent-browser connect <port|url> # Connect to browser via CDP\nagent-browser stream enable [--port <port>] # Start runtime WebSocket streaming\nagent-browser webmcp list # List experimental page tools\nagent-browser webmcp invoke <tool> --params @input.json\nagent-browser stream status # Show runtime streaming state and bound port\nagent-browser stream disable # Stop runtime WebSocket streaming\nagent-browser close # Close browser (aliases: quit, exit)\nagent-browser close --all # Close all active sessions\nagent-browser mcp # Start an MCP stdio server\n```\n\nBrowser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain only names, brief descriptions, origins, and frame IDs. Choose a relevant tool, then fetch its full schema with `agent-browser webmcp list <tool> --frame <frame-id> --json` before invoking it. Schemas and annotations are never included proactively. Unchanged catalogs and pages without tools add no context. JSON exposes updates as `data.webmcp`; CLI and MCP text include the same bounded summary. See [WebMCP](/webmcp) for update semantics and security.\n\nClicks fail before dispatch when another element covers the target's click point. The error names the covering element, for example `covered by <div#consent-banner>`. Dismiss or interact with that element, take a fresh snapshot, then retry the original action.\n\nHeadless Chromium screenshots hide native scrollbars for consistent image output. Pass `--hide-scrollbars false` when launching to keep native scrollbars visible.\n\n## Get info\n\n```bash\nagent-browser get text <sel> # Get text content\nagent-browser get html <sel> # Get innerHTML\nagent-browser get value <sel> # Get input value\nagent-browser get attr <sel> <attr> # Get attribute\nagent-browser get title # Get page title\nagent-browser get url # Get current URL\nagent-browser get cdp-url # Get CDP WebSocket URL\nagent-browser get count <sel> # Count matching elements\nagent-browser get box <sel> # Get bounding box\nagent-browser get styles <sel> # Get computed styles\n```\n\n## Read agent-friendly text\n\n```bash\nagent-browser read\nagent-browser read https://example.com/article\nagent-browser read https://example.com/article --filter overview\nagent-browser read https://example.com/article --outline\nagent-browser read https://docs.example.com --llms index --filter auth\nagent-browser read https://docs.example.com --llms full --filter auth\nagent-browser read example.com/article --require-md\nagent-browser read https://example.com/article --json\n```\n\n`read` fetches a URL without launching Chrome. Omit the URL to read the rendered DOM of the active tab in the current browser session, including browser auth state and client-side updates. Explicit URL reads send `Accept: text/markdown` by default, try the same URL with `.md` appended when the first response is not markdown, walk ancestor paths toward `/` to find the nearest `llms.txt` for a matching docs link, print markdown or plain text when available, and fall back to readable text extracted from HTML. `--llms` and `--require-md` with no URL use the active tab URL because they depend on HTTP resources. `read` does not read `llms-full.txt` unless you ask for it.\n\nOptions: `--raw` prints the response body without HTML extraction, `--require-md` fails unless the server returns `Content-Type: text/markdown`, `--outline` prints a compact heading outline for one page, `--llms index` prints a compact nearest-ancestor `llms.txt` link list, `--llms full` reads the nearest-ancestor `llms-full.txt`, `--filter <text>` narrows page sections, llms links/sections, or outline headings, and `--timeout <ms>` changes the request timeout. Global safeguards such as `--allowed-domains`, `--content-boundaries`, and `--max-output` also apply to read fetches and output.\n\n## Check state\n\n```bash\nagent-browser is visible <sel> # Check if visible\nagent-browser is enabled <sel> # Check if enabled\nagent-browser is checked <sel> # Check if checked\n```\n\n## Find elements\n\nSemantic locators with actions (`click`, `fill`, `check`, `hover`, `text`):\n\n```bash\nagent-browser find role <role> <action> [value]\nagent-browser find text <text> <action> [value]\nagent-browser find label <label> <action> [value]\nagent-browser find placeholder <ph> <action> [value]\nagent-browser find alt <text> <action> [value]\nagent-browser find title <text> <action> [value]\nagent-browser find testid <id> <action> [value]\nagent-browser find first <sel> <action> [value]\nagent-browser find last <sel> <action> [value]\nagent-browser find nth <n> <sel> <action> [value]\n```\n\nOptions:\n\n- `--name <name>`: filter role by accessible name\n- `--exact`: exact, case-sensitive match. For `role` it applies to the accessible name, whose default is a case-insensitive substring.\n\nExamples:\n\n```bash\nagent-browser find role button click --name \"Submit\"\nagent-browser find role heading text --name \"Skills\" # implicit roles work: <h2>=heading, <ul>=list, top-level <header>=banner\nagent-browser find label \"Email\" fill \"test@test.com\"\nagent-browser find alt \"Logo\" click\nagent-browser find first \".item\" click\nagent-browser find last \".item\" text\nagent-browser find nth 2 \".card\" hover\n```\n\n## Wait\n\n```bash\nagent-browser wait <selector> # Wait for element\nagent-browser wait <ms> # Wait for time\nagent-browser wait --text \"Welcome\" # Wait for text (substring match)\nagent-browser wait --url \"**/dash\" # Wait for URL pattern\nagent-browser wait --load domcontentloaded # Wait for DOMContentLoaded\nagent-browser wait --load load # Wait for the load event\nagent-browser wait --load networkidle # Use only for pages known to become quiet\nagent-browser wait --fn \"condition\" # Wait for JS condition\nagent-browser wait --download [path] # Wait for download\nagent-browser wait --fn \"!document.body.innerText.includes('Loading...')\" # Wait for text to disappear\nagent-browser wait \"#spinner\" --state hidden # Wait for element to disappear\n```\n\nAfter a page change, prefer a selector, text, URL, or JavaScript condition that represents the state you need. Use `networkidle` only when the page is known to become quiet, because SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Downloads\n\n```bash\nagent-browser download <sel> <path> # Click element to trigger download\nagent-browser wait --download [path] # Wait for any download to complete\n```\n\nUse `--download-path <dir>` (or `AGENT_BROWSER_DOWNLOAD_PATH` env) to set a default download directory. Without it, downloads go to a temporary directory that is deleted when the browser closes.\n\nSee [Files & Clipboard](/files) for upload, download, local file, screenshot, PDF, and clipboard workflows.\n\n## Mouse\n\n```bash\nagent-browser mouse move <x> <y> # Move mouse instantly\nagent-browser mouse move 600 400 --duration 250 --steps 24\nagent-browser mouse move 600 400 --human --seed 42\nagent-browser mouse down [button] # Press button\nagent-browser mouse up [button] # Release button\nagent-browser mouse wheel <dy> [dx] # Scroll wheel\n```\n\nUse `--human` with `click`, `drag`, or `mouse move` for curved, eased movement from the current cursor position. For `mouse move`, `--duration` sets the target total milliseconds including browser response time, `--steps` sets the number of events, and `--seed` makes the path reproducible. A slow browser can still extend the requested duration.\n\n## Clipboard\n\n```bash\nagent-browser clipboard read # Read text from clipboard\nagent-browser clipboard write \"Hello, World!\" # Write text to clipboard\nagent-browser clipboard copy # Copy current selection (Ctrl+C)\nagent-browser clipboard paste # Paste from clipboard (Ctrl+V)\n```\n\nSee [Files & Clipboard](/files) for clipboard, upload, download, local file, screenshot, and PDF workflows.\n\n## Settings\n\n```bash\nagent-browser set viewport <w> <h> [scale] # Set viewport size (scale for retina, e.g. 2)\nagent-browser set device <name> # Emulate device (\"iPhone 14\")\nagent-browser set geo <lat> <lng> # Set geolocation\nagent-browser set offline [on|off] # Toggle offline mode\nagent-browser set headers <json> # Extra HTTP headers\nagent-browser set credentials <u> <p> # HTTP basic auth for current and future tabs\nagent-browser set media [dark|light] # Emulate color scheme (persists for session)\n```\n\nUse `--color-scheme` for persistent dark/light mode across all commands:\n\n```bash\nagent-browser --color-scheme dark open https://example.com\n```\n\n## Cookies & storage\n\n```bash\nagent-browser cookies # Get all cookies\nagent-browser cookies set <name> <val> # Set cookie\nagent-browser cookies clear # Clear cookies\n\nagent-browser storage local # Get all localStorage\nagent-browser storage local <key> # Get specific key\nagent-browser storage local set <k> <v> # Set value\nagent-browser storage local clear # Clear all\n\nagent-browser storage session # Same for sessionStorage\n```\n\n## Network\n\n```bash\nagent-browser network route <url> # Intercept requests\nagent-browser network route <url> --abort # Block requests\nagent-browser network route <url> --body <json> # Mock response\nagent-browser network route '*' --abort --resource-type script # Block scripts only\nagent-browser network unroute [url] # Remove routes\nagent-browser network requests # View tracked requests\nagent-browser network requests --clear # Clear request log\nagent-browser network requests --filter <pat> # Filter by URL pattern\nagent-browser network requests --type xhr,fetch # Filter by resource type\nagent-browser network requests --method POST # Filter by HTTP method\nagent-browser network requests --status 2xx # Filter by status (200, 2xx, 400-499)\nagent-browser network request <requestId> # View full request/response detail\nagent-browser network har start # Start HAR recording (embeds text response bodies)\nagent-browser network har start --content all # Embed all response bodies (binary as base64)\nagent-browser network har start --content none # Metadata only, no bodies\nagent-browser network har stop [output.har] # Stop and save HAR (temp path if omitted)\n```\n\nSee [Network](/network) for pre-navigation routing, request filters, HAR export, and SSR/no-JavaScript debugging.\n\n## Tabs & frames\n\n```bash\nagent-browser tab # List tabs (each row shows tabId and label)\nagent-browser tab new [url] # New tab\nagent-browser tab new --label docs [url] # New tab with a user-assigned label\nagent-browser tab <t<N>|label> # Switch to a tab by id or label\nagent-browser tab close [t<N>|label] # Close a tab (defaults to active)\nagent-browser window new # Open new browser window\nagent-browser frame <sel> # Switch to iframe by CSS selector\nagent-browser frame @e3 # Switch to iframe by element ref\nagent-browser frame main # Back to main frame\n```\n\n### Stable tab ids and labels\n\nTab ids are stable strings of the form `t1`, `t2`, `t3`. They're never reused within a session, so `t2` keeps pointing at the same tab even as other tabs are opened or closed. The `t` prefix mirrors the `@e1` element-ref convention and is not interchangeable with positional integers — `agent-browser tab 2` errors with a teaching message; use `t2`.\n\nYou can also assign a memorable label (`docs`, `app`, `admin`) at tab-creation time and use it anywhere an id is accepted:\n\n```bash\nagent-browser tab new --label docs https://docs.example.com\nagent-browser tab docs # switch to the docs tab\nagent-browser snapshot # populate refs for docs\nagent-browser click @e3 # click uses docs's refs\nagent-browser tab close docs # close by label\n```\n\nLabels are never auto-generated and never rewritten on navigation — an agent that names a tab `docs` keeps that name until the tab is closed. Labels are unique within a session; creating a second tab with an existing label errors.\n\nTabs opened through `tab new` or `click --new-tab` inherit the session's setup before their first document loads: user agent, `set headers`, `set credentials`, origin-scoped `--headers`, init scripts, `route` rules, and emulation overrides (color scheme, timezone, locale, geolocation, offline). Turning offline mode off or setting headers to `{}` restores the default setup for future tabs.\n\n`tab list --json` also reports each tab's CDP `targetId`, and target ids are accepted anywhere a tab ref is accepted (`tab <targetId>`, `tab close <targetId>`). Unlike `t<N>` ids, which are per-daemon counters, target ids stay stable across daemon restarts. Each session is bound to its active tab by target id and returns to it after a daemon restart; with `--pin-tab` the binding is strict and a closed bound tab produces a `tab_gone` error instead of a silent fallback. JSON errors include <code>code: \"tab_gone\"</code>, <code>data.targetId</code>, and optional sanitized <code>data.lastUrl</code>. Batch output carries the recovery object under <code>result</code>. See [CDP Mode](/cdp-mode) for the multi-session workflow.\n\nRefs (`@e1`, etc.) are scoped to the tab that was active when the snapshot ran, so switch tabs first, then snapshot and interact:\n\n```bash\nagent-browser tab docs # switch first\nagent-browser snapshot # refs for docs\nagent-browser click @e3 # uses docs's refs\n```\n\n### Discarded tab revival\n\nBrowsers discard background tabs to save memory, leaving a tab with no renderer to drive. Switching to a discarded tab reactivates it, which reloads the page and resets its unsaved state; the switch result adds `\"revived\": true` so the reload is visible rather than silent. A tab whose page is paused by a JavaScript dialog is alive rather than discarded: the switch leaves it untouched and adds `\"dialogBlocked\": true`. Resolve the dialog with `dialog accept` or `dialog dismiss` and the tab keeps its state. Closing the active tab onto a discarded successor revives it the same way and reports `\"activeTabRevived\": true`.\n\n### Snapshot deltas\n\n```bash\nagent-browser snapshot --delta\nagent-browser snapshot --delta --full\n```\n\n`snapshot --delta` returns `full`, `unchanged`, or incremental updates per tab and option set. URL changes or large deltas return full state; `--full` resets the baseline. Apply a delta’s `changes` to ref metadata and `treeChange` to the previous tree: split on newlines, replace `deleteCount` lines at zero-based `startLine` with `lines`, then rejoin. Apply both to `baseRevision` before advancing to `revision`.\n\n### Iframe support\n\nIframes are detected automatically during snapshots. `Iframe` nodes are resolved and their content is inlined beneath the iframe element in the snapshot output. Refs assigned to elements inside iframes carry frame context, so `click`, `fill`, and other interactions work without manually switching frames.\n\n```bash\nagent-browser snapshot -i\n# @e3 [Iframe] \"payment-frame\"\n# @e4 [input] \"Card number\"\n# @e5 [button] \"Pay\"\n\n# Interact directly using refs — no frame switch needed\nagent-browser fill @e4 \"4111111111111111\"\nagent-browser click @e5\n\n# Or switch frame context for scoped snapshots\nagent-browser frame @e3\nagent-browser snapshot -i # Only elements inside that iframe\nagent-browser frame main # Return to main frame\n```\n\nThe `frame` command accepts element refs (`@e3`), CSS selectors (`\"#my-iframe\"`), or frame name/URL.\n\n## Dialogs\n\n```bash\nagent-browser dialog accept [text] # Accept dialog (with optional prompt text)\nagent-browser dialog dismiss # Dismiss dialog\nagent-browser dialog status # Check if a dialog is currently open\n```\n\nBy default, `alert` and `beforeunload` dialogs are automatically accepted so they never block the agent. `confirm` and `prompt` dialogs still require explicit handling. Use `--no-auto-dialog` (or `AGENT_BROWSER_NO_AUTO_DIALOG=1`) to disable automatic handling.\n\nWhen a JavaScript dialog (`alert`, `confirm`, `prompt`) is pending, all command responses include a `warning` field with the dialog type and message.\n\n## Streaming\n\n```bash\nagent-browser stream enable # Start runtime WebSocket streaming on an auto-selected port\nagent-browser stream enable --port 9223 # Bind a specific localhost port\nagent-browser stream status # Show enabled state, port, browser connection, screencasting\nagent-browser stream disable # Stop runtime streaming and remove the .stream metadata file\n```\n\nStreaming is enabled automatically for all sessions. Use these commands to check status, re-enable on a specific port, or disable streaming.\n\nStreaming is separate from file-based recordings. Use [Video Recording](/recording) when you need a saved WebM or MP4 artifact.\n\n## Debug\n\n```bash\nagent-browser trace start # Start trace\nagent-browser trace stop [path] # Stop and save trace\nagent-browser profiler start # Start Chrome DevTools profiling\nagent-browser profiler stop [path] # Stop and save profile (.json)\nagent-browser record start <path> # Start video recording (.webm/.mp4, 30 fps; needs ffmpeg)\nagent-browser record start <path> --fps 60 # Record at 60 fps (--fps accepts 1-60)\nagent-browser record start <path> --cursor # Include an animated mouse pointer\nagent-browser record start <path> --contact-sheet # Also save a timestamped PNG summary\nagent-browser record start <path> --contact-sheet-threshold 0.02 # Tune changed-frame selection\nagent-browser record stop # Stop and save video\nagent-browser record restart <path> # Stop current and start new recording\nagent-browser console # View console messages\nagent-browser console --json # JSON output with raw CDP args\nagent-browser console --clear # Clear console log\nagent-browser errors # View page errors\nagent-browser errors --clear # Clear error log\nagent-browser highlight <sel> # Highlight element\nagent-browser inspect # Open Chrome DevTools for the active page\n```\n\nRecording requires `ffmpeg` on `PATH`. See [Debugging](/debugging) for console, error, dialog, trace, highlight, and DevTools workflows. See [Video Recording](/recording) for recording requirements and `record` workflows, and [Profiler](/profiler) for performance profiles.\n\n## Auth vault\n\n```bash\nagent-browser auth save <name> [opts] # Save auth profile\nagent-browser auth login <name> # Login using saved credentials\nagent-browser auth login <name> --no-navigate\n # Use active page after origin validation\nagent-browser auth login <name> --credential-provider <plugin> [--item <ref>] [--url <url>]\n # Resolve credentials from plugin\nagent-browser auth login <name> --username-selector <s> --password-selector <s> [--submit-selector <s>]\n # Override selectors for one login\nagent-browser auth list # List saved profiles (names and URLs only)\nagent-browser auth show <name> # Show profile metadata (no passwords)\nagent-browser auth delete <name> # Delete a saved profile\nagent-browser plugin add <ref> # Add a plugin from npm or GitHub\nagent-browser plugin list # List configured plugins\nagent-browser plugin show <name> # Show one configured plugin\nagent-browser plugin run <name> <type> --payload <json>\n # Run an arbitrary plugin request\n```\n\nSave options:\n\n- `--url <url>`: login page URL (required)\n- `--username <user>`: username (required)\n- `--password <pass>`: password (required unless `--password-stdin`)\n- `--password-stdin`: read password from stdin (recommended to avoid shell history exposure)\n- `--username-selector <sel>`: custom CSS selector for username field\n- `--password-selector <sel>`: custom CSS selector for password field\n- `--submit-selector <sel>`: custom CSS selector for submit button\n\n`auth login` filters matching controls by their layout size, computed visibility and opacity, and disabled/readonly state, including custom CSS selectors. If a selected credential field is replaced or redirects focus before entry, the command fails without submitting.\n\n`auth login` navigates with `load` and then waits for the username/password/submit selectors to appear before interacting. This improves reliability on SPA login pages where fields render after initial page load.\n\nUse `--no-navigate` after an in-page click, challenge clearance, consent dismissal, or other stateful setup that must survive credential entry:\n\n```bash\nagent-browser open https://example.com/\nagent-browser click \"a[href='/login']\"\nagent-browser auth login work --no-navigate\n```\n\nThe flag suppresses only the initial auth-login navigation. It requires an existing active top-level HTTP(S) page and compares that page with the effective credential URL by scheme, host, and effective port. Paths, queries, and fragments may differ. Waiting, filling, clicking submit, and any submit-triggered navigation are unchanged. A command-level `--url` overrides profile or provider URL metadata and acts as the expected-origin constraint rather than a navigation destination.\n\nPlugin login options:\n\n- `--credential-provider <plugin>`: resolve credentials from a configured plugin\n- `--item <ref>`: provider-specific vault item reference\n- `--url <url>`: login URL override\n- `--no-navigate`: use the active top-level page after validating it against the effective credential origin\n- `--username-selector <sel>`: selector override for this login\n- `--password-selector <sel>`: selector override for this login\n- `--submit-selector <sel>`: selector override for this login\n\nCredential provider plugins run out-of-process over the `agent-browser.plugin.v1` stdio JSON protocol. They return credentials to the daemon for a single login and agent-browser does not save those credentials locally.\n\nOther plugin capabilities use the same protocol:\n\n- `browser.provider`: use the plugin with `--provider <name>` to return a CDP WebSocket URL\n- `launch.mutate`: append local launch args, extensions, or init scripts before Chrome starts\n- `command.run`: run arbitrary namespaced requests through `agent-browser plugin run`\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths.\n\n```bash\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\nagent-browser auth login github\nagent-browser plugin add agent-browser-plugin-vault --name vault\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\nagent-browser --provider cloud-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\nagent-browser auth list\n```\n\n## Confirmation\n\nWhen `--confirm-actions` is set, certain action categories return a `confirmation_required` response instead of executing immediately. Use `confirm` or `deny` to approve or reject the action.\n\n```bash\nagent-browser confirm <confirmation-id> # Approve a pending action\nagent-browser deny <confirmation-id> # Deny a pending action\n```\n\nPending confirmations auto-deny after 60 seconds.\n\n```bash\nagent-browser --confirm-actions eval,download eval \"document.title\"\n# Returns confirmation_required with ID\nagent-browser confirm c_8f3a1234\n```\n\n## State management\n\n```bash\nagent-browser state save <path> # Save auth state to file\nagent-browser state load <path> # Load auth state from file\nagent-browser state list # List saved state files\nagent-browser state show <file> # Show state summary\nagent-browser state rename <old> <new> # Rename state file\nagent-browser state clear [name] # Clear states for session name\nagent-browser state clear --all # Clear all saved states\nagent-browser state clean --older-than <days> # Delete old states\n```\n\n## Sessions\n\n```bash\nagent-browser session # Show current session name\nagent-browser session list # List active sessions\n```\n\n## Chrome profiles\n\n```bash\nagent-browser profiles # List available Chrome profiles\nagent-browser profiles --json # List profiles as JSON\nagent-browser --profile Default open https://gmail.com # Reuse a profile's login state\n```\n\n## Dashboard\n\n```bash\nagent-browser dashboard [start] # Start the dashboard server (default port: 4848)\nagent-browser dashboard start --port <n> # Start on a specific port\nagent-browser dashboard start --allowed-origins <origins> # Allow exact HTTPS reverse-proxied browser origins\nagent-browser dashboard stop # Stop the dashboard server\n```\n\nLoopback dashboard origins are accepted by default without an access token. For a reverse-proxied or forwarded URL, pass its exact browser origin with `--allowed-origins` or set `AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS`. Every configured origin must be a valid exact HTTPS origin. Ports must be integers from 1 to 65535. Unknown options, missing values, invalid ports, and malformed origins fail without starting the server. The command prints private tokenized access URLs only for external origins; open the matching URL once to establish the browser session and do not share it. Open the normal `http://localhost:<port>` URL for local access. The browser stays on the dashboard origin; per-session tabs, status, and stream traffic are proxied internally, so session ports do not need to be exposed. Stop the running dashboard before changing the port or allowed origins.\n\n## Doctor\n\nDiagnose your install, auto-clean stale daemon files, and optionally repair common problems.\n\n```bash\nagent-browser doctor # Full diagnosis (env, Chrome, daemons, config, providers, network, launch test)\nagent-browser doctor --offline --quick # Local-only, fastest\nagent-browser doctor --fix # Also run destructive repairs (reinstall Chrome, purge old state, ...)\nagent-browser doctor --webgpu # Also run a live WebGPU render probe (see the WebGPU page)\nagent-browser doctor --json # Structured JSON output for agents\n```\n\nExit code is `0` if all checks pass (warnings are fine), `1` if any fail. See the [Installation page](/installation#doctor) for the full check catalog.\n\n## Chat\n\nUse natural language to control the browser via AI. The `chat` command translates instructions into agent-browser commands, executes them, and streams the AI response. Requires `AI_GATEWAY_API_KEY` to be set.\n\n```bash\nagent-browser chat \"open google.com and search for cats\" # Single-shot instruction\nagent-browser chat # Interactive REPL (type quit to exit)\necho \"summarize this page\" | agent-browser chat # Piped input\nagent-browser -q chat \"summarize this page\" # Quiet: text only, no tool calls shown\nagent-browser -v chat \"fill in the login form\" # Verbose: show commands and their output\nagent-browser --model openai/gpt-4o chat \"take a screenshot\" # Override the default AI model\nagent-browser --json chat \"open example.com\" # Structured JSON output\n```\n\nChat-specific options:\n\n```bash\n--model <name> # AI model (or AI_GATEWAY_MODEL env, default: anthropic/claude-sonnet-4.6)\n-v, --verbose # Show tool commands and their raw output\n-q, --quiet # Show only the AI text response (hide tool calls)\n```\n\n## Navigation\n\n```bash\nagent-browser back # Go back\nagent-browser forward # Go forward\nagent-browser reload # Reload page\nagent-browser pushstate <url> # SPA client-side nav; auto-detects window.next.router.push,\n # falls back to history.pushState + popstate\n```\n\n## Pre-navigation setup\n\nSome flows need routes, cookies, or init scripts configured *before* the first navigation (SSR debug, auth on protected origins, etc.). `open` without a URL launches the browser but stays on `about:blank`, leaving room to stage state. `batch` makes it one CLI invocation:\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\n## React / Web Vitals\n\nReact commands require `--enable react-devtools` at launch (installs the React DevTools hook before any page JS runs). `vitals` and `pushstate` work on any site.\n\n```bash\nagent-browser open --enable react-devtools <url> # Launch with React hook installed\nagent-browser react tree # Full component tree\nagent-browser react inspect <fiberId> # Inspect one component\nagent-browser react renders start # Begin fiber render recording\nagent-browser react renders stop [--json] # Stop + print profile\nagent-browser react suspense [--only-dynamic] [--json] # Suspense boundaries + classifier\n # --only-dynamic hides the \"static\" list\nagent-browser vitals [url] [--json] # LCP/CLS/TTFB/FCP/INP + hydration\n```\n\nWorks on any React app (Next.js, Remix, Vite+React, CRA, TanStack Start, React Native Web, etc.). `vitals` and `pushstate` are framework-agnostic.\n\nSee [React & Web Vitals](/react) for full command details and examples.\n\n## Accessibility audits\n\nRun an embedded axe-core audit against the current page or navigate to a URL first. The vendored engine works without a CDN request and runs under strict page CSP. It runs private partial audits across the page's frame tree and merges serialized results without page messaging, so page-provided `window.axe` values remain intact and iframe violations retain their frame selector paths. Accessibility audits require a CDP browser and are not available with Safari or iOS WebDriver sessions.\n\n```bash\nagent-browser a11y # Audit the current page\nagent-browser a11y https://example.com # Navigate, then audit\nagent-browser a11y --tags wcag2a,wcag2aa # Filter by axe rule tags\nagent-browser a11y --selector \"#main\" # Scope to a subtree\nagent-browser a11y https://example.com --json # Structured results\n```\n\nThe default output lists violations and incomplete checks with impact, rule ID, fix guidance, and failing-node paths. JSON output preserves axe's `target` selector path arrays, including nested arrays for shadow DOM boundaries and multiple entries for frame boundaries.\n\n## Init scripts\n\n```bash\nagent-browser open --init-script <path> # Register before first navigation (repeatable)\nagent-browser addinitscript <js> # Register at runtime (returns identifier)\nagent-browser removeinitscript <identifier> # Remove from every tab in the session\n```\n\nSee [Init Scripts & Extensions](/init-scripts) for launch-time scripts, runtime scripts, built-in React DevTools, and extensions.\n\n## Global options\n\n```bash\n--session <name> # Isolated browser session\n--restore [name] # Auto-save/restore session state, defaults to --session\n--restore-save <policy> # Restore save policy: auto, always, never\n--namespace <name> # Isolate daemon sockets and restore-state directories\n--profile <path> # Persistent browser profile directory\n--state <path> # Load storage state from JSON file\n--headers <json> # HTTP headers scoped to URL's origin\n--executable-path <path> # Custom browser executable\n--extension <path> # Load browser extension (repeatable)\n--init-script <path> # Register a page init script before first navigation (repeatable)\n--enable <feature> # Built-in init scripts: react-devtools (repeatable or comma-list)\n--args <args> # Browser launch args (commas inside a value are kept)\n--user-agent <ua> # Custom User-Agent string\n--proxy <url> # Proxy server URL\n--proxy-bypass <hosts> # Hosts to bypass proxy\n--ignore-https-errors # Ignore HTTPS certificate errors\n--ca-cert <path> # Trust a CA for locally launched Chromium on Linux\n--no-ca-cert # Clear CA trust retained by the running session\n--allow-file-access # Allow file:// URLs to access local files (Chromium only)\n--hide-scrollbars <bool> # Hide native scrollbars in headless Chromium screenshots\n-p, --provider <name> # Browser provider or configured provider plugin\n--device <name> # iOS device name (e.g., \"iPhone 15 Pro\")\n--json # JSON output (for scripts)\n--annotate # Annotated screenshot with numbered element labels\n--screenshot-dir <path> # Default screenshot output directory (or AGENT_BROWSER_SCREENSHOT_DIR)\n--screenshot-quality <n> # JPEG quality 0-100 (or AGENT_BROWSER_SCREENSHOT_QUALITY)\n--screenshot-format <fmt> # Format: png (default), jpeg (or AGENT_BROWSER_SCREENSHOT_FORMAT)\n--headed # Show browser window (not headless)\n--webgpu # Enable WebGPU (software Vulkan on Linux, no GPU needed)\n--no-webmcp # Disable default experimental WebMCP Chrome features (or AGENT_BROWSER_NO_WEBMCP env)\n--cdp <port|url> # Connect via CDP; root WebSocket query slash is optional\n--auto-connect # Auto-discover and connect to running Chrome\n--color-scheme <scheme> # Color scheme: dark, light, no-preference\n--download-path <path> # Default download directory\n--content-boundaries # Wrap page output in boundary markers for LLM safety\n--max-output <chars> # Truncate page output to N characters\n--allowed-domains <list> # Allowed domains; rejects restore/state replay, profile/session startup args, and direct-page providers\n--action-policy <path> # Path to action policy JSON file\n--confirm-actions <list> # Action categories requiring confirmation\n--confirm-interactive # Interactive confirmation prompts (auto-denies if stdin is not a TTY)\n--engine <name> # Browser engine: chrome (default), lightpanda, obscura (experimental)\n--input-mode <mode> # Pointer movement: instant (default), smooth, human\n--idle-timeout <time> # Auto-shutdown daemon after inactivity (default: 1h; 0 disables)\n--no-auto-dialog # Disable auto-accept for alert and beforeunload dialogs\n--model <name> # AI model for chat (or AI_GATEWAY_MODEL env)\n-v, --verbose # Show tool commands and their raw output (chat)\n-q, --quiet # Show only AI text responses (chat)\n--config <path> # Use a custom config file\n--debug # Debug output\n```\n\nSee [Configuration](/configuration) for config files and environment variables. See [Proxy](/proxy) for proxy server, bypass, and credential settings.\n\n## Batch execution\n\nExecute multiple commands in a single invocation. Commands can be passed as quoted arguments or piped as JSON via stdin.\n\n```bash\n# Argument mode: each quoted argument is a full command\nagent-browser batch \"open https://example.com\" \"snapshot -i\" \"screenshot\"\n\n# With --bail to stop on first error\nagent-browser batch --bail \"open https://example.com\" \"click @e1\" \"screenshot\"\n\n# Stdin mode: pipe commands as JSON\necho '[\n [\"open\", \"https://example.com\"],\n [\"snapshot\", \"-i\"],\n [\"click\", \"@e1\"],\n [\"screenshot\", \"result.png\"]\n]' | agent-browser batch --json\n```\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--bail</code></td><td>Stop on first error (default: continue all commands)</td></tr>\n <tr><td><code>--json</code></td><td>Output results as a JSON array</td></tr>\n </tbody>\n</table>\n\n## MCP server\n\n```bash\nagent-browser mcp\nagent-browser mcp --tools all\nagent-browser mcp --tools core,network,react\n```\n\nStarts a Model Context Protocol server over stdio. MCP clients launch this command as a subprocess and exchange newline-delimited JSON-RPC on stdin and stdout. The server defaults to MCP protocol 2025-11-25 and accepts older supported client protocol versions during initialization.\n\nThe default tools profile is `core`, which keeps MCP context small for everyday browser automation. Use `--tools all` for the full typed CLI parity surface, or combine profiles with commas, such as `--tools core,network,react`.\n\nProfiles:\n\n- `core` - Default. Navigation, snapshots, interaction, waits, reads, screenshots, JavaScript eval, close, tab basics, and profile discovery\n- `network` - Network routes, request inspection, HAR, headers, credentials, offline\n- `state` - Cookies, storage, auth, saved state, sessions, profiles, skills\n- `debug` - Console/errors, tracing, profiling, recording, accessibility audits, clipboard, plugins, doctor, dashboard, install, upgrade, chat, diff, batch, confirm/deny\n- `tabs` - Back/forward/reload, tabs, windows, frames, dialogs\n- `react` - React tree/inspect/renders/suspense, vitals, pushstate\n- `mobile` - Viewport/device/geolocation/media, touch, swipe, mouse, keyboard\n- `all` - Every MCP tool, including the full typed CLI parity surface\n\nExample MCP client config:\n\n```json\n{\n \"mcpServers\": {\n \"agent-browser\": {\n \"command\": \"agent-browser\",\n \"args\": [\"mcp\"]\n }\n }\n}\n```\n\nWith `--tools all`, the server exposes typed tools across the CLI command surface, including navigation, snapshots, input, waits, screenshots/PDF, get/is/find, mouse, network, storage, cookies, tabs, windows, frames, dialogs, tracing, recording, accessibility audits, clipboard, auth, state, iOS, diff, React, vitals, sessions, skills, plugins, doctor, dashboard, install, upgrade, chat, eval, and close.\n\nCommon tools include:\n\n- `agent_browser_tools_profiles`\n- `agent_browser_open`\n- `agent_browser_snapshot`\n- `agent_browser_click`\n- `agent_browser_fill`\n- `agent_browser_type`\n- `agent_browser_press`\n- `agent_browser_wait_for_selector`\n- `agent_browser_screenshot`\n- `agent_browser_get_url`\n- `agent_browser_eval`\n- `agent_browser_close`\n\nEach tool has typed fields such as `url`, `selector`, `text`, `key`, `session`, `allowedDomains`, and `idleTimeout`, so MCP clients show meaningful approval prompts instead of raw command arrays. The common `allowedDomains` array maps to `--allowed-domains` and activates the same WebRTC containment and launch-mode restrictions. The common `idleTimeout` string maps to `--idle-timeout`, accepts values such as `30s`, `5m`, `1h`, or raw milliseconds, and accepts `0` to disable idle shutdown. Each tool also accepts `extraArgs` for advanced CLI flags and exact CLI parity. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally.\n\nTool invocations use the same config files and environment variables as the CLI. Use `session` in the tool arguments, or set `AGENT_BROWSER_SESSION`, to isolate browser state.\n\n## Command chaining\n\nChain commands with `&&` in a single shell invocation. The browser persists via a background daemon, so chaining works naturally and is more efficient than separate calls:\n\n```bash\nagent-browser open example.com && agent-browser wait --load domcontentloaded && agent-browser snapshot -i\nagent-browser fill @e1 \"user@example.com\" && agent-browser fill @e2 \"pass\" && agent-browser click @e3\nagent-browser open example.com && agent-browser wait --load load && agent-browser screenshot page.png\n```\n\nUse `&&` when you don't need to read intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs, then interact with those refs).\n\n## Local files\n\nOpen local files (PDFs, HTML) using `file://` URLs:\n\n```bash\nagent-browser --allow-file-access open file:///path/to/document.pdf\nagent-browser --allow-file-access open file:///path/to/page.html\nagent-browser screenshot output.png\n```\n\nThe `--allow-file-access` flag enables JavaScript to access other local files. Chromium only.\n\nSee [Files & Clipboard](/files) for local files, uploads, downloads, screenshots, PDFs, and clipboard workflows.",
|
||
"modernMarkdownSha256": "04e47da85f79d183fa8ce604cb894f753f04c61034c45d4773577ffe91b3e894",
|
||
"navigation": {
|
||
"title": "Commands",
|
||
"section": "Reference"
|
||
}
|
||
},
|
||
{
|
||
"path": "/configuration",
|
||
"source": "docs/src/app/configuration/page.mdx",
|
||
"layout": "docs/src/app/configuration/layout.tsx",
|
||
"sourceSha256": "061818943c04dbad7a0cefd395848cba8e60bbe37a1159662bc92626747b710c",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Configuration\n",
|
||
"markdownTitle": "Configuration",
|
||
"title": "Configuration | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Configuration | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Configuration - agent-browser",
|
||
"twitterTitle": "Configuration | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Configuration",
|
||
"id": "configuration"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Config File Locations",
|
||
"id": "config-file-locations"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Example Config",
|
||
"id": "example-config"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "All Options",
|
||
"id": "all-options"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Common Configurations",
|
||
"id": "common-configurations"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Local Development",
|
||
"id": "local-development"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Behind a Proxy",
|
||
"id": "behind-a-proxy"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "CI / Devcontainer",
|
||
"id": "ci-devcontainer"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "iOS Testing",
|
||
"id": "ios-testing"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "AI Agent Security",
|
||
"id": "ai-agent-security"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Overriding Boolean Options",
|
||
"id": "overriding-boolean-options"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Extensions Merging",
|
||
"id": "extensions-merging"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Plugins",
|
||
"id": "plugins"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Environment Variables",
|
||
"id": "environment-variables"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Error Handling",
|
||
"id": "error-handling"
|
||
}
|
||
],
|
||
"content": [
|
||
"Create an agent-browser.json file to set persistent defaults instead of repeating flags on every command.",
|
||
"agent-browser checks two locations, merged in priority order:",
|
||
"Priority",
|
||
"Location",
|
||
"Scope",
|
||
"1 (lowest)",
|
||
"~/.agent-browser/config.json",
|
||
"User-level defaults",
|
||
"2",
|
||
"./agent-browser.json",
|
||
"Project-level overrides",
|
||
"3",
|
||
"AGENT_BROWSER_* env vars",
|
||
"Override config values",
|
||
"4 (highest)",
|
||
"CLI flags",
|
||
"Override everything",
|
||
"Project-level values override user-level values. Environment variables override both. CLI flags always win.",
|
||
"Use --config <path> or the AGENT_BROWSER_CONFIG environment variable to load a specific config file instead of the default locations:",
|
||
"agent-browser --config ./ci-config.json open example.com AGENT_BROWSER_CONFIG=./ci-config.json agent-browser open example.com",
|
||
"{ \"headed\": true, \"proxy\": \"http://localhost:8080\", \"profile\": \"./browser-data\", \"userAgent\": \"my-agent/1.0\", \"hideScrollbars\": false, \"ignoreHttpsErrors\": true }",
|
||
"A JSON Schema is available for IDE autocomplete and validation. Add a $schema key to your config file to enable it:",
|
||
"{ \"$schema\": \"https://agent-browser.dev/schema.json\", \"headed\": true }",
|
||
"Global launch, output, provider, and chat options can be set in the config file using their camelCase equivalent. Command-scoped flags such as screenshot --full remain command arguments.",
|
||
"Config Key",
|
||
"CLI Flag",
|
||
"Type",
|
||
"headed",
|
||
"--headed",
|
||
"boolean",
|
||
"json",
|
||
"--json",
|
||
"debug",
|
||
"--debug",
|
||
"session",
|
||
"--session",
|
||
"string",
|
||
"restore",
|
||
"--restore",
|
||
"restoreSave",
|
||
"--restore-save",
|
||
"restoreCheckUrl",
|
||
"--restore-check-url",
|
||
"restoreCheckText",
|
||
"--restore-check-text",
|
||
"restoreCheckFn",
|
||
"--restore-check-fn",
|
||
"namespace",
|
||
"--namespace",
|
||
"sessionName",
|
||
"--session-name",
|
||
"string, legacy restore key",
|
||
"executablePath",
|
||
"--executable-path",
|
||
"extensions",
|
||
"--extension",
|
||
"string[]",
|
||
"initScripts",
|
||
"--init-script",
|
||
"enable",
|
||
"--enable",
|
||
"profile",
|
||
"--profile",
|
||
"state",
|
||
"--state",
|
||
"proxy",
|
||
"--proxy",
|
||
"proxyBypass",
|
||
"--proxy-bypass",
|
||
"args",
|
||
"--args",
|
||
"userAgent",
|
||
"--user-agent",
|
||
"provider",
|
||
"-p, --provider",
|
||
"device",
|
||
"--device",
|
||
"hideScrollbars",
|
||
"--hide-scrollbars",
|
||
"webgpu",
|
||
"--webgpu",
|
||
"noWebmcp",
|
||
"--no-webmcp or AGENT_BROWSER_NO_WEBMCP",
|
||
"ignoreHttpsErrors",
|
||
"--ignore-https-errors",
|
||
"caCert",
|
||
"--ca-cert",
|
||
"clearCaCert",
|
||
"--no-ca-cert",
|
||
"allowFileAccess",
|
||
"--allow-file-access",
|
||
"cdp",
|
||
"--cdp",
|
||
"autoConnect",
|
||
"--auto-connect",
|
||
"pinTab",
|
||
"--pin-tab",
|
||
"annotate",
|
||
"--annotate",
|
||
"colorScheme",
|
||
"--color-scheme",
|
||
"string (dark, light, no-preference)",
|
||
"downloadPath",
|
||
"--download-path",
|
||
"contentBoundaries",
|
||
"--content-boundaries",
|
||
"maxOutput",
|
||
"--max-output",
|
||
"number",
|
||
"allowedDomains",
|
||
"--allowed-domains",
|
||
"string[]; also disables WebRTC in supported Chromium sessions and requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins",
|
||
"actionPolicy",
|
||
"--action-policy",
|
||
"confirmActions",
|
||
"--confirm-actions",
|
||
"confirmInteractive",
|
||
"--confirm-interactive",
|
||
"engine",
|
||
"--engine",
|
||
"string (chrome, lightpanda, obscura)",
|
||
"screenshotDir",
|
||
"--screenshot-dir",
|
||
"screenshotQuality",
|
||
"--screenshot-quality",
|
||
"number (0-100)",
|
||
"screenshotFormat",
|
||
"--screenshot-format",
|
||
"string (png, jpeg)",
|
||
"idleTimeout",
|
||
"--idle-timeout",
|
||
"string (10s, 3m, 1h, or raw ms); defaults to 1h, while 0 disables idle shutdown",
|
||
"noAutoDialog",
|
||
"--no-auto-dialog",
|
||
"model",
|
||
"--model",
|
||
"headers",
|
||
"--headers",
|
||
"string (JSON)",
|
||
"plugins",
|
||
"(config only)",
|
||
"plugin config[]",
|
||
"{ \"headed\": true, \"profile\": \"./browser-data\" }",
|
||
"{ \"proxy\": \"http://proxy.corp.example.com:8080\", \"proxyBypass\": \"localhost,*.internal.com\", \"caCert\": \"/etc/ssl/certs/proxy-ca.crt\" }",
|
||
"caCert imports the supplied CA certificate or PEM bundle into an isolated NSS database for locally launched Chromium on Linux. Hostname, validity period, and unrelated CA verification remain enabled. The CA remains active when later commands omit it. Setting different certificate content or clearCaCert: true relaunches Chromium without restarting the daemon. agent-browser install --with-deps installs the required certutil; otherwise install libnss3-tools on Debian/Ubuntu or nss-tools on RPM Linux. This initial implementation does not support Chrome profiles, CDP attach, providers, Lightpanda, macOS, or Windows.",
|
||
"Without the CA certificate on hand, fall back to ignoring every certificate error, which is less secure:",
|
||
"{ \"proxy\": \"http://proxy.corp.example.com:8080\", \"proxyBypass\": \"localhost,*.internal.com\", \"ignoreHttpsErrors\": true }",
|
||
"{ \"args\": \"--no-sandbox,--disable-gpu\", \"ignoreHttpsErrors\": true }",
|
||
"{ \"provider\": \"ios\", \"device\": \"iPhone 16 Pro\" }",
|
||
"{ \"contentBoundaries\": true, \"maxOutput\": 50000, \"allowedDomains\": [\"your-app.com\", \"*.your-app.com\"], \"actionPolicy\": \"./policy.json\" }",
|
||
"Boolean flags accept an optional true/false value to override config settings:",
|
||
"agent-browser --headed false open example.com",
|
||
"A bare flag is equivalent to passing true:",
|
||
"agent-browser --headed open example.com # same as --headed true agent-browser --headed true open example.com # explicit",
|
||
"This applies to boolean flags such as --headed, --debug, --json, --ignore-https-errors, --allow-file-access, --hide-scrollbars, --auto-connect, --annotate, --content-boundaries, --confirm-interactive, and --no-auto-dialog.",
|
||
"Extensions from user-level and project-level configs are concatenated, not replaced. For example, if ~/.agent-browser/config.json specifies [\"/ext1\"] and ./agent-browser.json specifies [\"/ext2\"], the result is [\"/ext1\", \"/ext2\"].",
|
||
"The AGENT_BROWSER_EXTENSIONS environment variable and CLI --extension flags follow the standard priority rules (env replaces config, CLI appends).",
|
||
"Configure external plugins with the plugins array:",
|
||
"See Plugins for the plugin author protocol and implementation examples. Use agent-browser plugin add <ref> to create this config automatically.",
|
||
"{ \"plugins\": [ { \"name\": \"vault\", \"command\": \"agent-browser-plugin-vault\", \"args\": [], \"capabilities\": [\"credential.read\"] }, { \"name\": \"cloud-browser\", \"command\": \"agent-browser-plugin-cloud-browser\", \"capabilities\": [\"browser.provider\"] }, { \"name\": \"stealth\", \"command\": \"agent-browser-plugin-stealth\", \"capabilities\": [\"launch.mutate\"] }, { \"name\": \"captcha\", \"command\": \"agent-browser-plugin-captcha\", \"capabilities\": [\"command.run\", \"captcha.solve\"] } ] }",
|
||
"Project-level plugin entries are appended after user-level entries. If two entries use the same name, agent-browser resolves the later entry, so a project can override a user default. AGENT_BROWSER_PLUGINS can replace config discovery with a JSON array using the same shape.",
|
||
"Do not put vault tokens or passwords in plugin command args. Use the vault vendor's own login/session mechanism or environment outside agent-browser config.",
|
||
"agent-browser plugin list agent-browser auth login my-app --credential-provider vault --item \"My App\" agent-browser --provider cloud-browser open https://example.com agent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'",
|
||
"plugin run is for command.run and custom capabilities. Core capabilities and protocol request types use their dedicated command paths.",
|
||
"These environment variables configure additional daemon and runtime behavior:",
|
||
"Variable",
|
||
"Description",
|
||
"Default",
|
||
"AGENT_BROWSER_CONFIG",
|
||
"Path to an explicit config file.",
|
||
"(default discovery)",
|
||
"AGENT_BROWSER_SESSION",
|
||
"Isolated browser session name.",
|
||
"default",
|
||
"AGENT_BROWSER_AUTO_CONNECT",
|
||
"Auto-discover and connect to a running Chrome instance.",
|
||
"(disabled)",
|
||
"AGENT_BROWSER_ALLOW_FILE_ACCESS",
|
||
"Allow file:// URLs to access local files.",
|
||
"AGENT_BROWSER_EXECUTABLE_PATH",
|
||
"Custom browser executable path.",
|
||
"(auto-discover)",
|
||
"AGENT_BROWSER_PROFILE",
|
||
"Chrome profile name or persistent profile directory.",
|
||
"(none)",
|
||
"AGENT_BROWSER_STATE",
|
||
"Storage state file to load at launch.",
|
||
"AGENT_BROWSER_PROXY",
|
||
"Proxy URL. Takes precedence over standard proxy variables.",
|
||
"AGENT_BROWSER_PROXY_BYPASS",
|
||
"Proxy bypass host list.",
|
||
"AGENT_BROWSER_PROXY_USERNAME",
|
||
"Proxy username when credentials are supplied separately.",
|
||
"AGENT_BROWSER_PROXY_PASSWORD",
|
||
"Proxy password when credentials are supplied separately.",
|
||
"HTTP_PROXY / HTTPS_PROXY / ALL_PROXY",
|
||
"Standard proxy fallback variables.",
|
||
"NO_PROXY",
|
||
"Standard proxy bypass fallback.",
|
||
"AGENT_BROWSER_ARGS",
|
||
"AGENT_BROWSER_USER_AGENT",
|
||
"Custom User-Agent string.",
|
||
"(browser default)",
|
||
"AGENT_BROWSER_PROVIDER",
|
||
"Browser provider such as ios, browserbase, kernel, browseruse, browserless, agentcore, or a configured browser.provider plugin name.",
|
||
"(local browser)",
|
||
"AGENT_BROWSER_HIDE_SCROLLBARS",
|
||
"Hide native scrollbars in headless Chromium screenshots.",
|
||
"true",
|
||
"AGENT_BROWSER_COLOR_SCHEME",
|
||
"Color scheme preference (dark, light, no-preference).",
|
||
"AGENT_BROWSER_DOWNLOAD_PATH",
|
||
"Default directory for browser downloads.",
|
||
"(temp directory)",
|
||
"AGENT_BROWSER_DEFAULT_TIMEOUT",
|
||
"Default timeout in ms. Keep below 30000 to avoid IPC timeouts.",
|
||
"25000",
|
||
"AGENT_BROWSER_NAMESPACE",
|
||
"Namespace for daemon sockets and restore-state directories.",
|
||
"AGENT_BROWSER_RESTORE",
|
||
"Auto-save/load state persistence key.",
|
||
"AGENT_BROWSER_RESTORE_SAVE",
|
||
"Restore save policy: auto, always, or never.",
|
||
"auto",
|
||
"AGENT_BROWSER_AUTOSAVE_INTERVAL_MS",
|
||
"Minimum ms between periodic session autosaves while the browser is open. 0 saves only on close.",
|
||
"30000",
|
||
"AGENT_BROWSER_RESTORE_CHECK_URL",
|
||
"URL pattern restored state must match.",
|
||
"AGENT_BROWSER_RESTORE_CHECK_TEXT",
|
||
"Page text restored state must contain.",
|
||
"AGENT_BROWSER_RESTORE_CHECK_FN",
|
||
"JavaScript expression restored state must satisfy.",
|
||
"AGENT_BROWSER_SESSION_NAME",
|
||
"Legacy auto-save/load state persistence name.",
|
||
"AGENT_BROWSER_STATE_EXPIRE_DAYS",
|
||
"Auto-delete saved session states older than N days.",
|
||
"30",
|
||
"AGENT_BROWSER_ENCRYPTION_KEY",
|
||
"64-char hex key for AES-256-GCM session encryption.",
|
||
"AGENT_BROWSER_EXTENSIONS",
|
||
"Comma-separated browser extension paths. Extensions work in both headed and headless mode.",
|
||
"AGENT_BROWSER_INIT_SCRIPTS",
|
||
"Comma-separated paths to page init scripts.",
|
||
"AGENT_BROWSER_ENABLE",
|
||
"Comma-separated built-in init script features such as react-devtools.",
|
||
"AGENT_BROWSER_HEADED",
|
||
"Show browser window instead of running headless (1 to enable).",
|
||
"AGENT_BROWSER_WEBGPU",
|
||
"Enable WebGPU; SwiftShader software Vulkan on Linux, no GPU required (1 to enable).",
|
||
"AGENT_BROWSER_NO_XVFB",
|
||
"Disable automatic Xvfb virtual display for headed mode on displayless Linux hosts (1 to disable).",
|
||
"(auto-Xvfb enabled)",
|
||
"AGENT_BROWSER_CLEAR_CA_CERT",
|
||
"Clear CA trust retained by the running browser session.",
|
||
"AGENT_BROWSER_JSON",
|
||
"Use JSON output by default.",
|
||
"AGENT_BROWSER_ANNOTATE",
|
||
"Enable annotated screenshots by default.",
|
||
"AGENT_BROWSER_CDP",
|
||
"Connect the daemon to a CDP port or WebSocket URL.",
|
||
"AGENT_BROWSER_STREAM_PORT",
|
||
"Override the WebSocket streaming port. By default, an OS-assigned port is used. Set this to bind to a specific port (e.g., 9223).",
|
||
"OS-assigned",
|
||
"AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS",
|
||
"Comma-separated exact HTTPS origins allowed for a reverse-proxied dashboard. Every entry must be valid or dashboard startup fails. Without this setting, only loopback origins are accepted. Loopback access does not require the external dashboard token.",
|
||
"AGENT_BROWSER_STREAM_QUALITY",
|
||
"JPEG quality for streamed frames, 0 to 100. Lower values cut bandwidth: quality 20 costs about half the bytes of the default on a busy page.",
|
||
"80",
|
||
"AGENT_BROWSER_STREAM_MAX_WIDTH",
|
||
"Cap the encoded frame width in pixels. Caps the frame only and leaves the page size alone, so pointer coordinates are unaffected.",
|
||
"the viewport",
|
||
"AGENT_BROWSER_STREAM_MAX_HEIGHT",
|
||
"Cap the encoded frame height in pixels.",
|
||
"AGENT_BROWSER_IDLE_TIMEOUT_MS",
|
||
"Auto-shutdown the daemon after N ms without commands or dashboard input. Set 0 to disable. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default. Provider-owned cloud browsers are eligible for cleanup, and an explicit value applies to every browser.",
|
||
"3600000 (1 hour)",
|
||
"AGENT_BROWSER_IOS_DEVICE",
|
||
"Default iOS device name for the ios provider.",
|
||
"AGENT_BROWSER_IOS_UDID",
|
||
"Default iOS device UDID for the ios provider.",
|
||
"AGENT_BROWSER_DEBUG",
|
||
"Enable debug output (1 to enable).",
|
||
"AGENT_BROWSER_CONTENT_BOUNDARIES",
|
||
"Wrap page output in boundary markers for LLM safety.",
|
||
"AGENT_BROWSER_MAX_OUTPUT",
|
||
"Max characters for page output (truncates beyond limit).",
|
||
"(unlimited)",
|
||
"AGENT_BROWSER_ALLOWED_DOMAINS",
|
||
"Comma-separated allowed domain patterns (e.g., example.com,*.example.com). Requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins.",
|
||
"(unrestricted)",
|
||
"AGENT_BROWSER_ACTION_POLICY",
|
||
"Path to action policy JSON file.",
|
||
"AGENT_BROWSER_CONFIRM_ACTIONS",
|
||
"Comma-separated action categories requiring confirmation.",
|
||
"AGENT_BROWSER_CONFIRM_INTERACTIVE",
|
||
"Enable interactive confirmation prompts (auto-denies if stdin is not a TTY).",
|
||
"AGENT_BROWSER_ENGINE",
|
||
"Browser engine to use: chrome (default), lightpanda, obscura (experimental).",
|
||
"chrome",
|
||
"AGENT_BROWSER_NO_AUTO_DIALOG",
|
||
"Disable automatic dismissal of alert/beforeunload dialogs.",
|
||
"AGENT_BROWSER_PLUGINS",
|
||
"JSON plugin registry override.",
|
||
"(config discovery)",
|
||
"AGENT_BROWSER_SCREENSHOT_DIR",
|
||
"Default screenshot output directory.",
|
||
"AGENT_BROWSER_SCREENSHOT_QUALITY",
|
||
"JPEG screenshot quality from 0 to 100.",
|
||
"(format default)",
|
||
"AGENT_BROWSER_SCREENSHOT_FORMAT",
|
||
"Screenshot format: png or jpeg.",
|
||
"png",
|
||
"AGENT_BROWSER_SOCKET_DIR",
|
||
"Advanced override for daemon socket files.",
|
||
"runtime dir or ~/.agent-browser",
|
||
"AGENT_BROWSER_SKILLS_DIR",
|
||
"Override the directory used by agent-browser skills.",
|
||
"bundled skills",
|
||
"AGENT_BROWSER_COLOR",
|
||
"Enable colored CLI output when truthy.",
|
||
"NO_COLOR",
|
||
"Disable colored output when present.",
|
||
"(not set)",
|
||
"AI_GATEWAY_URL",
|
||
"Vercel AI Gateway base URL.",
|
||
"https://ai-gateway.vercel.sh",
|
||
"AI_GATEWAY_API_KEY",
|
||
"API key for the Vercel AI Gateway. Required to enable AI chat.",
|
||
"AI_GATEWAY_MODEL",
|
||
"Default AI model for dashboard chat.",
|
||
"anthropic/claude-sonnet-4.6",
|
||
"Auto-discovered config files (~/.agent-browser/config.json, ./agent-browser.json) that are missing are silently ignored.",
|
||
"--config <path> with a missing or malformed file exits with an error.",
|
||
"Malformed JSON in auto-discovered files prints a warning to stderr and continues without that file.",
|
||
"Unknown keys are silently ignored for forward compatibility.",
|
||
"Tip: If your project-level agent-browser.json contains environment-specific values (paths, proxies), consider adding it to .gitignore."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://agent-browser.dev/schema.json",
|
||
"text": "JSON Schema"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/plugins",
|
||
"text": "Plugins"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Configuration\n\nCreate an `agent-browser.json` file to set persistent defaults instead of repeating flags on every command.\n\n## Config File Locations\n\nagent-browser checks two locations, merged in priority order:\n\n<table>\n <thead>\n <tr><th>Priority</th><th>Location</th><th>Scope</th></tr>\n </thead>\n <tbody>\n <tr><td>1 (lowest)</td><td><code>~/.agent-browser/config.json</code></td><td>User-level defaults</td></tr>\n <tr><td>2</td><td><code>./agent-browser.json</code></td><td>Project-level overrides</td></tr>\n <tr><td>3</td><td><code>AGENT_BROWSER_*</code> env vars</td><td>Override config values</td></tr>\n <tr><td>4 (highest)</td><td>CLI flags</td><td>Override everything</td></tr>\n </tbody>\n</table>\n\nProject-level values override user-level values. Environment variables override both. CLI flags always win.\n\nUse `--config <path>` or the `AGENT_BROWSER_CONFIG` environment variable to load a specific config file instead of the default locations:\n\n```bash\nagent-browser --config ./ci-config.json open example.com\nAGENT_BROWSER_CONFIG=./ci-config.json agent-browser open example.com\n```\n\n## Example Config\n\n```json\n{\n \"headed\": true,\n \"proxy\": \"http://localhost:8080\",\n \"profile\": \"./browser-data\",\n \"userAgent\": \"my-agent/1.0\",\n \"hideScrollbars\": false,\n \"ignoreHttpsErrors\": true\n}\n```\n\nA [JSON Schema](https://agent-browser.dev/schema.json) is available for IDE autocomplete and validation. Add a `$schema` key to your config file to enable it:\n\n```json\n{\n \"$schema\": \"https://agent-browser.dev/schema.json\",\n \"headed\": true\n}\n```\n\n## All Options\n\nGlobal launch, output, provider, and chat options can be set in the config file using their camelCase equivalent. Command-scoped flags such as `screenshot --full` remain command arguments.\n\n<table>\n <thead>\n <tr><th>Config Key</th><th>CLI Flag</th><th>Type</th></tr>\n </thead>\n <tbody>\n <tr><td><code>headed</code></td><td><code>--headed</code></td><td>boolean</td></tr>\n <tr><td><code>json</code></td><td><code>--json</code></td><td>boolean</td></tr>\n <tr><td><code>debug</code></td><td><code>--debug</code></td><td>boolean</td></tr>\n <tr><td><code>session</code></td><td><code>--session</code></td><td>string</td></tr>\n <tr><td><code>restore</code></td><td><code>--restore</code></td><td>string</td></tr>\n <tr><td><code>restoreSave</code></td><td><code>--restore-save</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckUrl</code></td><td><code>--restore-check-url</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckText</code></td><td><code>--restore-check-text</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckFn</code></td><td><code>--restore-check-fn</code></td><td>string</td></tr>\n <tr><td><code>namespace</code></td><td><code>--namespace</code></td><td>string</td></tr>\n <tr><td><code>sessionName</code></td><td><code>--session-name</code></td><td>string, legacy restore key</td></tr>\n <tr><td><code>executablePath</code></td><td><code>--executable-path</code></td><td>string</td></tr>\n <tr><td><code>extensions</code></td><td><code>--extension</code></td><td>string[]</td></tr>\n <tr><td><code>initScripts</code></td><td><code>--init-script</code></td><td>string[]</td></tr>\n <tr><td><code>enable</code></td><td><code>--enable</code></td><td>string[]</td></tr>\n <tr><td><code>profile</code></td><td><code>--profile</code></td><td>string</td></tr>\n <tr><td><code>state</code></td><td><code>--state</code></td><td>string</td></tr>\n <tr><td><code>proxy</code></td><td><code>--proxy</code></td><td>string</td></tr>\n <tr><td><code>proxyBypass</code></td><td><code>--proxy-bypass</code></td><td>string</td></tr>\n <tr><td><code>args</code></td><td><code>--args</code></td><td>string</td></tr>\n <tr><td><code>userAgent</code></td><td><code>--user-agent</code></td><td>string</td></tr>\n <tr><td><code>provider</code></td><td><code>-p, --provider</code></td><td>string</td></tr>\n <tr><td><code>device</code></td><td><code>--device</code></td><td>string</td></tr>\n <tr><td><code>hideScrollbars</code></td><td><code>--hide-scrollbars</code></td><td>boolean</td></tr>\n <tr><td><code>webgpu</code></td><td><code>--webgpu</code></td><td>boolean</td></tr>\n <tr><td><code>noWebmcp</code></td><td><code>--no-webmcp</code> or <code>AGENT_BROWSER_NO_WEBMCP</code></td><td>boolean</td></tr>\n <tr><td><code>ignoreHttpsErrors</code></td><td><code>--ignore-https-errors</code></td><td>boolean</td></tr>\n <tr><td><code>caCert</code></td><td><code>--ca-cert</code></td><td>string</td></tr>\n <tr><td><code>clearCaCert</code></td><td><code>--no-ca-cert</code></td><td>boolean</td></tr>\n <tr><td><code>allowFileAccess</code></td><td><code>--allow-file-access</code></td><td>boolean</td></tr>\n <tr><td><code>cdp</code></td><td><code>--cdp</code></td><td>string</td></tr>\n <tr><td><code>autoConnect</code></td><td><code>--auto-connect</code></td><td>boolean</td></tr>\n <tr><td><code>pinTab</code></td><td><code>--pin-tab</code></td><td>boolean</td></tr>\n <tr><td><code>annotate</code></td><td><code>--annotate</code></td><td>boolean</td></tr>\n <tr><td><code>colorScheme</code></td><td><code>--color-scheme</code></td><td>string (<code>dark</code>, <code>light</code>, <code>no-preference</code>)</td></tr>\n <tr><td><code>downloadPath</code></td><td><code>--download-path</code></td><td>string</td></tr>\n <tr><td><code>contentBoundaries</code></td><td><code>--content-boundaries</code></td><td>boolean</td></tr>\n <tr><td><code>maxOutput</code></td><td><code>--max-output</code></td><td>number</td></tr>\n <tr><td><code>allowedDomains</code></td><td><code>--allowed-domains</code></td><td>string[]; also disables WebRTC in supported Chromium sessions and requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins</td></tr>\n <tr><td><code>actionPolicy</code></td><td><code>--action-policy</code></td><td>string</td></tr>\n <tr><td><code>confirmActions</code></td><td><code>--confirm-actions</code></td><td>string</td></tr>\n <tr><td><code>confirmInteractive</code></td><td><code>--confirm-interactive</code></td><td>boolean</td></tr>\n <tr><td><code>engine</code></td><td><code>--engine</code></td><td>string (<code>chrome</code>, <code>lightpanda</code>, <code>obscura</code>)</td></tr>\n <tr><td><code>screenshotDir</code></td><td><code>--screenshot-dir</code></td><td>string</td></tr>\n <tr><td><code>screenshotQuality</code></td><td><code>--screenshot-quality</code></td><td>number (0-100)</td></tr>\n <tr><td><code>screenshotFormat</code></td><td><code>--screenshot-format</code></td><td>string (<code>png</code>, <code>jpeg</code>)</td></tr>\n <tr><td><code>idleTimeout</code></td><td><code>--idle-timeout</code></td><td>string (<code>10s</code>, <code>3m</code>, <code>1h</code>, or raw ms); defaults to <code>1h</code>, while <code>0</code> disables idle shutdown</td></tr>\n <tr><td><code>noAutoDialog</code></td><td><code>--no-auto-dialog</code></td><td>boolean</td></tr>\n <tr><td><code>model</code></td><td><code>--model</code></td><td>string</td></tr>\n <tr><td><code>headers</code></td><td><code>--headers</code></td><td>string (JSON)</td></tr>\n <tr><td><code>plugins</code></td><td>(config only)</td><td>plugin config[]</td></tr>\n </tbody>\n</table>\n\n## Common Configurations\n\n### Local Development\n\n```json\n{\n \"headed\": true,\n \"profile\": \"./browser-data\"\n}\n```\n\n### Behind a Proxy\n\n```json\n{\n \"proxy\": \"http://proxy.corp.example.com:8080\",\n \"proxyBypass\": \"localhost,*.internal.com\",\n \"caCert\": \"/etc/ssl/certs/proxy-ca.crt\"\n}\n```\n\n`caCert` imports the supplied CA certificate or PEM bundle into an isolated NSS database for locally launched Chromium on Linux. Hostname, validity period, and unrelated CA verification remain enabled. The CA remains active when later commands omit it. Setting different certificate content or `clearCaCert: true` relaunches Chromium without restarting the daemon. `agent-browser install --with-deps` installs the required `certutil`; otherwise install `libnss3-tools` on Debian/Ubuntu or `nss-tools` on RPM Linux. This initial implementation does not support Chrome profiles, CDP attach, providers, Lightpanda, macOS, or Windows.\n\nWithout the CA certificate on hand, fall back to ignoring every certificate error, which is less secure:\n\n```json\n{\n \"proxy\": \"http://proxy.corp.example.com:8080\",\n \"proxyBypass\": \"localhost,*.internal.com\",\n \"ignoreHttpsErrors\": true\n}\n```\n\n### CI / Devcontainer\n\n```json\n{\n \"args\": \"--no-sandbox,--disable-gpu\",\n \"ignoreHttpsErrors\": true\n}\n```\n\n### iOS Testing\n\n```json\n{\n \"provider\": \"ios\",\n \"device\": \"iPhone 16 Pro\"\n}\n```\n\n### AI Agent Security\n\n```json\n{\n \"contentBoundaries\": true,\n \"maxOutput\": 50000,\n \"allowedDomains\": [\"your-app.com\", \"*.your-app.com\"],\n \"actionPolicy\": \"./policy.json\"\n}\n```\n\n## Overriding Boolean Options\n\nBoolean flags accept an optional `true`/`false` value to override config settings:\n\n```bash\nagent-browser --headed false open example.com\n```\n\nA bare flag is equivalent to passing `true`:\n\n```bash\nagent-browser --headed open example.com # same as --headed true\nagent-browser --headed true open example.com # explicit\n```\n\nThis applies to boolean flags such as `--headed`, `--debug`, `--json`, `--ignore-https-errors`, `--allow-file-access`, `--hide-scrollbars`, `--auto-connect`, `--annotate`, `--content-boundaries`, `--confirm-interactive`, and `--no-auto-dialog`.\n\n## Extensions Merging\n\nExtensions from user-level and project-level configs are **concatenated**, not replaced. For example, if `~/.agent-browser/config.json` specifies `[\"/ext1\"]` and `./agent-browser.json` specifies `[\"/ext2\"]`, the result is `[\"/ext1\", \"/ext2\"]`.\n\nThe `AGENT_BROWSER_EXTENSIONS` environment variable and CLI `--extension` flags follow the standard priority rules (env replaces config, CLI appends).\n\n## Plugins\n\nConfigure external plugins with the `plugins` array:\n\nSee [Plugins](/plugins) for the plugin author protocol and implementation examples. Use `agent-browser plugin add <ref>` to create this config automatically.\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"args\": [],\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"cloud-browser\",\n \"command\": \"agent-browser-plugin-cloud-browser\",\n \"capabilities\": [\"browser.provider\"]\n },\n {\n \"name\": \"stealth\",\n \"command\": \"agent-browser-plugin-stealth\",\n \"capabilities\": [\"launch.mutate\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nProject-level plugin entries are appended after user-level entries. If two entries use the same name, agent-browser resolves the later entry, so a project can override a user default. `AGENT_BROWSER_PLUGINS` can replace config discovery with a JSON array using the same shape.\n\nDo not put vault tokens or passwords in plugin command args. Use the vault vendor's own login/session mechanism or environment outside agent-browser config.\n\n```bash\nagent-browser plugin list\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --provider cloud-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\n```\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths.\n\n## Environment Variables\n\nThese environment variables configure additional daemon and runtime behavior:\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_CONFIG</code></td><td>Path to an explicit config file.</td><td>(default discovery)</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION</code></td><td>Isolated browser session name.</td><td><code>default</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTO_CONNECT</code></td><td>Auto-discover and connect to a running Chrome instance.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOW_FILE_ACCESS</code></td><td>Allow <code>file://</code> URLs to access local files.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_EXECUTABLE_PATH</code></td><td>Custom browser executable path.</td><td>(auto-discover)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROFILE</code></td><td>Chrome profile name or persistent profile directory.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE</code></td><td>Storage state file to load at launch.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY</code></td><td>Proxy URL. Takes precedence over standard proxy variables.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_BYPASS</code></td><td>Proxy bypass host list.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_USERNAME</code></td><td>Proxy username when credentials are supplied separately.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_PASSWORD</code></td><td>Proxy password when credentials are supplied separately.</td><td>(none)</td></tr>\n <tr><td><code>HTTP_PROXY</code> / <code>HTTPS_PROXY</code> / <code>ALL_PROXY</code></td><td>Standard proxy fallback variables.</td><td>(none)</td></tr>\n <tr><td><code>NO_PROXY</code></td><td>Standard proxy bypass fallback.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_ARGS</code></td><td>Browser launch arguments, separated by newlines or by commas before another flag. Commas inside a value are kept.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_USER_AGENT</code></td><td>Custom User-Agent string.</td><td>(browser default)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROVIDER</code></td><td>Browser provider such as <code>ios</code>, <code>browserbase</code>, <code>kernel</code>, <code>browseruse</code>, <code>browserless</code>, <code>agentcore</code>, or a configured <code>browser.provider</code> plugin name.</td><td>(local browser)</td></tr>\n <tr><td><code>AGENT_BROWSER_HIDE_SCROLLBARS</code></td><td>Hide native scrollbars in headless Chromium screenshots.</td><td><code>true</code></td></tr>\n <tr><td><code>AGENT_BROWSER_COLOR_SCHEME</code></td><td>Color scheme preference (<code>dark</code>, <code>light</code>, <code>no-preference</code>).</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_DOWNLOAD_PATH</code></td><td>Default directory for browser downloads.</td><td>(temp directory)</td></tr>\n <tr><td><code>AGENT_BROWSER_DEFAULT_TIMEOUT</code></td><td>Default timeout in ms. Keep below 30000 to avoid IPC timeouts.</td><td><code>25000</code></td></tr>\n <tr><td><code>AGENT_BROWSER_NAMESPACE</code></td><td>Namespace for daemon sockets and restore-state directories.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE</code></td><td>Auto-save/load state persistence key.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_SAVE</code></td><td>Restore save policy: <code>auto</code>, <code>always</code>, or <code>never</code>.</td><td><code>auto</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTOSAVE_INTERVAL_MS</code></td><td>Minimum ms between periodic session autosaves while the browser is open. <code>0</code> saves only on close.</td><td><code>30000</code></td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_URL</code></td><td>URL pattern restored state must match.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_TEXT</code></td><td>Page text restored state must contain.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_FN</code></td><td>JavaScript expression restored state must satisfy.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION_NAME</code></td><td>Legacy auto-save/load state persistence name.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code></td><td>Auto-delete saved session states older than N days.</td><td><code>30</code></td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM session encryption.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_EXTENSIONS</code></td><td>Comma-separated browser extension paths. Extensions work in both headed and headless mode.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_INIT_SCRIPTS</code></td><td>Comma-separated paths to page init scripts.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_ENABLE</code></td><td>Comma-separated built-in init script features such as <code>react-devtools</code>.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_HEADED</code></td><td>Show browser window instead of running headless (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_WEBGPU</code></td><td>Enable WebGPU; SwiftShader software Vulkan on Linux, no GPU required (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_NO_XVFB</code></td><td>Disable automatic Xvfb virtual display for headed mode on displayless Linux hosts (<code>1</code> to disable).</td><td>(auto-Xvfb enabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CLEAR_CA_CERT</code></td><td>Clear CA trust retained by the running browser session.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_JSON</code></td><td>Use JSON output by default.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ANNOTATE</code></td><td>Enable annotated screenshots by default.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CDP</code></td><td>Connect the daemon to a CDP port or WebSocket URL.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_PORT</code></td><td>Override the WebSocket streaming port. By default, an OS-assigned port is used. Set this to bind to a specific port (e.g., <code>9223</code>).</td><td>OS-assigned</td></tr>\n <tr><td><code>AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS</code></td><td>Comma-separated exact HTTPS origins allowed for a reverse-proxied dashboard. Every entry must be valid or dashboard startup fails. Without this setting, only loopback origins are accepted. Loopback access does not require the external dashboard token.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_QUALITY</code></td><td>JPEG quality for streamed frames, 0 to 100. Lower values cut bandwidth: quality 20 costs about half the bytes of the default on a busy page.</td><td><code>80</code></td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_MAX_WIDTH</code></td><td>Cap the encoded frame width in pixels. Caps the frame only and leaves the page size alone, so pointer coordinates are unaffected.</td><td>the viewport</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_MAX_HEIGHT</code></td><td>Cap the encoded frame height in pixels.</td><td>the viewport</td></tr>\n <tr><td><code>AGENT_BROWSER_IDLE_TIMEOUT_MS</code></td><td>Auto-shutdown the daemon after N ms without commands or dashboard input. Set <code>0</code> to disable. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default. Provider-owned cloud browsers are eligible for cleanup, and an explicit value applies to every browser.</td><td><code>3600000</code> (1 hour)</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_DEVICE</code></td><td>Default iOS device name for the <code>ios</code> provider.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_UDID</code></td><td>Default iOS device UDID for the <code>ios</code> provider.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_DEBUG</code></td><td>Enable debug output (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONTENT_BOUNDARIES</code></td><td>Wrap page output in boundary markers for LLM safety.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_MAX_OUTPUT</code></td><td>Max characters for page output (truncates beyond limit).</td><td>(unlimited)</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOWED_DOMAINS</code></td><td>Comma-separated allowed domain patterns (e.g., <code>example.com,*.example.com</code>). Requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins.</td><td>(unrestricted)</td></tr>\n <tr><td><code>AGENT_BROWSER_ACTION_POLICY</code></td><td>Path to action policy JSON file.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_ACTIONS</code></td><td>Comma-separated action categories requiring confirmation.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_INTERACTIVE</code></td><td>Enable interactive confirmation prompts (auto-denies if stdin is not a TTY).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ENGINE</code></td><td>Browser engine to use: <code>chrome</code> (default), <code>lightpanda</code>, <code>obscura</code> (experimental).</td><td><code>chrome</code></td></tr>\n <tr><td><code>AGENT_BROWSER_NO_AUTO_DIALOG</code></td><td>Disable automatic dismissal of <code>alert</code>/<code>beforeunload</code> dialogs.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_PLUGINS</code></td><td>JSON plugin registry override.</td><td>(config discovery)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_DIR</code></td><td>Default screenshot output directory.</td><td>(temp directory)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_QUALITY</code></td><td>JPEG screenshot quality from 0 to 100.</td><td>(format default)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_FORMAT</code></td><td>Screenshot format: <code>png</code> or <code>jpeg</code>.</td><td><code>png</code></td></tr>\n <tr><td><code>AGENT_BROWSER_SOCKET_DIR</code></td><td>Advanced override for daemon socket files.</td><td>runtime dir or <code>~/.agent-browser</code></td></tr>\n <tr><td><code>AGENT_BROWSER_SKILLS_DIR</code></td><td>Override the directory used by <code>agent-browser skills</code>.</td><td>bundled skills</td></tr>\n <tr><td><code>AGENT_BROWSER_COLOR</code></td><td>Enable colored CLI output when truthy.</td><td>(disabled)</td></tr>\n <tr><td><code>NO_COLOR</code></td><td>Disable colored output when present.</td><td>(not set)</td></tr>\n <tr><td><code>AI_GATEWAY_URL</code></td><td>Vercel AI Gateway base URL.</td><td><code>https://ai-gateway.vercel.sh</code></td></tr>\n <tr><td><code>AI_GATEWAY_API_KEY</code></td><td>API key for the Vercel AI Gateway. Required to enable AI chat.</td><td>(none)</td></tr>\n <tr><td><code>AI_GATEWAY_MODEL</code></td><td>Default AI model for dashboard chat.</td><td><code>anthropic/claude-sonnet-4.6</code></td></tr>\n </tbody>\n</table>\n\n## Error Handling\n\n- **Auto-discovered config files** (`~/.agent-browser/config.json`, `./agent-browser.json`) that are missing are silently ignored.\n- **`--config <path>`** with a missing or malformed file exits with an error.\n- **Malformed JSON** in auto-discovered files prints a warning to stderr and continues without that file.\n- **Unknown keys** are silently ignored for forward compatibility.\n\n> **Tip:** If your project-level `agent-browser.json` contains environment-specific values (paths, proxies), consider adding it to `.gitignore`.",
|
||
"legacyMarkdownSha256": "15f48397a7c43c9061b6a50119b76fad4cf8540bbe0809cbefd9410eb6eb4c5c",
|
||
"modernMarkdown": "# Configuration\n\nCreate an `agent-browser.json` file to set persistent defaults instead of repeating flags on every command.\n\n## Config File Locations\n\nagent-browser checks two locations, merged in priority order:\n\n<table>\n <thead>\n <tr><th>Priority</th><th>Location</th><th>Scope</th></tr>\n </thead>\n <tbody>\n <tr><td>1 (lowest)</td><td><code>~/.agent-browser/config.json</code></td><td>User-level defaults</td></tr>\n <tr><td>2</td><td><code>./agent-browser.json</code></td><td>Project-level overrides</td></tr>\n <tr><td>3</td><td><code>AGENT_BROWSER_*</code> env vars</td><td>Override config values</td></tr>\n <tr><td>4 (highest)</td><td>CLI flags</td><td>Override everything</td></tr>\n </tbody>\n</table>\n\nProject-level values override user-level values. Environment variables override both. CLI flags always win.\n\nUse `--config <path>` or the `AGENT_BROWSER_CONFIG` environment variable to load a specific config file instead of the default locations:\n\n```bash\nagent-browser --config ./ci-config.json open example.com\nAGENT_BROWSER_CONFIG=./ci-config.json agent-browser open example.com\n```\n\n## Example Config\n\n```json\n{\n \"headed\": true,\n \"proxy\": \"http://localhost:8080\",\n \"profile\": \"./browser-data\",\n \"userAgent\": \"my-agent/1.0\",\n \"hideScrollbars\": false,\n \"ignoreHttpsErrors\": true\n}\n```\n\nA [JSON Schema](https://agent-browser.dev/schema.json) is available for IDE autocomplete and validation. Add a `$schema` key to your config file to enable it:\n\n```json\n{\n \"$schema\": \"https://agent-browser.dev/schema.json\",\n \"headed\": true\n}\n```\n\n## All Options\n\nGlobal launch, output, provider, and chat options can be set in the config file using their camelCase equivalent. Command-scoped flags such as `screenshot --full` remain command arguments.\n\n<table>\n <thead>\n <tr><th>Config Key</th><th>CLI Flag</th><th>Type</th></tr>\n </thead>\n <tbody>\n <tr><td><code>headed</code></td><td><code>--headed</code></td><td>boolean</td></tr>\n <tr><td><code>json</code></td><td><code>--json</code></td><td>boolean</td></tr>\n <tr><td><code>debug</code></td><td><code>--debug</code></td><td>boolean</td></tr>\n <tr><td><code>session</code></td><td><code>--session</code></td><td>string</td></tr>\n <tr><td><code>restore</code></td><td><code>--restore</code></td><td>string</td></tr>\n <tr><td><code>restoreSave</code></td><td><code>--restore-save</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckUrl</code></td><td><code>--restore-check-url</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckText</code></td><td><code>--restore-check-text</code></td><td>string</td></tr>\n <tr><td><code>restoreCheckFn</code></td><td><code>--restore-check-fn</code></td><td>string</td></tr>\n <tr><td><code>namespace</code></td><td><code>--namespace</code></td><td>string</td></tr>\n <tr><td><code>sessionName</code></td><td><code>--session-name</code></td><td>string, legacy restore key</td></tr>\n <tr><td><code>executablePath</code></td><td><code>--executable-path</code></td><td>string</td></tr>\n <tr><td><code>extensions</code></td><td><code>--extension</code></td><td>string[]</td></tr>\n <tr><td><code>initScripts</code></td><td><code>--init-script</code></td><td>string[]</td></tr>\n <tr><td><code>enable</code></td><td><code>--enable</code></td><td>string[]</td></tr>\n <tr><td><code>profile</code></td><td><code>--profile</code></td><td>string</td></tr>\n <tr><td><code>state</code></td><td><code>--state</code></td><td>string</td></tr>\n <tr><td><code>proxy</code></td><td><code>--proxy</code></td><td>string</td></tr>\n <tr><td><code>proxyBypass</code></td><td><code>--proxy-bypass</code></td><td>string</td></tr>\n <tr><td><code>args</code></td><td><code>--args</code></td><td>string</td></tr>\n <tr><td><code>userAgent</code></td><td><code>--user-agent</code></td><td>string</td></tr>\n <tr><td><code>provider</code></td><td><code>-p, --provider</code></td><td>string</td></tr>\n <tr><td><code>device</code></td><td><code>--device</code></td><td>string</td></tr>\n <tr><td><code>hideScrollbars</code></td><td><code>--hide-scrollbars</code></td><td>boolean</td></tr>\n <tr><td><code>webgpu</code></td><td><code>--webgpu</code></td><td>boolean</td></tr>\n <tr><td><code>noWebmcp</code></td><td><code>--no-webmcp</code> or <code>AGENT_BROWSER_NO_WEBMCP</code></td><td>boolean</td></tr>\n <tr><td><code>ignoreHttpsErrors</code></td><td><code>--ignore-https-errors</code></td><td>boolean</td></tr>\n <tr><td><code>caCert</code></td><td><code>--ca-cert</code></td><td>string</td></tr>\n <tr><td><code>clearCaCert</code></td><td><code>--no-ca-cert</code></td><td>boolean</td></tr>\n <tr><td><code>allowFileAccess</code></td><td><code>--allow-file-access</code></td><td>boolean</td></tr>\n <tr><td><code>cdp</code></td><td><code>--cdp</code></td><td>string</td></tr>\n <tr><td><code>autoConnect</code></td><td><code>--auto-connect</code></td><td>boolean</td></tr>\n <tr><td><code>pinTab</code></td><td><code>--pin-tab</code></td><td>boolean</td></tr>\n <tr><td><code>annotate</code></td><td><code>--annotate</code></td><td>boolean</td></tr>\n <tr><td><code>colorScheme</code></td><td><code>--color-scheme</code></td><td>string (<code>dark</code>, <code>light</code>, <code>no-preference</code>)</td></tr>\n <tr><td><code>downloadPath</code></td><td><code>--download-path</code></td><td>string</td></tr>\n <tr><td><code>contentBoundaries</code></td><td><code>--content-boundaries</code></td><td>boolean</td></tr>\n <tr><td><code>maxOutput</code></td><td><code>--max-output</code></td><td>number</td></tr>\n <tr><td><code>allowedDomains</code></td><td><code>--allowed-domains</code></td><td>string[]; also disables WebRTC in supported Chromium sessions and requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins</td></tr>\n <tr><td><code>actionPolicy</code></td><td><code>--action-policy</code></td><td>string</td></tr>\n <tr><td><code>confirmActions</code></td><td><code>--confirm-actions</code></td><td>string</td></tr>\n <tr><td><code>confirmInteractive</code></td><td><code>--confirm-interactive</code></td><td>boolean</td></tr>\n <tr><td><code>engine</code></td><td><code>--engine</code></td><td>string (<code>chrome</code>, <code>lightpanda</code>, <code>obscura</code>)</td></tr>\n <tr><td><code>screenshotDir</code></td><td><code>--screenshot-dir</code></td><td>string</td></tr>\n <tr><td><code>screenshotQuality</code></td><td><code>--screenshot-quality</code></td><td>number (0-100)</td></tr>\n <tr><td><code>screenshotFormat</code></td><td><code>--screenshot-format</code></td><td>string (<code>png</code>, <code>jpeg</code>)</td></tr>\n <tr><td><code>idleTimeout</code></td><td><code>--idle-timeout</code></td><td>string (<code>10s</code>, <code>3m</code>, <code>1h</code>, or raw ms); defaults to <code>1h</code>, while <code>0</code> disables idle shutdown</td></tr>\n <tr><td><code>noAutoDialog</code></td><td><code>--no-auto-dialog</code></td><td>boolean</td></tr>\n <tr><td><code>model</code></td><td><code>--model</code></td><td>string</td></tr>\n <tr><td><code>headers</code></td><td><code>--headers</code></td><td>string (JSON)</td></tr>\n <tr><td><code>plugins</code></td><td>(config only)</td><td>plugin config[]</td></tr>\n </tbody>\n</table>\n\n## Common Configurations\n\n### Local Development\n\n```json\n{\n \"headed\": true,\n \"profile\": \"./browser-data\"\n}\n```\n\n### Behind a Proxy\n\n```json\n{\n \"proxy\": \"http://proxy.corp.example.com:8080\",\n \"proxyBypass\": \"localhost,*.internal.com\",\n \"caCert\": \"/etc/ssl/certs/proxy-ca.crt\"\n}\n```\n\n`caCert` imports the supplied CA certificate or PEM bundle into an isolated NSS database for locally launched Chromium on Linux. Hostname, validity period, and unrelated CA verification remain enabled. The CA remains active when later commands omit it. Setting different certificate content or `clearCaCert: true` relaunches Chromium without restarting the daemon. `agent-browser install --with-deps` installs the required `certutil`; otherwise install `libnss3-tools` on Debian/Ubuntu or `nss-tools` on RPM Linux. This initial implementation does not support Chrome profiles, CDP attach, providers, Lightpanda, macOS, or Windows.\n\nWithout the CA certificate on hand, fall back to ignoring every certificate error, which is less secure:\n\n```json\n{\n \"proxy\": \"http://proxy.corp.example.com:8080\",\n \"proxyBypass\": \"localhost,*.internal.com\",\n \"ignoreHttpsErrors\": true\n}\n```\n\n### CI / Devcontainer\n\n```json\n{\n \"args\": \"--no-sandbox,--disable-gpu\",\n \"ignoreHttpsErrors\": true\n}\n```\n\n### iOS Testing\n\n```json\n{\n \"provider\": \"ios\",\n \"device\": \"iPhone 16 Pro\"\n}\n```\n\n### AI Agent Security\n\n```json\n{\n \"contentBoundaries\": true,\n \"maxOutput\": 50000,\n \"allowedDomains\": [\"your-app.com\", \"*.your-app.com\"],\n \"actionPolicy\": \"./policy.json\"\n}\n```\n\n## Overriding Boolean Options\n\nBoolean flags accept an optional `true`/`false` value to override config settings:\n\n```bash\nagent-browser --headed false open example.com\n```\n\nA bare flag is equivalent to passing `true`:\n\n```bash\nagent-browser --headed open example.com # same as --headed true\nagent-browser --headed true open example.com # explicit\n```\n\nThis applies to boolean flags such as `--headed`, `--debug`, `--json`, `--ignore-https-errors`, `--allow-file-access`, `--hide-scrollbars`, `--auto-connect`, `--annotate`, `--content-boundaries`, `--confirm-interactive`, and `--no-auto-dialog`.\n\n## Extensions Merging\n\nExtensions from user-level and project-level configs are **concatenated**, not replaced. For example, if `~/.agent-browser/config.json` specifies `[\"/ext1\"]` and `./agent-browser.json` specifies `[\"/ext2\"]`, the result is `[\"/ext1\", \"/ext2\"]`.\n\nThe `AGENT_BROWSER_EXTENSIONS` environment variable and CLI `--extension` flags follow the standard priority rules (env replaces config, CLI appends).\n\n## Plugins\n\nConfigure external plugins with the `plugins` array:\n\nSee [Plugins](/plugins) for the plugin author protocol and implementation examples. Use `agent-browser plugin add <ref>` to create this config automatically.\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"args\": [],\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"cloud-browser\",\n \"command\": \"agent-browser-plugin-cloud-browser\",\n \"capabilities\": [\"browser.provider\"]\n },\n {\n \"name\": \"stealth\",\n \"command\": \"agent-browser-plugin-stealth\",\n \"capabilities\": [\"launch.mutate\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nProject-level plugin entries are appended after user-level entries. If two entries use the same name, agent-browser resolves the later entry, so a project can override a user default. `AGENT_BROWSER_PLUGINS` can replace config discovery with a JSON array using the same shape.\n\nDo not put vault tokens or passwords in plugin command args. Use the vault vendor's own login/session mechanism or environment outside agent-browser config.\n\n```bash\nagent-browser plugin list\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --provider cloud-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\n```\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths.\n\n## Environment Variables\n\nThese environment variables configure additional daemon and runtime behavior:\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_CONFIG</code></td><td>Path to an explicit config file.</td><td>(default discovery)</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION</code></td><td>Isolated browser session name.</td><td><code>default</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTO_CONNECT</code></td><td>Auto-discover and connect to a running Chrome instance.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOW_FILE_ACCESS</code></td><td>Allow <code>file://</code> URLs to access local files.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_EXECUTABLE_PATH</code></td><td>Custom browser executable path.</td><td>(auto-discover)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROFILE</code></td><td>Chrome profile name or persistent profile directory.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE</code></td><td>Storage state file to load at launch.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY</code></td><td>Proxy URL. Takes precedence over standard proxy variables.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_BYPASS</code></td><td>Proxy bypass host list.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_USERNAME</code></td><td>Proxy username when credentials are supplied separately.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_PASSWORD</code></td><td>Proxy password when credentials are supplied separately.</td><td>(none)</td></tr>\n <tr><td><code>HTTP_PROXY</code> / <code>HTTPS_PROXY</code> / <code>ALL_PROXY</code></td><td>Standard proxy fallback variables.</td><td>(none)</td></tr>\n <tr><td><code>NO_PROXY</code></td><td>Standard proxy bypass fallback.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_ARGS</code></td><td>Browser launch arguments, separated by newlines or by commas before another flag. Commas inside a value are kept.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_USER_AGENT</code></td><td>Custom User-Agent string.</td><td>(browser default)</td></tr>\n <tr><td><code>AGENT_BROWSER_PROVIDER</code></td><td>Browser provider such as <code>ios</code>, <code>browserbase</code>, <code>kernel</code>, <code>browseruse</code>, <code>browserless</code>, <code>agentcore</code>, or a configured <code>browser.provider</code> plugin name.</td><td>(local browser)</td></tr>\n <tr><td><code>AGENT_BROWSER_HIDE_SCROLLBARS</code></td><td>Hide native scrollbars in headless Chromium screenshots.</td><td><code>true</code></td></tr>\n <tr><td><code>AGENT_BROWSER_COLOR_SCHEME</code></td><td>Color scheme preference (<code>dark</code>, <code>light</code>, <code>no-preference</code>).</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_DOWNLOAD_PATH</code></td><td>Default directory for browser downloads.</td><td>(temp directory)</td></tr>\n <tr><td><code>AGENT_BROWSER_DEFAULT_TIMEOUT</code></td><td>Default timeout in ms. Keep below 30000 to avoid IPC timeouts.</td><td><code>25000</code></td></tr>\n <tr><td><code>AGENT_BROWSER_NAMESPACE</code></td><td>Namespace for daemon sockets and restore-state directories.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE</code></td><td>Auto-save/load state persistence key.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_SAVE</code></td><td>Restore save policy: <code>auto</code>, <code>always</code>, or <code>never</code>.</td><td><code>auto</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTOSAVE_INTERVAL_MS</code></td><td>Minimum ms between periodic session autosaves while the browser is open. <code>0</code> saves only on close.</td><td><code>30000</code></td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_URL</code></td><td>URL pattern restored state must match.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_TEXT</code></td><td>Page text restored state must contain.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_FN</code></td><td>JavaScript expression restored state must satisfy.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION_NAME</code></td><td>Legacy auto-save/load state persistence name.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code></td><td>Auto-delete saved session states older than N days.</td><td><code>30</code></td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM session encryption.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_EXTENSIONS</code></td><td>Comma-separated browser extension paths. Extensions work in both headed and headless mode.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_INIT_SCRIPTS</code></td><td>Comma-separated paths to page init scripts.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_ENABLE</code></td><td>Comma-separated built-in init script features such as <code>react-devtools</code>.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_HEADED</code></td><td>Show browser window instead of running headless (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_WEBGPU</code></td><td>Enable WebGPU; SwiftShader software Vulkan on Linux, no GPU required (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_NO_XVFB</code></td><td>Disable automatic Xvfb virtual display for headed mode on displayless Linux hosts (<code>1</code> to disable).</td><td>(auto-Xvfb enabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CLEAR_CA_CERT</code></td><td>Clear CA trust retained by the running browser session.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_JSON</code></td><td>Use JSON output by default.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ANNOTATE</code></td><td>Enable annotated screenshots by default.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CDP</code></td><td>Connect the daemon to a CDP port or WebSocket URL.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_PORT</code></td><td>Override the WebSocket streaming port. By default, an OS-assigned port is used. Set this to bind to a specific port (e.g., <code>9223</code>).</td><td>OS-assigned</td></tr>\n <tr><td><code>AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS</code></td><td>Comma-separated exact HTTPS origins allowed for a reverse-proxied dashboard. Every entry must be valid or dashboard startup fails. Without this setting, only loopback origins are accepted. Loopback access does not require the external dashboard token.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_QUALITY</code></td><td>JPEG quality for streamed frames, 0 to 100. Lower values cut bandwidth: quality 20 costs about half the bytes of the default on a busy page.</td><td><code>80</code></td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_MAX_WIDTH</code></td><td>Cap the encoded frame width in pixels. Caps the frame only and leaves the page size alone, so pointer coordinates are unaffected.</td><td>the viewport</td></tr>\n <tr><td><code>AGENT_BROWSER_STREAM_MAX_HEIGHT</code></td><td>Cap the encoded frame height in pixels.</td><td>the viewport</td></tr>\n <tr><td><code>AGENT_BROWSER_IDLE_TIMEOUT_MS</code></td><td>Auto-shutdown the daemon after N ms without commands or dashboard input. Set <code>0</code> to disable. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default. Provider-owned cloud browsers are eligible for cleanup, and an explicit value applies to every browser.</td><td><code>3600000</code> (1 hour)</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_DEVICE</code></td><td>Default iOS device name for the <code>ios</code> provider.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_UDID</code></td><td>Default iOS device UDID for the <code>ios</code> provider.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_DEBUG</code></td><td>Enable debug output (<code>1</code> to enable).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONTENT_BOUNDARIES</code></td><td>Wrap page output in boundary markers for LLM safety.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_MAX_OUTPUT</code></td><td>Max characters for page output (truncates beyond limit).</td><td>(unlimited)</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOWED_DOMAINS</code></td><td>Comma-separated allowed domain patterns (e.g., <code>example.com,*.example.com</code>). Requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins.</td><td>(unrestricted)</td></tr>\n <tr><td><code>AGENT_BROWSER_ACTION_POLICY</code></td><td>Path to action policy JSON file.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_ACTIONS</code></td><td>Comma-separated action categories requiring confirmation.</td><td>(none)</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_INTERACTIVE</code></td><td>Enable interactive confirmation prompts (auto-denies if stdin is not a TTY).</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_ENGINE</code></td><td>Browser engine to use: <code>chrome</code> (default), <code>lightpanda</code>, <code>obscura</code> (experimental).</td><td><code>chrome</code></td></tr>\n <tr><td><code>AGENT_BROWSER_NO_AUTO_DIALOG</code></td><td>Disable automatic dismissal of <code>alert</code>/<code>beforeunload</code> dialogs.</td><td>(disabled)</td></tr>\n <tr><td><code>AGENT_BROWSER_PLUGINS</code></td><td>JSON plugin registry override.</td><td>(config discovery)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_DIR</code></td><td>Default screenshot output directory.</td><td>(temp directory)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_QUALITY</code></td><td>JPEG screenshot quality from 0 to 100.</td><td>(format default)</td></tr>\n <tr><td><code>AGENT_BROWSER_SCREENSHOT_FORMAT</code></td><td>Screenshot format: <code>png</code> or <code>jpeg</code>.</td><td><code>png</code></td></tr>\n <tr><td><code>AGENT_BROWSER_SOCKET_DIR</code></td><td>Advanced override for daemon socket files.</td><td>runtime dir or <code>~/.agent-browser</code></td></tr>\n <tr><td><code>AGENT_BROWSER_SKILLS_DIR</code></td><td>Override the directory used by <code>agent-browser skills</code>.</td><td>bundled skills</td></tr>\n <tr><td><code>AGENT_BROWSER_COLOR</code></td><td>Enable colored CLI output when truthy.</td><td>(disabled)</td></tr>\n <tr><td><code>NO_COLOR</code></td><td>Disable colored output when present.</td><td>(not set)</td></tr>\n <tr><td><code>AI_GATEWAY_URL</code></td><td>Vercel AI Gateway base URL.</td><td><code>https://ai-gateway.vercel.sh</code></td></tr>\n <tr><td><code>AI_GATEWAY_API_KEY</code></td><td>API key for the Vercel AI Gateway. Required to enable AI chat.</td><td>(none)</td></tr>\n <tr><td><code>AI_GATEWAY_MODEL</code></td><td>Default AI model for dashboard chat.</td><td><code>anthropic/claude-sonnet-4.6</code></td></tr>\n </tbody>\n</table>\n\n## Error Handling\n\n- **Auto-discovered config files** (`~/.agent-browser/config.json`, `./agent-browser.json`) that are missing are silently ignored.\n- **`--config <path>`** with a missing or malformed file exits with an error.\n- **Malformed JSON** in auto-discovered files prints a warning to stderr and continues without that file.\n- **Unknown keys** are silently ignored for forward compatibility.\n\n> **Tip:** If your project-level `agent-browser.json` contains environment-specific values (paths, proxies), consider adding it to `.gitignore`.",
|
||
"modernMarkdownSha256": "15f48397a7c43c9061b6a50119b76fad4cf8540bbe0809cbefd9410eb6eb4c5c",
|
||
"navigation": {
|
||
"title": "Configuration",
|
||
"section": "Reference"
|
||
}
|
||
},
|
||
{
|
||
"path": "/dashboard",
|
||
"source": "docs/src/app/dashboard/page.mdx",
|
||
"layout": "docs/src/app/dashboard/layout.tsx",
|
||
"sourceSha256": "d992bc635950e46152dcd232fad676228f9481bd001a63de21536b710b0e9553",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Observability Dashboard\n",
|
||
"markdownTitle": "Observability Dashboard",
|
||
"title": "Dashboard | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Dashboard | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Dashboard - agent-browser",
|
||
"twitterTitle": "Dashboard | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Observability Dashboard",
|
||
"id": "observability-dashboard"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Usage",
|
||
"id": "usage"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Custom stream port",
|
||
"id": "custom-stream-port"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Dashboard features",
|
||
"id": "dashboard-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "WebSocket protocol",
|
||
"id": "websocket-protocol"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Command events",
|
||
"id": "command-events"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Result events",
|
||
"id": "result-events"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Console events",
|
||
"id": "console-events"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Architecture",
|
||
"id": "architecture"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "AI Chat",
|
||
"id": "ai-chat"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "How it works",
|
||
"id": "how-it-works"
|
||
}
|
||
],
|
||
"content": [
|
||
"Monitor agent-browser sessions in real time with a local web dashboard showing a live browser viewport and command activity feed.",
|
||
"The dashboard is bundled into the binary and requires no separate install. Start the server and open any session:",
|
||
"agent-browser dashboard start agent-browser open example.com",
|
||
"Then open http://localhost:4848 in your browser to see the live dashboard. If you expose the dashboard through a reverse proxy or port forward, explicitly allow its browser HTTPS origin when starting the server:",
|
||
"agent-browser dashboard start --allowed-origins https://dashboard.example.com",
|
||
"All sessions automatically stream to the dashboard. Local loopback origins are allowed automatically over IPv4 and IPv6 without an access token. For a reverse-proxied dashboard, use a comma-separated list of exact origins with --allowed-origins or AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS; this lets the dashboard reject cross-origin requests and DNS-rebinding attacks. Every configured origin must be valid, and custom ports must be integers from 1 to 65535. Unknown options, missing values, invalid ports, and malformed origins fail without starting the server. The command prints private tokenized access URLs only for external origins. Open the matching URL once to establish the browser session and do not share it. Its unguessable token stays in the initial URL fragment, then the browser stores it in a Secure, host-bound, same-site cookie for dashboard API and stream requests. Open http://localhost:<port> directly for local access; the external token is never written to a loopback cookie. Configure the reverse proxy to redact cookies from logs. The browser stays on the dashboard origin while the server proxies per-session tabs, status, and stream traffic internally, so session ports do not need to be exposed. Repeated starts reuse the dashboard only when these settings match; stop it before changing the port or allowed origins.",
|
||
"By default each session binds its WebSocket stream server to an OS-assigned port. To use a specific port, set the AGENT_BROWSER_STREAM_PORT environment variable:",
|
||
"AGENT_BROWSER_STREAM_PORT=9223 agent-browser open example.com",
|
||
"You can also use the runtime commands to control streaming on a running session:",
|
||
"agent-browser stream enable --port 9223 agent-browser stream status agent-browser stream disable",
|
||
"The dashboard is a single-page web app with three areas:",
|
||
"Area",
|
||
"Description",
|
||
"Live viewport",
|
||
"Real-time JPEG frames from the browser, rendered to a canvas element",
|
||
"Activity feed",
|
||
"Chronological stream of commands, results, and console messages with expandable details",
|
||
"Session creation",
|
||
"Create new sessions from the dashboard with local engines (Chrome, Lightpanda) or cloud providers (AgentCore, Browserbase, Browserless, Browser Use, Kernel)",
|
||
"Status bar",
|
||
"Connection status, viewport dimensions, and WebSocket endpoint",
|
||
"The dashboard connects to the same WebSocket endpoint used by Streaming, with additional message types for observability:",
|
||
"Sent when a command begins executing:",
|
||
"{ \"type\": \"command\", \"action\": \"click\", \"id\": \"r123\", \"params\": { \"selector\": \"@e5\" }, \"timestamp\": 1711367000000 }",
|
||
"Sent when a command finishes:",
|
||
"{ \"type\": \"result\", \"id\": \"r123\", \"action\": \"click\", \"success\": true, \"data\": {}, \"duration_ms\": 45, \"timestamp\": 1711367000045 }",
|
||
"Sent when the browser logs to the console:",
|
||
"{ \"type\": \"console\", \"level\": \"log\", \"text\": \"Page loaded\", \"args\": [{\"type\": \"string\", \"value\": \"Page loaded\"}], \"timestamp\": 1711367000100 }",
|
||
"The args array contains the raw CDP Runtime.consoleAPICalled arguments for programmatic access. Object arguments include preview data (e.g. {userId: \"abc\", count: 42} instead of \"Object\").",
|
||
"These are in addition to the existing frame, status, and error message types documented on the Streaming page.",
|
||
"The dashboard is a Next.js static export (output: 'export') that produces plain HTML, CSS, and JS. It lives at packages/dashboard/ in the monorepo and is built with:",
|
||
"pnpm build:dashboard",
|
||
"The dashboard is embedded into the CLI binary at compile time using rust-embed. Plain HTTP requests serve the embedded dashboard assets and same-origin API routes. Session-specific tabs, status, and stream WebSocket traffic are proxied through the dashboard server to loopback-only session ports.",
|
||
"The dashboard includes an optional AI chat panel powered by the Vercel AI Gateway. When enabled, a Chat tab appears in the right pane alongside Activity, Console, Network, Storage, and Extensions.",
|
||
"The Chat tab is always visible. Set the API key to enable responses:",
|
||
"export AI_GATEWAY_API_KEY=gw_your_key_here agent-browser dashboard start",
|
||
"Optionally override the gateway URL or model:",
|
||
"export AI_GATEWAY_URL=https://ai-gateway.vercel.sh # this is the default export AI_GATEWAY_MODEL=openai/gpt-4o-mini # default: anthropic/claude-sonnet-4.6",
|
||
"The Rust server proxies chat requests from the dashboard to the Vercel AI Gateway and streams responses back using the Vercel AI SDK's UI Message Stream protocol. The dashboard frontend uses useChat from @ai-sdk/react with DefaultChatTransport.",
|
||
"Chat runs one agent-browser command per tool call. A ; or && inside a quoted argument is kept as text, so JSON parameters can contain them. Chat can load bundled skills with skills get <name> and use page WebMCP tools: it fetches a tool's input schema with webmcp list <tool> --frame <frame-id> --json, then calls webmcp invoke with the same --frame.",
|
||
"Variable",
|
||
"Default",
|
||
"AI_GATEWAY_URL",
|
||
"Vercel AI Gateway base URL.",
|
||
"https://ai-gateway.vercel.sh",
|
||
"AI_GATEWAY_API_KEY",
|
||
"API key for the AI Gateway. Required to enable AI chat responses.",
|
||
"(none)",
|
||
"AI_GATEWAY_MODEL",
|
||
"Default AI model for chat requests.",
|
||
"anthropic/claude-sonnet-4.6"
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/streaming",
|
||
"text": "Streaming"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/streaming",
|
||
"text": "Streaming"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://vercel.com/docs/ai-gateway",
|
||
"text": "Vercel AI Gateway"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Observability Dashboard\n\nMonitor agent-browser sessions in real time with a local web dashboard showing a live browser viewport and command activity feed.\n\n## Usage\n\nThe dashboard is bundled into the binary and requires no separate install. Start the server and open any session:\n\n```bash\nagent-browser dashboard start\nagent-browser open example.com\n```\n\nThen open `http://localhost:4848` in your browser to see the live dashboard. If you expose the dashboard through a reverse proxy or port forward, explicitly allow its browser HTTPS origin when starting the server:\n\n```bash\nagent-browser dashboard start --allowed-origins https://dashboard.example.com\n```\n\nAll sessions automatically stream to the dashboard. Local loopback origins are allowed automatically over IPv4 and IPv6 without an access token. For a reverse-proxied dashboard, use a comma-separated list of exact origins with `--allowed-origins` or `AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS`; this lets the dashboard reject cross-origin requests and DNS-rebinding attacks. Every configured origin must be valid, and custom ports must be integers from 1 to 65535. Unknown options, missing values, invalid ports, and malformed origins fail without starting the server. The command prints private tokenized access URLs only for external origins. Open the matching URL once to establish the browser session and do not share it. Its unguessable token stays in the initial URL fragment, then the browser stores it in a Secure, host-bound, same-site cookie for dashboard API and stream requests. Open `http://localhost:<port>` directly for local access; the external token is never written to a loopback cookie. Configure the reverse proxy to redact cookies from logs. The browser stays on the dashboard origin while the server proxies per-session tabs, status, and stream traffic internally, so session ports do not need to be exposed. Repeated starts reuse the dashboard only when these settings match; stop it before changing the port or allowed origins.\n\n### Custom stream port\n\nBy default each session binds its WebSocket stream server to an OS-assigned port. To use a specific port, set the `AGENT_BROWSER_STREAM_PORT` environment variable:\n\n```bash\nAGENT_BROWSER_STREAM_PORT=9223 agent-browser open example.com\n```\n\nYou can also use the runtime commands to control streaming on a running session:\n\n```bash\nagent-browser stream enable --port 9223\nagent-browser stream status\nagent-browser stream disable\n```\n\n## Dashboard features\n\nThe dashboard is a single-page web app with three areas:\n\n<table>\n <thead>\n <tr>\n <th>Area</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong>Live viewport</strong></td>\n <td>Real-time JPEG frames from the browser, rendered to a canvas element</td>\n </tr>\n <tr>\n <td><strong>Activity feed</strong></td>\n <td>Chronological stream of commands, results, and console messages with expandable details</td>\n </tr>\n <tr>\n <td><strong>Session creation</strong></td>\n <td>Create new sessions from the dashboard with local engines (Chrome, Lightpanda) or cloud providers (AgentCore, Browserbase, Browserless, Browser Use, Kernel)</td>\n </tr>\n <tr>\n <td><strong>Status bar</strong></td>\n <td>Connection status, viewport dimensions, and WebSocket endpoint</td>\n </tr>\n </tbody>\n</table>\n\n## WebSocket protocol\n\nThe dashboard connects to the same WebSocket endpoint used by [Streaming](/streaming), with additional message types for observability:\n\n### Command events\n\nSent when a command begins executing:\n\n```json\n{\n \"type\": \"command\",\n \"action\": \"click\",\n \"id\": \"r123\",\n \"params\": { \"selector\": \"@e5\" },\n \"timestamp\": 1711367000000\n}\n```\n\n### Result events\n\nSent when a command finishes:\n\n```json\n{\n \"type\": \"result\",\n \"id\": \"r123\",\n \"action\": \"click\",\n \"success\": true,\n \"data\": {},\n \"duration_ms\": 45,\n \"timestamp\": 1711367000045\n}\n```\n\n### Console events\n\nSent when the browser logs to the console:\n\n```json\n{\n \"type\": \"console\",\n \"level\": \"log\",\n \"text\": \"Page loaded\",\n \"args\": [{\"type\": \"string\", \"value\": \"Page loaded\"}],\n \"timestamp\": 1711367000100\n}\n```\n\nThe `args` array contains the raw CDP `Runtime.consoleAPICalled` arguments for programmatic access. Object arguments include preview data (e.g. `{userId: \"abc\", count: 42}` instead of `\"Object\"`).\n\nThese are in addition to the existing `frame`, `status`, and `error` message types documented on the [Streaming](/streaming) page.\n\n## Architecture\n\nThe dashboard is a Next.js static export (`output: 'export'`) that produces plain HTML, CSS, and JS. It lives at `packages/dashboard/` in the monorepo and is built with:\n\n```bash\npnpm build:dashboard\n```\n\nThe dashboard is embedded into the CLI binary at compile time using `rust-embed`. Plain HTTP requests serve the embedded dashboard assets and same-origin API routes. Session-specific tabs, status, and stream WebSocket traffic are proxied through the dashboard server to loopback-only session ports.\n\n## AI Chat\n\nThe dashboard includes an optional AI chat panel powered by the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway). When enabled, a **Chat** tab appears in the right pane alongside Activity, Console, Network, Storage, and Extensions.\n\n### Setup\n\nThe Chat tab is always visible. Set the API key to enable responses:\n\n```bash\nagent-browser dashboard start\n```\n\nOptionally override the gateway URL or model:\n\n```bash\n```\n\n### How it works\n\nThe Rust server proxies chat requests from the dashboard to the Vercel AI Gateway and streams responses back using the Vercel AI SDK's UI Message Stream protocol. The dashboard frontend uses `useChat` from `@ai-sdk/react` with `DefaultChatTransport`.\n\nChat runs one agent-browser command per tool call. A `;` or `&&` inside a quoted argument is kept as text, so JSON parameters can contain them. Chat can load bundled skills with `skills get <name>` and use page WebMCP tools: it fetches a tool's input schema with `webmcp list <tool> --frame <frame-id> --json`, then calls `webmcp invoke` with the same `--frame`.\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AI_GATEWAY_URL</code></td><td>Vercel AI Gateway base URL.</td><td><code>https://ai-gateway.vercel.sh</code></td></tr>\n <tr><td><code>AI_GATEWAY_API_KEY</code></td><td>API key for the AI Gateway. Required to enable AI chat responses.</td><td>(none)</td></tr>\n <tr><td><code>AI_GATEWAY_MODEL</code></td><td>Default AI model for chat requests.</td><td><code>anthropic/claude-sonnet-4.6</code></td></tr>\n </tbody>\n</table>",
|
||
"legacyMarkdownSha256": "6554f445bb25ae0efa016553c0bde64007e14e8d1921ec8f8fee7f0a0b82198e",
|
||
"modernMarkdown": "# Observability Dashboard\n\nMonitor agent-browser sessions in real time with a local web dashboard showing a live browser viewport and command activity feed.\n\n## Usage\n\nThe dashboard is bundled into the binary and requires no separate install. Start the server and open any session:\n\n```bash\nagent-browser dashboard start\nagent-browser open example.com\n```\n\nThen open `http://localhost:4848` in your browser to see the live dashboard. If you expose the dashboard through a reverse proxy or port forward, explicitly allow its browser HTTPS origin when starting the server:\n\n```bash\nagent-browser dashboard start --allowed-origins https://dashboard.example.com\n```\n\nAll sessions automatically stream to the dashboard. Local loopback origins are allowed automatically over IPv4 and IPv6 without an access token. For a reverse-proxied dashboard, use a comma-separated list of exact origins with `--allowed-origins` or `AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS`; this lets the dashboard reject cross-origin requests and DNS-rebinding attacks. Every configured origin must be valid, and custom ports must be integers from 1 to 65535. Unknown options, missing values, invalid ports, and malformed origins fail without starting the server. The command prints private tokenized access URLs only for external origins. Open the matching URL once to establish the browser session and do not share it. Its unguessable token stays in the initial URL fragment, then the browser stores it in a Secure, host-bound, same-site cookie for dashboard API and stream requests. Open `http://localhost:<port>` directly for local access; the external token is never written to a loopback cookie. Configure the reverse proxy to redact cookies from logs. The browser stays on the dashboard origin while the server proxies per-session tabs, status, and stream traffic internally, so session ports do not need to be exposed. Repeated starts reuse the dashboard only when these settings match; stop it before changing the port or allowed origins.\n\n### Custom stream port\n\nBy default each session binds its WebSocket stream server to an OS-assigned port. To use a specific port, set the `AGENT_BROWSER_STREAM_PORT` environment variable:\n\n```bash\nAGENT_BROWSER_STREAM_PORT=9223 agent-browser open example.com\n```\n\nYou can also use the runtime commands to control streaming on a running session:\n\n```bash\nagent-browser stream enable --port 9223\nagent-browser stream status\nagent-browser stream disable\n```\n\n## Dashboard features\n\nThe dashboard is a single-page web app with three areas:\n\n<table>\n <thead>\n <tr>\n <th>Area</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong>Live viewport</strong></td>\n <td>Real-time JPEG frames from the browser, rendered to a canvas element</td>\n </tr>\n <tr>\n <td><strong>Activity feed</strong></td>\n <td>Chronological stream of commands, results, and console messages with expandable details</td>\n </tr>\n <tr>\n <td><strong>Session creation</strong></td>\n <td>Create new sessions from the dashboard with local engines (Chrome, Lightpanda) or cloud providers (AgentCore, Browserbase, Browserless, Browser Use, Kernel)</td>\n </tr>\n <tr>\n <td><strong>Status bar</strong></td>\n <td>Connection status, viewport dimensions, and WebSocket endpoint</td>\n </tr>\n </tbody>\n</table>\n\n## WebSocket protocol\n\nThe dashboard connects to the same WebSocket endpoint used by [Streaming](/streaming), with additional message types for observability:\n\n### Command events\n\nSent when a command begins executing:\n\n```json\n{\n \"type\": \"command\",\n \"action\": \"click\",\n \"id\": \"r123\",\n \"params\": { \"selector\": \"@e5\" },\n \"timestamp\": 1711367000000\n}\n```\n\n### Result events\n\nSent when a command finishes:\n\n```json\n{\n \"type\": \"result\",\n \"id\": \"r123\",\n \"action\": \"click\",\n \"success\": true,\n \"data\": {},\n \"duration_ms\": 45,\n \"timestamp\": 1711367000045\n}\n```\n\n### Console events\n\nSent when the browser logs to the console:\n\n```json\n{\n \"type\": \"console\",\n \"level\": \"log\",\n \"text\": \"Page loaded\",\n \"args\": [{\"type\": \"string\", \"value\": \"Page loaded\"}],\n \"timestamp\": 1711367000100\n}\n```\n\nThe `args` array contains the raw CDP `Runtime.consoleAPICalled` arguments for programmatic access. Object arguments include preview data (e.g. `{userId: \"abc\", count: 42}` instead of `\"Object\"`).\n\nThese are in addition to the existing `frame`, `status`, and `error` message types documented on the [Streaming](/streaming) page.\n\n## Architecture\n\nThe dashboard is a Next.js static export (`output: 'export'`) that produces plain HTML, CSS, and JS. It lives at `packages/dashboard/` in the monorepo and is built with:\n\n```bash\npnpm build:dashboard\n```\n\nThe dashboard is embedded into the CLI binary at compile time using `rust-embed`. Plain HTTP requests serve the embedded dashboard assets and same-origin API routes. Session-specific tabs, status, and stream WebSocket traffic are proxied through the dashboard server to loopback-only session ports.\n\n## AI Chat\n\nThe dashboard includes an optional AI chat panel powered by the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway). When enabled, a **Chat** tab appears in the right pane alongside Activity, Console, Network, Storage, and Extensions.\n\n### Setup\n\nThe Chat tab is always visible. Set the API key to enable responses:\n\n```bash\nexport AI_GATEWAY_API_KEY=gw_your_key_here\nagent-browser dashboard start\n```\n\nOptionally override the gateway URL or model:\n\n```bash\nexport AI_GATEWAY_URL=https://ai-gateway.vercel.sh # this is the default\nexport AI_GATEWAY_MODEL=openai/gpt-4o-mini # default: anthropic/claude-sonnet-4.6\n```\n\n### How it works\n\nThe Rust server proxies chat requests from the dashboard to the Vercel AI Gateway and streams responses back using the Vercel AI SDK's UI Message Stream protocol. The dashboard frontend uses `useChat` from `@ai-sdk/react` with `DefaultChatTransport`.\n\nChat runs one agent-browser command per tool call. A `;` or `&&` inside a quoted argument is kept as text, so JSON parameters can contain them. Chat can load bundled skills with `skills get <name>` and use page WebMCP tools: it fetches a tool's input schema with `webmcp list <tool> --frame <frame-id> --json`, then calls `webmcp invoke` with the same `--frame`.\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AI_GATEWAY_URL</code></td><td>Vercel AI Gateway base URL.</td><td><code>https://ai-gateway.vercel.sh</code></td></tr>\n <tr><td><code>AI_GATEWAY_API_KEY</code></td><td>API key for the AI Gateway. Required to enable AI chat responses.</td><td>(none)</td></tr>\n <tr><td><code>AI_GATEWAY_MODEL</code></td><td>Default AI model for chat requests.</td><td><code>anthropic/claude-sonnet-4.6</code></td></tr>\n </tbody>\n</table>",
|
||
"modernMarkdownSha256": "06dace79ccfa3fd7d44936699a437a637cc0c8ed9a26b3965cda0fd8df3c4048",
|
||
"navigation": {
|
||
"title": "Dashboard",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/debugging",
|
||
"source": "docs/src/app/debugging/page.mdx",
|
||
"layout": "docs/src/app/debugging/layout.tsx",
|
||
"sourceSha256": "4a06ffc5b78ffbfbe6fef94a7edf783eada4f2df8c241c8cfd2432488b18bec3",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Debugging\n",
|
||
"markdownTitle": "Debugging",
|
||
"title": "Debugging | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Debugging | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Debugging - agent-browser",
|
||
"twitterTitle": "Debugging | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Debugging",
|
||
"id": "debugging"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Console and page errors",
|
||
"id": "console-and-page-errors"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "JavaScript dialogs",
|
||
"id": "javascript-dialogs"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "DevTools and visual inspection",
|
||
"id": "devtools-and-visual-inspection"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Chrome trace capture",
|
||
"id": "chrome-trace-capture"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Related tools",
|
||
"id": "related-tools"
|
||
}
|
||
],
|
||
"content": [
|
||
"Use debugging commands to inspect browser logs, page errors, JavaScript dialogs, Chrome DevTools traces, highlighted elements, and the live DevTools frontend during automation.",
|
||
"agent-browser console agent-browser console --json agent-browser console --clear agent-browser errors agent-browser errors --clear",
|
||
"Command",
|
||
"Description",
|
||
"console",
|
||
"Show browser console messages",
|
||
"console --json",
|
||
"Show structured console output with raw CDP arguments",
|
||
"console --clear",
|
||
"Clear the console log captured by agent-browser",
|
||
"errors",
|
||
"Show captured page errors and uncaught JavaScript exceptions",
|
||
"errors --clear",
|
||
"Clear the captured page error log",
|
||
"Use console --json when object previews or raw CDP arguments matter for an automated diagnostic script. Use the default text output when an agent only needs to understand what the page logged.",
|
||
"agent-browser dialog status agent-browser dialog accept agent-browser dialog accept \"prompt text\" agent-browser dialog dismiss",
|
||
"By default, alert and beforeunload dialogs are automatically accepted so they do not block the agent. confirm and prompt dialogs still require explicit handling. Use --no-auto-dialog or AGENT_BROWSER_NO_AUTO_DIALOG=1 to disable automatic handling.",
|
||
"When a dialog is pending, command responses include a warning field with the dialog type and message so agents can recover with dialog accept or dialog dismiss.",
|
||
"agent-browser highlight @e4 agent-browser highlight \"#submit\" agent-browser inspect",
|
||
"highlight draws attention to an element in the live page, which is useful when running headed or when viewing the session through streaming or the dashboard. inspect opens Chrome DevTools for the active page through a local proxy while the daemon continues to accept agent-browser commands.",
|
||
"agent-browser trace start agent-browser open https://example.com agent-browser click @e3 agent-browser trace stop ./trace.json",
|
||
"trace start begins a Chrome DevTools trace. trace stop [path] ends tracing and saves a Chrome Trace Event JSON file. If no path is provided, agent-browser writes an auto-generated trace file under its temp directory.",
|
||
"Use Profiler when you want curated performance categories and event counts. Use raw traces when you need a general Chrome trace for lower-level debugging.",
|
||
"Need",
|
||
"Use",
|
||
"Performance profile",
|
||
"Profiler",
|
||
"Saved video artifact",
|
||
"Video Recording",
|
||
"Live browser stream",
|
||
"Streaming",
|
||
"Install and environment diagnosis",
|
||
"Doctor"
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/profiler",
|
||
"text": "Profiler"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Debugging\n\nUse debugging commands to inspect browser logs, page errors, JavaScript dialogs, Chrome DevTools traces, highlighted elements, and the live DevTools frontend during automation.\n\n## Console and page errors\n\n```bash\nagent-browser console\nagent-browser console --json\nagent-browser console --clear\n\nagent-browser errors\nagent-browser errors --clear\n```\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>console</code></td><td>Show browser console messages</td></tr>\n <tr><td><code>console --json</code></td><td>Show structured console output with raw CDP arguments</td></tr>\n <tr><td><code>console --clear</code></td><td>Clear the console log captured by agent-browser</td></tr>\n <tr><td><code>errors</code></td><td>Show captured page errors and uncaught JavaScript exceptions</td></tr>\n <tr><td><code>errors --clear</code></td><td>Clear the captured page error log</td></tr>\n </tbody>\n</table>\n\nUse `console --json` when object previews or raw CDP arguments matter for an automated diagnostic script. Use the default text output when an agent only needs to understand what the page logged.\n\n## JavaScript dialogs\n\n```bash\nagent-browser dialog status\nagent-browser dialog accept\nagent-browser dialog accept \"prompt text\"\nagent-browser dialog dismiss\n```\n\nBy default, `alert` and `beforeunload` dialogs are automatically accepted so they do not block the agent. `confirm` and `prompt` dialogs still require explicit handling. Use `--no-auto-dialog` or `AGENT_BROWSER_NO_AUTO_DIALOG=1` to disable automatic handling.\n\nWhen a dialog is pending, command responses include a `warning` field with the dialog type and message so agents can recover with `dialog accept` or `dialog dismiss`.\n\n## DevTools and visual inspection\n\n```bash\nagent-browser highlight @e4\nagent-browser highlight \"#submit\"\nagent-browser inspect\n```\n\n`highlight` draws attention to an element in the live page, which is useful when running headed or when viewing the session through streaming or the dashboard. `inspect` opens Chrome DevTools for the active page through a local proxy while the daemon continues to accept agent-browser commands.\n\n## Chrome trace capture\n\n```bash\nagent-browser trace start\n\nagent-browser open https://example.com\nagent-browser click @e3\n\nagent-browser trace stop ./trace.json\n```\n\n`trace start` begins a Chrome DevTools trace. `trace stop [path]` ends tracing and saves a Chrome Trace Event JSON file. If no path is provided, agent-browser writes an auto-generated trace file under its temp directory.\n\nUse [Profiler](/profiler) when you want curated performance categories and event counts. Use raw traces when you need a general Chrome trace for lower-level debugging.\n\n## Related tools\n\n<table>\n <thead>\n <tr><th>Need</th><th>Use</th></tr>\n </thead>\n <tbody>\n <tr><td>Performance profile</td><td><a href=\"/profiler\">Profiler</a></td></tr>\n <tr><td>Saved video artifact</td><td><a href=\"/recording\">Video Recording</a></td></tr>\n <tr><td>Live browser stream</td><td><a href=\"/streaming\">Streaming</a></td></tr>\n <tr><td>Install and environment diagnosis</td><td><a href=\"/installation#doctor\">Doctor</a></td></tr>\n </tbody>\n</table>",
|
||
"legacyMarkdownSha256": "c5517c147fd80b766a53c56c66f5aa8af542c1f392af70de0c986b5d43bbd8b9",
|
||
"modernMarkdown": "# Debugging\n\nUse debugging commands to inspect browser logs, page errors, JavaScript dialogs, Chrome DevTools traces, highlighted elements, and the live DevTools frontend during automation.\n\n## Console and page errors\n\n```bash\nagent-browser console\nagent-browser console --json\nagent-browser console --clear\n\nagent-browser errors\nagent-browser errors --clear\n```\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>console</code></td><td>Show browser console messages</td></tr>\n <tr><td><code>console --json</code></td><td>Show structured console output with raw CDP arguments</td></tr>\n <tr><td><code>console --clear</code></td><td>Clear the console log captured by agent-browser</td></tr>\n <tr><td><code>errors</code></td><td>Show captured page errors and uncaught JavaScript exceptions</td></tr>\n <tr><td><code>errors --clear</code></td><td>Clear the captured page error log</td></tr>\n </tbody>\n</table>\n\nUse `console --json` when object previews or raw CDP arguments matter for an automated diagnostic script. Use the default text output when an agent only needs to understand what the page logged.\n\n## JavaScript dialogs\n\n```bash\nagent-browser dialog status\nagent-browser dialog accept\nagent-browser dialog accept \"prompt text\"\nagent-browser dialog dismiss\n```\n\nBy default, `alert` and `beforeunload` dialogs are automatically accepted so they do not block the agent. `confirm` and `prompt` dialogs still require explicit handling. Use `--no-auto-dialog` or `AGENT_BROWSER_NO_AUTO_DIALOG=1` to disable automatic handling.\n\nWhen a dialog is pending, command responses include a `warning` field with the dialog type and message so agents can recover with `dialog accept` or `dialog dismiss`.\n\n## DevTools and visual inspection\n\n```bash\nagent-browser highlight @e4\nagent-browser highlight \"#submit\"\nagent-browser inspect\n```\n\n`highlight` draws attention to an element in the live page, which is useful when running headed or when viewing the session through streaming or the dashboard. `inspect` opens Chrome DevTools for the active page through a local proxy while the daemon continues to accept agent-browser commands.\n\n## Chrome trace capture\n\n```bash\nagent-browser trace start\n\nagent-browser open https://example.com\nagent-browser click @e3\n\nagent-browser trace stop ./trace.json\n```\n\n`trace start` begins a Chrome DevTools trace. `trace stop [path]` ends tracing and saves a Chrome Trace Event JSON file. If no path is provided, agent-browser writes an auto-generated trace file under its temp directory.\n\nUse [Profiler](/profiler) when you want curated performance categories and event counts. Use raw traces when you need a general Chrome trace for lower-level debugging.\n\n## Related tools\n\n<table>\n <thead>\n <tr><th>Need</th><th>Use</th></tr>\n </thead>\n <tbody>\n <tr><td>Performance profile</td><td><a href=\"/profiler\">Profiler</a></td></tr>\n <tr><td>Saved video artifact</td><td><a href=\"/recording\">Video Recording</a></td></tr>\n <tr><td>Live browser stream</td><td><a href=\"/streaming\">Streaming</a></td></tr>\n <tr><td>Install and environment diagnosis</td><td><a href=\"/installation#doctor\">Doctor</a></td></tr>\n </tbody>\n</table>",
|
||
"modernMarkdownSha256": "c5517c147fd80b766a53c56c66f5aa8af542c1f392af70de0c986b5d43bbd8b9",
|
||
"navigation": {
|
||
"title": "Debugging",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/diffing",
|
||
"source": "docs/src/app/diffing/page.mdx",
|
||
"layout": "docs/src/app/diffing/layout.tsx",
|
||
"sourceSha256": "8ac94e6fe9daed07123c8ef148521462ee6ea7ee7d49ed4b1f66206c5c8b2b3d",
|
||
"h1InsertionOffset": 51,
|
||
"h1Source": "# Diffing\n",
|
||
"markdownTitle": "Diffing",
|
||
"title": "Diffing | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Diffing | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Diffing - agent-browser",
|
||
"twitterTitle": "Diffing | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Diffing",
|
||
"id": "diffing"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Commands",
|
||
"id": "commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Snapshot diff",
|
||
"id": "snapshot-diff"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Options",
|
||
"id": "options"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Output",
|
||
"id": "output"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Screenshot diff",
|
||
"id": "screenshot-diff"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Options",
|
||
"id": "options"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Output",
|
||
"id": "output"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "URL diff",
|
||
"id": "url-diff"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Options",
|
||
"id": "options"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Use cases",
|
||
"id": "use-cases"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Verifying agent actions",
|
||
"id": "verifying-agent-actions"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Monitoring for changes",
|
||
"id": "monitoring-for-changes"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Visual regression testing",
|
||
"id": "visual-regression-testing"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Comparing environments",
|
||
"id": "comparing-environments"
|
||
}
|
||
],
|
||
"content": [
|
||
"Compare page states to detect changes -- structurally via accessibility tree snapshots, visually via pixel comparison, or across two different URLs.",
|
||
"Command",
|
||
"Description",
|
||
"diff snapshot",
|
||
"Compare current snapshot to last snapshot in session",
|
||
"diff snapshot --baseline <file>",
|
||
"Compare current snapshot to a saved file",
|
||
"diff screenshot --baseline <file>",
|
||
"Visual pixel diff against a baseline image",
|
||
"diff url <url1> <url2>",
|
||
"Compare two pages (snapshot + optional screenshot)",
|
||
"Compares the accessibility tree between two points in time using a line-level text diff.",
|
||
"# Compare against the last snapshot taken in this session agent-browser diff snapshot # Compare against a saved baseline file agent-browser diff snapshot --baseline before.txt # Scope to a specific part of the page agent-browser diff snapshot --selector \"#main\" --compact",
|
||
"Without --baseline, the command automatically compares against the most recent snapshot taken in the current session. This is the primary use case for agents verifying that an action had the intended effect.",
|
||
"Flag",
|
||
"-b, --baseline <file>",
|
||
"Path to a saved snapshot file to compare against",
|
||
"-s, --selector <sel>",
|
||
"Scope the current snapshot to a CSS selector or @ref",
|
||
"-c, --compact",
|
||
"Use compact snapshot format",
|
||
"-d, --depth <n>",
|
||
"Limit snapshot tree depth",
|
||
"The diff uses + for added lines and - for removed lines, similar to unified diff format. A summary line shows the count of additions, removals, and unchanged lines.",
|
||
"- button \"Submit\" [ref=e2] + button \"Submit\" [ref=e2] [disabled] 3 additions, 2 removals, 41 unchanged",
|
||
"Compares the current page screenshot against a baseline image at the pixel level. Produces a diff image with changed pixels highlighted in red.",
|
||
"# Basic visual diff agent-browser diff screenshot --baseline before.png # Save diff image to a specific path agent-browser diff screenshot --baseline before.png --output diff.png # Adjust threshold and scope to element agent-browser diff screenshot --baseline before.png --threshold 0.2 --selector \"#hero\"",
|
||
"Baseline PNG/JPEG image to compare against (required)",
|
||
"-o, --output <file>",
|
||
"Path for the generated diff image (default: temp dir)",
|
||
"-t, --threshold <0-1>",
|
||
"Color distance threshold (default: 0.1). Higher = more tolerant",
|
||
"Scope the current screenshot to an element",
|
||
"--full",
|
||
"Take a full-page screenshot",
|
||
"Reports the diff image path, number of different pixels, and mismatch percentage. The diff image shows unchanged pixels dimmed with changed pixels in red.",
|
||
"If the baseline and current images have different dimensions, the command reports a dimension mismatch instead of attempting pixel comparison.",
|
||
"Compares two pages by navigating to each in sequence and diffing the results.",
|
||
"# Compare two URLs (snapshot diff) agent-browser diff url https://staging.example.com https://prod.example.com # Include visual comparison agent-browser diff url https://v1.example.com https://v2.example.com --screenshot # Full-page screenshot comparison agent-browser diff url https://v1.example.com https://v2.example.com --screenshot --full",
|
||
"The command navigates to the first URL, captures state, then navigates to the second URL and captures again. Snapshot diff is always included. Screenshot diff requires the --screenshot flag.",
|
||
"After completion, the browser remains on the second URL.",
|
||
"--screenshot",
|
||
"Also perform visual screenshot comparison",
|
||
"Use full-page screenshots",
|
||
"--wait-until <strategy>",
|
||
"Navigation wait strategy: load, domcontentloaded, networkidle (default: load)",
|
||
"Scope snapshots to a CSS selector or @ref",
|
||
"The --wait-until option accepts only load, domcontentloaded, and networkidle; it cannot express an app-specific condition. If a page needs a selector, text, URL, or JavaScript condition, use separate open and wait commands, then compare the captured snapshots or screenshots instead of using diff url. networkidle is supported for quiet pages, but SSE, WebSockets, polling, and long-polling can keep it from resolving.",
|
||
"The most common use case: confirm that an action (click, fill, submit) changed the page as expected.",
|
||
"agent-browser snapshot -i # Take interactive-only snapshot (baseline) agent-browser fill @e3 \"test@example.com\" agent-browser diff snapshot # Compare current snapshot to the baseline",
|
||
"Periodically compare a page against a saved baseline to detect updates.",
|
||
"# Save baseline agent-browser open https://example.com && agent-browser snapshot > baseline.txt # Later, check for changes agent-browser open https://example.com && agent-browser diff snapshot --baseline baseline.txt",
|
||
"Compare screenshots before and after a deploy to catch unintended visual changes.",
|
||
"agent-browser open https://staging.example.com && agent-browser screenshot baseline.png # ... deploy happens ... agent-browser open https://staging.example.com && agent-browser diff screenshot --baseline baseline.png",
|
||
"Diff staging against production to verify parity.",
|
||
"agent-browser diff url https://staging.example.com https://prod.example.com --screenshot"
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Diffing\n\nCompare page states to detect changes -- structurally via accessibility tree snapshots, visually via pixel comparison, or across two different URLs.\n\n<DiffDemo />\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>diff snapshot</code></td><td>Compare current snapshot to last snapshot in session</td></tr>\n <tr><td><code>diff snapshot --baseline <file></code></td><td>Compare current snapshot to a saved file</td></tr>\n <tr><td><code>diff screenshot --baseline <file></code></td><td>Visual pixel diff against a baseline image</td></tr>\n <tr><td><code>diff url <url1> <url2></code></td><td>Compare two pages (snapshot + optional screenshot)</td></tr>\n </tbody>\n</table>\n\n## Snapshot diff\n\nCompares the accessibility tree between two points in time using a line-level text diff.\n\n```bash\n# Compare against the last snapshot taken in this session\nagent-browser diff snapshot\n\n# Compare against a saved baseline file\nagent-browser diff snapshot --baseline before.txt\n\n# Scope to a specific part of the page\nagent-browser diff snapshot --selector \"#main\" --compact\n```\n\nWithout `--baseline`, the command automatically compares against the most recent snapshot taken in the current session. This is the primary use case for agents verifying that an action had the intended effect.\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-b, --baseline <file></code></td><td>Path to a saved snapshot file to compare against</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope the current snapshot to a CSS selector or @ref</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Use compact snapshot format</td></tr>\n <tr><td><code>-d, --depth <n></code></td><td>Limit snapshot tree depth</td></tr>\n </tbody>\n</table>\n\n### Output\n\nThe diff uses `+` for added lines and `-` for removed lines, similar to unified diff format. A summary line shows the count of additions, removals, and unchanged lines.\n\n```\n- button \"Submit\" [ref=e2]\n+ button \"Submit\" [ref=e2] [disabled]\n 3 additions, 2 removals, 41 unchanged\n```\n\n## Screenshot diff\n\nCompares the current page screenshot against a baseline image at the pixel level. Produces a diff image with changed pixels highlighted in red.\n\n```bash\n# Basic visual diff\nagent-browser diff screenshot --baseline before.png\n\n# Save diff image to a specific path\nagent-browser diff screenshot --baseline before.png --output diff.png\n\n# Adjust threshold and scope to element\nagent-browser diff screenshot --baseline before.png --threshold 0.2 --selector \"#hero\"\n```\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-b, --baseline <file></code></td><td>Baseline PNG/JPEG image to compare against (required)</td></tr>\n <tr><td><code>-o, --output <file></code></td><td>Path for the generated diff image (default: temp dir)</td></tr>\n <tr><td><code>-t, --threshold <0-1></code></td><td>Color distance threshold (default: 0.1). Higher = more tolerant</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope the current screenshot to an element</td></tr>\n <tr><td><code>--full</code></td><td>Take a full-page screenshot</td></tr>\n </tbody>\n</table>\n\n### Output\n\nReports the diff image path, number of different pixels, and mismatch percentage. The diff image shows unchanged pixels dimmed with changed pixels in red.\n\nIf the baseline and current images have different dimensions, the command reports a dimension mismatch instead of attempting pixel comparison.\n\n## URL diff\n\nCompares two pages by navigating to each in sequence and diffing the results.\n\n```bash\n# Compare two URLs (snapshot diff)\nagent-browser diff url https://staging.example.com https://prod.example.com\n\n# Include visual comparison\nagent-browser diff url https://v1.example.com https://v2.example.com --screenshot\n\n# Full-page screenshot comparison\nagent-browser diff url https://v1.example.com https://v2.example.com --screenshot --full\n```\n\nThe command navigates to the first URL, captures state, then navigates to the second URL and captures again. Snapshot diff is always included. Screenshot diff requires the `--screenshot` flag.\n\nAfter completion, the browser remains on the second URL.\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--screenshot</code></td><td>Also perform visual screenshot comparison</td></tr>\n <tr><td><code>--full</code></td><td>Use full-page screenshots</td></tr>\n <tr><td><code>--wait-until <strategy></code></td><td>Navigation wait strategy: <code>load</code>, <code>domcontentloaded</code>, <code>networkidle</code> (default: <code>load</code>)</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope snapshots to a CSS selector or @ref</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Use compact snapshot format</td></tr>\n <tr><td><code>-d, --depth <n></code></td><td>Limit snapshot tree depth</td></tr>\n </tbody>\n</table>\n\nThe `--wait-until` option accepts only `load`, `domcontentloaded`, and `networkidle`; it cannot express an app-specific condition. If a page needs a selector, text, URL, or JavaScript condition, use separate `open` and `wait` commands, then compare the captured snapshots or screenshots instead of using `diff url`. `networkidle` is supported for quiet pages, but SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Use cases\n\n### Verifying agent actions\n\nThe most common use case: confirm that an action (click, fill, submit) changed the page as expected.\n\n```bash\nagent-browser snapshot -i # Take interactive-only snapshot (baseline)\nagent-browser fill @e3 \"test@example.com\"\nagent-browser diff snapshot # Compare current snapshot to the baseline\n```\n\n### Monitoring for changes\n\nPeriodically compare a page against a saved baseline to detect updates.\n\n```bash\n# Save baseline\nagent-browser open https://example.com && agent-browser snapshot > baseline.txt\n\n# Later, check for changes\nagent-browser open https://example.com && agent-browser diff snapshot --baseline baseline.txt\n```\n\n### Visual regression testing\n\nCompare screenshots before and after a deploy to catch unintended visual changes.\n\n```bash\nagent-browser open https://staging.example.com && agent-browser screenshot baseline.png\n# ... deploy happens ...\nagent-browser open https://staging.example.com && agent-browser diff screenshot --baseline baseline.png\n```\n\n### Comparing environments\n\nDiff staging against production to verify parity.\n\n```bash\nagent-browser diff url https://staging.example.com https://prod.example.com --screenshot\n```",
|
||
"legacyMarkdownSha256": "c86623bcaa1e95f248584c822a4427775e160ece4a828c4b96eee0098dbaeb89",
|
||
"modernMarkdown": "# Diffing\n\nCompare page states to detect changes -- structurally via accessibility tree snapshots, visually via pixel comparison, or across two different URLs.\n\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>diff snapshot</code></td><td>Compare current snapshot to last snapshot in session</td></tr>\n <tr><td><code>diff snapshot --baseline <file></code></td><td>Compare current snapshot to a saved file</td></tr>\n <tr><td><code>diff screenshot --baseline <file></code></td><td>Visual pixel diff against a baseline image</td></tr>\n <tr><td><code>diff url <url1> <url2></code></td><td>Compare two pages (snapshot + optional screenshot)</td></tr>\n </tbody>\n</table>\n\n## Snapshot diff\n\nCompares the accessibility tree between two points in time using a line-level text diff.\n\n```bash\n# Compare against the last snapshot taken in this session\nagent-browser diff snapshot\n\n# Compare against a saved baseline file\nagent-browser diff snapshot --baseline before.txt\n\n# Scope to a specific part of the page\nagent-browser diff snapshot --selector \"#main\" --compact\n```\n\nWithout `--baseline`, the command automatically compares against the most recent snapshot taken in the current session. This is the primary use case for agents verifying that an action had the intended effect.\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-b, --baseline <file></code></td><td>Path to a saved snapshot file to compare against</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope the current snapshot to a CSS selector or @ref</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Use compact snapshot format</td></tr>\n <tr><td><code>-d, --depth <n></code></td><td>Limit snapshot tree depth</td></tr>\n </tbody>\n</table>\n\n### Output\n\nThe diff uses `+` for added lines and `-` for removed lines, similar to unified diff format. A summary line shows the count of additions, removals, and unchanged lines.\n\n```\n- button \"Submit\" [ref=e2]\n+ button \"Submit\" [ref=e2] [disabled]\n 3 additions, 2 removals, 41 unchanged\n```\n\n## Screenshot diff\n\nCompares the current page screenshot against a baseline image at the pixel level. Produces a diff image with changed pixels highlighted in red.\n\n```bash\n# Basic visual diff\nagent-browser diff screenshot --baseline before.png\n\n# Save diff image to a specific path\nagent-browser diff screenshot --baseline before.png --output diff.png\n\n# Adjust threshold and scope to element\nagent-browser diff screenshot --baseline before.png --threshold 0.2 --selector \"#hero\"\n```\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-b, --baseline <file></code></td><td>Baseline PNG/JPEG image to compare against (required)</td></tr>\n <tr><td><code>-o, --output <file></code></td><td>Path for the generated diff image (default: temp dir)</td></tr>\n <tr><td><code>-t, --threshold <0-1></code></td><td>Color distance threshold (default: 0.1). Higher = more tolerant</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope the current screenshot to an element</td></tr>\n <tr><td><code>--full</code></td><td>Take a full-page screenshot</td></tr>\n </tbody>\n</table>\n\n### Output\n\nReports the diff image path, number of different pixels, and mismatch percentage. The diff image shows unchanged pixels dimmed with changed pixels in red.\n\nIf the baseline and current images have different dimensions, the command reports a dimension mismatch instead of attempting pixel comparison.\n\n## URL diff\n\nCompares two pages by navigating to each in sequence and diffing the results.\n\n```bash\n# Compare two URLs (snapshot diff)\nagent-browser diff url https://staging.example.com https://prod.example.com\n\n# Include visual comparison\nagent-browser diff url https://v1.example.com https://v2.example.com --screenshot\n\n# Full-page screenshot comparison\nagent-browser diff url https://v1.example.com https://v2.example.com --screenshot --full\n```\n\nThe command navigates to the first URL, captures state, then navigates to the second URL and captures again. Snapshot diff is always included. Screenshot diff requires the `--screenshot` flag.\n\nAfter completion, the browser remains on the second URL.\n\n### Options\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--screenshot</code></td><td>Also perform visual screenshot comparison</td></tr>\n <tr><td><code>--full</code></td><td>Use full-page screenshots</td></tr>\n <tr><td><code>--wait-until <strategy></code></td><td>Navigation wait strategy: <code>load</code>, <code>domcontentloaded</code>, <code>networkidle</code> (default: <code>load</code>)</td></tr>\n <tr><td><code>-s, --selector <sel></code></td><td>Scope snapshots to a CSS selector or @ref</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Use compact snapshot format</td></tr>\n <tr><td><code>-d, --depth <n></code></td><td>Limit snapshot tree depth</td></tr>\n </tbody>\n</table>\n\nThe `--wait-until` option accepts only `load`, `domcontentloaded`, and `networkidle`; it cannot express an app-specific condition. If a page needs a selector, text, URL, or JavaScript condition, use separate `open` and `wait` commands, then compare the captured snapshots or screenshots instead of using `diff url`. `networkidle` is supported for quiet pages, but SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Use cases\n\n### Verifying agent actions\n\nThe most common use case: confirm that an action (click, fill, submit) changed the page as expected.\n\n```bash\nagent-browser snapshot -i # Take interactive-only snapshot (baseline)\nagent-browser fill @e3 \"test@example.com\"\nagent-browser diff snapshot # Compare current snapshot to the baseline\n```\n\n### Monitoring for changes\n\nPeriodically compare a page against a saved baseline to detect updates.\n\n```bash\n# Save baseline\nagent-browser open https://example.com && agent-browser snapshot > baseline.txt\n\n# Later, check for changes\nagent-browser open https://example.com && agent-browser diff snapshot --baseline baseline.txt\n```\n\n### Visual regression testing\n\nCompare screenshots before and after a deploy to catch unintended visual changes.\n\n```bash\nagent-browser open https://staging.example.com && agent-browser screenshot baseline.png\n# ... deploy happens ...\nagent-browser open https://staging.example.com && agent-browser diff screenshot --baseline baseline.png\n```\n\n### Comparing environments\n\nDiff staging against production to verify parity.\n\n```bash\nagent-browser diff url https://staging.example.com https://prod.example.com --screenshot\n```",
|
||
"modernMarkdownSha256": "32e7e80e66c5acc2ee189ef21d74e90dd268d85000a31ad1fdb5f15cf6697710",
|
||
"navigation": {
|
||
"title": "Diffing",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/engines/chrome",
|
||
"source": "docs/src/app/engines/chrome/page.mdx",
|
||
"layout": "docs/src/app/engines/chrome/layout.tsx",
|
||
"sourceSha256": "efc7760a94cd0be3e71d565e59405f2a353c8940075b46e0c6df7f22c2a0cbba",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Chrome\n",
|
||
"markdownTitle": "Chrome",
|
||
"title": "Chrome | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Chrome | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Chrome - agent-browser",
|
||
"twitterTitle": "Chrome | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Chrome",
|
||
"id": "chrome"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Binary Discovery",
|
||
"id": "binary-discovery"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Usage",
|
||
"id": "usage"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Custom Binary",
|
||
"id": "custom-binary"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Chrome-Specific Features",
|
||
"id": "chrome-specific-features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Containers and CI",
|
||
"id": "containers-and-ci"
|
||
}
|
||
],
|
||
"content": [
|
||
"Chrome (and Chromium) is the default browser engine. agent-browser discovers, launches, and manages the Chrome process automatically via the Chrome DevTools Protocol (CDP).",
|
||
"When no --executable-path is provided, agent-browser searches for Chrome in this order:",
|
||
"Platform",
|
||
"Locations checked",
|
||
"macOS",
|
||
"/Applications/Google Chrome.app, /Applications/Google Chrome Canary.app, /Applications/Chromium.app, /Applications/Brave Browser.app, Puppeteer cache (~/.cache/puppeteer/chrome/ or PUPPETEER_CACHE_DIR), Chrome for Testing cache",
|
||
"Linux",
|
||
"google-chrome, google-chrome-stable, chromium-browser, chromium in PATH, Puppeteer cache (~/.cache/puppeteer/chrome/ or PUPPETEER_CACHE_DIR), Chrome for Testing cache",
|
||
"Windows",
|
||
"%LOCALAPPDATA%\\Google\\Chrome\\Application\\chrome.exe, C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe, C:\\Program Files (x86)...\\chrome.exe",
|
||
"If Chrome is not found, run agent-browser install to download Chrome from Chrome for Testing.",
|
||
"Chrome is the default engine -- no --engine flag is needed:",
|
||
"agent-browser open example.com",
|
||
"To be explicit:",
|
||
"agent-browser --engine chrome open example.com",
|
||
"Point to any Chromium-based browser with --executable-path:",
|
||
"agent-browser --executable-path /path/to/chromium open example.com",
|
||
"Or via environment variable:",
|
||
"export AGENT_BROWSER_EXECUTABLE_PATH=/path/to/chromium agent-browser open example.com",
|
||
"These features are available only with Chrome:",
|
||
"Feature",
|
||
"Flag",
|
||
"Browser extensions",
|
||
"--extension <path>",
|
||
"Persistent profiles",
|
||
"--profile <path> (sets Chrome's --user-data-dir)",
|
||
"Storage state",
|
||
"--state <path>",
|
||
"File URL access",
|
||
"--allow-file-access",
|
||
"Headless screenshot scrollbars",
|
||
"--hide-scrollbars false keeps native scrollbars visible",
|
||
"Headed mode",
|
||
"--headed",
|
||
"Custom launch args",
|
||
"--args <args>",
|
||
"In Docker, CI runners, or other sandboxed environments, Chrome's user namespace sandbox may need to be disabled:",
|
||
"agent-browser --args \"--no-sandbox\" open example.com",
|
||
"agent-browser automatically adds --no-sandbox when it detects a container environment (Docker, Podman, running as root)."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Chrome\n\nChrome (and Chromium) is the default browser engine. agent-browser discovers, launches, and manages the Chrome process automatically via the Chrome DevTools Protocol (CDP).\n\n## Binary Discovery\n\nWhen no `--executable-path` is provided, agent-browser searches for Chrome in this order:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Locations checked</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>macOS</td>\n <td>\n <code>/Applications/Google Chrome.app</code>,\n <code>/Applications/Google Chrome Canary.app</code>,\n <code>/Applications/Chromium.app</code>,\n <code>/Applications/Brave Browser.app</code>,\n Puppeteer cache (<code>~/.cache/puppeteer/chrome/</code> or <code>PUPPETEER_CACHE_DIR</code>),\n Chrome for Testing cache\n </td>\n </tr>\n <tr>\n <td>Linux</td>\n <td>\n <code>google-chrome</code>,\n <code>google-chrome-stable</code>,\n <code>chromium-browser</code>,\n <code>chromium</code> in PATH,\n Puppeteer cache (<code>~/.cache/puppeteer/chrome/</code> or <code>PUPPETEER_CACHE_DIR</code>),\n Chrome for Testing cache\n </td>\n </tr>\n <tr>\n <td>Windows</td>\n <td>\n <code>%LOCALAPPDATA%\\Google\\Chrome\\Application\\chrome.exe</code>,\n <code>C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe</code>,\n <code>C:\\Program Files (x86)\\...\\chrome.exe</code>\n </td>\n </tr>\n </tbody>\n</table>\n\nIf Chrome is not found, run `agent-browser install` to download Chrome from Chrome for Testing.\n\n## Usage\n\nChrome is the default engine -- no `--engine` flag is needed:\n\n```bash\nagent-browser open example.com\n```\n\nTo be explicit:\n\n```bash\nagent-browser --engine chrome open example.com\n```\n\n## Custom Binary\n\nPoint to any Chromium-based browser with `--executable-path`:\n\n```bash\nagent-browser --executable-path /path/to/chromium open example.com\n```\n\nOr via environment variable:\n\n```bash\nagent-browser open example.com\n```\n\n## Chrome-Specific Features\n\nThese features are available only with Chrome:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Flag</th></tr>\n </thead>\n <tbody>\n <tr><td>Browser extensions</td><td><code>--extension <path></code></td></tr>\n <tr><td>Persistent profiles</td><td><code>--profile <path></code> (sets Chrome's <code>--user-data-dir</code>)</td></tr>\n <tr><td>Storage state</td><td><code>--state <path></code></td></tr>\n <tr><td>File URL access</td><td><code>--allow-file-access</code></td></tr>\n <tr><td>Headless screenshot scrollbars</td><td><code>--hide-scrollbars false</code> keeps native scrollbars visible</td></tr>\n <tr><td>Headed mode</td><td><code>--headed</code></td></tr>\n <tr><td>Custom launch args</td><td><code>--args <args></code></td></tr>\n </tbody>\n</table>\n\n## Containers and CI\n\nIn Docker, CI runners, or other sandboxed environments, Chrome's user namespace sandbox may need to be disabled:\n\n```bash\nagent-browser --args \"--no-sandbox\" open example.com\n```\n\nagent-browser automatically adds `--no-sandbox` when it detects a container environment (Docker, Podman, running as root).",
|
||
"legacyMarkdownSha256": "5128cf646ba9a39796f51ef74925acafd391446703b5f424be33a59307780c75",
|
||
"modernMarkdown": "# Chrome\n\nChrome (and Chromium) is the default browser engine. agent-browser discovers, launches, and manages the Chrome process automatically via the Chrome DevTools Protocol (CDP).\n\n## Binary Discovery\n\nWhen no `--executable-path` is provided, agent-browser searches for Chrome in this order:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Locations checked</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>macOS</td>\n <td>\n <code>/Applications/Google Chrome.app</code>,\n <code>/Applications/Google Chrome Canary.app</code>,\n <code>/Applications/Chromium.app</code>,\n <code>/Applications/Brave Browser.app</code>,\n Puppeteer cache (<code>~/.cache/puppeteer/chrome/</code> or <code>PUPPETEER_CACHE_DIR</code>),\n Chrome for Testing cache\n </td>\n </tr>\n <tr>\n <td>Linux</td>\n <td>\n <code>google-chrome</code>,\n <code>google-chrome-stable</code>,\n <code>chromium-browser</code>,\n <code>chromium</code> in PATH,\n Puppeteer cache (<code>~/.cache/puppeteer/chrome/</code> or <code>PUPPETEER_CACHE_DIR</code>),\n Chrome for Testing cache\n </td>\n </tr>\n <tr>\n <td>Windows</td>\n <td>\n <code>%LOCALAPPDATA%\\Google\\Chrome\\Application\\chrome.exe</code>,\n <code>C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe</code>,\n <code>C:\\Program Files (x86)\\...\\chrome.exe</code>\n </td>\n </tr>\n </tbody>\n</table>\n\nIf Chrome is not found, run `agent-browser install` to download Chrome from Chrome for Testing.\n\n## Usage\n\nChrome is the default engine -- no `--engine` flag is needed:\n\n```bash\nagent-browser open example.com\n```\n\nTo be explicit:\n\n```bash\nagent-browser --engine chrome open example.com\n```\n\n## Custom Binary\n\nPoint to any Chromium-based browser with `--executable-path`:\n\n```bash\nagent-browser --executable-path /path/to/chromium open example.com\n```\n\nOr via environment variable:\n\n```bash\nexport AGENT_BROWSER_EXECUTABLE_PATH=/path/to/chromium\nagent-browser open example.com\n```\n\n## Chrome-Specific Features\n\nThese features are available only with Chrome:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Flag</th></tr>\n </thead>\n <tbody>\n <tr><td>Browser extensions</td><td><code>--extension <path></code></td></tr>\n <tr><td>Persistent profiles</td><td><code>--profile <path></code> (sets Chrome's <code>--user-data-dir</code>)</td></tr>\n <tr><td>Storage state</td><td><code>--state <path></code></td></tr>\n <tr><td>File URL access</td><td><code>--allow-file-access</code></td></tr>\n <tr><td>Headless screenshot scrollbars</td><td><code>--hide-scrollbars false</code> keeps native scrollbars visible</td></tr>\n <tr><td>Headed mode</td><td><code>--headed</code></td></tr>\n <tr><td>Custom launch args</td><td><code>--args <args></code></td></tr>\n </tbody>\n</table>\n\n## Containers and CI\n\nIn Docker, CI runners, or other sandboxed environments, Chrome's user namespace sandbox may need to be disabled:\n\n```bash\nagent-browser --args \"--no-sandbox\" open example.com\n```\n\nagent-browser automatically adds `--no-sandbox` when it detects a container environment (Docker, Podman, running as root).",
|
||
"modernMarkdownSha256": "4c74b528e6c6b76a51a403043f2fe82036eee5bd5dfd45ff9bba3e1ae8b67be4",
|
||
"navigation": {
|
||
"title": "Chrome",
|
||
"section": "Engines"
|
||
}
|
||
},
|
||
{
|
||
"path": "/engines/lightpanda",
|
||
"source": "docs/src/app/engines/lightpanda/page.mdx",
|
||
"layout": "docs/src/app/engines/lightpanda/layout.tsx",
|
||
"sourceSha256": "af1630ac72e596ba666a30cb02797e97d0b744b2978246d8c33df238be199100",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Lightpanda\n",
|
||
"markdownTitle": "Lightpanda",
|
||
"title": "Lightpanda | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Lightpanda | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Lightpanda - agent-browser",
|
||
"twitterTitle": "Lightpanda | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Lightpanda",
|
||
"id": "lightpanda"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Installation",
|
||
"id": "installation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Usage",
|
||
"id": "usage"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Custom Binary Path",
|
||
"id": "custom-binary-path"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Differences from Chrome",
|
||
"id": "differences-from-chrome"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "When to Use Lightpanda",
|
||
"id": "when-to-use-lightpanda"
|
||
}
|
||
],
|
||
"content": [
|
||
"Lightpanda is a headless browser engine built from scratch in Zig for machines. It starts instantly, uses 10x less memory than Chrome, and executes 10x faster.",
|
||
"agent-browser manages Lightpanda the same way it manages Chrome -- spawning the process, connecting via CDP, and shutting it down. All downstream commands (snapshot, click, fill, screenshot, etc.) work through the same CDP protocol path.",
|
||
"Install the Lightpanda binary before using it with agent-browser:",
|
||
"Platform",
|
||
"Command",
|
||
"macOS (Apple Silicon)",
|
||
"curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos && chmod a+x ./lightpanda",
|
||
"Linux (x86_64)",
|
||
"curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && chmod a+x ./lightpanda",
|
||
"Move the binary somewhere in your PATH (e.g. /usr/local/bin/lightpanda or ~/.local/bin/lightpanda).",
|
||
"See the Lightpanda installation docs for more options.",
|
||
"Use the --engine flag to select Lightpanda:",
|
||
"agent-browser --engine lightpanda open example.com agent-browser --engine lightpanda snapshot agent-browser --engine lightpanda screenshot",
|
||
"Or set it as the default via environment variable:",
|
||
"export AGENT_BROWSER_ENGINE=lightpanda agent-browser open example.com",
|
||
"Or in your agent-browser.json config:",
|
||
"{ \"engine\": \"lightpanda\" }",
|
||
"If the lightpanda binary is not in your PATH, use --executable-path:",
|
||
"agent-browser --engine lightpanda --executable-path /path/to/lightpanda open example.com",
|
||
"Lightpanda is a purpose-built headless engine. Some Chrome-specific features are not available:",
|
||
"Feature",
|
||
"Status",
|
||
"Extensions (--extension)",
|
||
"Not supported",
|
||
"Persistent profiles (--profile)",
|
||
"Storage state (--state)",
|
||
"File access (--allow-file-access)",
|
||
"Headed mode (--headed)",
|
||
"Not applicable (headless only)",
|
||
"Screenshots",
|
||
"Depends on Lightpanda CDP support",
|
||
"agent-browser returns a clear error if you combine --engine lightpanda with unsupported flags.",
|
||
"Lightpanda is a good fit for:",
|
||
"Fast web scraping and data extraction",
|
||
"AI agent workflows where speed and low memory matter",
|
||
"CI/CD environments with constrained resources",
|
||
"High-volume parallel automation",
|
||
"Use Chrome when you need full browser fidelity, extensions, or persistent profiles."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://lightpanda.io/",
|
||
"text": "Lightpanda"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://lightpanda.io/docs/open-source/installation",
|
||
"text": "Lightpanda installation docs"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Lightpanda\n\n[Lightpanda](https://lightpanda.io/) is a headless browser engine built from scratch in Zig for machines. It starts instantly, uses 10x less memory than Chrome, and executes 10x faster.\n\nagent-browser manages Lightpanda the same way it manages Chrome -- spawning the process, connecting via CDP, and shutting it down. All downstream commands (snapshot, click, fill, screenshot, etc.) work through the same CDP protocol path.\n\n## Installation\n\nInstall the Lightpanda binary before using it with agent-browser:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Command</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>macOS (Apple Silicon)</td>\n <td><code>curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos && chmod a+x ./lightpanda</code></td>\n </tr>\n <tr>\n <td>Linux (x86_64)</td>\n <td><code>curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && chmod a+x ./lightpanda</code></td>\n </tr>\n </tbody>\n</table>\n\nMove the binary somewhere in your `PATH` (e.g. `/usr/local/bin/lightpanda` or `~/.local/bin/lightpanda`).\n\nSee the [Lightpanda installation docs](https://lightpanda.io/docs/open-source/installation) for more options.\n\n## Usage\n\nUse the `--engine` flag to select Lightpanda:\n\n```bash\nagent-browser --engine lightpanda open example.com\nagent-browser --engine lightpanda snapshot\nagent-browser --engine lightpanda screenshot\n```\n\nOr set it as the default via environment variable:\n\n```bash\nagent-browser open example.com\n```\n\nOr in your `agent-browser.json` config:\n\n```json\n{\n \"engine\": \"lightpanda\"\n}\n```\n\n## Custom Binary Path\n\nIf the `lightpanda` binary is not in your `PATH`, use `--executable-path`:\n\n```bash\nagent-browser --engine lightpanda --executable-path /path/to/lightpanda open example.com\n```\n\n## Differences from Chrome\n\nLightpanda is a purpose-built headless engine. Some Chrome-specific features are not available:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Status</th></tr>\n </thead>\n <tbody>\n <tr><td>Extensions (<code>--extension</code>)</td><td>Not supported</td></tr>\n <tr><td>Persistent profiles (<code>--profile</code>)</td><td>Not supported</td></tr>\n <tr><td>Storage state (<code>--state</code>)</td><td>Not supported</td></tr>\n <tr><td>File access (<code>--allow-file-access</code>)</td><td>Not supported</td></tr>\n <tr><td>Headed mode (<code>--headed</code>)</td><td>Not applicable (headless only)</td></tr>\n <tr><td>Screenshots</td><td>Depends on Lightpanda CDP support</td></tr>\n </tbody>\n</table>\n\nagent-browser returns a clear error if you combine `--engine lightpanda` with unsupported flags.\n\n## When to Use Lightpanda\n\nLightpanda is a good fit for:\n\n- Fast web scraping and data extraction\n- AI agent workflows where speed and low memory matter\n- CI/CD environments with constrained resources\n- High-volume parallel automation\n\nUse Chrome when you need full browser fidelity, extensions, or persistent profiles.",
|
||
"legacyMarkdownSha256": "ec212d42a8e6416fe89160a643c9dd0b931ae77a7041a1963f62444c2a2fba81",
|
||
"modernMarkdown": "# Lightpanda\n\n[Lightpanda](https://lightpanda.io/) is a headless browser engine built from scratch in Zig for machines. It starts instantly, uses 10x less memory than Chrome, and executes 10x faster.\n\nagent-browser manages Lightpanda the same way it manages Chrome -- spawning the process, connecting via CDP, and shutting it down. All downstream commands (snapshot, click, fill, screenshot, etc.) work through the same CDP protocol path.\n\n## Installation\n\nInstall the Lightpanda binary before using it with agent-browser:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Command</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>macOS (Apple Silicon)</td>\n <td><code>curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos && chmod a+x ./lightpanda</code></td>\n </tr>\n <tr>\n <td>Linux (x86_64)</td>\n <td><code>curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && chmod a+x ./lightpanda</code></td>\n </tr>\n </tbody>\n</table>\n\nMove the binary somewhere in your `PATH` (e.g. `/usr/local/bin/lightpanda` or `~/.local/bin/lightpanda`).\n\nSee the [Lightpanda installation docs](https://lightpanda.io/docs/open-source/installation) for more options.\n\n## Usage\n\nUse the `--engine` flag to select Lightpanda:\n\n```bash\nagent-browser --engine lightpanda open example.com\nagent-browser --engine lightpanda snapshot\nagent-browser --engine lightpanda screenshot\n```\n\nOr set it as the default via environment variable:\n\n```bash\nexport AGENT_BROWSER_ENGINE=lightpanda\nagent-browser open example.com\n```\n\nOr in your `agent-browser.json` config:\n\n```json\n{\n \"engine\": \"lightpanda\"\n}\n```\n\n## Custom Binary Path\n\nIf the `lightpanda` binary is not in your `PATH`, use `--executable-path`:\n\n```bash\nagent-browser --engine lightpanda --executable-path /path/to/lightpanda open example.com\n```\n\n## Differences from Chrome\n\nLightpanda is a purpose-built headless engine. Some Chrome-specific features are not available:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Status</th></tr>\n </thead>\n <tbody>\n <tr><td>Extensions (<code>--extension</code>)</td><td>Not supported</td></tr>\n <tr><td>Persistent profiles (<code>--profile</code>)</td><td>Not supported</td></tr>\n <tr><td>Storage state (<code>--state</code>)</td><td>Not supported</td></tr>\n <tr><td>File access (<code>--allow-file-access</code>)</td><td>Not supported</td></tr>\n <tr><td>Headed mode (<code>--headed</code>)</td><td>Not applicable (headless only)</td></tr>\n <tr><td>Screenshots</td><td>Depends on Lightpanda CDP support</td></tr>\n </tbody>\n</table>\n\nagent-browser returns a clear error if you combine `--engine lightpanda` with unsupported flags.\n\n## When to Use Lightpanda\n\nLightpanda is a good fit for:\n\n- Fast web scraping and data extraction\n- AI agent workflows where speed and low memory matter\n- CI/CD environments with constrained resources\n- High-volume parallel automation\n\nUse Chrome when you need full browser fidelity, extensions, or persistent profiles.",
|
||
"modernMarkdownSha256": "30a7c93befadce77041c533e45ab4158020677c55b581abf830d49679277356b",
|
||
"navigation": {
|
||
"title": "Lightpanda",
|
||
"section": "Engines"
|
||
}
|
||
},
|
||
{
|
||
"path": "/engines/obscura",
|
||
"source": "docs/src/app/engines/obscura/page.mdx",
|
||
"layout": "docs/src/app/engines/obscura/layout.tsx",
|
||
"sourceSha256": "bad7a21e84dec56007bfd0bb8587d49d1a76559c305b8cd9c62aa4f2534324a8",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Obscura (experimental)\n",
|
||
"markdownTitle": "Obscura (experimental)",
|
||
"title": "Obscura | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Obscura | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Obscura - agent-browser",
|
||
"twitterTitle": "Obscura | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Obscura (experimental)",
|
||
"id": "obscura-experimental"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Installation",
|
||
"id": "installation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Usage",
|
||
"id": "usage"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Custom Binary Path",
|
||
"id": "custom-binary-path"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Stealth mode",
|
||
"id": "stealth-mode"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Differences from Chrome",
|
||
"id": "differences-from-chrome"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "When to Use Obscura",
|
||
"id": "when-to-use-obscura"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Experimental Obscura provider",
|
||
"id": "experimental-obscura-provider"
|
||
}
|
||
],
|
||
"content": [
|
||
"This adapter does not fix upstream engine bugs or imply Chrome parity. Review the limitations below before choosing Obscura.",
|
||
"Obscura is a headless browser engine written in Rust. It runs real JavaScript through V8, speaks the Chrome DevTools Protocol, and targets web scraping and AI agent automation.",
|
||
"agent-browser manages Obscura the same way it manages Chrome. It spawns the obscura serve process, connects over CDP, and shuts it down when done. All downstream commands (snapshot, click, fill, screenshot, and so on) run through the same CDP path.",
|
||
"Install the Obscura binary before using it with agent-browser:",
|
||
"Platform",
|
||
"Command",
|
||
"Linux (x86_64)",
|
||
"curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-linux.tar.gz && tar xzf obscura-x86_64-linux.tar.gz",
|
||
"macOS (Apple Silicon)",
|
||
"curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-aarch64-macos.tar.gz && tar xzf obscura-aarch64-macos.tar.gz",
|
||
"Move the binary somewhere in your PATH (e.g. /usr/local/bin/obscura or ~/.local/bin/obscura).",
|
||
"See the Obscura README for more install options, including Docker and building from source.",
|
||
"Use the --engine flag to select Obscura:",
|
||
"agent-browser --engine obscura open example.com agent-browser --engine obscura snapshot agent-browser --engine obscura screenshot",
|
||
"Or set it as the default via environment variable:",
|
||
"export AGENT_BROWSER_ENGINE=obscura agent-browser open example.com",
|
||
"Or in your agent-browser.json config:",
|
||
"{ \"engine\": \"obscura\" }",
|
||
"If the obscura binary is not in your PATH, use --executable-path:",
|
||
"agent-browser --engine obscura --executable-path /path/to/obscura open example.com",
|
||
"Obscura ships an optional stealth mode that presents a privacy-first, consistent browser fingerprint and blocks known trackers. Enable it for the Obscura engine by setting AGENT_BROWSER_OBSCURA_STEALTH:",
|
||
"AGENT_BROWSER_OBSCURA_STEALTH=1 agent-browser --engine obscura open example.com",
|
||
"When set, agent-browser launches obscura serve with --stealth. Accepted values are 1, true, yes, and on. Stealth is off by default and requires an Obscura build with stealth support; disabling it does not imply Chrome parity.",
|
||
"Obscura is a purpose-built headless engine. Some Chrome-specific features are not available:",
|
||
"Feature",
|
||
"Status",
|
||
"Extensions (--extension)",
|
||
"Not supported",
|
||
"Persistent profiles (--profile)",
|
||
"Storage state (--state)",
|
||
"File access (--allow-file-access)",
|
||
"Headed mode (--headed)",
|
||
"Not applicable (headless only)",
|
||
"Proxy bypass (--proxy-bypass, config, or environment)",
|
||
"Rejected, even without a proxy",
|
||
"WebGPU, custom CA certificates, Chrome arguments",
|
||
"agent-browser returns a clear error if you combine --engine obscura with unsupported flags.",
|
||
"Potential uses to evaluate include:",
|
||
"Web scraping and data extraction with real JavaScript execution",
|
||
"AI agent workflows that want a lightweight CDP target",
|
||
"CI/CD environments where you prefer a single self-contained binary",
|
||
"Setups that want a privacy-first, consistent browser fingerprint (Obscura ships an optional stealth mode)",
|
||
"Use Chrome when you need full browser fidelity, extensions, or persistent profiles.",
|
||
"Select --engine obscura --executable-path /path/to/obscura to launch a local Obscura binary. This provider is experimental. Obscura v0.2.2 has known accessibility naming, hidden-element, iframe and screenshot fidelity gaps; successful CDP connection does not establish Chrome parity. Use Chrome for workflows that depend on these features until validated against your target pages.",
|
||
"Local development pages require OBSCURA_ALLOW_PRIVATE_NETWORK=1 in the environment before the session starts. Close and relaunch the named session when changing engine launch settings. Stealth support depends on how the Obscura binary was built. Unsupported options including --webgpu, --ca-cert, --args, and --proxy-bypass are rejected. Proxy bypass rules from proxyBypass config, AGENT_BROWSER_PROXY_BYPASS, NO_PROXY, or no_proxy are also rejected, even without a proxy. Remove those settings only if bypass is not needed; otherwise use Chrome. Explicit --engine obscura launches validate the current invocation's resolved bypass settings, even with an existing daemon; clearing those settings does not reuse stale daemon environment values. Startup discovery and CDP initialization each have a 10-second deadline, with bounded connection cleanup on initialization failure.",
|
||
"MCP tools use the same provider through extraArgs: [\"--engine\", \"obscura\", \"--executable-path\", \"/path/to/obscura\"]. A separate engine-specific MCP tool is unnecessary because tools delegate to the canonical CLI parser.",
|
||
"For source-build testing, see the Obscura adapter contributor guide."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/h4ckf0r0day/obscura",
|
||
"text": "Obscura"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/h4ckf0r0day/obscura",
|
||
"text": "Obscura README"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md#obscura-adapter",
|
||
"text": "Obscura adapter contributor guide"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Obscura (experimental)\n\nThis adapter does not fix upstream engine bugs or imply Chrome parity. Review the limitations below before choosing Obscura.\n\n[Obscura](https://github.com/h4ckf0r0day/obscura) is a headless browser engine written in Rust. It runs real JavaScript through V8, speaks the Chrome DevTools Protocol, and targets web scraping and AI agent automation.\n\nagent-browser manages Obscura the same way it manages Chrome. It spawns the `obscura serve` process, connects over CDP, and shuts it down when done. All downstream commands (snapshot, click, fill, screenshot, and so on) run through the same CDP path.\n\n## Installation\n\nInstall the Obscura binary before using it with agent-browser:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Command</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>Linux (x86_64)</td>\n <td><code>curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-linux.tar.gz && tar xzf obscura-x86_64-linux.tar.gz</code></td>\n </tr>\n <tr>\n <td>macOS (Apple Silicon)</td>\n <td><code>curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-aarch64-macos.tar.gz && tar xzf obscura-aarch64-macos.tar.gz</code></td>\n </tr>\n </tbody>\n</table>\n\nMove the binary somewhere in your `PATH` (e.g. `/usr/local/bin/obscura` or `~/.local/bin/obscura`).\n\nSee the [Obscura README](https://github.com/h4ckf0r0day/obscura) for more install options, including Docker and building from source.\n\n## Usage\n\nUse the `--engine` flag to select Obscura:\n\n```bash\nagent-browser --engine obscura open example.com\nagent-browser --engine obscura snapshot\nagent-browser --engine obscura screenshot\n```\n\nOr set it as the default via environment variable:\n\n```bash\nagent-browser open example.com\n```\n\nOr in your `agent-browser.json` config:\n\n```json\n{\n \"engine\": \"obscura\"\n}\n```\n\n## Custom Binary Path\n\nIf the `obscura` binary is not in your `PATH`, use `--executable-path`:\n\n```bash\nagent-browser --engine obscura --executable-path /path/to/obscura open example.com\n```\n\n## Stealth mode\n\nObscura ships an optional stealth mode that presents a privacy-first, consistent browser fingerprint and blocks known trackers. Enable it for the Obscura engine by setting `AGENT_BROWSER_OBSCURA_STEALTH`:\n\n```bash\nAGENT_BROWSER_OBSCURA_STEALTH=1 agent-browser --engine obscura open example.com\n```\n\nWhen set, agent-browser launches `obscura serve` with `--stealth`. Accepted values are `1`, `true`, `yes`, and `on`. Stealth is off by default and requires an Obscura build with stealth support; disabling it does not imply Chrome parity.\n\n## Differences from Chrome\n\nObscura is a purpose-built headless engine. Some Chrome-specific features are not available:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Status</th></tr>\n </thead>\n <tbody>\n <tr><td>Extensions (<code>--extension</code>)</td><td>Not supported</td></tr>\n <tr><td>Persistent profiles (<code>--profile</code>)</td><td>Not supported</td></tr>\n <tr><td>Storage state (<code>--state</code>)</td><td>Not supported</td></tr>\n <tr><td>File access (<code>--allow-file-access</code>)</td><td>Not supported</td></tr>\n <tr><td>Headed mode (<code>--headed</code>)</td><td>Not applicable (headless only)</td></tr>\n <tr><td>Proxy bypass (<code>--proxy-bypass</code>, config, or environment)</td><td>Rejected, even without a proxy</td></tr>\n <tr><td>WebGPU, custom CA certificates, Chrome arguments</td><td>Not supported</td></tr>\n </tbody>\n</table>\n\nagent-browser returns a clear error if you combine `--engine obscura` with unsupported flags.\n\n## When to Use Obscura\n\nPotential uses to evaluate include:\n\n- Web scraping and data extraction with real JavaScript execution\n- AI agent workflows that want a lightweight CDP target\n- CI/CD environments where you prefer a single self-contained binary\n- Setups that want a privacy-first, consistent browser fingerprint (Obscura ships an optional stealth mode)\n\nUse Chrome when you need full browser fidelity, extensions, or persistent profiles.\n\n## Experimental Obscura provider\n\nSelect `--engine obscura --executable-path /path/to/obscura` to launch a local Obscura binary. This provider is experimental. Obscura v0.2.2 has known accessibility naming, hidden-element, iframe and screenshot fidelity gaps; successful CDP connection does not establish Chrome parity. Use Chrome for workflows that depend on these features until validated against your target pages.\n\nLocal development pages require `OBSCURA_ALLOW_PRIVATE_NETWORK=1` in the environment before the session starts. Close and relaunch the named session when changing engine launch settings. Stealth support depends on how the Obscura binary was built. Unsupported options including `--webgpu`, `--ca-cert`, `--args`, and `--proxy-bypass` are rejected. Proxy bypass rules from `proxyBypass` config, `AGENT_BROWSER_PROXY_BYPASS`, `NO_PROXY`, or `no_proxy` are also rejected, even without a proxy. Remove those settings only if bypass is not needed; otherwise use Chrome. Explicit `--engine obscura` launches validate the current invocation's resolved bypass settings, even with an existing daemon; clearing those settings does not reuse stale daemon environment values. Startup discovery and CDP initialization each have a 10-second deadline, with bounded connection cleanup on initialization failure.\n\nMCP tools use the same provider through `extraArgs`: `[\"--engine\", \"obscura\", \"--executable-path\", \"/path/to/obscura\"]`. A separate engine-specific MCP tool is unnecessary because tools delegate to the canonical CLI parser.\n\nFor source-build testing, see the [Obscura adapter contributor guide](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md#obscura-adapter).",
|
||
"legacyMarkdownSha256": "7c937f48acc4f76cde51ea41213c59adf7e7b1e8e9015bc0f0e39fc6dd009e17",
|
||
"modernMarkdown": "# Obscura (experimental)\n\nThis adapter does not fix upstream engine bugs or imply Chrome parity. Review the limitations below before choosing Obscura.\n\n[Obscura](https://github.com/h4ckf0r0day/obscura) is a headless browser engine written in Rust. It runs real JavaScript through V8, speaks the Chrome DevTools Protocol, and targets web scraping and AI agent automation.\n\nagent-browser manages Obscura the same way it manages Chrome. It spawns the `obscura serve` process, connects over CDP, and shuts it down when done. All downstream commands (snapshot, click, fill, screenshot, and so on) run through the same CDP path.\n\n## Installation\n\nInstall the Obscura binary before using it with agent-browser:\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Command</th></tr>\n </thead>\n <tbody>\n <tr>\n <td>Linux (x86_64)</td>\n <td><code>curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-linux.tar.gz && tar xzf obscura-x86_64-linux.tar.gz</code></td>\n </tr>\n <tr>\n <td>macOS (Apple Silicon)</td>\n <td><code>curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-aarch64-macos.tar.gz && tar xzf obscura-aarch64-macos.tar.gz</code></td>\n </tr>\n </tbody>\n</table>\n\nMove the binary somewhere in your `PATH` (e.g. `/usr/local/bin/obscura` or `~/.local/bin/obscura`).\n\nSee the [Obscura README](https://github.com/h4ckf0r0day/obscura) for more install options, including Docker and building from source.\n\n## Usage\n\nUse the `--engine` flag to select Obscura:\n\n```bash\nagent-browser --engine obscura open example.com\nagent-browser --engine obscura snapshot\nagent-browser --engine obscura screenshot\n```\n\nOr set it as the default via environment variable:\n\n```bash\nexport AGENT_BROWSER_ENGINE=obscura\nagent-browser open example.com\n```\n\nOr in your `agent-browser.json` config:\n\n```json\n{\n \"engine\": \"obscura\"\n}\n```\n\n## Custom Binary Path\n\nIf the `obscura` binary is not in your `PATH`, use `--executable-path`:\n\n```bash\nagent-browser --engine obscura --executable-path /path/to/obscura open example.com\n```\n\n## Stealth mode\n\nObscura ships an optional stealth mode that presents a privacy-first, consistent browser fingerprint and blocks known trackers. Enable it for the Obscura engine by setting `AGENT_BROWSER_OBSCURA_STEALTH`:\n\n```bash\nAGENT_BROWSER_OBSCURA_STEALTH=1 agent-browser --engine obscura open example.com\n```\n\nWhen set, agent-browser launches `obscura serve` with `--stealth`. Accepted values are `1`, `true`, `yes`, and `on`. Stealth is off by default and requires an Obscura build with stealth support; disabling it does not imply Chrome parity.\n\n## Differences from Chrome\n\nObscura is a purpose-built headless engine. Some Chrome-specific features are not available:\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Status</th></tr>\n </thead>\n <tbody>\n <tr><td>Extensions (<code>--extension</code>)</td><td>Not supported</td></tr>\n <tr><td>Persistent profiles (<code>--profile</code>)</td><td>Not supported</td></tr>\n <tr><td>Storage state (<code>--state</code>)</td><td>Not supported</td></tr>\n <tr><td>File access (<code>--allow-file-access</code>)</td><td>Not supported</td></tr>\n <tr><td>Headed mode (<code>--headed</code>)</td><td>Not applicable (headless only)</td></tr>\n <tr><td>Proxy bypass (<code>--proxy-bypass</code>, config, or environment)</td><td>Rejected, even without a proxy</td></tr>\n <tr><td>WebGPU, custom CA certificates, Chrome arguments</td><td>Not supported</td></tr>\n </tbody>\n</table>\n\nagent-browser returns a clear error if you combine `--engine obscura` with unsupported flags.\n\n## When to Use Obscura\n\nPotential uses to evaluate include:\n\n- Web scraping and data extraction with real JavaScript execution\n- AI agent workflows that want a lightweight CDP target\n- CI/CD environments where you prefer a single self-contained binary\n- Setups that want a privacy-first, consistent browser fingerprint (Obscura ships an optional stealth mode)\n\nUse Chrome when you need full browser fidelity, extensions, or persistent profiles.\n\n## Experimental Obscura provider\n\nSelect `--engine obscura --executable-path /path/to/obscura` to launch a local Obscura binary. This provider is experimental. Obscura v0.2.2 has known accessibility naming, hidden-element, iframe and screenshot fidelity gaps; successful CDP connection does not establish Chrome parity. Use Chrome for workflows that depend on these features until validated against your target pages.\n\nLocal development pages require `OBSCURA_ALLOW_PRIVATE_NETWORK=1` in the environment before the session starts. Close and relaunch the named session when changing engine launch settings. Stealth support depends on how the Obscura binary was built. Unsupported options including `--webgpu`, `--ca-cert`, `--args`, and `--proxy-bypass` are rejected. Proxy bypass rules from `proxyBypass` config, `AGENT_BROWSER_PROXY_BYPASS`, `NO_PROXY`, or `no_proxy` are also rejected, even without a proxy. Remove those settings only if bypass is not needed; otherwise use Chrome. Explicit `--engine obscura` launches validate the current invocation's resolved bypass settings, even with an existing daemon; clearing those settings does not reuse stale daemon environment values. Startup discovery and CDP initialization each have a 10-second deadline, with bounded connection cleanup on initialization failure.\n\nMCP tools use the same provider through `extraArgs`: `[\"--engine\", \"obscura\", \"--executable-path\", \"/path/to/obscura\"]`. A separate engine-specific MCP tool is unnecessary because tools delegate to the canonical CLI parser.\n\nFor source-build testing, see the [Obscura adapter contributor guide](https://github.com/vercel-labs/agent-browser/blob/main/AGENTS.md#obscura-adapter).",
|
||
"modernMarkdownSha256": "723424d0f58371a3c20b4b7266066f07b1e18b0e16528f643f23d11ee86be5ea",
|
||
"navigation": {
|
||
"title": "Obscura",
|
||
"section": "Engines"
|
||
}
|
||
},
|
||
{
|
||
"path": "/eve",
|
||
"source": "docs/src/app/eve/page.mdx",
|
||
"layout": "docs/src/app/eve/layout.tsx",
|
||
"sourceSha256": "08de1a8e033ea0b80d5667a20d00f1ed63b569963d6de76e1ee282878b361bd4",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# eve Extension\n",
|
||
"markdownTitle": "eve Extension",
|
||
"title": "eve Extension | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "eve Extension | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "eve Extension - agent-browser",
|
||
"twitterTitle": "eve Extension | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "eve Extension",
|
||
"id": "eve-extension"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Install",
|
||
"id": "install"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Mount",
|
||
"id": "mount"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Sandbox bootstrap",
|
||
"id": "sandbox-bootstrap"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Configuration",
|
||
"id": "configuration"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Agent workflow",
|
||
"id": "agent-workflow"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Security",
|
||
"id": "security"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Example",
|
||
"id": "example"
|
||
}
|
||
],
|
||
"content": [
|
||
"@agent-browser/eve mounts the full agent-browser tool set into an eve agent. The tools run agent-browser inside the agent sandbox, so the browser process, downloads, screenshots, and state stay out of the Next.js runtime.",
|
||
"pnpm add @agent-browser/eve",
|
||
"eve is a peer dependency and should already be present in an eve app. The sandbox preinstall helpers shown below ship with the same package, so no other install is needed.",
|
||
"Create an extension mount under agent/extensions/. The file name becomes the tool namespace.",
|
||
"// agent/extensions/browser.ts import browser from \"@agent-browser/eve\"; export default browser({ allowedDomains: [\"example.com\", \"*.example.com\"], maxOutputChars: 50000, });",
|
||
"The agent gets namespaced tools such as browser__navigate, browser__snapshot, browser__click, browser__fill, browser__find, browser__screenshot, browser__console, and browser__network_requests.",
|
||
"The extension can install agent-browser, Chromium, and required Linux libraries on first tool use. For production, install them in the eve sandbox template so sessions start warm.",
|
||
"// agent/sandbox.ts import { agentBrowserRevalidationKey, installAgentBrowser } from \"@agent-browser/eve/sandbox\"; import { defineSandbox } from \"eve/sandbox\"; import { vercel } from \"eve/sandbox/vercel\"; export default defineSandbox({ backend: vercel({ resources: { vcpus: 2 } }), revalidationKey: () => agentBrowserRevalidationKey(), async bootstrap({ use }) { const sandbox = await use(); await installAgentBrowser(sandbox); }, });",
|
||
"Common options:",
|
||
"allowedDomains restricts navigation and subresources.",
|
||
"contentBoundaries wraps page output in boundary markers.",
|
||
"maxOutputChars truncates large page output.",
|
||
"inlineScreenshots embeds screenshots as data URLs for channels that can render them.",
|
||
"autoInstall, installSpec, installBrowser, and installSystemDependencies control first-use installation.",
|
||
"session and sessionPrefix control browser session naming.",
|
||
"binary points at the agent-browser executable inside the sandbox.",
|
||
"proxy configures browser proxy use.",
|
||
"Have the agent navigate, snapshot, then act on snapshot refs. Snapshot refs like [ref=e12] become @e12 selectors for interaction tools.",
|
||
"Inspect https://example.com and summarize what is visible.",
|
||
"For reading articles or docs, prefer browser__read. For apps, use browser__snapshot before interaction and resnapshot after page changes.",
|
||
"Cookie, storage, and saved-auth-state commands are intentionally not exposed by the extension because they can reveal credential material to the model. Use standard eve extension overrides when you need to disable a tool, add approval requirements, or provide an app-specific guarded tool.",
|
||
"See examples/eve for a complete Next.js eve app with the extension mounted."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://eve.dev",
|
||
"text": "eve"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/vercel-labs/agent-browser/tree/main/examples/eve",
|
||
"text": "examples/eve"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# eve Extension\n\n`@agent-browser/eve` mounts the full agent-browser tool set into an [eve](https://eve.dev) agent. The tools run `agent-browser` inside the agent sandbox, so the browser process, downloads, screenshots, and state stay out of the Next.js runtime.\n\n## Install\n\n```bash\npnpm add @agent-browser/eve\n```\n\n`eve` is a peer dependency and should already be present in an eve app. The sandbox preinstall helpers shown below ship with the same package, so no other install is needed.\n\n## Mount\n\nCreate an extension mount under `agent/extensions/`. The file name becomes the tool namespace.\n\n```ts\n// agent/extensions/browser.ts\n\n allowedDomains: [\"example.com\", \"*.example.com\"],\n maxOutputChars: 50000,\n});\n```\n\nThe agent gets namespaced tools such as `browser__navigate`, `browser__snapshot`, `browser__click`, `browser__fill`, `browser__find`, `browser__screenshot`, `browser__console`, and `browser__network_requests`.\n\n## Sandbox bootstrap\n\nThe extension can install `agent-browser`, Chromium, and required Linux libraries on first tool use. For production, install them in the eve sandbox template so sessions start warm.\n\n```ts\n// agent/sandbox.ts\n\n backend: vercel({ resources: { vcpus: 2 } }),\n revalidationKey: () => agentBrowserRevalidationKey(),\n async bootstrap({ use }) {\n const sandbox = await use();\n await installAgentBrowser(sandbox);\n },\n});\n```\n\n## Configuration\n\nCommon options:\n\n- `allowedDomains` restricts navigation and subresources.\n- `contentBoundaries` wraps page output in boundary markers.\n- `maxOutputChars` truncates large page output.\n- `inlineScreenshots` embeds screenshots as data URLs for channels that can render them.\n- `autoInstall`, `installSpec`, `installBrowser`, and `installSystemDependencies` control first-use installation.\n- `session` and `sessionPrefix` control browser session naming.\n- `binary` points at the `agent-browser` executable inside the sandbox.\n- `proxy` configures browser proxy use.\n\n## Agent workflow\n\nHave the agent navigate, snapshot, then act on snapshot refs. Snapshot refs like `[ref=e12]` become `@e12` selectors for interaction tools.\n\n```text\nInspect https://example.com and summarize what is visible.\n```\n\nFor reading articles or docs, prefer `browser__read`. For apps, use `browser__snapshot` before interaction and resnapshot after page changes.\n\n## Security\n\nCookie, storage, and saved-auth-state commands are intentionally not exposed by the extension because they can reveal credential material to the model. Use standard eve extension overrides when you need to disable a tool, add approval requirements, or provide an app-specific guarded tool.\n\n## Example\n\nSee [`examples/eve`](https://github.com/vercel-labs/agent-browser/tree/main/examples/eve) for a complete Next.js eve app with the extension mounted.",
|
||
"legacyMarkdownSha256": "962c9264568561877513d39c79843e35a5c042d8537b3a1a6fabcaee16331734",
|
||
"modernMarkdown": "# eve Extension\n\n`@agent-browser/eve` mounts the full agent-browser tool set into an [eve](https://eve.dev) agent. The tools run `agent-browser` inside the agent sandbox, so the browser process, downloads, screenshots, and state stay out of the Next.js runtime.\n\n## Install\n\n```bash\npnpm add @agent-browser/eve\n```\n\n`eve` is a peer dependency and should already be present in an eve app. The sandbox preinstall helpers shown below ship with the same package, so no other install is needed.\n\n## Mount\n\nCreate an extension mount under `agent/extensions/`. The file name becomes the tool namespace.\n\n```ts\n// agent/extensions/browser.ts\nimport browser from \"@agent-browser/eve\";\n\nexport default browser({\n allowedDomains: [\"example.com\", \"*.example.com\"],\n maxOutputChars: 50000,\n});\n```\n\nThe agent gets namespaced tools such as `browser__navigate`, `browser__snapshot`, `browser__click`, `browser__fill`, `browser__find`, `browser__screenshot`, `browser__console`, and `browser__network_requests`.\n\n## Sandbox bootstrap\n\nThe extension can install `agent-browser`, Chromium, and required Linux libraries on first tool use. For production, install them in the eve sandbox template so sessions start warm.\n\n```ts\n// agent/sandbox.ts\nimport { agentBrowserRevalidationKey, installAgentBrowser } from \"@agent-browser/eve/sandbox\";\nimport { defineSandbox } from \"eve/sandbox\";\nimport { vercel } from \"eve/sandbox/vercel\";\n\nexport default defineSandbox({\n backend: vercel({ resources: { vcpus: 2 } }),\n revalidationKey: () => agentBrowserRevalidationKey(),\n async bootstrap({ use }) {\n const sandbox = await use();\n await installAgentBrowser(sandbox);\n },\n});\n```\n\n## Configuration\n\nCommon options:\n\n- `allowedDomains` restricts navigation and subresources.\n- `contentBoundaries` wraps page output in boundary markers.\n- `maxOutputChars` truncates large page output.\n- `inlineScreenshots` embeds screenshots as data URLs for channels that can render them.\n- `autoInstall`, `installSpec`, `installBrowser`, and `installSystemDependencies` control first-use installation.\n- `session` and `sessionPrefix` control browser session naming.\n- `binary` points at the `agent-browser` executable inside the sandbox.\n- `proxy` configures browser proxy use.\n\n## Agent workflow\n\nHave the agent navigate, snapshot, then act on snapshot refs. Snapshot refs like `[ref=e12]` become `@e12` selectors for interaction tools.\n\n```text\nInspect https://example.com and summarize what is visible.\n```\n\nFor reading articles or docs, prefer `browser__read`. For apps, use `browser__snapshot` before interaction and resnapshot after page changes.\n\n## Security\n\nCookie, storage, and saved-auth-state commands are intentionally not exposed by the extension because they can reveal credential material to the model. Use standard eve extension overrides when you need to disable a tool, add approval requirements, or provide an app-specific guarded tool.\n\n## Example\n\nSee [`examples/eve`](https://github.com/vercel-labs/agent-browser/tree/main/examples/eve) for a complete Next.js eve app with the extension mounted.",
|
||
"modernMarkdownSha256": "bd0af3a533c12f61d81e0c0d81fc42f9f21fc03861a2e2e6ae777ae49c7331e7",
|
||
"navigation": {
|
||
"title": "eve Extension",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/files",
|
||
"source": "docs/src/app/files/page.mdx",
|
||
"layout": "docs/src/app/files/layout.tsx",
|
||
"sourceSha256": "b671a6a8facc78b7b10f9a63b61871938efa3d86aede147da141ed80d5aee917",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Files & Clipboard\n",
|
||
"markdownTitle": "Files & Clipboard",
|
||
"title": "Files & Clipboard | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Files & Clipboard | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Files & Clipboard - agent-browser",
|
||
"twitterTitle": "Files & Clipboard | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Files & Clipboard",
|
||
"id": "files-clipboard"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Upload files",
|
||
"id": "upload-files"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Downloads",
|
||
"id": "downloads"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Screenshots and PDFs",
|
||
"id": "screenshots-and-pdfs"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Local files",
|
||
"id": "local-files"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Clipboard",
|
||
"id": "clipboard"
|
||
}
|
||
],
|
||
"content": [
|
||
"agent-browser can upload files, capture downloads, read local files through file:// URLs, write PDFs and screenshots, and interact with the browser clipboard.",
|
||
"agent-browser snapshot -i agent-browser upload @e4 ./invoice.pdf agent-browser upload @e4 ./front.png ./back.png",
|
||
"The selector must resolve to a file input. Multiple file paths are accepted for multi-file inputs.",
|
||
"agent-browser download @e5 ./report.csv agent-browser wait --download ./archive.zip --timeout 30000",
|
||
"Use download when a specific element triggers the download. Use wait --download when another action starts the download and you need to wait for completion.",
|
||
"Set a default download directory for browser-initiated downloads:",
|
||
"agent-browser --download-path ./downloads open https://app.example.com",
|
||
"Without --download-path, downloads go to a temporary directory that is cleaned up when the browser closes.",
|
||
"agent-browser screenshot ./page.png agent-browser screenshot --full ./page-full.png agent-browser screenshot --if-changed agent-browser screenshot --threshold 0.01 agent-browser screenshot --screenshot-format jpeg --screenshot-quality 80 ./page.jpg agent-browser pdf ./page.pdf",
|
||
"Prefer --if-changed for repeated captures: skipping unchanged images is the most token-efficient option. History is per tab and capture scope. The first capture returns a path; later unchanged captures omit it. JSON includes changed, revision, and pixelChangeRatio. --threshold <0-1> implies --if-changed and treats changes at or below that ratio as unchanged.",
|
||
"Screenshot defaults can also be configured with:",
|
||
"Setting",
|
||
"Description",
|
||
"--screenshot-dir / AGENT_BROWSER_SCREENSHOT_DIR",
|
||
"Default screenshot output directory",
|
||
"--screenshot-format / AGENT_BROWSER_SCREENSHOT_FORMAT",
|
||
"png or jpeg",
|
||
"--screenshot-quality / AGENT_BROWSER_SCREENSHOT_QUALITY",
|
||
"JPEG quality from 0 to 100",
|
||
"agent-browser --allow-file-access open file:///Users/me/report.pdf agent-browser --allow-file-access open file:///path/to/page.html agent-browser screenshot ./local-file.png",
|
||
"--allow-file-access is Chromium-only. It allows file:// pages to load and access other local files through browser APIs such as fetch and XHR.",
|
||
"agent-browser clipboard read agent-browser clipboard write \"Hello, world\" agent-browser clipboard copy agent-browser clipboard paste",
|
||
"copy and paste simulate the platform keyboard shortcuts for the current selection or focused element. Use write when you want to set clipboard text directly."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Files & Clipboard\n\nagent-browser can upload files, capture downloads, read local files through `file://` URLs, write PDFs and screenshots, and interact with the browser clipboard.\n\n## Upload files\n\n```bash\nagent-browser snapshot -i\nagent-browser upload @e4 ./invoice.pdf\nagent-browser upload @e4 ./front.png ./back.png\n```\n\nThe selector must resolve to a file input. Multiple file paths are accepted for multi-file inputs.\n\n## Downloads\n\n```bash\nagent-browser download @e5 ./report.csv\nagent-browser wait --download ./archive.zip --timeout 30000\n```\n\nUse `download` when a specific element triggers the download. Use `wait --download` when another action starts the download and you need to wait for completion.\n\nSet a default download directory for browser-initiated downloads:\n\n```bash\nagent-browser --download-path ./downloads open https://app.example.com\n```\n\nWithout `--download-path`, downloads go to a temporary directory that is cleaned up when the browser closes.\n\n## Screenshots and PDFs\n\n```bash\nagent-browser screenshot ./page.png\nagent-browser screenshot --full ./page-full.png\nagent-browser screenshot --if-changed\nagent-browser screenshot --threshold 0.01\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80 ./page.jpg\nagent-browser pdf ./page.pdf\n```\n\nPrefer `--if-changed` for repeated captures: skipping unchanged images is the most token-efficient option. History is per tab and capture scope. The first capture returns a path; later unchanged captures omit it. JSON includes `changed`, `revision`, and `pixelChangeRatio`. `--threshold <0-1>` implies `--if-changed` and treats changes at or below that ratio as unchanged.\n\nScreenshot defaults can also be configured with:\n\n<table>\n <thead>\n <tr><th>Setting</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--screenshot-dir</code> / <code>AGENT_BROWSER_SCREENSHOT_DIR</code></td><td>Default screenshot output directory</td></tr>\n <tr><td><code>--screenshot-format</code> / <code>AGENT_BROWSER_SCREENSHOT_FORMAT</code></td><td><code>png</code> or <code>jpeg</code></td></tr>\n <tr><td><code>--screenshot-quality</code> / <code>AGENT_BROWSER_SCREENSHOT_QUALITY</code></td><td>JPEG quality from 0 to 100</td></tr>\n </tbody>\n</table>\n\n## Local files\n\n```bash\nagent-browser --allow-file-access open file:///Users/me/report.pdf\nagent-browser --allow-file-access open file:///path/to/page.html\nagent-browser screenshot ./local-file.png\n```\n\n`--allow-file-access` is Chromium-only. It allows `file://` pages to load and access other local files through browser APIs such as `fetch` and XHR.\n\n## Clipboard\n\n```bash\nagent-browser clipboard read\nagent-browser clipboard write \"Hello, world\"\nagent-browser clipboard copy\nagent-browser clipboard paste\n```\n\n`copy` and `paste` simulate the platform keyboard shortcuts for the current selection or focused element. Use `write` when you want to set clipboard text directly.",
|
||
"legacyMarkdownSha256": "9285511872dc9a5b5f568aa6269373cb74cad7c17db6c46affd5df22b1083b66",
|
||
"modernMarkdown": "# Files & Clipboard\n\nagent-browser can upload files, capture downloads, read local files through `file://` URLs, write PDFs and screenshots, and interact with the browser clipboard.\n\n## Upload files\n\n```bash\nagent-browser snapshot -i\nagent-browser upload @e4 ./invoice.pdf\nagent-browser upload @e4 ./front.png ./back.png\n```\n\nThe selector must resolve to a file input. Multiple file paths are accepted for multi-file inputs.\n\n## Downloads\n\n```bash\nagent-browser download @e5 ./report.csv\nagent-browser wait --download ./archive.zip --timeout 30000\n```\n\nUse `download` when a specific element triggers the download. Use `wait --download` when another action starts the download and you need to wait for completion.\n\nSet a default download directory for browser-initiated downloads:\n\n```bash\nagent-browser --download-path ./downloads open https://app.example.com\n```\n\nWithout `--download-path`, downloads go to a temporary directory that is cleaned up when the browser closes.\n\n## Screenshots and PDFs\n\n```bash\nagent-browser screenshot ./page.png\nagent-browser screenshot --full ./page-full.png\nagent-browser screenshot --if-changed\nagent-browser screenshot --threshold 0.01\nagent-browser screenshot --screenshot-format jpeg --screenshot-quality 80 ./page.jpg\nagent-browser pdf ./page.pdf\n```\n\nPrefer `--if-changed` for repeated captures: skipping unchanged images is the most token-efficient option. History is per tab and capture scope. The first capture returns a path; later unchanged captures omit it. JSON includes `changed`, `revision`, and `pixelChangeRatio`. `--threshold <0-1>` implies `--if-changed` and treats changes at or below that ratio as unchanged.\n\nScreenshot defaults can also be configured with:\n\n<table>\n <thead>\n <tr><th>Setting</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--screenshot-dir</code> / <code>AGENT_BROWSER_SCREENSHOT_DIR</code></td><td>Default screenshot output directory</td></tr>\n <tr><td><code>--screenshot-format</code> / <code>AGENT_BROWSER_SCREENSHOT_FORMAT</code></td><td><code>png</code> or <code>jpeg</code></td></tr>\n <tr><td><code>--screenshot-quality</code> / <code>AGENT_BROWSER_SCREENSHOT_QUALITY</code></td><td>JPEG quality from 0 to 100</td></tr>\n </tbody>\n</table>\n\n## Local files\n\n```bash\nagent-browser --allow-file-access open file:///Users/me/report.pdf\nagent-browser --allow-file-access open file:///path/to/page.html\nagent-browser screenshot ./local-file.png\n```\n\n`--allow-file-access` is Chromium-only. It allows `file://` pages to load and access other local files through browser APIs such as `fetch` and XHR.\n\n## Clipboard\n\n```bash\nagent-browser clipboard read\nagent-browser clipboard write \"Hello, world\"\nagent-browser clipboard copy\nagent-browser clipboard paste\n```\n\n`copy` and `paste` simulate the platform keyboard shortcuts for the current selection or focused element. Use `write` when you want to set clipboard text directly.",
|
||
"modernMarkdownSha256": "9285511872dc9a5b5f568aa6269373cb74cad7c17db6c46affd5df22b1083b66",
|
||
"navigation": {
|
||
"title": "Files & Clipboard",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/init-scripts",
|
||
"source": "docs/src/app/init-scripts/page.mdx",
|
||
"layout": "docs/src/app/init-scripts/layout.tsx",
|
||
"sourceSha256": "035caf5a8f503e03c1ca13493a4bd3372827210c243ab875b8bf01d5366dd647",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Init Scripts & Extensions\n",
|
||
"markdownTitle": "Init Scripts & Extensions",
|
||
"title": "Init Scripts | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Init Scripts | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Init Scripts - agent-browser",
|
||
"twitterTitle": "Init Scripts | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Init Scripts & Extensions",
|
||
"id": "init-scripts-extensions"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Launch-time scripts",
|
||
"id": "launch-time-scripts"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Built-in scripts",
|
||
"id": "built-in-scripts"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Runtime scripts",
|
||
"id": "runtime-scripts"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Pre-navigation setup",
|
||
"id": "pre-navigation-setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Extensions",
|
||
"id": "extensions"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Safety",
|
||
"id": "safety"
|
||
}
|
||
],
|
||
"content": [
|
||
"Init scripts run before page JavaScript. Use them to install hooks, polyfills, instrumentation, or test helpers before the first navigation.",
|
||
"agent-browser --init-script ./instrumentation.js open https://example.com agent-browser --init-script ./a.js --init-script ./b.js open https://example.com",
|
||
"You can also configure scripts with an environment variable:",
|
||
"export AGENT_BROWSER_INIT_SCRIPTS=\"./a.js,./b.js\" agent-browser open https://example.com",
|
||
"Launch-time scripts are applied when the browser starts. If the daemon is already running, close it before changing launch-time script options.",
|
||
"agent-browser --enable react-devtools open http://localhost:3000",
|
||
"react-devtools is the built-in feature currently available. It installs the React DevTools hook before application code runs and is required for react tree, react inspect, react renders, and react suspense.",
|
||
"agent-browser addinitscript \"window.__testMode = true\" # Returns an identifier agent-browser removeinitscript <identifier>",
|
||
"Runtime init scripts are useful after a session has started. They are still init scripts, so they affect future documents and navigations rather than rewriting already-executed page code.",
|
||
"Runtime init-script identifiers are session-wide. removeinitscript removes the script from every open tab where it was registered and prevents it from being replayed into tabs opened later.",
|
||
"For flows that need routes, cookies, or scripts installed before the first real navigation, start the browser without a URL:",
|
||
"agent-browser batch \\ '[\"open\"]' \\ '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\ '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\ '[\"navigate\",\"http://localhost:3000/target\"]'",
|
||
"open with no URL launches the browser on about:blank, leaving room to stage state before the target page loads.",
|
||
"agent-browser --extension ./extension open https://example.com agent-browser --extension ./a --extension ./b open https://example.com",
|
||
"Extensions are launch-time options. They require a local Chromium-based browser and are not supported with CDP connections, cloud providers, or Lightpanda.",
|
||
"Init scripts and extensions run with high privilege in the page context. Only load scripts and extension directories from trusted local paths."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Init Scripts & Extensions\n\nInit scripts run before page JavaScript. Use them to install hooks, polyfills, instrumentation, or test helpers before the first navigation.\n\n## Launch-time scripts\n\n```bash\nagent-browser --init-script ./instrumentation.js open https://example.com\nagent-browser --init-script ./a.js --init-script ./b.js open https://example.com\n```\n\nYou can also configure scripts with an environment variable:\n\n```bash\nagent-browser open https://example.com\n```\n\nLaunch-time scripts are applied when the browser starts. If the daemon is already running, close it before changing launch-time script options.\n\n## Built-in scripts\n\n```bash\nagent-browser --enable react-devtools open http://localhost:3000\n```\n\n`react-devtools` is the built-in feature currently available. It installs the React DevTools hook before application code runs and is required for `react tree`, `react inspect`, `react renders`, and `react suspense`.\n\n## Runtime scripts\n\n```bash\nagent-browser addinitscript \"window.__testMode = true\"\n# Returns an identifier\n\nagent-browser removeinitscript <identifier>\n```\n\nRuntime init scripts are useful after a session has started. They are still init scripts, so they affect future documents and navigations rather than rewriting already-executed page code.\n\nRuntime init-script identifiers are session-wide. `removeinitscript` removes the script from every open tab where it was registered and prevents it from being replayed into tabs opened later.\n\n## Pre-navigation setup\n\nFor flows that need routes, cookies, or scripts installed before the first real navigation, start the browser without a URL:\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\n`open` with no URL launches the browser on `about:blank`, leaving room to stage state before the target page loads.\n\n## Extensions\n\n```bash\nagent-browser --extension ./extension open https://example.com\nagent-browser --extension ./a --extension ./b open https://example.com\n```\n\nExtensions are launch-time options. They require a local Chromium-based browser and are not supported with CDP connections, cloud providers, or Lightpanda.\n\n## Safety\n\nInit scripts and extensions run with high privilege in the page context. Only load scripts and extension directories from trusted local paths.",
|
||
"legacyMarkdownSha256": "652317f90e44e814521d68973c80603c817fe983039dcef7f4a8af77efb32ec0",
|
||
"modernMarkdown": "# Init Scripts & Extensions\n\nInit scripts run before page JavaScript. Use them to install hooks, polyfills, instrumentation, or test helpers before the first navigation.\n\n## Launch-time scripts\n\n```bash\nagent-browser --init-script ./instrumentation.js open https://example.com\nagent-browser --init-script ./a.js --init-script ./b.js open https://example.com\n```\n\nYou can also configure scripts with an environment variable:\n\n```bash\nexport AGENT_BROWSER_INIT_SCRIPTS=\"./a.js,./b.js\"\nagent-browser open https://example.com\n```\n\nLaunch-time scripts are applied when the browser starts. If the daemon is already running, close it before changing launch-time script options.\n\n## Built-in scripts\n\n```bash\nagent-browser --enable react-devtools open http://localhost:3000\n```\n\n`react-devtools` is the built-in feature currently available. It installs the React DevTools hook before application code runs and is required for `react tree`, `react inspect`, `react renders`, and `react suspense`.\n\n## Runtime scripts\n\n```bash\nagent-browser addinitscript \"window.__testMode = true\"\n# Returns an identifier\n\nagent-browser removeinitscript <identifier>\n```\n\nRuntime init scripts are useful after a session has started. They are still init scripts, so they affect future documents and navigations rather than rewriting already-executed page code.\n\nRuntime init-script identifiers are session-wide. `removeinitscript` removes the script from every open tab where it was registered and prevents it from being replayed into tabs opened later.\n\n## Pre-navigation setup\n\nFor flows that need routes, cookies, or scripts installed before the first real navigation, start the browser without a URL:\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"cookies\",\"set\",\"--curl\",\"cookies.curl\",\"--domain\",\"localhost\"]' \\\n '[\"navigate\",\"http://localhost:3000/target\"]'\n```\n\n`open` with no URL launches the browser on `about:blank`, leaving room to stage state before the target page loads.\n\n## Extensions\n\n```bash\nagent-browser --extension ./extension open https://example.com\nagent-browser --extension ./a --extension ./b open https://example.com\n```\n\nExtensions are launch-time options. They require a local Chromium-based browser and are not supported with CDP connections, cloud providers, or Lightpanda.\n\n## Safety\n\nInit scripts and extensions run with high privilege in the page context. Only load scripts and extension directories from trusted local paths.",
|
||
"modernMarkdownSha256": "3f0f4133209f56a4a5a60a86769f0d432b89f6e891af59b971bbb93390b10f9f",
|
||
"navigation": {
|
||
"title": "Init Scripts",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/installation",
|
||
"source": "docs/src/app/installation/page.mdx",
|
||
"layout": "docs/src/app/installation/layout.tsx",
|
||
"sourceSha256": "2814c86965a6635d4eee08e4e5f522bf568e2f60e278656d6c1c89486a82ed45",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Installation\n",
|
||
"markdownTitle": "Installation",
|
||
"title": "Installation | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Installation | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Installation - agent-browser",
|
||
"twitterTitle": "Installation | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Installation",
|
||
"id": "installation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Global installation (recommended)",
|
||
"id": "global-installation-recommended"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Quick start (no install)",
|
||
"id": "quick-start-no-install"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Project installation (local dependency)",
|
||
"id": "project-installation-local-dependency"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Homebrew (macOS)",
|
||
"id": "homebrew-macos"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Cargo (Rust)",
|
||
"id": "cargo-rust"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "From source",
|
||
"id": "from-source"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Windows browser sessions",
|
||
"id": "windows-browser-sessions"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Linux dependencies",
|
||
"id": "linux-dependencies"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Updating",
|
||
"id": "updating"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Doctor",
|
||
"id": "doctor"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Custom browser",
|
||
"id": "custom-browser"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Serverless example",
|
||
"id": "serverless-example"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "AI agent setup",
|
||
"id": "ai-agent-setup"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "AI coding assistants (recommended)",
|
||
"id": "ai-coding-assistants-recommended"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "AGENTS.md / CLAUDE.md",
|
||
"id": "agentsmd-claudemd"
|
||
}
|
||
],
|
||
"content": [
|
||
"Installs the native Rust binary for maximum performance:",
|
||
"npm install -g agent-browser agent-browser install # Download Chrome from Chrome for Testing (first time)",
|
||
"This is the fastest option -- commands run through the native Rust CLI directly with sub-millisecond parsing overhead.",
|
||
"npx agent-browser install # Download Chrome (first time only) npx agent-browser open example.com",
|
||
"For projects that want to pin the version in package.json:",
|
||
"npm install agent-browser npx agent-browser install # Download Chrome (first time)",
|
||
"Then use via npx or package.json scripts.",
|
||
"brew install agent-browser agent-browser install # Download Chrome (first time)",
|
||
"cargo install agent-browser agent-browser install # Download Chrome (first time)",
|
||
"Compiles from source (~2-3 min). Requires Node.js 24+, pnpm 11+, and the Rust toolchain (rustup.rs).",
|
||
"git clone https://github.com/vercel-labs/agent-browser cd agent-browser pnpm install pnpm build pnpm build:native ./bin/agent-browser install pnpm link --global",
|
||
"Headless Chrome runs on a private Windows desktop. This prevents hidden browser windows from leaving visible rectangles on your desktop, including with affected Chrome 150 builds. It applies to bundled and custom Chrome executables and to windows created later in the session. Automation, screenshots, and GPU rendering continue through CDP.",
|
||
"Use --headed to show Chrome on the interactive desktop. Sessions with extensions also use the interactive desktop. Agent-browser owns the Chrome processes it launches: Windows terminates the entire Chrome tree when its daemon exits or is forcibly killed. Browsers attached with --cdp or --auto-connect remain externally owned.",
|
||
"On Linux, install system dependencies:",
|
||
"agent-browser install --with-deps",
|
||
"This exits nonzero if the package manager cannot install every required browser library.",
|
||
"Upgrade to the latest version:",
|
||
"agent-browser upgrade",
|
||
"Detects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command automatically. Displays the version change on success, or informs you if you are already on the latest version.",
|
||
"doctor diagnoses your install and auto-cleans stale daemon files. Run it whenever something stops working unexpectedly, or after upgrades:",
|
||
"agent-browser doctor # Full diagnosis agent-browser doctor --offline --quick # Local-only, fastest (~<1s) agent-browser doctor --fix # Also run destructive repairs agent-browser doctor --webgpu # Also run a live WebGPU render probe agent-browser doctor --json # Structured output",
|
||
"It checks:",
|
||
"Category",
|
||
"What it checks",
|
||
"Environment",
|
||
"CLI version, platform, home directory, state and socket dirs, free disk space",
|
||
"Chrome",
|
||
"Chrome install path and version, cache dir, Puppeteer fallback, user-data dir and profile count, optional lightpanda engine",
|
||
"Daemons",
|
||
"Running daemons per session, stale .sock / .pid / .version / .stream files (auto-cleaned), version mismatch with the CLI, dashboard process liveness",
|
||
"Config",
|
||
"~/.agent-browser/config.json, ./agent-browser.json, and any file at AGENT_BROWSER_CONFIG parse as valid JSON",
|
||
"Security",
|
||
"Encryption key env var or ~/.agent-browser/.encryption-key (with 0600 permissions on unix), state file count and age vs AGENT_BROWSER_STATE_EXPIRE_DAYS, action policy file",
|
||
"Providers",
|
||
"Env vars for Browserless, Browserbase, Browser Use, Kernel, AgentCore (AWS creds), Appium (for --provider ios), and AI_GATEWAY_API_KEY for chat",
|
||
"Network",
|
||
"Reachability of the Chrome for Testing CDN, AI Gateway (if configured), and any currently selected provider endpoint (skipped under --offline)",
|
||
"Launch test",
|
||
"Spawns a scratch session, launches headless Chrome, navigates to about:blank, then closes. Measures wall time (skipped under --quick)",
|
||
"WebGPU probe",
|
||
"Opt-in via --webgpu: launches a scratch session with the WebGPU preset, renders through a real WebGPU pass, and pixel-checks both an offscreen readback and a decoded screenshot. Add --headed to validate the headed/Xvfb capture path",
|
||
"Stale sidecar files are always cleaned. Destructive actions are opt-in via --fix:",
|
||
"Check",
|
||
"What --fix does",
|
||
"Chrome missing",
|
||
"Runs agent-browser install",
|
||
"Version-mismatched daemons",
|
||
"Sends close to each and cleans files",
|
||
"Old state files",
|
||
"Deletes state files older than AGENT_BROWSER_STATE_EXPIRE_DAYS (default 30)",
|
||
"Missing encryption key",
|
||
"Generates a new key at ~/.agent-browser/.encryption-key (0600, unix); never overwrites an existing key",
|
||
"Exit code is 0 if all checks pass (warnings are fine), 1 if any fail.",
|
||
"Use a custom browser executable instead of bundled Chromium:",
|
||
"Serverless - Use @sparticuz/chromium (~50MB vs ~684MB)",
|
||
"System browser - Use existing Chrome installation",
|
||
"Custom builds - Use modified browser builds",
|
||
"# Via flag agent-browser --executable-path /path/to/chromium open example.com # Via environment variable AGENT_BROWSER_EXECUTABLE_PATH=/path/to/chromium agent-browser open example.com",
|
||
"Use @sparticuz/chromium or similar to obtain a Chromium executable path, then pass it via --executable-path or AGENT_BROWSER_EXECUTABLE_PATH.",
|
||
"agent-browser works with any AI agent out of the box. For richer context:",
|
||
"Install the skill for your AI coding assistant:",
|
||
"npx skills add vercel-labs/agent-browser",
|
||
"This works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode, and Windsurf. The skill is fetched from the repository and stays up to date automatically.",
|
||
"Do not copy SKILL.md from node_modules -- it will become stale as new features are added. Always use npx skills add or reference the repository version.",
|
||
"Add to your instructions file:",
|
||
"## Browser Automation Use `agent-browser` for web automation. Run `agent-browser --help` for all commands. Core workflow: 1. `agent-browser open <url>` - Navigate to page 2. `agent-browser snapshot -i` - Get interactive elements with refs (@e1, @e2) 3. `agent-browser click @e1` / `fill @e2 \"text\"` - Interact using refs 4. Re-snapshot after page changes"
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://rustup.rs",
|
||
"text": "rustup.rs"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Installation\n\n## Global installation (recommended)\n\nInstalls the native Rust binary for maximum performance:\n\n```bash\nnpm install -g agent-browser\nagent-browser install # Download Chrome from Chrome for Testing (first time)\n```\n\nThis is the fastest option -- commands run through the native Rust CLI directly with sub-millisecond parsing overhead.\n\n## Quick start (no install)\n\n```bash\nnpx agent-browser install # Download Chrome (first time only)\nnpx agent-browser open example.com\n```\n\n## Project installation (local dependency)\n\nFor projects that want to pin the version in `package.json`:\n\n```bash\nnpm install agent-browser\nnpx agent-browser install # Download Chrome (first time)\n```\n\nThen use via `npx` or `package.json` scripts.\n\n## Homebrew (macOS)\n\n```bash\nbrew install agent-browser\nagent-browser install # Download Chrome (first time)\n```\n\n## Cargo (Rust)\n\n```bash\ncargo install agent-browser\nagent-browser install # Download Chrome (first time)\n```\n\nCompiles from source (~2-3 min). Requires Node.js 24+, pnpm 11+, and the Rust toolchain ([rustup.rs](https://rustup.rs)).\n\n## From source\n\n```bash\ngit clone https://github.com/vercel-labs/agent-browser\ncd agent-browser\npnpm install\npnpm build\npnpm build:native\n./bin/agent-browser install\npnpm link --global\n```\n\n## Windows browser sessions\n\nHeadless Chrome runs on a private Windows desktop. This prevents hidden browser windows from leaving visible rectangles on your desktop, including with affected Chrome 150 builds. It applies to bundled and custom Chrome executables and to windows created later in the session. Automation, screenshots, and GPU rendering continue through CDP.\n\nUse `--headed` to show Chrome on the interactive desktop. Sessions with extensions also use the interactive desktop. Agent-browser owns the Chrome processes it launches: Windows terminates the entire Chrome tree when its daemon exits or is forcibly killed. Browsers attached with `--cdp` or `--auto-connect` remain externally owned.\n\n## Linux dependencies\n\nOn Linux, install system dependencies:\n\n```bash\nagent-browser install --with-deps\n```\n\nThis exits nonzero if the package manager cannot install every required browser library.\n\n## Updating\n\nUpgrade to the latest version:\n\n```bash\nagent-browser upgrade\n```\n\nDetects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command automatically. Displays the version change on success, or informs you if you are already on the latest version.\n\n## Doctor\n\n`doctor` diagnoses your install and auto-cleans stale daemon files. Run it whenever something stops working unexpectedly, or after upgrades:\n\n```bash\nagent-browser doctor # Full diagnosis\nagent-browser doctor --offline --quick # Local-only, fastest (~<1s)\nagent-browser doctor --fix # Also run destructive repairs\nagent-browser doctor --webgpu # Also run a live WebGPU render probe\nagent-browser doctor --json # Structured output\n```\n\nIt checks:\n\n<table>\n<thead>\n<tr><th>Category</th><th>What it checks</th></tr>\n</thead>\n<tbody>\n<tr><td>Environment</td><td>CLI version, platform, home directory, state and socket dirs, free disk space</td></tr>\n<tr><td>Chrome</td><td>Chrome install path and version, cache dir, Puppeteer fallback, user-data dir and profile count, optional <code>lightpanda</code> engine</td></tr>\n<tr><td>Daemons</td><td>Running daemons per session, stale <code>.sock</code> / <code>.pid</code> / <code>.version</code> / <code>.stream</code> files (auto-cleaned), version mismatch with the CLI, dashboard process liveness</td></tr>\n<tr><td>Config</td><td><code>~/.agent-browser/config.json</code>, <code>./agent-browser.json</code>, and any file at <code>AGENT_BROWSER_CONFIG</code> parse as valid JSON</td></tr>\n<tr><td>Security</td><td>Encryption key env var or <code>~/.agent-browser/.encryption-key</code> (with 0600 permissions on unix), state file count and age vs <code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code>, action policy file</td></tr>\n<tr><td>Providers</td><td>Env vars for Browserless, Browserbase, Browser Use, Kernel, AgentCore (AWS creds), Appium (for <code>--provider ios</code>), and <code>AI_GATEWAY_API_KEY</code> for chat</td></tr>\n<tr><td>Network</td><td>Reachability of the Chrome for Testing CDN, AI Gateway (if configured), and any currently selected provider endpoint (skipped under <code>--offline</code>)</td></tr>\n<tr><td>Launch test</td><td>Spawns a scratch session, launches headless Chrome, navigates to <code>about:blank</code>, then closes. Measures wall time (skipped under <code>--quick</code>)</td></tr>\n<tr><td>WebGPU probe</td><td>Opt-in via <code>--webgpu</code>: launches a scratch session with the <a href=\"/webgpu\">WebGPU preset</a>, renders through a real WebGPU pass, and pixel-checks both an offscreen readback and a decoded screenshot. Add <code>--headed</code> to validate the headed/Xvfb capture path</td></tr>\n</tbody>\n</table>\n\nStale sidecar files are always cleaned. Destructive actions are opt-in via `--fix`:\n\n<table>\n<thead>\n<tr><th>Check</th><th>What <code>--fix</code> does</th></tr>\n</thead>\n<tbody>\n<tr><td>Chrome missing</td><td>Runs <code>agent-browser install</code></td></tr>\n<tr><td>Version-mismatched daemons</td><td>Sends <code>close</code> to each and cleans files</td></tr>\n<tr><td>Old state files</td><td>Deletes state files older than <code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code> (default 30)</td></tr>\n<tr><td>Missing encryption key</td><td>Generates a new key at <code>~/.agent-browser/.encryption-key</code> (0600, unix); never overwrites an existing key</td></tr>\n</tbody>\n</table>\n\nExit code is `0` if all checks pass (warnings are fine), `1` if any fail.\n\n## Custom browser\n\nUse a custom browser executable instead of bundled Chromium:\n\n- **Serverless** - Use `@sparticuz/chromium` (~50MB vs ~684MB)\n- **System browser** - Use existing Chrome installation\n- **Custom builds** - Use modified browser builds\n\n```bash\n# Via flag\nagent-browser --executable-path /path/to/chromium open example.com\n\n# Via environment variable\nAGENT_BROWSER_EXECUTABLE_PATH=/path/to/chromium agent-browser open example.com\n```\n\n### Serverless example\n\nUse `@sparticuz/chromium` or similar to obtain a Chromium executable path, then pass it via `--executable-path` or `AGENT_BROWSER_EXECUTABLE_PATH`.\n\n## AI agent setup\n\nagent-browser works with any AI agent out of the box. For richer context:\n\n### AI coding assistants (recommended)\n\nInstall the skill for your AI coding assistant:\n\n```bash\nnpx skills add vercel-labs/agent-browser\n```\n\nThis works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode, and Windsurf. The skill is fetched from the repository and stays up to date automatically.\n\n> **Do not** copy `SKILL.md` from `node_modules` -- it will become stale as new features are added. Always use `npx skills add` or reference the repository version.\n\n### AGENTS.md / CLAUDE.md\n\nAdd to your instructions file:\n\n```markdown\n## Browser Automation\n\nUse `agent-browser` for web automation. Run `agent-browser --help` for all commands.\n\nCore workflow:\n1. `agent-browser open <url>` - Navigate to page\n2. `agent-browser snapshot -i` - Get interactive elements with refs (@e1, @e2)\n3. `agent-browser click @e1` / `fill @e2 \"text\"` - Interact using refs\n4. Re-snapshot after page changes\n```",
|
||
"legacyMarkdownSha256": "e3181f8147de61941bd4625aca38035448b10879c570e2bd2d0441955523265b",
|
||
"modernMarkdown": "# Installation\n\n## Global installation (recommended)\n\nInstalls the native Rust binary for maximum performance:\n\n```bash\nnpm install -g agent-browser\nagent-browser install # Download Chrome from Chrome for Testing (first time)\n```\n\nThis is the fastest option -- commands run through the native Rust CLI directly with sub-millisecond parsing overhead.\n\n## Quick start (no install)\n\n```bash\nnpx agent-browser install # Download Chrome (first time only)\nnpx agent-browser open example.com\n```\n\n## Project installation (local dependency)\n\nFor projects that want to pin the version in `package.json`:\n\n```bash\nnpm install agent-browser\nnpx agent-browser install # Download Chrome (first time)\n```\n\nThen use via `npx` or `package.json` scripts.\n\n## Homebrew (macOS)\n\n```bash\nbrew install agent-browser\nagent-browser install # Download Chrome (first time)\n```\n\n## Cargo (Rust)\n\n```bash\ncargo install agent-browser\nagent-browser install # Download Chrome (first time)\n```\n\nCompiles from source (~2-3 min). Requires Node.js 24+, pnpm 11+, and the Rust toolchain ([rustup.rs](https://rustup.rs)).\n\n## From source\n\n```bash\ngit clone https://github.com/vercel-labs/agent-browser\ncd agent-browser\npnpm install\npnpm build\npnpm build:native\n./bin/agent-browser install\npnpm link --global\n```\n\n## Windows browser sessions\n\nHeadless Chrome runs on a private Windows desktop. This prevents hidden browser windows from leaving visible rectangles on your desktop, including with affected Chrome 150 builds. It applies to bundled and custom Chrome executables and to windows created later in the session. Automation, screenshots, and GPU rendering continue through CDP.\n\nUse `--headed` to show Chrome on the interactive desktop. Sessions with extensions also use the interactive desktop. Agent-browser owns the Chrome processes it launches: Windows terminates the entire Chrome tree when its daemon exits or is forcibly killed. Browsers attached with `--cdp` or `--auto-connect` remain externally owned.\n\n## Linux dependencies\n\nOn Linux, install system dependencies:\n\n```bash\nagent-browser install --with-deps\n```\n\nThis exits nonzero if the package manager cannot install every required browser library.\n\n## Updating\n\nUpgrade to the latest version:\n\n```bash\nagent-browser upgrade\n```\n\nDetects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command automatically. Displays the version change on success, or informs you if you are already on the latest version.\n\n## Doctor\n\n`doctor` diagnoses your install and auto-cleans stale daemon files. Run it whenever something stops working unexpectedly, or after upgrades:\n\n```bash\nagent-browser doctor # Full diagnosis\nagent-browser doctor --offline --quick # Local-only, fastest (~<1s)\nagent-browser doctor --fix # Also run destructive repairs\nagent-browser doctor --webgpu # Also run a live WebGPU render probe\nagent-browser doctor --json # Structured output\n```\n\nIt checks:\n\n<table>\n<thead>\n<tr><th>Category</th><th>What it checks</th></tr>\n</thead>\n<tbody>\n<tr><td>Environment</td><td>CLI version, platform, home directory, state and socket dirs, free disk space</td></tr>\n<tr><td>Chrome</td><td>Chrome install path and version, cache dir, Puppeteer fallback, user-data dir and profile count, optional <code>lightpanda</code> engine</td></tr>\n<tr><td>Daemons</td><td>Running daemons per session, stale <code>.sock</code> / <code>.pid</code> / <code>.version</code> / <code>.stream</code> files (auto-cleaned), version mismatch with the CLI, dashboard process liveness</td></tr>\n<tr><td>Config</td><td><code>~/.agent-browser/config.json</code>, <code>./agent-browser.json</code>, and any file at <code>AGENT_BROWSER_CONFIG</code> parse as valid JSON</td></tr>\n<tr><td>Security</td><td>Encryption key env var or <code>~/.agent-browser/.encryption-key</code> (with 0600 permissions on unix), state file count and age vs <code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code>, action policy file</td></tr>\n<tr><td>Providers</td><td>Env vars for Browserless, Browserbase, Browser Use, Kernel, AgentCore (AWS creds), Appium (for <code>--provider ios</code>), and <code>AI_GATEWAY_API_KEY</code> for chat</td></tr>\n<tr><td>Network</td><td>Reachability of the Chrome for Testing CDN, AI Gateway (if configured), and any currently selected provider endpoint (skipped under <code>--offline</code>)</td></tr>\n<tr><td>Launch test</td><td>Spawns a scratch session, launches headless Chrome, navigates to <code>about:blank</code>, then closes. Measures wall time (skipped under <code>--quick</code>)</td></tr>\n<tr><td>WebGPU probe</td><td>Opt-in via <code>--webgpu</code>: launches a scratch session with the <a href=\"/webgpu\">WebGPU preset</a>, renders through a real WebGPU pass, and pixel-checks both an offscreen readback and a decoded screenshot. Add <code>--headed</code> to validate the headed/Xvfb capture path</td></tr>\n</tbody>\n</table>\n\nStale sidecar files are always cleaned. Destructive actions are opt-in via `--fix`:\n\n<table>\n<thead>\n<tr><th>Check</th><th>What <code>--fix</code> does</th></tr>\n</thead>\n<tbody>\n<tr><td>Chrome missing</td><td>Runs <code>agent-browser install</code></td></tr>\n<tr><td>Version-mismatched daemons</td><td>Sends <code>close</code> to each and cleans files</td></tr>\n<tr><td>Old state files</td><td>Deletes state files older than <code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code> (default 30)</td></tr>\n<tr><td>Missing encryption key</td><td>Generates a new key at <code>~/.agent-browser/.encryption-key</code> (0600, unix); never overwrites an existing key</td></tr>\n</tbody>\n</table>\n\nExit code is `0` if all checks pass (warnings are fine), `1` if any fail.\n\n## Custom browser\n\nUse a custom browser executable instead of bundled Chromium:\n\n- **Serverless** - Use `@sparticuz/chromium` (~50MB vs ~684MB)\n- **System browser** - Use existing Chrome installation\n- **Custom builds** - Use modified browser builds\n\n```bash\n# Via flag\nagent-browser --executable-path /path/to/chromium open example.com\n\n# Via environment variable\nAGENT_BROWSER_EXECUTABLE_PATH=/path/to/chromium agent-browser open example.com\n```\n\n### Serverless example\n\nUse `@sparticuz/chromium` or similar to obtain a Chromium executable path, then pass it via `--executable-path` or `AGENT_BROWSER_EXECUTABLE_PATH`.\n\n## AI agent setup\n\nagent-browser works with any AI agent out of the box. For richer context:\n\n### AI coding assistants (recommended)\n\nInstall the skill for your AI coding assistant:\n\n```bash\nnpx skills add vercel-labs/agent-browser\n```\n\nThis works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode, and Windsurf. The skill is fetched from the repository and stays up to date automatically.\n\n> **Do not** copy `SKILL.md` from `node_modules` -- it will become stale as new features are added. Always use `npx skills add` or reference the repository version.\n\n### AGENTS.md / CLAUDE.md\n\nAdd to your instructions file:\n\n```markdown\n## Browser Automation\n\nUse `agent-browser` for web automation. Run `agent-browser --help` for all commands.\n\nCore workflow:\n1. `agent-browser open <url>` - Navigate to page\n2. `agent-browser snapshot -i` - Get interactive elements with refs (@e1, @e2)\n3. `agent-browser click @e1` / `fill @e2 \"text\"` - Interact using refs\n4. Re-snapshot after page changes\n```",
|
||
"modernMarkdownSha256": "e3181f8147de61941bd4625aca38035448b10879c570e2bd2d0441955523265b",
|
||
"navigation": {
|
||
"title": "Installation",
|
||
"section": ""
|
||
}
|
||
},
|
||
{
|
||
"path": "/ios",
|
||
"source": "docs/src/app/ios/page.mdx",
|
||
"layout": "docs/src/app/ios/layout.tsx",
|
||
"sourceSha256": "ca3908a6e7159347d4bb94514334e67d35221994ea4eae52c1d58a345eeb1092",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# iOS Simulator\n",
|
||
"markdownTitle": "iOS Simulator",
|
||
"title": "iOS Simulator | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "iOS Simulator | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "iOS Simulator - agent-browser",
|
||
"twitterTitle": "iOS Simulator | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "iOS Simulator",
|
||
"id": "ios-simulator"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Requirements",
|
||
"id": "requirements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "List available devices",
|
||
"id": "list-available-devices"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Basic usage",
|
||
"id": "basic-usage"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Mobile-specific commands",
|
||
"id": "mobile-specific-commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Environment variables",
|
||
"id": "environment-variables"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Supported devices",
|
||
"id": "supported-devices"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Real device support",
|
||
"id": "real-device-support"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "1. Get your device UDID",
|
||
"id": "1-get-your-device-udid"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "2. Sign WebDriverAgent (one-time)",
|
||
"id": "2-sign-webdriveragent-one-time"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "3. Use with agent-browser",
|
||
"id": "3-use-with-agent-browser"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Real device notes",
|
||
"id": "real-device-notes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Performance notes",
|
||
"id": "performance-notes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Differences from desktop",
|
||
"id": "differences-from-desktop"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Troubleshooting",
|
||
"id": "troubleshooting"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Appium not found",
|
||
"id": "appium-not-found"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "No simulators available",
|
||
"id": "no-simulators-available"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Simulator won't boot",
|
||
"id": "simulator-wont-boot"
|
||
}
|
||
],
|
||
"content": [
|
||
"Control real Mobile Safari in the iOS Simulator for authentic mobile web testing. Uses Appium with XCUITest for native automation.",
|
||
"macOS with Xcode installed",
|
||
"iOS Simulator runtimes (download via Xcode)",
|
||
"Appium with XCUITest driver",
|
||
"# Install Appium globally npm install -g appium # Install the XCUITest driver for iOS appium driver install xcuitest",
|
||
"See all iOS simulators available on your system:",
|
||
"agent-browser device list # Output: # Available iOS Simulators: # # ○ iPhone 16 Pro (iOS 18.0) # F21EEC0D-7618-419F-811B-33AF27A8B2FD # ○ iPhone 16 Pro Max (iOS 18.0) # 50402807-C9B8-4D37-9F13-2E00E782C744 # ○ iPad Pro 13-inch (M4) (iOS 18.0) # 3A6C6436-B909-4593-866D-91D1062BB070 # ...",
|
||
"Use the -p ios flag to enable iOS mode. The workflow is identical to desktop:",
|
||
"# Launch Safari on iPhone 16 Pro agent-browser -p ios --device \"iPhone 16 Pro\" open https://example.com # Get snapshot with refs (same as desktop) agent-browser -p ios snapshot -i # Interact using refs agent-browser -p ios tap @e1 agent-browser -p ios fill @e2 \"text\" # Take screenshot agent-browser -p ios screenshot mobile.png # Close session (shuts down simulator) agent-browser -p ios close",
|
||
"# Swipe gestures agent-browser -p ios swipe up agent-browser -p ios swipe down agent-browser -p ios swipe left agent-browser -p ios swipe right # Swipe with distance (pixels) agent-browser -p ios swipe up 500 # Tap (alias for click, semantically clearer for touch) agent-browser -p ios tap @e1",
|
||
"Configure iOS mode via environment variables:",
|
||
"export AGENT_BROWSER_PROVIDER=ios export AGENT_BROWSER_IOS_DEVICE=\"iPhone 16 Pro\" # Now all commands use iOS agent-browser open https://example.com agent-browser snapshot -i agent-browser tap @e1",
|
||
"Variable",
|
||
"Description",
|
||
"AGENT_BROWSER_PROVIDER",
|
||
"Set to ios to enable iOS mode",
|
||
"AGENT_BROWSER_IOS_DEVICE",
|
||
"Device name (e.g., \"iPhone 16 Pro\")",
|
||
"AGENT_BROWSER_IOS_UDID",
|
||
"Device UDID (alternative to device name)",
|
||
"All iOS Simulators available in Xcode are supported, including:",
|
||
"All iPhone models (iPhone 15, 16, 17, SE, etc.)",
|
||
"All iPad models (iPad Pro, iPad Air, iPad mini, etc.)",
|
||
"Multiple iOS versions (17.x, 18.x, etc.)",
|
||
"Real devices are also supported via USB connection (see below).",
|
||
"Appium can control Safari on real iOS devices connected via USB. This requires additional one-time setup.",
|
||
"# List connected devices xcrun xctrace list devices # Or via system profiler system_profiler SPUSBDataType | grep -A 5 \"iPhone\\|iPad\"",
|
||
"WebDriverAgent needs to be signed with your Apple Developer certificate to run on real devices.",
|
||
"# Open the WebDriverAgent Xcode project cd ~/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent open WebDriverAgent.xcodeproj",
|
||
"In Xcode:",
|
||
"Select the WebDriverAgentRunner target",
|
||
"Go to Signing & Capabilities",
|
||
"Select your Team (requires Apple Developer account, free tier works)",
|
||
"Let Xcode manage signing automatically",
|
||
"# Connect device via USB, then use the UDID agent-browser -p ios --device \"<DEVICE_UDID>\" open https://example.com # Or use the device name if unique agent-browser -p ios --device \"John's iPhone\" open https://example.com",
|
||
"First run installs WebDriverAgent to the device (may require Trust prompt on device)",
|
||
"Device must be unlocked and connected via USB",
|
||
"Slightly slower initial connection than simulator",
|
||
"Tests against real Safari performance and behavior",
|
||
"On first install, go to Settings → General → VPN & Device Management to trust the developer certificate",
|
||
"First launch: Takes 30-60 seconds to boot the simulator and start Appium",
|
||
"Subsequent commands: Fast (simulator stays running)",
|
||
"Close command: Shuts down simulator and Appium server",
|
||
"Feature",
|
||
"Desktop",
|
||
"iOS",
|
||
"Browser",
|
||
"Chrome, Lightpanda",
|
||
"Safari only",
|
||
"Tabs",
|
||
"Supported",
|
||
"Single tab only",
|
||
"PDF export",
|
||
"Not supported",
|
||
"Screencast",
|
||
"Swipe gestures",
|
||
"Not native",
|
||
"Native support",
|
||
"# Make sure Appium is installed globally npm install -g appium appium driver install xcuitest # Verify installation appium --version",
|
||
"Open Xcode and download iOS Simulator runtimes from Settings → Platforms.",
|
||
"Try booting the simulator manually from Xcode or the Simulator app to ensure it works, then retry with agent-browser."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# iOS Simulator\n\nControl real Mobile Safari in the iOS Simulator for authentic mobile web testing. Uses Appium with XCUITest for native automation.\n\n## Requirements\n\n- macOS with Xcode installed\n- iOS Simulator runtimes (download via Xcode)\n- Appium with XCUITest driver\n\n## Setup\n\n```bash\n# Install Appium globally\nnpm install -g appium\n\n# Install the XCUITest driver for iOS\nappium driver install xcuitest\n```\n\n## List available devices\n\nSee all iOS simulators available on your system:\n\n```bash\nagent-browser device list\n\n# Output:\n# Available iOS Simulators:\n#\n# ○ iPhone 16 Pro (iOS 18.0)\n# F21EEC0D-7618-419F-811B-33AF27A8B2FD\n# ○ iPhone 16 Pro Max (iOS 18.0)\n# 50402807-C9B8-4D37-9F13-2E00E782C744\n# ○ iPad Pro 13-inch (M4) (iOS 18.0)\n# 3A6C6436-B909-4593-866D-91D1062BB070\n# ...\n```\n\n## Basic usage\n\nUse the `-p ios` flag to enable iOS mode. The workflow is identical to desktop:\n\n```bash\n# Launch Safari on iPhone 16 Pro\nagent-browser -p ios --device \"iPhone 16 Pro\" open https://example.com\n\n# Get snapshot with refs (same as desktop)\nagent-browser -p ios snapshot -i\n\n# Interact using refs\nagent-browser -p ios tap @e1\nagent-browser -p ios fill @e2 \"text\"\n\n# Take screenshot\nagent-browser -p ios screenshot mobile.png\n\n# Close session (shuts down simulator)\nagent-browser -p ios close\n```\n\n## Mobile-specific commands\n\n```bash\n# Swipe gestures\nagent-browser -p ios swipe up\nagent-browser -p ios swipe down\nagent-browser -p ios swipe left\nagent-browser -p ios swipe right\n\n# Swipe with distance (pixels)\nagent-browser -p ios swipe up 500\n\n# Tap (alias for click, semantically clearer for touch)\nagent-browser -p ios tap @e1\n```\n\n## Environment variables\n\nConfigure iOS mode via environment variables:\n\n```bash\n\n# Now all commands use iOS\nagent-browser open https://example.com\nagent-browser snapshot -i\nagent-browser tap @e1\n```\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_PROVIDER</code></td><td>Set to <code>ios</code> to enable iOS mode</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_DEVICE</code></td><td>Device name (e.g., \"iPhone 16 Pro\")</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_UDID</code></td><td>Device UDID (alternative to device name)</td></tr>\n </tbody>\n</table>\n\n## Supported devices\n\nAll iOS Simulators available in Xcode are supported, including:\n\n- All iPhone models (iPhone 15, 16, 17, SE, etc.)\n- All iPad models (iPad Pro, iPad Air, iPad mini, etc.)\n- Multiple iOS versions (17.x, 18.x, etc.)\n\n**Real devices** are also supported via USB connection (see below).\n\n## Real device support\n\nAppium can control Safari on real iOS devices connected via USB. This requires additional one-time setup.\n\n### 1. Get your device UDID\n\n```bash\n# List connected devices\nxcrun xctrace list devices\n\n# Or via system profiler\nsystem_profiler SPUSBDataType | grep -A 5 \"iPhone\\|iPad\"\n```\n\n### 2. Sign WebDriverAgent (one-time)\n\nWebDriverAgent needs to be signed with your Apple Developer certificate to run on real devices.\n\n```bash\n# Open the WebDriverAgent Xcode project\ncd ~/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent\nopen WebDriverAgent.xcodeproj\n```\n\nIn Xcode:\n\n1. Select the `WebDriverAgentRunner` target\n2. Go to Signing & Capabilities\n3. Select your Team (requires Apple Developer account, free tier works)\n4. Let Xcode manage signing automatically\n\n### 3. Use with agent-browser\n\n```bash\n# Connect device via USB, then use the UDID\nagent-browser -p ios --device \"<DEVICE_UDID>\" open https://example.com\n\n# Or use the device name if unique\nagent-browser -p ios --device \"John's iPhone\" open https://example.com\n```\n\n### Real device notes\n\n- First run installs WebDriverAgent to the device (may require Trust prompt on device)\n- Device must be unlocked and connected via USB\n- Slightly slower initial connection than simulator\n- Tests against real Safari performance and behavior\n- On first install, go to Settings → General → VPN & Device Management to trust the developer certificate\n\n## Performance notes\n\n- **First launch:** Takes 30-60 seconds to boot the simulator and start Appium\n- **Subsequent commands:** Fast (simulator stays running)\n- **Close command:** Shuts down simulator and Appium server\n\n## Differences from desktop\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Desktop</th><th>iOS</th></tr>\n </thead>\n <tbody>\n <tr><td>Browser</td><td>Chrome, Lightpanda</td><td>Safari only</td></tr>\n <tr><td>Tabs</td><td>Supported</td><td>Single tab only</td></tr>\n <tr><td>PDF export</td><td>Supported</td><td>Not supported</td></tr>\n <tr><td>Screencast</td><td>Supported</td><td>Not supported</td></tr>\n <tr><td>Swipe gestures</td><td>Not native</td><td>Native support</td></tr>\n </tbody>\n</table>\n\n## Troubleshooting\n\n### Appium not found\n\n```bash\n# Make sure Appium is installed globally\nnpm install -g appium\nappium driver install xcuitest\n\n# Verify installation\nappium --version\n```\n\n### No simulators available\n\nOpen Xcode and download iOS Simulator runtimes from **Settings → Platforms**.\n\n### Simulator won't boot\n\nTry booting the simulator manually from Xcode or the Simulator app to ensure it works, then retry with agent-browser.",
|
||
"legacyMarkdownSha256": "73b9ab75a4913841e54323ace940f4b181ecf99cf2cb9c0395e01e6ac1a3bc2f",
|
||
"modernMarkdown": "# iOS Simulator\n\nControl real Mobile Safari in the iOS Simulator for authentic mobile web testing. Uses Appium with XCUITest for native automation.\n\n## Requirements\n\n- macOS with Xcode installed\n- iOS Simulator runtimes (download via Xcode)\n- Appium with XCUITest driver\n\n## Setup\n\n```bash\n# Install Appium globally\nnpm install -g appium\n\n# Install the XCUITest driver for iOS\nappium driver install xcuitest\n```\n\n## List available devices\n\nSee all iOS simulators available on your system:\n\n```bash\nagent-browser device list\n\n# Output:\n# Available iOS Simulators:\n#\n# ○ iPhone 16 Pro (iOS 18.0)\n# F21EEC0D-7618-419F-811B-33AF27A8B2FD\n# ○ iPhone 16 Pro Max (iOS 18.0)\n# 50402807-C9B8-4D37-9F13-2E00E782C744\n# ○ iPad Pro 13-inch (M4) (iOS 18.0)\n# 3A6C6436-B909-4593-866D-91D1062BB070\n# ...\n```\n\n## Basic usage\n\nUse the `-p ios` flag to enable iOS mode. The workflow is identical to desktop:\n\n```bash\n# Launch Safari on iPhone 16 Pro\nagent-browser -p ios --device \"iPhone 16 Pro\" open https://example.com\n\n# Get snapshot with refs (same as desktop)\nagent-browser -p ios snapshot -i\n\n# Interact using refs\nagent-browser -p ios tap @e1\nagent-browser -p ios fill @e2 \"text\"\n\n# Take screenshot\nagent-browser -p ios screenshot mobile.png\n\n# Close session (shuts down simulator)\nagent-browser -p ios close\n```\n\n## Mobile-specific commands\n\n```bash\n# Swipe gestures\nagent-browser -p ios swipe up\nagent-browser -p ios swipe down\nagent-browser -p ios swipe left\nagent-browser -p ios swipe right\n\n# Swipe with distance (pixels)\nagent-browser -p ios swipe up 500\n\n# Tap (alias for click, semantically clearer for touch)\nagent-browser -p ios tap @e1\n```\n\n## Environment variables\n\nConfigure iOS mode via environment variables:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=ios\nexport AGENT_BROWSER_IOS_DEVICE=\"iPhone 16 Pro\"\n\n# Now all commands use iOS\nagent-browser open https://example.com\nagent-browser snapshot -i\nagent-browser tap @e1\n```\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_PROVIDER</code></td><td>Set to <code>ios</code> to enable iOS mode</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_DEVICE</code></td><td>Device name (e.g., \"iPhone 16 Pro\")</td></tr>\n <tr><td><code>AGENT_BROWSER_IOS_UDID</code></td><td>Device UDID (alternative to device name)</td></tr>\n </tbody>\n</table>\n\n## Supported devices\n\nAll iOS Simulators available in Xcode are supported, including:\n\n- All iPhone models (iPhone 15, 16, 17, SE, etc.)\n- All iPad models (iPad Pro, iPad Air, iPad mini, etc.)\n- Multiple iOS versions (17.x, 18.x, etc.)\n\n**Real devices** are also supported via USB connection (see below).\n\n## Real device support\n\nAppium can control Safari on real iOS devices connected via USB. This requires additional one-time setup.\n\n### 1. Get your device UDID\n\n```bash\n# List connected devices\nxcrun xctrace list devices\n\n# Or via system profiler\nsystem_profiler SPUSBDataType | grep -A 5 \"iPhone\\|iPad\"\n```\n\n### 2. Sign WebDriverAgent (one-time)\n\nWebDriverAgent needs to be signed with your Apple Developer certificate to run on real devices.\n\n```bash\n# Open the WebDriverAgent Xcode project\ncd ~/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent\nopen WebDriverAgent.xcodeproj\n```\n\nIn Xcode:\n\n1. Select the `WebDriverAgentRunner` target\n2. Go to Signing & Capabilities\n3. Select your Team (requires Apple Developer account, free tier works)\n4. Let Xcode manage signing automatically\n\n### 3. Use with agent-browser\n\n```bash\n# Connect device via USB, then use the UDID\nagent-browser -p ios --device \"<DEVICE_UDID>\" open https://example.com\n\n# Or use the device name if unique\nagent-browser -p ios --device \"John's iPhone\" open https://example.com\n```\n\n### Real device notes\n\n- First run installs WebDriverAgent to the device (may require Trust prompt on device)\n- Device must be unlocked and connected via USB\n- Slightly slower initial connection than simulator\n- Tests against real Safari performance and behavior\n- On first install, go to Settings → General → VPN & Device Management to trust the developer certificate\n\n## Performance notes\n\n- **First launch:** Takes 30-60 seconds to boot the simulator and start Appium\n- **Subsequent commands:** Fast (simulator stays running)\n- **Close command:** Shuts down simulator and Appium server\n\n## Differences from desktop\n\n<table>\n <thead>\n <tr><th>Feature</th><th>Desktop</th><th>iOS</th></tr>\n </thead>\n <tbody>\n <tr><td>Browser</td><td>Chrome, Lightpanda</td><td>Safari only</td></tr>\n <tr><td>Tabs</td><td>Supported</td><td>Single tab only</td></tr>\n <tr><td>PDF export</td><td>Supported</td><td>Not supported</td></tr>\n <tr><td>Screencast</td><td>Supported</td><td>Not supported</td></tr>\n <tr><td>Swipe gestures</td><td>Not native</td><td>Native support</td></tr>\n </tbody>\n</table>\n\n## Troubleshooting\n\n### Appium not found\n\n```bash\n# Make sure Appium is installed globally\nnpm install -g appium\nappium driver install xcuitest\n\n# Verify installation\nappium --version\n```\n\n### No simulators available\n\nOpen Xcode and download iOS Simulator runtimes from **Settings → Platforms**.\n\n### Simulator won't boot\n\nTry booting the simulator manually from Xcode or the Simulator app to ensure it works, then retry with agent-browser.",
|
||
"modernMarkdownSha256": "6e8dae294fefd336933376c7b0e08f9bc1bb05e4a5e3c668e41bb8b2d7a06501",
|
||
"navigation": {
|
||
"title": "iOS Simulator",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/native-mode",
|
||
"source": "docs/src/app/native-mode/page.mdx",
|
||
"layout": "docs/src/app/native-mode/layout.tsx",
|
||
"sourceSha256": "cc6a213090ab51eaae7da4c8da8f774fcdc021d5310211e0b7ced4c75bc9f6cd",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Native Mode\n",
|
||
"markdownTitle": "Native Mode",
|
||
"title": "Native Mode | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Native Mode | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Native Mode - agent-browser",
|
||
"twitterTitle": "Native Mode | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Native Mode",
|
||
"id": "native-mode"
|
||
}
|
||
],
|
||
"content": [
|
||
"agent-browser is now 100% native Rust by default. The Node.js/Playwright daemon has been removed.",
|
||
"This page is no longer relevant. See the main documentation for current architecture and usage."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/introduction",
|
||
"text": "documentation"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Native Mode\n\nagent-browser is now 100% native Rust by default. The Node.js/Playwright daemon has been removed.\n\nThis page is no longer relevant. See the main [documentation](/) for current architecture and usage.",
|
||
"legacyMarkdownSha256": "3412dba9e7a389e23827e6b039e52991a993a2baf4c63071b8647d0c2870501e",
|
||
"modernMarkdown": "# Native Mode\n\nagent-browser is now 100% native Rust by default. The Node.js/Playwright daemon has been removed.\n\nThis page is no longer relevant. See the main [documentation](/) for current architecture and usage.",
|
||
"modernMarkdownSha256": "3412dba9e7a389e23827e6b039e52991a993a2baf4c63071b8647d0c2870501e",
|
||
"navigation": {
|
||
"title": "Native Mode",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/network",
|
||
"source": "docs/src/app/network/page.mdx",
|
||
"layout": "docs/src/app/network/layout.tsx",
|
||
"sourceSha256": "1a1cc13cc57b0a85dc293c7e283f7acf146ea473165045091de0b6efd56fd862",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Network\n",
|
||
"markdownTitle": "Network",
|
||
"title": "Network | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Network | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Network - agent-browser",
|
||
"twitterTitle": "Network | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Network",
|
||
"id": "network"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Request routing",
|
||
"id": "request-routing"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Request log",
|
||
"id": "request-log"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "HAR export",
|
||
"id": "har-export"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "SSR and no-JavaScript debugging",
|
||
"id": "ssr-and-no-javascript-debugging"
|
||
}
|
||
],
|
||
"content": [
|
||
"Use network commands to intercept requests, mock responses, inspect traffic, and export HAR files during browser automation.",
|
||
"Routes apply before matching requests are sent. Set them before navigation when you need the first page load to be affected.",
|
||
"agent-browser open agent-browser network route \"**/analytics/**\" --abort agent-browser network route \"**/api/users\" --body '{\"users\":[]}' agent-browser navigate https://app.example.com",
|
||
"Command",
|
||
"Description",
|
||
"network route <url>",
|
||
"Intercept matching requests",
|
||
"network route <url> --abort",
|
||
"Block matching requests",
|
||
"network route <url> --body <json>",
|
||
"Fulfill matching requests with a mock body",
|
||
"network route \"*\" --resource-type script --abort",
|
||
"Block only a specific resource type",
|
||
"network unroute [url]",
|
||
"Remove one route or all routes",
|
||
"--resource-type accepts comma-separated resource types such as script, image, font, xhr, and fetch.",
|
||
"agent-browser network requests agent-browser network requests --filter api agent-browser network requests --type xhr,fetch agent-browser network requests --method POST agent-browser network requests --status 2xx agent-browser network request <requestId> agent-browser network requests --clear",
|
||
"Filter",
|
||
"--filter <pattern>",
|
||
"Filter by URL substring or pattern",
|
||
"--type <csv>",
|
||
"Filter by resource type",
|
||
"--method <method>",
|
||
"Filter by HTTP method",
|
||
"--status <status>",
|
||
"Filter by exact status, status family, or range",
|
||
"--clear",
|
||
"Clear the tracked request log",
|
||
"Use network request <requestId> to inspect one request and response in detail after finding its ID in network requests.",
|
||
"agent-browser network har start agent-browser open https://app.example.com agent-browser click @e4 agent-browser network har stop ./trace.har",
|
||
"Text response bodies (JSON, HTML, JavaScript, form data) are embedded in the HAR as content.text by default, captured while the browser still has them buffered so they survive navigation. The --content flag on har start controls this:",
|
||
"Mode",
|
||
"Behavior",
|
||
"--content text",
|
||
"Default. Embed text-like bodies (JSON, XML, HTML, JS, form data), up to 2 MB per body.",
|
||
"--content all",
|
||
"Embed every body; binary content is base64-encoded with encoding: \"base64\".",
|
||
"--content none",
|
||
"Sizes and MIME types only, no bodies.",
|
||
"HAR files include request headers, response headers, cookies, POST data, and response bodies. Treat them as sensitive when pages use cookies, bearer tokens, or API keys.",
|
||
"agent-browser batch \\ '[\"open\"]' \\ '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\ '[\"navigate\",\"http://localhost:3000\"]' \\ '[\"snapshot\",\"-i\"]'",
|
||
"Launching with open and no URL leaves the browser on about:blank, which gives routes time to register before the first real navigation."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Network\n\nUse network commands to intercept requests, mock responses, inspect traffic, and export HAR files during browser automation.\n\n## Request routing\n\nRoutes apply before matching requests are sent. Set them before navigation when you need the first page load to be affected.\n\n```bash\nagent-browser open\nagent-browser network route \"**/analytics/**\" --abort\nagent-browser network route \"**/api/users\" --body '{\"users\":[]}'\nagent-browser navigate https://app.example.com\n```\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>network route <url></code></td><td>Intercept matching requests</td></tr>\n <tr><td><code>network route <url> --abort</code></td><td>Block matching requests</td></tr>\n <tr><td><code>network route <url> --body <json></code></td><td>Fulfill matching requests with a mock body</td></tr>\n <tr><td><code>network route \"*\" --resource-type script --abort</code></td><td>Block only a specific resource type</td></tr>\n <tr><td><code>network unroute [url]</code></td><td>Remove one route or all routes</td></tr>\n </tbody>\n</table>\n\n`--resource-type` accepts comma-separated resource types such as `script`, `image`, `font`, `xhr`, and `fetch`.\n\n## Request log\n\n```bash\nagent-browser network requests\nagent-browser network requests --filter api\nagent-browser network requests --type xhr,fetch\nagent-browser network requests --method POST\nagent-browser network requests --status 2xx\nagent-browser network request <requestId>\nagent-browser network requests --clear\n```\n\n<table>\n <thead>\n <tr><th>Filter</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--filter <pattern></code></td><td>Filter by URL substring or pattern</td></tr>\n <tr><td><code>--type <csv></code></td><td>Filter by resource type</td></tr>\n <tr><td><code>--method <method></code></td><td>Filter by HTTP method</td></tr>\n <tr><td><code>--status <status></code></td><td>Filter by exact status, status family, or range</td></tr>\n <tr><td><code>--clear</code></td><td>Clear the tracked request log</td></tr>\n </tbody>\n</table>\n\nUse `network request <requestId>` to inspect one request and response in detail after finding its ID in `network requests`.\n\n## HAR export\n\n```bash\nagent-browser network har start\n\nagent-browser open https://app.example.com\nagent-browser click @e4\n\nagent-browser network har stop ./trace.har\n```\n\nText response bodies (JSON, HTML, JavaScript, form data) are embedded in the HAR as `content.text` by default, captured while the browser still has them buffered so they survive navigation. The `--content` flag on `har start` controls this:\n\n<table>\n <thead>\n <tr><th>Mode</th><th>Behavior</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--content text</code></td><td>Default. Embed text-like bodies (JSON, XML, HTML, JS, form data), up to 2 MB per body.</td></tr>\n <tr><td><code>--content all</code></td><td>Embed every body; binary content is base64-encoded with <code>encoding: \"base64\"</code>.</td></tr>\n <tr><td><code>--content none</code></td><td>Sizes and MIME types only, no bodies.</td></tr>\n </tbody>\n</table>\n\nHAR files include request headers, response headers, cookies, POST data, and response bodies. Treat them as sensitive when pages use cookies, bearer tokens, or API keys.\n\n## SSR and no-JavaScript debugging\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"navigate\",\"http://localhost:3000\"]' \\\n '[\"snapshot\",\"-i\"]'\n```\n\nLaunching with `open` and no URL leaves the browser on `about:blank`, which gives routes time to register before the first real navigation.",
|
||
"legacyMarkdownSha256": "fbcfe59e7cb3f15ae7c360a2420583e747c0b68aba01896635b8924e25c58ce7",
|
||
"modernMarkdown": "# Network\n\nUse network commands to intercept requests, mock responses, inspect traffic, and export HAR files during browser automation.\n\n## Request routing\n\nRoutes apply before matching requests are sent. Set them before navigation when you need the first page load to be affected.\n\n```bash\nagent-browser open\nagent-browser network route \"**/analytics/**\" --abort\nagent-browser network route \"**/api/users\" --body '{\"users\":[]}'\nagent-browser navigate https://app.example.com\n```\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>network route <url></code></td><td>Intercept matching requests</td></tr>\n <tr><td><code>network route <url> --abort</code></td><td>Block matching requests</td></tr>\n <tr><td><code>network route <url> --body <json></code></td><td>Fulfill matching requests with a mock body</td></tr>\n <tr><td><code>network route \"*\" --resource-type script --abort</code></td><td>Block only a specific resource type</td></tr>\n <tr><td><code>network unroute [url]</code></td><td>Remove one route or all routes</td></tr>\n </tbody>\n</table>\n\n`--resource-type` accepts comma-separated resource types such as `script`, `image`, `font`, `xhr`, and `fetch`.\n\n## Request log\n\n```bash\nagent-browser network requests\nagent-browser network requests --filter api\nagent-browser network requests --type xhr,fetch\nagent-browser network requests --method POST\nagent-browser network requests --status 2xx\nagent-browser network request <requestId>\nagent-browser network requests --clear\n```\n\n<table>\n <thead>\n <tr><th>Filter</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--filter <pattern></code></td><td>Filter by URL substring or pattern</td></tr>\n <tr><td><code>--type <csv></code></td><td>Filter by resource type</td></tr>\n <tr><td><code>--method <method></code></td><td>Filter by HTTP method</td></tr>\n <tr><td><code>--status <status></code></td><td>Filter by exact status, status family, or range</td></tr>\n <tr><td><code>--clear</code></td><td>Clear the tracked request log</td></tr>\n </tbody>\n</table>\n\nUse `network request <requestId>` to inspect one request and response in detail after finding its ID in `network requests`.\n\n## HAR export\n\n```bash\nagent-browser network har start\n\nagent-browser open https://app.example.com\nagent-browser click @e4\n\nagent-browser network har stop ./trace.har\n```\n\nText response bodies (JSON, HTML, JavaScript, form data) are embedded in the HAR as `content.text` by default, captured while the browser still has them buffered so they survive navigation. The `--content` flag on `har start` controls this:\n\n<table>\n <thead>\n <tr><th>Mode</th><th>Behavior</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--content text</code></td><td>Default. Embed text-like bodies (JSON, XML, HTML, JS, form data), up to 2 MB per body.</td></tr>\n <tr><td><code>--content all</code></td><td>Embed every body; binary content is base64-encoded with <code>encoding: \"base64\"</code>.</td></tr>\n <tr><td><code>--content none</code></td><td>Sizes and MIME types only, no bodies.</td></tr>\n </tbody>\n</table>\n\nHAR files include request headers, response headers, cookies, POST data, and response bodies. Treat them as sensitive when pages use cookies, bearer tokens, or API keys.\n\n## SSR and no-JavaScript debugging\n\n```bash\nagent-browser batch \\\n '[\"open\"]' \\\n '[\"network\",\"route\",\"*\",\"--abort\",\"--resource-type\",\"script\"]' \\\n '[\"navigate\",\"http://localhost:3000\"]' \\\n '[\"snapshot\",\"-i\"]'\n```\n\nLaunching with `open` and no URL leaves the browser on `about:blank`, which gives routes time to register before the first real navigation.",
|
||
"modernMarkdownSha256": "fbcfe59e7cb3f15ae7c360a2420583e747c0b68aba01896635b8924e25c58ce7",
|
||
"navigation": {
|
||
"title": "Network",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/next",
|
||
"source": "docs/src/app/next/page.mdx",
|
||
"layout": "docs/src/app/next/layout.tsx",
|
||
"sourceSha256": "0a5cab81b28a3ecbbb9ca1d8d59331beb7a9b71ba21bc8ef6974f23ad61286ba",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Next.js + Vercel\n",
|
||
"markdownTitle": "Next.js + Vercel",
|
||
"title": "Next.js + Vercel | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Next.js + Vercel | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Next.js + Vercel - agent-browser",
|
||
"twitterTitle": "Next.js + Vercel | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Next.js + Vercel",
|
||
"id": "nextjs-vercel"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Server action",
|
||
"id": "server-action"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Sandbox snapshots",
|
||
"id": "sandbox-snapshots"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Authentication",
|
||
"id": "authentication"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Scheduled workflows (cron)",
|
||
"id": "scheduled-workflows-cron"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Environment variables",
|
||
"id": "environment-variables"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Demo app",
|
||
"id": "demo-app"
|
||
}
|
||
],
|
||
"content": [
|
||
"Run agent-browser from a Next.js app on Vercel using Vercel Sandbox. A Linux microVM spins up on demand, runs agent-browser + Chrome, and shuts down. No binary size limits, no Chromium bundling complexity.",
|
||
"pnpm add @agent-browser/sandbox @vercel/sandbox",
|
||
"The Vercel Sandbox runs Amazon Linux. Chromium requires system libraries that are not installed by default, so fresh sandboxes need a dnf install step before agent-browser can launch Chrome. Use a sandbox snapshot (below) to skip this entirely in production. The @agent-browser/sandbox helper installs those system dependencies by default and handles command execution.",
|
||
"\"use server\"; import { runAgentBrowserCommand, withAgentBrowserSandbox } from \"@agent-browser/sandbox/vercel\"; export async function screenshotUrl(url: string) { return withAgentBrowserSandbox(async (sandbox) => { await runAgentBrowserCommand(sandbox, [\"open\", url]); const ssResult = await runAgentBrowserCommand<{ data?: { path?: string } }>(sandbox, [ \"screenshot\", ]); const ssPath = ssResult.json?.data?.path; if (!ssPath) throw new Error(\"Screenshot did not return a file path.\"); const b64Result = await sandbox.runCommand(\"base64\", [\"-w\", \"0\", ssPath]); const screenshot = (await b64Result.stdout()).trim(); await runAgentBrowserCommand(sandbox, [\"close\"], { json: false }); return { ok: true, screenshot }; }); } export async function snapshotUrl(url: string) { return withAgentBrowserSandbox(async (sandbox) => { await runAgentBrowserCommand(sandbox, [\"open\", url]); const result = await runAgentBrowserCommand(sandbox, [\"snapshot\", \"-i\", \"-c\"], { json: false, }); await runAgentBrowserCommand(sandbox, [\"close\"], { json: false }); return { ok: true, snapshot: result.stdout }; }); }",
|
||
"Without optimization, each Sandbox run installs system dependencies + agent-browser + Chromium from scratch (~30 seconds). A sandbox snapshot is a saved VM image with everything pre-installed, similar to a Docker image for Vercel Sandbox. When AGENT_BROWSER_SNAPSHOT_ID is set, the sandbox boots from that image instead of installing, bringing startup down to sub-second.",
|
||
"This is different from an agent-browser accessibility snapshot (which dumps a page's accessibility tree). A sandbox snapshot is a Vercel infrastructure concept.",
|
||
"Create a sandbox snapshot by running the helper script once:",
|
||
"npx tsx scripts/create-snapshot.ts",
|
||
"The script spins up a fresh sandbox, installs system dependencies + agent-browser + Chromium, saves the VM state, and prints the snapshot ID:",
|
||
"AGENT_BROWSER_SNAPSHOT_ID=snap_xxxxxxxxxxxx",
|
||
"Add this to your Vercel project environment variables (or .env.local for local development). Recommended for any production deployment.",
|
||
"On Vercel deployments, the Sandbox SDK authenticates automatically via OIDC. For local development, provide explicit credentials:",
|
||
"Variable",
|
||
"Description",
|
||
"VERCEL_TOKEN",
|
||
"Vercel personal access token",
|
||
"VERCEL_TEAM_ID",
|
||
"Vercel team ID",
|
||
"VERCEL_PROJECT_ID",
|
||
"Vercel project ID",
|
||
"When all three are set, they are passed to Sandbox.create(). When absent, the SDK falls back to VERCEL_OIDC_TOKEN (automatic on Vercel).",
|
||
"For recurring tasks like daily monitoring, use Vercel Cron Jobs:",
|
||
"// app/api/cron/monitor/route.ts import { runAgentBrowserCommand, withAgentBrowserSandbox } from \"@agent-browser/sandbox/vercel\"; export async function GET() { const result = await withAgentBrowserSandbox(async (sandbox) => { await runAgentBrowserCommand(sandbox, [ \"open\", \"https://example.com/pricing\", ]); const snap = await runAgentBrowserCommand(sandbox, [ \"snapshot\", \"-i\", \"-c\", ], { json: false }); await runAgentBrowserCommand(sandbox, [\"close\"], { json: false }); return snap.stdout; }); // Process results, send alerts, store data... return Response.json({ ok: true, snapshot: result }); }",
|
||
"// vercel.json { \"crons\": [ { \"path\": \"/api/cron/monitor\", \"schedule\": \"0 9 * * *\" } ] }",
|
||
"AGENT_BROWSER_SNAPSHOT_ID",
|
||
"Sandbox snapshot ID for sub-second startup (see above)",
|
||
"Vercel personal access token (for local dev; OIDC is automatic on Vercel)",
|
||
"Vercel team ID (for local dev)",
|
||
"Vercel project ID (for local dev)",
|
||
"A working demo with streaming progress UI, rate limiting, and a deploy-to-Vercel button is at examples/environments/."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/vercel-labs/agent-browser/tree/main/examples/environments",
|
||
"text": "examples/environments/"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Next.js + Vercel\n\nRun agent-browser from a Next.js app on Vercel using Vercel Sandbox. A Linux microVM spins up on demand, runs agent-browser + Chrome, and shuts down. No binary size limits, no Chromium bundling complexity.\n\n## Setup\n\n```bash\npnpm add @agent-browser/sandbox @vercel/sandbox\n```\n\n## Server action\n\nThe Vercel Sandbox runs Amazon Linux. Chromium requires system libraries that are not installed by default, so fresh sandboxes need a `dnf install` step before agent-browser can launch Chrome. Use a sandbox snapshot (below) to skip this entirely in production. The `@agent-browser/sandbox` helper installs those system dependencies by default and handles command execution.\n\n```ts\n\"use server\";\n\n return withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\"open\", url]);\n\n const ssResult = await runAgentBrowserCommand<{ data?: { path?: string } }>(sandbox, [\n \"screenshot\",\n ]);\n const ssPath = ssResult.json?.data?.path;\n if (!ssPath) throw new Error(\"Screenshot did not return a file path.\");\n\n const b64Result = await sandbox.runCommand(\"base64\", [\"-w\", \"0\", ssPath]);\n const screenshot = (await b64Result.stdout()).trim();\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return { ok: true, screenshot };\n });\n}\n\n return withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\"open\", url]);\n\n const result = await runAgentBrowserCommand(sandbox, [\"snapshot\", \"-i\", \"-c\"], {\n json: false,\n });\n\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return { ok: true, snapshot: result.stdout };\n });\n}\n```\n\n## Sandbox snapshots\n\nWithout optimization, each Sandbox run installs system dependencies + agent-browser + Chromium from scratch (~30 seconds). A **sandbox snapshot** is a saved VM image with everything pre-installed, similar to a Docker image for Vercel Sandbox. When `AGENT_BROWSER_SNAPSHOT_ID` is set, the sandbox boots from that image instead of installing, bringing startup down to sub-second.\n\nThis is different from an agent-browser *accessibility snapshot* (which dumps a page's accessibility tree). A sandbox snapshot is a Vercel infrastructure concept.\n\nCreate a sandbox snapshot by running the helper script once:\n\n```bash\nnpx tsx scripts/create-snapshot.ts\n```\n\nThe script spins up a fresh sandbox, installs system dependencies + agent-browser + Chromium, saves the VM state, and prints the snapshot ID:\n\n```\nAGENT_BROWSER_SNAPSHOT_ID=snap_xxxxxxxxxxxx\n```\n\nAdd this to your Vercel project environment variables (or `.env.local` for local development). Recommended for any production deployment.\n\n## Authentication\n\nOn Vercel deployments, the Sandbox SDK authenticates automatically via OIDC. For local development, provide explicit credentials:\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>VERCEL_TOKEN</code></td><td>Vercel personal access token</td></tr>\n <tr><td><code>VERCEL_TEAM_ID</code></td><td>Vercel team ID</td></tr>\n <tr><td><code>VERCEL_PROJECT_ID</code></td><td>Vercel project ID</td></tr>\n </tbody>\n</table>\n\nWhen all three are set, they are passed to `Sandbox.create()`. When absent, the SDK falls back to `VERCEL_OIDC_TOKEN` (automatic on Vercel).\n\n## Scheduled workflows (cron)\n\nFor recurring tasks like daily monitoring, use Vercel Cron Jobs:\n\n```ts\n// app/api/cron/monitor/route.ts\n\n const result = await withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\n \"open\", \"https://example.com/pricing\",\n ]);\n const snap = await runAgentBrowserCommand(sandbox, [\n \"snapshot\", \"-i\", \"-c\",\n ], { json: false });\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return snap.stdout;\n });\n\n // Process results, send alerts, store data...\n return Response.json({ ok: true, snapshot: result });\n}\n```\n\n```json\n// vercel.json\n{\n \"crons\": [\n { \"path\": \"/api/cron/monitor\", \"schedule\": \"0 9 * * *\" }\n ]\n}\n```\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_SNAPSHOT_ID</code></td><td>Sandbox snapshot ID for sub-second startup (see above)</td></tr>\n <tr><td><code>VERCEL_TOKEN</code></td><td>Vercel personal access token (for local dev; OIDC is automatic on Vercel)</td></tr>\n <tr><td><code>VERCEL_TEAM_ID</code></td><td>Vercel team ID (for local dev)</td></tr>\n <tr><td><code>VERCEL_PROJECT_ID</code></td><td>Vercel project ID (for local dev)</td></tr>\n </tbody>\n</table>\n\n## Demo app\n\nA working demo with streaming progress UI, rate limiting, and a deploy-to-Vercel button is at [`examples/environments/`](https://github.com/vercel-labs/agent-browser/tree/main/examples/environments).",
|
||
"legacyMarkdownSha256": "d7e2560dd80418b8e79ff4a3142ca5c0c0bfe077438cda7f60011683ecf7c531",
|
||
"modernMarkdown": "# Next.js + Vercel\n\nRun agent-browser from a Next.js app on Vercel using Vercel Sandbox. A Linux microVM spins up on demand, runs agent-browser + Chrome, and shuts down. No binary size limits, no Chromium bundling complexity.\n\n## Setup\n\n```bash\npnpm add @agent-browser/sandbox @vercel/sandbox\n```\n\n## Server action\n\nThe Vercel Sandbox runs Amazon Linux. Chromium requires system libraries that are not installed by default, so fresh sandboxes need a `dnf install` step before agent-browser can launch Chrome. Use a sandbox snapshot (below) to skip this entirely in production. The `@agent-browser/sandbox` helper installs those system dependencies by default and handles command execution.\n\n```ts\n\"use server\";\nimport { runAgentBrowserCommand, withAgentBrowserSandbox } from \"@agent-browser/sandbox/vercel\";\n\nexport async function screenshotUrl(url: string) {\n return withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\"open\", url]);\n\n const ssResult = await runAgentBrowserCommand<{ data?: { path?: string } }>(sandbox, [\n \"screenshot\",\n ]);\n const ssPath = ssResult.json?.data?.path;\n if (!ssPath) throw new Error(\"Screenshot did not return a file path.\");\n\n const b64Result = await sandbox.runCommand(\"base64\", [\"-w\", \"0\", ssPath]);\n const screenshot = (await b64Result.stdout()).trim();\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return { ok: true, screenshot };\n });\n}\n\nexport async function snapshotUrl(url: string) {\n return withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\"open\", url]);\n\n const result = await runAgentBrowserCommand(sandbox, [\"snapshot\", \"-i\", \"-c\"], {\n json: false,\n });\n\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return { ok: true, snapshot: result.stdout };\n });\n}\n```\n\n## Sandbox snapshots\n\nWithout optimization, each Sandbox run installs system dependencies + agent-browser + Chromium from scratch (~30 seconds). A **sandbox snapshot** is a saved VM image with everything pre-installed, similar to a Docker image for Vercel Sandbox. When `AGENT_BROWSER_SNAPSHOT_ID` is set, the sandbox boots from that image instead of installing, bringing startup down to sub-second.\n\nThis is different from an agent-browser *accessibility snapshot* (which dumps a page's accessibility tree). A sandbox snapshot is a Vercel infrastructure concept.\n\nCreate a sandbox snapshot by running the helper script once:\n\n```bash\nnpx tsx scripts/create-snapshot.ts\n```\n\nThe script spins up a fresh sandbox, installs system dependencies + agent-browser + Chromium, saves the VM state, and prints the snapshot ID:\n\n```\nAGENT_BROWSER_SNAPSHOT_ID=snap_xxxxxxxxxxxx\n```\n\nAdd this to your Vercel project environment variables (or `.env.local` for local development). Recommended for any production deployment.\n\n## Authentication\n\nOn Vercel deployments, the Sandbox SDK authenticates automatically via OIDC. For local development, provide explicit credentials:\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>VERCEL_TOKEN</code></td><td>Vercel personal access token</td></tr>\n <tr><td><code>VERCEL_TEAM_ID</code></td><td>Vercel team ID</td></tr>\n <tr><td><code>VERCEL_PROJECT_ID</code></td><td>Vercel project ID</td></tr>\n </tbody>\n</table>\n\nWhen all three are set, they are passed to `Sandbox.create()`. When absent, the SDK falls back to `VERCEL_OIDC_TOKEN` (automatic on Vercel).\n\n## Scheduled workflows (cron)\n\nFor recurring tasks like daily monitoring, use Vercel Cron Jobs:\n\n```ts\n// app/api/cron/monitor/route.ts\nimport { runAgentBrowserCommand, withAgentBrowserSandbox } from \"@agent-browser/sandbox/vercel\";\n\nexport async function GET() {\n const result = await withAgentBrowserSandbox(async (sandbox) => {\n await runAgentBrowserCommand(sandbox, [\n \"open\", \"https://example.com/pricing\",\n ]);\n const snap = await runAgentBrowserCommand(sandbox, [\n \"snapshot\", \"-i\", \"-c\",\n ], { json: false });\n await runAgentBrowserCommand(sandbox, [\"close\"], { json: false });\n return snap.stdout;\n });\n\n // Process results, send alerts, store data...\n return Response.json({ ok: true, snapshot: result });\n}\n```\n\n```json\n// vercel.json\n{\n \"crons\": [\n { \"path\": \"/api/cron/monitor\", \"schedule\": \"0 9 * * *\" }\n ]\n}\n```\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_SNAPSHOT_ID</code></td><td>Sandbox snapshot ID for sub-second startup (see above)</td></tr>\n <tr><td><code>VERCEL_TOKEN</code></td><td>Vercel personal access token (for local dev; OIDC is automatic on Vercel)</td></tr>\n <tr><td><code>VERCEL_TEAM_ID</code></td><td>Vercel team ID (for local dev)</td></tr>\n <tr><td><code>VERCEL_PROJECT_ID</code></td><td>Vercel project ID (for local dev)</td></tr>\n </tbody>\n</table>\n\n## Demo app\n\nA working demo with streaming progress UI, rate limiting, and a deploy-to-Vercel button is at [`examples/environments/`](https://github.com/vercel-labs/agent-browser/tree/main/examples/environments).",
|
||
"modernMarkdownSha256": "6922298ba0312adb6b55c6a277727e5ddd430ca09b3ea529cde0d58560597c45",
|
||
"navigation": {
|
||
"title": "Next.js + Vercel",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/",
|
||
"source": "docs/src/app/page.mdx",
|
||
"layout": "docs/src/app/layout.tsx",
|
||
"sourceSha256": "a8944e48018ff35b54691083380dd10259d4a9c55624ffd418f6ef475f05dadc",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# agent-browser\n",
|
||
"markdownTitle": "agent-browser",
|
||
"title": "agent-browser | Browser Automation for AI",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "agent-browser | Browser Automation for AI",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "agent-browser",
|
||
"twitterTitle": "agent-browser | Browser Automation for AI",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "agent-browser",
|
||
"id": "agent-browser"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Features",
|
||
"id": "features"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Works with",
|
||
"id": "works-with"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Example",
|
||
"id": "example"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Why refs?",
|
||
"id": "why-refs"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Architecture",
|
||
"id": "architecture"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Platforms",
|
||
"id": "platforms"
|
||
}
|
||
],
|
||
"content": [
|
||
"Browser automation CLI designed for AI agents. Compact text output minimizes context usage. 100% native Rust.",
|
||
"npm install -g agent-browser # all platforms brew install agent-browser # macOS agent-browser install # Download Chrome (first time) # or try without installing npx agent-browser open example.com",
|
||
"Agent-first: Compact text output uses fewer tokens than JSON, designed for AI context efficiency",
|
||
"Ref-based: Snapshot returns accessibility tree with refs for deterministic element selection",
|
||
"Complete: 50+ commands for navigation, forms, screenshots, network, storage, files, tabs, frames, and debugging",
|
||
"Observable: Video recording, streaming, debugging, profiler, and diffing tools are built in",
|
||
"Modern apps: Network control, React & Web Vitals, init scripts, Next.js + Vercel, and eve Extension workflows have first-class docs",
|
||
"Stateful: Sessions, profiles, auth state, cookies, storage, proxy, and security controls support long-running agents",
|
||
"Cross-platform: macOS, Linux, Windows with native binaries",
|
||
"Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Google Gemini, opencode, and any agent that can run shell commands.",
|
||
"# Navigate and get snapshot agent-browser open example.com agent-browser snapshot -i # Output: # - heading \"Example Domain\" [ref=e1] # - link \"More information...\" [ref=e2] # Interact using refs agent-browser click @e2 agent-browser screenshot page.png agent-browser close",
|
||
"The snapshot command returns a compact accessibility tree where each element has a unique ref like @e1, @e2. This provides:",
|
||
"Context-efficient: Text output uses ~200-400 tokens vs ~3000-5000 for full DOM",
|
||
"Deterministic: Ref points to exact element from snapshot",
|
||
"Fast: No DOM re-query needed",
|
||
"AI-friendly: LLMs parse text output naturally",
|
||
"Client-daemon architecture for optimal performance:",
|
||
"Rust CLI: Parses commands, communicates with daemon",
|
||
"Native Daemon: Pure Rust daemon using direct CDP, manages Chrome via Chrome DevTools Protocol",
|
||
"The daemon starts automatically and persists between commands. By default, it saves configured restore state, closes its headless browser, and exits after one hour without commands or dashboard input. Without --restore or another restore key, shutdown discards transient browser state and open tabs. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default timeout; provider-owned cloud browsers are not. Use --idle-timeout <time> or AGENT_BROWSER_IDLE_TIMEOUT_MS to tune the timeout, and use 0 to disable it.",
|
||
"Native Rust binaries for macOS (ARM64, x64), Linux (ARM64, x64), and Windows (x64)."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/recording",
|
||
"text": "Video recording"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/streaming",
|
||
"text": "streaming"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/debugging",
|
||
"text": "debugging"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/profiler",
|
||
"text": "profiler"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/diffing",
|
||
"text": "diffing"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/network",
|
||
"text": "Network control"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/react",
|
||
"text": "React & Web Vitals"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/init-scripts",
|
||
"text": "init scripts"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/next",
|
||
"text": "Next.js + Vercel"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/eve",
|
||
"text": "eve Extension"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "/sessions",
|
||
"text": "Sessions"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# agent-browser\n\nBrowser automation CLI designed for AI agents. Compact text output minimizes context usage. 100% native Rust.\n\n```bash\nnpm install -g agent-browser # all platforms\nbrew install agent-browser # macOS\nagent-browser install # Download Chrome (first time)\n\n# or try without installing\nnpx agent-browser open example.com\n```\n\n## Features\n\n- **Agent-first**: Compact text output uses fewer tokens than JSON, designed for AI context efficiency\n- **Ref-based**: Snapshot returns accessibility tree with refs for deterministic element selection\n- **Complete**: 50+ commands for navigation, forms, screenshots, network, storage, files, tabs, frames, and debugging\n- **Observable**: [Video recording](/recording), [streaming](/streaming), [debugging](/debugging), [profiler](/profiler), and [diffing](/diffing) tools are built in\n- **Modern apps**: [Network control](/network), [React & Web Vitals](/react), [init scripts](/init-scripts), [Next.js + Vercel](/next), and [eve Extension](/eve) workflows have first-class docs\n- **Stateful**: [Sessions](/sessions), profiles, auth state, cookies, storage, proxy, and security controls support long-running agents\n- **Cross-platform**: macOS, Linux, Windows with native binaries\n\n## Works with\n\nClaude Code, Cursor, GitHub Copilot, OpenAI Codex, Google Gemini, opencode, and any agent that can run shell commands.\n\n## Example\n\n```bash\n# Navigate and get snapshot\nagent-browser open example.com\nagent-browser snapshot -i\n\n# Output:\n# - heading \"Example Domain\" [ref=e1]\n# - link \"More information...\" [ref=e2]\n\n# Interact using refs\nagent-browser click @e2\nagent-browser screenshot page.png\nagent-browser close\n```\n\n## Why refs?\n\nThe `snapshot` command returns a compact accessibility tree where each element has a unique ref like `@e1`, `@e2`. This provides:\n\n- **Context-efficient**: Text output uses ~200-400 tokens vs ~3000-5000 for full DOM\n- **Deterministic**: Ref points to exact element from snapshot\n- **Fast**: No DOM re-query needed\n- **AI-friendly**: LLMs parse text output naturally\n\n## Architecture\n\nClient-daemon architecture for optimal performance:\n\n1. **Rust CLI**: Parses commands, communicates with daemon\n2. **Native Daemon**: Pure Rust daemon using direct CDP, manages Chrome via Chrome DevTools Protocol\n\nThe daemon starts automatically and persists between commands. By default, it saves configured restore state, closes its headless browser, and exits after one hour without commands or dashboard input. Without `--restore` or another restore key, shutdown discards transient browser state and open tabs. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default timeout; provider-owned cloud browsers are not. Use `--idle-timeout <time>` or `AGENT_BROWSER_IDLE_TIMEOUT_MS` to tune the timeout, and use `0` to disable it.\n\n## Platforms\n\nNative Rust binaries for macOS (ARM64, x64), Linux (ARM64, x64), and Windows (x64).",
|
||
"legacyMarkdownSha256": "5978074a9a448ecf9dc9fd7ea1f3e6b38ada9088d286358caef05d8d2db69ee6",
|
||
"modernMarkdown": "# agent-browser\n\nBrowser automation CLI designed for AI agents. Compact text output minimizes context usage. 100% native Rust.\n\n```bash\nnpm install -g agent-browser # all platforms\nbrew install agent-browser # macOS\nagent-browser install # Download Chrome (first time)\n\n# or try without installing\nnpx agent-browser open example.com\n```\n\n## Features\n\n- **Agent-first**: Compact text output uses fewer tokens than JSON, designed for AI context efficiency\n- **Ref-based**: Snapshot returns accessibility tree with refs for deterministic element selection\n- **Complete**: 50+ commands for navigation, forms, screenshots, network, storage, files, tabs, frames, and debugging\n- **Observable**: [Video recording](/recording), [streaming](/streaming), [debugging](/debugging), [profiler](/profiler), and [diffing](/diffing) tools are built in\n- **Modern apps**: [Network control](/network), [React & Web Vitals](/react), [init scripts](/init-scripts), [Next.js + Vercel](/next), and [eve Extension](/eve) workflows have first-class docs\n- **Stateful**: [Sessions](/sessions), profiles, auth state, cookies, storage, proxy, and security controls support long-running agents\n- **Cross-platform**: macOS, Linux, Windows with native binaries\n\n## Works with\n\nClaude Code, Cursor, GitHub Copilot, OpenAI Codex, Google Gemini, opencode, and any agent that can run shell commands.\n\n## Example\n\n```bash\n# Navigate and get snapshot\nagent-browser open example.com\nagent-browser snapshot -i\n\n# Output:\n# - heading \"Example Domain\" [ref=e1]\n# - link \"More information...\" [ref=e2]\n\n# Interact using refs\nagent-browser click @e2\nagent-browser screenshot page.png\nagent-browser close\n```\n\n## Why refs?\n\nThe `snapshot` command returns a compact accessibility tree where each element has a unique ref like `@e1`, `@e2`. This provides:\n\n- **Context-efficient**: Text output uses ~200-400 tokens vs ~3000-5000 for full DOM\n- **Deterministic**: Ref points to exact element from snapshot\n- **Fast**: No DOM re-query needed\n- **AI-friendly**: LLMs parse text output naturally\n\n## Architecture\n\nClient-daemon architecture for optimal performance:\n\n1. **Rust CLI**: Parses commands, communicates with daemon\n2. **Native Daemon**: Pure Rust daemon using direct CDP, manages Chrome via Chrome DevTools Protocol\n\nThe daemon starts automatically and persists between commands. By default, it saves configured restore state, closes its headless browser, and exits after one hour without commands or dashboard input. Without `--restore` or another restore key, shutdown discards transient browser state and open tabs. Headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt from the default timeout; provider-owned cloud browsers are not. Use `--idle-timeout <time>` or `AGENT_BROWSER_IDLE_TIMEOUT_MS` to tune the timeout, and use `0` to disable it.\n\n## Platforms\n\nNative Rust binaries for macOS (ARM64, x64), Linux (ARM64, x64), and Windows (x64).",
|
||
"modernMarkdownSha256": "5978074a9a448ecf9dc9fd7ea1f3e6b38ada9088d286358caef05d8d2db69ee6",
|
||
"navigation": {
|
||
"title": "Introduction",
|
||
"section": ""
|
||
}
|
||
},
|
||
{
|
||
"path": "/plugins",
|
||
"source": "docs/src/app/plugins/page.mdx",
|
||
"layout": "docs/src/app/plugins/layout.tsx",
|
||
"sourceSha256": "ae6ad531b00e8831140eafeb30715ac64bb7d9ce0e1f6d61ca8ef5d589e1cb33",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Plugins\n",
|
||
"markdownTitle": "Plugins",
|
||
"title": "Plugins | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Plugins | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Plugins - agent-browser",
|
||
"twitterTitle": "Plugins | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Plugins",
|
||
"id": "plugins"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "When to write a plugin",
|
||
"id": "when-to-write-a-plugin"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "What to build as a plugin",
|
||
"id": "what-to-build-as-a-plugin"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Add a plugin someone else built",
|
||
"id": "add-a-plugin-someone-else-built"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Configure a plugin",
|
||
"id": "configure-a-plugin"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Protocol",
|
||
"id": "protocol"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Plugin manifest",
|
||
"id": "plugin-manifest"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Capabilities",
|
||
"id": "capabilities"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Minimal plugin",
|
||
"id": "minimal-plugin"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Credential plugin",
|
||
"id": "credential-plugin"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Browser provider plugin",
|
||
"id": "browser-provider-plugin"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Launch mutator plugin",
|
||
"id": "launch-mutator-plugin"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Policy and confirmation",
|
||
"id": "policy-and-confirmation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Packaging guidance",
|
||
"id": "packaging-guidance"
|
||
}
|
||
],
|
||
"content": [
|
||
"Plugins let agent-browser integrate with external tools without adding those tools to core. A plugin is a local executable that reads one JSON request from stdin and writes one JSON response to stdout.",
|
||
"Use plugins for vault-backed login, custom browser providers, local launch customization, and domain-specific commands such as CAPTCHA solving.",
|
||
"Write a plugin when the integration needs vendor SDKs, local CLIs, credentials, paid APIs, or behavior that should not become an agent-browser dependency.",
|
||
"Good plugin fits:",
|
||
"Resolve login credentials from an external vault",
|
||
"Launch a browser through a hosted provider and return a CDP WebSocket URL",
|
||
"Add local Chrome launch arguments, extensions, or init scripts",
|
||
"Run a namespaced command such as captcha.solve",
|
||
"Keep browser automation itself in agent-browser. A plugin should provide data or launch configuration, then let agent-browser continue driving the browser.",
|
||
"These are good places for plugin authors to start:",
|
||
"New cloud browser providers: Hosted browser platforms are good models for browser.provider. Existing built-ins can stay in core for compatibility, but new providers should usually start as plugins.",
|
||
"Vault integrations: Password managers, secret stores, and enterprise SSO helpers fit credential.read. Keep the local encrypted auth vault in core, but put vendor-specific vault access in plugins.",
|
||
"Stealth and anti-detection: These techniques change quickly and can be risky to support in core. They fit launch.mutate plugins that append launch args, extensions, init scripts, or user-agent overrides.",
|
||
"CAPTCHA solvers: CAPTCHA integrations are plugin territory because they involve third-party APIs, credentials, policy concerns, and fast vendor churn. They can use command.run or a custom capability such as captcha.solve.",
|
||
"Vendor-specific auth helpers: Login helpers for a specific app, IdP, or enterprise flow should live outside core unless they become generic browser automation primitives.",
|
||
"Use plugin add with the package or repository name:",
|
||
"agent-browser plugin add agent-browser-plugin-captcha agent-browser plugin add @company/agent-browser-plugin-vault --name vault agent-browser plugin add org/agent-browser-plugin-cloud-browser",
|
||
"agent-browser chooses the source from the reference:",
|
||
"Reference",
|
||
"Source",
|
||
"Example",
|
||
"name",
|
||
"npm package",
|
||
"agent-browser-plugin-captcha",
|
||
"@scope/name",
|
||
"scoped npm package",
|
||
"@company/agent-browser-plugin-vault",
|
||
"owner/repo",
|
||
"GitHub repository",
|
||
"org/agent-browser-plugin-cloud-browser",
|
||
"plugin add writes ./agent-browser.json by default. Use --global to write ~/.agent-browser/config.json instead.",
|
||
"During add, agent-browser runs the package once and asks for plugin.manifest. A plugin manifest declares the plugin name and capabilities. If a plugin does not support manifests yet, use the capabilities from the plugin README:",
|
||
"agent-browser plugin add agent-browser-plugin-captcha --capability command.run --capability captcha.solve --no-manifest",
|
||
"Verify the plugin is configured:",
|
||
"agent-browser plugin list agent-browser plugin show captcha",
|
||
"Then use it through the command path for its capability:",
|
||
"agent-browser auth login my-app --credential-provider vault --item \"My App\" agent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login agent-browser --provider cloud-browser open https://example.com agent-browser open https://example.com agent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"abc\",\"url\":\"https://example.com\"}'",
|
||
"launch.mutate plugins run automatically for local launches such as agent-browser open.",
|
||
"plugin add creates this config for you. You can also edit the plugins array manually:",
|
||
"{ \"plugins\": [ { \"name\": \"vault\", \"command\": \"agent-browser-plugin-vault\", \"args\": [], \"capabilities\": [\"credential.read\"] }, { \"name\": \"captcha\", \"command\": \"agent-browser-plugin-captcha\", \"capabilities\": [\"command.run\", \"captcha.solve\"] } ] }",
|
||
"Inspect the registry:",
|
||
"agent-browser plugin list agent-browser plugin show vault",
|
||
"AGENT_BROWSER_PLUGINS can replace config discovery with a JSON array using the same shape.",
|
||
"Do not put API tokens, vault tokens, or passwords in plugin args. Use the vendor's own CLI login, keychain, environment, or session mechanism outside agent-browser config.",
|
||
"agent-browser starts the executable, writes this envelope to stdin, waits for stdout, and parses stdout as JSON:",
|
||
"{ \"protocol\": \"agent-browser.plugin.v1\", \"type\": \"credential.resolve\", \"capability\": \"credential.read\", \"request\": {} }",
|
||
"Every successful response must include the same protocol and success: true:",
|
||
"{ \"protocol\": \"agent-browser.plugin.v1\", \"success\": true, \"data\": {} }",
|
||
"Only stdout is parsed. Write no logs to stdout. agent-browser suppresses plugin stderr for core integrations, so use files or your own debug mode when developing.",
|
||
"Core integrations suppress plugin-provided error text in user-facing errors to reduce accidental secret exposure. Generic plugin run keeps plugin error text because it is a developer-facing command.",
|
||
"Support plugin.manifest so users can add your plugin without manually entering capabilities:",
|
||
"{ \"protocol\": \"agent-browser.plugin.v1\", \"type\": \"plugin.manifest\", \"capability\": \"plugin.manifest\", \"request\": {} }",
|
||
"Return the plugin name and capabilities:",
|
||
"{ \"protocol\": \"agent-browser.plugin.v1\", \"success\": true, \"manifest\": { \"name\": \"captcha\", \"capabilities\": [\"command.run\", \"captcha.solve\"], \"description\": \"Solve CAPTCHA challenges through Example CAPTCHA\" } }",
|
||
"With a manifest, users can run:",
|
||
"agent-browser plugin add agent-browser-plugin-captcha",
|
||
"Without a manifest, users must pass --capability flags during add.",
|
||
"Capability",
|
||
"Request type",
|
||
"How users invoke it",
|
||
"Response field",
|
||
"credential.read",
|
||
"credential.resolve",
|
||
"auth login --credential-provider <name>",
|
||
"credential",
|
||
"browser.provider",
|
||
"browser.launch, browser.close",
|
||
"--provider <name>",
|
||
"browser",
|
||
"launch.mutate",
|
||
"Any local launch",
|
||
"launch",
|
||
"command.run",
|
||
"Custom request type",
|
||
"plugin run <name> <type>",
|
||
"data",
|
||
"Plugins may declare custom capabilities such as captcha.solve. plugin run can invoke command.run and custom capabilities, but it cannot invoke core capabilities or protocol request types directly. Use the dedicated command path for credential.read, browser.provider, and launch.mutate.",
|
||
"This plugin implements captcha.solve and returns a fake token:",
|
||
"#!/usr/bin/env node const chunks = []; for await (const chunk of process.stdin) { chunks.push(chunk); } const input = JSON.parse(Buffer.concat(chunks).toString(\"utf8\")); function reply(body) { process.stdout.write( JSON.stringify({ protocol: \"agent-browser.plugin.v1\", success: true, ...body, }) ); } if (input.protocol !== \"agent-browser.plugin.v1\") { process.stdout.write( JSON.stringify({ protocol: \"agent-browser.plugin.v1\", success: false, error: \"unsupported protocol\", }) ); process.exit(0); } if (input.type === \"plugin.manifest\") { reply({ manifest: { name: \"captcha\", capabilities: [\"command.run\", \"captcha.solve\"], description: \"Example CAPTCHA plugin\", }, }); process.exit(0); } if (input.type === \"captcha.solve\") { reply({ data: { token: \"example-token\", siteKey: input.request.siteKey, url: input.request.url, }, }); process.exit(0); } process.stdout.write( JSON.stringify({ protocol: \"agent-browser.plugin.v1\", success: false, error: `unsupported request type: ${input.type}`, }) );",
|
||
"Make it executable and configure it:",
|
||
"chmod +x ./agent-browser-plugin-captcha",
|
||
"{ \"plugins\": [ { \"name\": \"captcha\", \"command\": \"./agent-browser-plugin-captcha\", \"capabilities\": [\"command.run\", \"captcha.solve\"] } ] }",
|
||
"Run it:",
|
||
"agent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"abc\",\"url\":\"https://example.com\"}'",
|
||
"A credential plugin receives:",
|
||
"{ \"protocol\": \"agent-browser.plugin.v1\", \"type\": \"credential.resolve\", \"capability\": \"credential.read\", \"request\": { \"profileName\": \"my-app\", \"itemRef\": \"My App\", \"url\": \"https://app.example.com/login\" } }",
|
||
"Return credential:",
|
||
"{ \"protocol\": \"agent-browser.plugin.v1\", \"success\": true, \"credential\": { \"username\": \"alice@example.com\", \"password\": \"secret\", \"url\": \"https://app.example.com/login\", \"usernameSelector\": \"#username\", \"passwordSelector\": \"#password\", \"submitSelector\": \"input[type=submit]\" } }",
|
||
"Use it for one login:",
|
||
"agent-browser auth login my-app --credential-provider vault --item \"My App\"",
|
||
"For a login form reached through stateful in-page setup, add --no-navigate. The active top-level page must have the same scheme, host, and effective port as the effective credential URL. Command-level --url overrides provider URL metadata and supplies this expected origin without navigating. The provider secret remains outside generated process arguments and normal output:",
|
||
"agent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login",
|
||
"For external vaults, prefer calling the vendor CLI from the plugin and relying on its existing local session. Do not pass vault tokens in agent-browser.json.",
|
||
"A browser provider plugin receives browser.launch and returns a CDP URL:",
|
||
"{ \"protocol\": \"agent-browser.plugin.v1\", \"success\": true, \"browser\": { \"cdpUrl\": \"ws://127.0.0.1:9222/devtools/browser/session\", \"directPage\": false, \"metadata\": { \"sessionId\": \"provider-session-id\" }, \"cleanup\": { \"sessionId\": \"provider-session-id\" } } }",
|
||
"Then users launch through the plugin name:",
|
||
"agent-browser --provider cloud-browser open https://example.com",
|
||
"If cleanup is returned and connection fails, agent-browser later sends it back as the request body for browser.close.",
|
||
"A launch mutator receives local launch options before Chrome starts and can append arguments, extensions, init scripts, or a user agent:",
|
||
"{ \"protocol\": \"agent-browser.plugin.v1\", \"success\": true, \"launch\": { \"args\": [\"--disable-blink-features=AutomationControlled\"], \"extensions\": [\"/absolute/path/to/extension\"], \"initScripts\": [ \"Object.defineProperty(navigator, 'webdriver', { get: () => undefined });\" ], \"userAgent\": \"my-agent/1.0\" } }",
|
||
"Configure it with launch.mutate, then use any local launch command:",
|
||
"agent-browser open https://example.com",
|
||
"Launch mutators do not run for CDP connections or remote browser providers because those browsers are already running outside the local launch path.",
|
||
"Plugin access is exposed as capability-scoped policy actions:",
|
||
"agent-browser --confirm-actions plugin:vault:credential.read auth login my-app --credential-provider vault --item \"My App\" agent-browser --confirm-actions plugin:cloud-browser:browser.provider --provider cloud-browser open https://example.com agent-browser --confirm-actions plugin:stealth:launch.mutate open https://example.com",
|
||
"The action string is plugin:<name>:<capability>.",
|
||
"For npm packages, expose a bin command with no required stdout logs:",
|
||
"{ \"name\": \"agent-browser-plugin-example\", \"bin\": { \"agent-browser-plugin-example\": \"./bin/plugin.js\" } }",
|
||
"Keep the plugin small and explicit:",
|
||
"Declare only the capabilities it actually supports",
|
||
"Read exactly one request from stdin",
|
||
"Write exactly one JSON response to stdout",
|
||
"Keep secrets out of command-line arguments",
|
||
"Let agent-browser handle navigation, selectors, screenshots, state, and policy"
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Plugins\n\nPlugins let agent-browser integrate with external tools without adding those tools to core. A plugin is a local executable that reads one JSON request from stdin and writes one JSON response to stdout.\n\nUse plugins for vault-backed login, custom browser providers, local launch customization, and domain-specific commands such as CAPTCHA solving.\n\n## When to write a plugin\n\nWrite a plugin when the integration needs vendor SDKs, local CLIs, credentials, paid APIs, or behavior that should not become an agent-browser dependency.\n\nGood plugin fits:\n\n- Resolve login credentials from an external vault\n- Launch a browser through a hosted provider and return a CDP WebSocket URL\n- Add local Chrome launch arguments, extensions, or init scripts\n- Run a namespaced command such as `captcha.solve`\n\nKeep browser automation itself in agent-browser. A plugin should provide data or launch configuration, then let agent-browser continue driving the browser.\n\n## What to build as a plugin\n\nThese are good places for plugin authors to start:\n\n- **New cloud browser providers**: Hosted browser platforms are good models for `browser.provider`. Existing built-ins can stay in core for compatibility, but new providers should usually start as plugins.\n- **Vault integrations**: Password managers, secret stores, and enterprise SSO helpers fit `credential.read`. Keep the local encrypted auth vault in core, but put vendor-specific vault access in plugins.\n- **Stealth and anti-detection**: These techniques change quickly and can be risky to support in core. They fit `launch.mutate` plugins that append launch args, extensions, init scripts, or user-agent overrides.\n- **CAPTCHA solvers**: CAPTCHA integrations are plugin territory because they involve third-party APIs, credentials, policy concerns, and fast vendor churn. They can use `command.run` or a custom capability such as `captcha.solve`.\n- **Vendor-specific auth helpers**: Login helpers for a specific app, IdP, or enterprise flow should live outside core unless they become generic browser automation primitives.\n\n## Add a plugin someone else built\n\nUse `plugin add` with the package or repository name:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha\nagent-browser plugin add @company/agent-browser-plugin-vault --name vault\nagent-browser plugin add org/agent-browser-plugin-cloud-browser\n```\n\nagent-browser chooses the source from the reference:\n\n<table>\n <thead>\n <tr><th>Reference</th><th>Source</th><th>Example</th></tr>\n </thead>\n <tbody>\n <tr><td><code>name</code></td><td>npm package</td><td><code>agent-browser-plugin-captcha</code></td></tr>\n <tr><td><code>@scope/name</code></td><td>scoped npm package</td><td><code>@company/agent-browser-plugin-vault</code></td></tr>\n <tr><td><code>owner/repo</code></td><td>GitHub repository</td><td><code>org/agent-browser-plugin-cloud-browser</code></td></tr>\n </tbody>\n</table>\n\n`plugin add` writes `./agent-browser.json` by default. Use `--global` to write `~/.agent-browser/config.json` instead.\n\nDuring add, agent-browser runs the package once and asks for `plugin.manifest`. A plugin manifest declares the plugin name and capabilities. If a plugin does not support manifests yet, use the capabilities from the plugin README:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha --capability command.run --capability captcha.solve --no-manifest\n```\n\nVerify the plugin is configured:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show captcha\n```\n\nThen use it through the command path for its capability:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\nagent-browser --provider cloud-browser open https://example.com\nagent-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"abc\",\"url\":\"https://example.com\"}'\n```\n\n`launch.mutate` plugins run automatically for local launches such as `agent-browser open`.\n\n## Configure a plugin\n\n`plugin add` creates this config for you. You can also edit the `plugins` array manually:\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"args\": [],\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nInspect the registry:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show vault\n```\n\n`AGENT_BROWSER_PLUGINS` can replace config discovery with a JSON array using the same shape.\n\nDo not put API tokens, vault tokens, or passwords in plugin `args`. Use the vendor's own CLI login, keychain, environment, or session mechanism outside agent-browser config.\n\n## Protocol\n\nagent-browser starts the executable, writes this envelope to stdin, waits for stdout, and parses stdout as JSON:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"credential.resolve\",\n \"capability\": \"credential.read\",\n \"request\": {}\n}\n```\n\nEvery successful response must include the same protocol and `success: true`:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"data\": {}\n}\n```\n\nOnly stdout is parsed. Write no logs to stdout. agent-browser suppresses plugin stderr for core integrations, so use files or your own debug mode when developing.\n\nCore integrations suppress plugin-provided error text in user-facing errors to reduce accidental secret exposure. Generic `plugin run` keeps plugin error text because it is a developer-facing command.\n\n## Plugin manifest\n\nSupport `plugin.manifest` so users can add your plugin without manually entering capabilities:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"plugin.manifest\",\n \"capability\": \"plugin.manifest\",\n \"request\": {}\n}\n```\n\nReturn the plugin name and capabilities:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"manifest\": {\n \"name\": \"captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"],\n \"description\": \"Solve CAPTCHA challenges through Example CAPTCHA\"\n }\n}\n```\n\nWith a manifest, users can run:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha\n```\n\nWithout a manifest, users must pass `--capability` flags during add.\n\n## Capabilities\n\n<table>\n <thead>\n <tr><th>Capability</th><th>Request type</th><th>How users invoke it</th><th>Response field</th></tr>\n </thead>\n <tbody>\n <tr><td><code>credential.read</code></td><td><code>credential.resolve</code></td><td><code>auth login --credential-provider <name></code></td><td><code>credential</code></td></tr>\n <tr><td><code>browser.provider</code></td><td><code>browser.launch</code>, <code>browser.close</code></td><td><code>--provider <name></code></td><td><code>browser</code></td></tr>\n <tr><td><code>launch.mutate</code></td><td><code>launch.mutate</code></td><td>Any local launch</td><td><code>launch</code></td></tr>\n <tr><td><code>command.run</code></td><td>Custom request type</td><td><code>plugin run <name> <type></code></td><td><code>data</code></td></tr>\n </tbody>\n</table>\n\nPlugins may declare custom capabilities such as `captcha.solve`. `plugin run` can invoke `command.run` and custom capabilities, but it cannot invoke core capabilities or protocol request types directly. Use the dedicated command path for `credential.read`, `browser.provider`, and `launch.mutate`.\n\n## Minimal plugin\n\nThis plugin implements `captcha.solve` and returns a fake token:\n\n```js\n#!/usr/bin/env node\n\nconst chunks = [];\nfor await (const chunk of process.stdin) {\n chunks.push(chunk);\n}\n\nconst input = JSON.parse(Buffer.concat(chunks).toString(\"utf8\"));\n\nfunction reply(body) {\n process.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: true,\n ...body,\n })\n );\n}\n\nif (input.protocol !== \"agent-browser.plugin.v1\") {\n process.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: false,\n error: \"unsupported protocol\",\n })\n );\n process.exit(0);\n}\n\nif (input.type === \"plugin.manifest\") {\n reply({\n manifest: {\n name: \"captcha\",\n capabilities: [\"command.run\", \"captcha.solve\"],\n description: \"Example CAPTCHA plugin\",\n },\n });\n process.exit(0);\n}\n\nif (input.type === \"captcha.solve\") {\n reply({\n data: {\n token: \"example-token\",\n siteKey: input.request.siteKey,\n url: input.request.url,\n },\n });\n process.exit(0);\n}\n\nprocess.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: false,\n error: `unsupported request type: ${input.type}`,\n })\n);\n```\n\nMake it executable and configure it:\n\n```bash\nchmod +x ./agent-browser-plugin-captcha\n```\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"captcha\",\n \"command\": \"./agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nRun it:\n\n```bash\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"abc\",\"url\":\"https://example.com\"}'\n```\n\n## Credential plugin\n\nA credential plugin receives:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"credential.resolve\",\n \"capability\": \"credential.read\",\n \"request\": {\n \"profileName\": \"my-app\",\n \"itemRef\": \"My App\",\n \"url\": \"https://app.example.com/login\"\n }\n}\n```\n\nReturn `credential`:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"credential\": {\n \"username\": \"alice@example.com\",\n \"password\": \"secret\",\n \"url\": \"https://app.example.com/login\",\n \"usernameSelector\": \"#username\",\n \"passwordSelector\": \"#password\",\n \"submitSelector\": \"input[type=submit]\"\n }\n}\n```\n\nUse it for one login:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\n```\n\nFor a login form reached through stateful in-page setup, add `--no-navigate`. The active top-level page must have the same scheme, host, and effective port as the effective credential URL. Command-level `--url` overrides provider URL metadata and supplies this expected origin without navigating. The provider secret remains outside generated process arguments and normal output:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\n```\n\nFor external vaults, prefer calling the vendor CLI from the plugin and relying on its existing local session. Do not pass vault tokens in `agent-browser.json`.\n\n## Browser provider plugin\n\nA browser provider plugin receives `browser.launch` and returns a CDP URL:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"browser\": {\n \"cdpUrl\": \"ws://127.0.0.1:9222/devtools/browser/session\",\n \"directPage\": false,\n \"metadata\": {\n \"sessionId\": \"provider-session-id\"\n },\n \"cleanup\": {\n \"sessionId\": \"provider-session-id\"\n }\n }\n}\n```\n\nThen users launch through the plugin name:\n\n```bash\nagent-browser --provider cloud-browser open https://example.com\n```\n\nIf `cleanup` is returned and connection fails, agent-browser later sends it back as the request body for `browser.close`.\n\n## Launch mutator plugin\n\nA launch mutator receives local launch options before Chrome starts and can append arguments, extensions, init scripts, or a user agent:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"launch\": {\n \"args\": [\"--disable-blink-features=AutomationControlled\"],\n \"extensions\": [\"/absolute/path/to/extension\"],\n \"initScripts\": [\n \"Object.defineProperty(navigator, 'webdriver', { get: () => undefined });\"\n ],\n \"userAgent\": \"my-agent/1.0\"\n }\n}\n```\n\nConfigure it with `launch.mutate`, then use any local launch command:\n\n```bash\nagent-browser open https://example.com\n```\n\nLaunch mutators do not run for CDP connections or remote browser providers because those browsers are already running outside the local launch path.\n\n## Policy and confirmation\n\nPlugin access is exposed as capability-scoped policy actions:\n\n```bash\nagent-browser --confirm-actions plugin:vault:credential.read auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --confirm-actions plugin:cloud-browser:browser.provider --provider cloud-browser open https://example.com\nagent-browser --confirm-actions plugin:stealth:launch.mutate open https://example.com\n```\n\nThe action string is `plugin:<name>:<capability>`.\n\n## Packaging guidance\n\nFor npm packages, expose a `bin` command with no required stdout logs:\n\n```json\n{\n \"name\": \"agent-browser-plugin-example\",\n \"bin\": {\n \"agent-browser-plugin-example\": \"./bin/plugin.js\"\n }\n}\n```\n\nKeep the plugin small and explicit:\n\n- Declare only the capabilities it actually supports\n- Read exactly one request from stdin\n- Write exactly one JSON response to stdout\n- Keep secrets out of command-line arguments\n- Let agent-browser handle navigation, selectors, screenshots, state, and policy",
|
||
"legacyMarkdownSha256": "d3d0bf3ad53ce7801b34133a84432db93c5a538adbbcd77b6db16dce4b54e147",
|
||
"modernMarkdown": "# Plugins\n\nPlugins let agent-browser integrate with external tools without adding those tools to core. A plugin is a local executable that reads one JSON request from stdin and writes one JSON response to stdout.\n\nUse plugins for vault-backed login, custom browser providers, local launch customization, and domain-specific commands such as CAPTCHA solving.\n\n## When to write a plugin\n\nWrite a plugin when the integration needs vendor SDKs, local CLIs, credentials, paid APIs, or behavior that should not become an agent-browser dependency.\n\nGood plugin fits:\n\n- Resolve login credentials from an external vault\n- Launch a browser through a hosted provider and return a CDP WebSocket URL\n- Add local Chrome launch arguments, extensions, or init scripts\n- Run a namespaced command such as `captcha.solve`\n\nKeep browser automation itself in agent-browser. A plugin should provide data or launch configuration, then let agent-browser continue driving the browser.\n\n## What to build as a plugin\n\nThese are good places for plugin authors to start:\n\n- **New cloud browser providers**: Hosted browser platforms are good models for `browser.provider`. Existing built-ins can stay in core for compatibility, but new providers should usually start as plugins.\n- **Vault integrations**: Password managers, secret stores, and enterprise SSO helpers fit `credential.read`. Keep the local encrypted auth vault in core, but put vendor-specific vault access in plugins.\n- **Stealth and anti-detection**: These techniques change quickly and can be risky to support in core. They fit `launch.mutate` plugins that append launch args, extensions, init scripts, or user-agent overrides.\n- **CAPTCHA solvers**: CAPTCHA integrations are plugin territory because they involve third-party APIs, credentials, policy concerns, and fast vendor churn. They can use `command.run` or a custom capability such as `captcha.solve`.\n- **Vendor-specific auth helpers**: Login helpers for a specific app, IdP, or enterprise flow should live outside core unless they become generic browser automation primitives.\n\n## Add a plugin someone else built\n\nUse `plugin add` with the package or repository name:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha\nagent-browser plugin add @company/agent-browser-plugin-vault --name vault\nagent-browser plugin add org/agent-browser-plugin-cloud-browser\n```\n\nagent-browser chooses the source from the reference:\n\n<table>\n <thead>\n <tr><th>Reference</th><th>Source</th><th>Example</th></tr>\n </thead>\n <tbody>\n <tr><td><code>name</code></td><td>npm package</td><td><code>agent-browser-plugin-captcha</code></td></tr>\n <tr><td><code>@scope/name</code></td><td>scoped npm package</td><td><code>@company/agent-browser-plugin-vault</code></td></tr>\n <tr><td><code>owner/repo</code></td><td>GitHub repository</td><td><code>org/agent-browser-plugin-cloud-browser</code></td></tr>\n </tbody>\n</table>\n\n`plugin add` writes `./agent-browser.json` by default. Use `--global` to write `~/.agent-browser/config.json` instead.\n\nDuring add, agent-browser runs the package once and asks for `plugin.manifest`. A plugin manifest declares the plugin name and capabilities. If a plugin does not support manifests yet, use the capabilities from the plugin README:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha --capability command.run --capability captcha.solve --no-manifest\n```\n\nVerify the plugin is configured:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show captcha\n```\n\nThen use it through the command path for its capability:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\nagent-browser --provider cloud-browser open https://example.com\nagent-browser open https://example.com\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"abc\",\"url\":\"https://example.com\"}'\n```\n\n`launch.mutate` plugins run automatically for local launches such as `agent-browser open`.\n\n## Configure a plugin\n\n`plugin add` creates this config for you. You can also edit the `plugins` array manually:\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"args\": [],\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nInspect the registry:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show vault\n```\n\n`AGENT_BROWSER_PLUGINS` can replace config discovery with a JSON array using the same shape.\n\nDo not put API tokens, vault tokens, or passwords in plugin `args`. Use the vendor's own CLI login, keychain, environment, or session mechanism outside agent-browser config.\n\n## Protocol\n\nagent-browser starts the executable, writes this envelope to stdin, waits for stdout, and parses stdout as JSON:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"credential.resolve\",\n \"capability\": \"credential.read\",\n \"request\": {}\n}\n```\n\nEvery successful response must include the same protocol and `success: true`:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"data\": {}\n}\n```\n\nOnly stdout is parsed. Write no logs to stdout. agent-browser suppresses plugin stderr for core integrations, so use files or your own debug mode when developing.\n\nCore integrations suppress plugin-provided error text in user-facing errors to reduce accidental secret exposure. Generic `plugin run` keeps plugin error text because it is a developer-facing command.\n\n## Plugin manifest\n\nSupport `plugin.manifest` so users can add your plugin without manually entering capabilities:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"plugin.manifest\",\n \"capability\": \"plugin.manifest\",\n \"request\": {}\n}\n```\n\nReturn the plugin name and capabilities:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"manifest\": {\n \"name\": \"captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"],\n \"description\": \"Solve CAPTCHA challenges through Example CAPTCHA\"\n }\n}\n```\n\nWith a manifest, users can run:\n\n```bash\nagent-browser plugin add agent-browser-plugin-captcha\n```\n\nWithout a manifest, users must pass `--capability` flags during add.\n\n## Capabilities\n\n<table>\n <thead>\n <tr><th>Capability</th><th>Request type</th><th>How users invoke it</th><th>Response field</th></tr>\n </thead>\n <tbody>\n <tr><td><code>credential.read</code></td><td><code>credential.resolve</code></td><td><code>auth login --credential-provider <name></code></td><td><code>credential</code></td></tr>\n <tr><td><code>browser.provider</code></td><td><code>browser.launch</code>, <code>browser.close</code></td><td><code>--provider <name></code></td><td><code>browser</code></td></tr>\n <tr><td><code>launch.mutate</code></td><td><code>launch.mutate</code></td><td>Any local launch</td><td><code>launch</code></td></tr>\n <tr><td><code>command.run</code></td><td>Custom request type</td><td><code>plugin run <name> <type></code></td><td><code>data</code></td></tr>\n </tbody>\n</table>\n\nPlugins may declare custom capabilities such as `captcha.solve`. `plugin run` can invoke `command.run` and custom capabilities, but it cannot invoke core capabilities or protocol request types directly. Use the dedicated command path for `credential.read`, `browser.provider`, and `launch.mutate`.\n\n## Minimal plugin\n\nThis plugin implements `captcha.solve` and returns a fake token:\n\n```js\n#!/usr/bin/env node\n\nconst chunks = [];\nfor await (const chunk of process.stdin) {\n chunks.push(chunk);\n}\n\nconst input = JSON.parse(Buffer.concat(chunks).toString(\"utf8\"));\n\nfunction reply(body) {\n process.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: true,\n ...body,\n })\n );\n}\n\nif (input.protocol !== \"agent-browser.plugin.v1\") {\n process.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: false,\n error: \"unsupported protocol\",\n })\n );\n process.exit(0);\n}\n\nif (input.type === \"plugin.manifest\") {\n reply({\n manifest: {\n name: \"captcha\",\n capabilities: [\"command.run\", \"captcha.solve\"],\n description: \"Example CAPTCHA plugin\",\n },\n });\n process.exit(0);\n}\n\nif (input.type === \"captcha.solve\") {\n reply({\n data: {\n token: \"example-token\",\n siteKey: input.request.siteKey,\n url: input.request.url,\n },\n });\n process.exit(0);\n}\n\nprocess.stdout.write(\n JSON.stringify({\n protocol: \"agent-browser.plugin.v1\",\n success: false,\n error: `unsupported request type: ${input.type}`,\n })\n);\n```\n\nMake it executable and configure it:\n\n```bash\nchmod +x ./agent-browser-plugin-captcha\n```\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"captcha\",\n \"command\": \"./agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nRun it:\n\n```bash\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"abc\",\"url\":\"https://example.com\"}'\n```\n\n## Credential plugin\n\nA credential plugin receives:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"type\": \"credential.resolve\",\n \"capability\": \"credential.read\",\n \"request\": {\n \"profileName\": \"my-app\",\n \"itemRef\": \"My App\",\n \"url\": \"https://app.example.com/login\"\n }\n}\n```\n\nReturn `credential`:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"credential\": {\n \"username\": \"alice@example.com\",\n \"password\": \"secret\",\n \"url\": \"https://app.example.com/login\",\n \"usernameSelector\": \"#username\",\n \"passwordSelector\": \"#password\",\n \"submitSelector\": \"input[type=submit]\"\n }\n}\n```\n\nUse it for one login:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\n```\n\nFor a login form reached through stateful in-page setup, add `--no-navigate`. The active top-level page must have the same scheme, host, and effective port as the effective credential URL. Command-level `--url` overrides provider URL metadata and supplies this expected origin without navigating. The provider secret remains outside generated process arguments and normal output:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\n```\n\nFor external vaults, prefer calling the vendor CLI from the plugin and relying on its existing local session. Do not pass vault tokens in `agent-browser.json`.\n\n## Browser provider plugin\n\nA browser provider plugin receives `browser.launch` and returns a CDP URL:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"browser\": {\n \"cdpUrl\": \"ws://127.0.0.1:9222/devtools/browser/session\",\n \"directPage\": false,\n \"metadata\": {\n \"sessionId\": \"provider-session-id\"\n },\n \"cleanup\": {\n \"sessionId\": \"provider-session-id\"\n }\n }\n}\n```\n\nThen users launch through the plugin name:\n\n```bash\nagent-browser --provider cloud-browser open https://example.com\n```\n\nIf `cleanup` is returned and connection fails, agent-browser later sends it back as the request body for `browser.close`.\n\n## Launch mutator plugin\n\nA launch mutator receives local launch options before Chrome starts and can append arguments, extensions, init scripts, or a user agent:\n\n```json\n{\n \"protocol\": \"agent-browser.plugin.v1\",\n \"success\": true,\n \"launch\": {\n \"args\": [\"--disable-blink-features=AutomationControlled\"],\n \"extensions\": [\"/absolute/path/to/extension\"],\n \"initScripts\": [\n \"Object.defineProperty(navigator, 'webdriver', { get: () => undefined });\"\n ],\n \"userAgent\": \"my-agent/1.0\"\n }\n}\n```\n\nConfigure it with `launch.mutate`, then use any local launch command:\n\n```bash\nagent-browser open https://example.com\n```\n\nLaunch mutators do not run for CDP connections or remote browser providers because those browsers are already running outside the local launch path.\n\n## Policy and confirmation\n\nPlugin access is exposed as capability-scoped policy actions:\n\n```bash\nagent-browser --confirm-actions plugin:vault:credential.read auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --confirm-actions plugin:cloud-browser:browser.provider --provider cloud-browser open https://example.com\nagent-browser --confirm-actions plugin:stealth:launch.mutate open https://example.com\n```\n\nThe action string is `plugin:<name>:<capability>`.\n\n## Packaging guidance\n\nFor npm packages, expose a `bin` command with no required stdout logs:\n\n```json\n{\n \"name\": \"agent-browser-plugin-example\",\n \"bin\": {\n \"agent-browser-plugin-example\": \"./bin/plugin.js\"\n }\n}\n```\n\nKeep the plugin small and explicit:\n\n- Declare only the capabilities it actually supports\n- Read exactly one request from stdin\n- Write exactly one JSON response to stdout\n- Keep secrets out of command-line arguments\n- Let agent-browser handle navigation, selectors, screenshots, state, and policy",
|
||
"modernMarkdownSha256": "d3d0bf3ad53ce7801b34133a84432db93c5a538adbbcd77b6db16dce4b54e147",
|
||
"navigation": {
|
||
"title": "Plugins",
|
||
"section": "Reference"
|
||
}
|
||
},
|
||
{
|
||
"path": "/profiler",
|
||
"source": "docs/src/app/profiler/page.mdx",
|
||
"layout": "docs/src/app/profiler/layout.tsx",
|
||
"sourceSha256": "35d84228ed2efa5b521452427e2bc9c007fbf6f01571f9b9af0eaf856cb948d0",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Profiler\n",
|
||
"markdownTitle": "Profiler",
|
||
"title": "Profiler | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Profiler | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Profiler - agent-browser",
|
||
"twitterTitle": "Profiler | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Profiler",
|
||
"id": "profiler"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Basic usage",
|
||
"id": "basic-usage"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Commands",
|
||
"id": "commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Trace categories",
|
||
"id": "trace-categories"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Common categories",
|
||
"id": "common-categories"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Output format",
|
||
"id": "output-format"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Viewing profiles",
|
||
"id": "viewing-profiles"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Use cases",
|
||
"id": "use-cases"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Limitations",
|
||
"id": "limitations"
|
||
}
|
||
],
|
||
"content": [
|
||
"Capture Chrome DevTools performance profiles during browser automation. Use profiles to diagnose slow page loads, expensive JavaScript, layout thrashing, and other performance bottlenecks in agentic workflows.",
|
||
"# Start profiling agent-browser profiler start # Perform actions agent-browser navigate https://example.com agent-browser click \"#button\" # Stop and save profile agent-browser profiler stop ./trace.json",
|
||
"The output JSON file can be loaded into Chrome DevTools, Perfetto UI, or any tool that accepts Chrome Trace Event format.",
|
||
"Command",
|
||
"Description",
|
||
"profiler start",
|
||
"Start recording a performance profile",
|
||
"profiler start --categories <list>",
|
||
"Start with custom trace categories",
|
||
"profiler stop [path]",
|
||
"Stop profiling and save to file",
|
||
"The --categories flag accepts a comma-separated list of Chrome trace categories.",
|
||
"agent-browser profiler start --categories \"devtools.timeline,v8.execute,blink.user_timing\"",
|
||
"Default categories include devtools.timeline, v8.execute, blink, blink.user_timing, latencyInfo, renderer.scheduler, toplevel, and several disabled-by-default-* categories for detailed CPU profiling and call stack analysis.",
|
||
"Category",
|
||
"What it captures",
|
||
"devtools.timeline",
|
||
"Standard DevTools performance events",
|
||
"v8.execute",
|
||
"Time spent running JavaScript",
|
||
"blink",
|
||
"Renderer events (layout, paint, style)",
|
||
"blink.user_timing",
|
||
"performance.mark() and performance.measure() calls",
|
||
"latencyInfo",
|
||
"Input-to-display latency",
|
||
"disabled-by-default-v8.cpu_profiler",
|
||
"Sampling-based JS CPU profiling",
|
||
"The output is a JSON file in Chrome Trace Event format:",
|
||
"{ \"traceEvents\": [ { \"cat\": \"devtools.timeline\", \"name\": \"RunTask\", \"ph\": \"X\", \"ts\": 12345, \"dur\": 100, \"pid\": 1, \"tid\": 1 } ], \"metadata\": { \"clock-domain\": \"LINUX_CLOCK_MONOTONIC\" } }",
|
||
"The metadata.clock-domain field reflects the host platform (Linux or macOS). On Windows it is omitted.",
|
||
"Chrome DevTools -- Performance panel > Load profile",
|
||
"Perfetto -- https://ui.perfetto.dev/ (drag and drop the JSON file)",
|
||
"Trace Viewer -- chrome://tracing in any Chromium browser",
|
||
"Page load analysis -- Profile navigation to identify slow resources, long tasks, or layout shifts",
|
||
"Interaction profiling -- Measure the cost of clicks, form fills, and other user interactions",
|
||
"CI regression checks -- Capture profiles per build and compare trace data over time",
|
||
"Agent workflow optimization -- Find which steps in an agentic flow are most expensive",
|
||
"Only works with Chromium-based browsers (Chrome, Edge). Not supported on Firefox or WebKit.",
|
||
"Trace data accumulates in memory while profiling is active (capped at 5 million events). Stop profiling promptly after the area of interest.",
|
||
"Data collection on stop has a 30-second timeout. If the browser is unresponsive, the stop command may fail.",
|
||
"When no output path is provided, the profile is saved to an auto-generated path under the agent-browser temp directory."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Profiler\n\nCapture Chrome DevTools performance profiles during browser automation. Use profiles to diagnose slow page loads, expensive JavaScript, layout thrashing, and other performance bottlenecks in agentic workflows.\n\n## Basic usage\n\n```bash\n# Start profiling\nagent-browser profiler start\n\n# Perform actions\nagent-browser navigate https://example.com\nagent-browser click \"#button\"\n\n# Stop and save profile\nagent-browser profiler stop ./trace.json\n```\n\nThe output JSON file can be loaded into Chrome DevTools, Perfetto UI, or any tool that accepts Chrome Trace Event format.\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>profiler start</code></td><td>Start recording a performance profile</td></tr>\n <tr><td><code>profiler start --categories <list></code></td><td>Start with custom trace categories</td></tr>\n <tr><td><code>profiler stop [path]</code></td><td>Stop profiling and save to file</td></tr>\n </tbody>\n</table>\n\n## Trace categories\n\nThe `--categories` flag accepts a comma-separated list of Chrome trace categories.\n\n```bash\nagent-browser profiler start --categories \"devtools.timeline,v8.execute,blink.user_timing\"\n```\n\nDefault categories include `devtools.timeline`, `v8.execute`, `blink`, `blink.user_timing`, `latencyInfo`, `renderer.scheduler`, `toplevel`, and several `disabled-by-default-*` categories for detailed CPU profiling and call stack analysis.\n\n### Common categories\n\n<table>\n <thead>\n <tr><th>Category</th><th>What it captures</th></tr>\n </thead>\n <tbody>\n <tr><td><code>devtools.timeline</code></td><td>Standard DevTools performance events</td></tr>\n <tr><td><code>v8.execute</code></td><td>Time spent running JavaScript</td></tr>\n <tr><td><code>blink</code></td><td>Renderer events (layout, paint, style)</td></tr>\n <tr><td><code>blink.user_timing</code></td><td><code>performance.mark()</code> and <code>performance.measure()</code> calls</td></tr>\n <tr><td><code>latencyInfo</code></td><td>Input-to-display latency</td></tr>\n <tr><td><code>disabled-by-default-v8.cpu_profiler</code></td><td>Sampling-based JS CPU profiling</td></tr>\n </tbody>\n</table>\n\n## Output format\n\nThe output is a JSON file in Chrome Trace Event format:\n\n```json\n{\n \"traceEvents\": [\n {\n \"cat\": \"devtools.timeline\",\n \"name\": \"RunTask\",\n \"ph\": \"X\",\n \"ts\": 12345,\n \"dur\": 100,\n \"pid\": 1,\n \"tid\": 1\n }\n ],\n \"metadata\": {\n \"clock-domain\": \"LINUX_CLOCK_MONOTONIC\"\n }\n}\n```\n\nThe `metadata.clock-domain` field reflects the host platform (Linux or macOS). On Windows it is omitted.\n\n## Viewing profiles\n\n- **Chrome DevTools** -- Performance panel > Load profile\n- **Perfetto** -- https://ui.perfetto.dev/ (drag and drop the JSON file)\n- **Trace Viewer** -- `chrome://tracing` in any Chromium browser\n\n## Use cases\n\n- **Page load analysis** -- Profile navigation to identify slow resources, long tasks, or layout shifts\n- **Interaction profiling** -- Measure the cost of clicks, form fills, and other user interactions\n- **CI regression checks** -- Capture profiles per build and compare trace data over time\n- **Agent workflow optimization** -- Find which steps in an agentic flow are most expensive\n\n## Limitations\n\n- Only works with Chromium-based browsers (Chrome, Edge). Not supported on Firefox or WebKit.\n- Trace data accumulates in memory while profiling is active (capped at 5 million events). Stop profiling promptly after the area of interest.\n- Data collection on stop has a 30-second timeout. If the browser is unresponsive, the stop command may fail.\n- When no output path is provided, the profile is saved to an auto-generated path under the agent-browser temp directory.",
|
||
"legacyMarkdownSha256": "23e66f27f8d52308a6b10ef9dccd160a507f84d352573bb82670ed5169370663",
|
||
"modernMarkdown": "# Profiler\n\nCapture Chrome DevTools performance profiles during browser automation. Use profiles to diagnose slow page loads, expensive JavaScript, layout thrashing, and other performance bottlenecks in agentic workflows.\n\n## Basic usage\n\n```bash\n# Start profiling\nagent-browser profiler start\n\n# Perform actions\nagent-browser navigate https://example.com\nagent-browser click \"#button\"\n\n# Stop and save profile\nagent-browser profiler stop ./trace.json\n```\n\nThe output JSON file can be loaded into Chrome DevTools, Perfetto UI, or any tool that accepts Chrome Trace Event format.\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>profiler start</code></td><td>Start recording a performance profile</td></tr>\n <tr><td><code>profiler start --categories <list></code></td><td>Start with custom trace categories</td></tr>\n <tr><td><code>profiler stop [path]</code></td><td>Stop profiling and save to file</td></tr>\n </tbody>\n</table>\n\n## Trace categories\n\nThe `--categories` flag accepts a comma-separated list of Chrome trace categories.\n\n```bash\nagent-browser profiler start --categories \"devtools.timeline,v8.execute,blink.user_timing\"\n```\n\nDefault categories include `devtools.timeline`, `v8.execute`, `blink`, `blink.user_timing`, `latencyInfo`, `renderer.scheduler`, `toplevel`, and several `disabled-by-default-*` categories for detailed CPU profiling and call stack analysis.\n\n### Common categories\n\n<table>\n <thead>\n <tr><th>Category</th><th>What it captures</th></tr>\n </thead>\n <tbody>\n <tr><td><code>devtools.timeline</code></td><td>Standard DevTools performance events</td></tr>\n <tr><td><code>v8.execute</code></td><td>Time spent running JavaScript</td></tr>\n <tr><td><code>blink</code></td><td>Renderer events (layout, paint, style)</td></tr>\n <tr><td><code>blink.user_timing</code></td><td><code>performance.mark()</code> and <code>performance.measure()</code> calls</td></tr>\n <tr><td><code>latencyInfo</code></td><td>Input-to-display latency</td></tr>\n <tr><td><code>disabled-by-default-v8.cpu_profiler</code></td><td>Sampling-based JS CPU profiling</td></tr>\n </tbody>\n</table>\n\n## Output format\n\nThe output is a JSON file in Chrome Trace Event format:\n\n```json\n{\n \"traceEvents\": [\n {\n \"cat\": \"devtools.timeline\",\n \"name\": \"RunTask\",\n \"ph\": \"X\",\n \"ts\": 12345,\n \"dur\": 100,\n \"pid\": 1,\n \"tid\": 1\n }\n ],\n \"metadata\": {\n \"clock-domain\": \"LINUX_CLOCK_MONOTONIC\"\n }\n}\n```\n\nThe `metadata.clock-domain` field reflects the host platform (Linux or macOS). On Windows it is omitted.\n\n## Viewing profiles\n\n- **Chrome DevTools** -- Performance panel > Load profile\n- **Perfetto** -- https://ui.perfetto.dev/ (drag and drop the JSON file)\n- **Trace Viewer** -- `chrome://tracing` in any Chromium browser\n\n## Use cases\n\n- **Page load analysis** -- Profile navigation to identify slow resources, long tasks, or layout shifts\n- **Interaction profiling** -- Measure the cost of clicks, form fills, and other user interactions\n- **CI regression checks** -- Capture profiles per build and compare trace data over time\n- **Agent workflow optimization** -- Find which steps in an agentic flow are most expensive\n\n## Limitations\n\n- Only works with Chromium-based browsers (Chrome, Edge). Not supported on Firefox or WebKit.\n- Trace data accumulates in memory while profiling is active (capped at 5 million events). Stop profiling promptly after the area of interest.\n- Data collection on stop has a 30-second timeout. If the browser is unresponsive, the stop command may fail.\n- When no output path is provided, the profile is saved to an auto-generated path under the agent-browser temp directory.",
|
||
"modernMarkdownSha256": "23e66f27f8d52308a6b10ef9dccd160a507f84d352573bb82670ed5169370663",
|
||
"navigation": {
|
||
"title": "Profiler",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/providers/agentcore",
|
||
"source": "docs/src/app/providers/agentcore/page.mdx",
|
||
"layout": "docs/src/app/providers/agentcore/layout.tsx",
|
||
"sourceSha256": "836b71e0aca383ab7331cb4dd5496485310edb27ce45227dd885680775b97a86",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# AgentCore\n",
|
||
"markdownTitle": "AgentCore",
|
||
"title": "AgentCore | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "AgentCore | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "AgentCore - agent-browser",
|
||
"twitterTitle": "AgentCore | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "AgentCore",
|
||
"id": "agentcore"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Configuration",
|
||
"id": "configuration"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Browser Profiles",
|
||
"id": "browser-profiles"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Live View",
|
||
"id": "live-view"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Credential Resolution",
|
||
"id": "credential-resolution"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Example",
|
||
"id": "example"
|
||
}
|
||
],
|
||
"content": [
|
||
"AWS Bedrock AgentCore provides cloud browser sessions with SigV4 authentication. Use it when running agent-browser in AWS environments or when you need managed cloud browsers backed by AWS infrastructure.",
|
||
"Credentials are automatically resolved from:",
|
||
"Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)",
|
||
"AWS CLI (aws configure export-credentials) which supports SSO, profiles, IAM roles, etc.",
|
||
"agent-browser -p agentcore open https://example.com",
|
||
"Or use environment variables for CI/scripts:",
|
||
"export AGENT_BROWSER_PROVIDER=agentcore agent-browser open https://example.com",
|
||
"The -p flag takes precedence over AGENT_BROWSER_PROVIDER.",
|
||
"Variable",
|
||
"Description",
|
||
"Default",
|
||
"AGENTCORE_REGION",
|
||
"AWS region for the AgentCore endpoint",
|
||
"us-east-1",
|
||
"AGENTCORE_BROWSER_ID",
|
||
"Browser identifier",
|
||
"aws.browser.v1",
|
||
"AGENTCORE_PROFILE_ID",
|
||
"Browser profile for persistent state (cookies, localStorage)",
|
||
"(none)",
|
||
"AGENTCORE_SESSION_TIMEOUT",
|
||
"Session timeout in seconds",
|
||
"3600",
|
||
"AWS_PROFILE",
|
||
"AWS CLI profile for credential resolution",
|
||
"default",
|
||
"AWS_ACCESS_KEY_ID",
|
||
"AWS access key (checked before AWS CLI fallback)",
|
||
"AWS_SECRET_ACCESS_KEY",
|
||
"AWS secret key",
|
||
"AWS_SESSION_TOKEN",
|
||
"Temporary session token (for STS/SSO credentials)",
|
||
"Use AGENTCORE_PROFILE_ID to persist browser state (cookies, localStorage) across sessions:",
|
||
"AGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://example.com",
|
||
"When a profile is set, AgentCore stores and restores browser state automatically between sessions.",
|
||
"When a session starts, AgentCore prints a Live View URL to stderr:",
|
||
"Session: abc123-def456 Live View: https://us-east-1.console.aws.amazon.com/bedrock-agentcore/browser/aws.browser.v1/session/abc123-def456#",
|
||
"Open this URL in your browser to watch the agent session in real time from the AWS Console.",
|
||
"AgentCore uses lightweight manual SigV4 signing (no AWS SDK dependency). Credentials are resolved in order:",
|
||
"Environment variables (AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY, optionally AWS_SESSION_TOKEN)",
|
||
"AWS CLI (aws configure export-credentials --format env), which supports SSO, IAM roles, credential files, and profiles",
|
||
"If using SSO, run aws sso login before launching agent-browser. Set AWS_PROFILE to select a specific named profile.",
|
||
"# Basic usage (credentials auto-resolved via AWS CLI) agent-browser -p agentcore open https://example.com # With a browser profile for persistent login state AGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://x.com/home # With explicit region AGENTCORE_REGION=eu-west-1 agent-browser -p agentcore open https://example.com # With SSO profile AWS_PROFILE=my-sso-profile agent-browser -p agentcore open https://example.com",
|
||
"When enabled, agent-browser connects to an AgentCore cloud browser session instead of launching a local browser. All commands work identically."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://aws.amazon.com/bedrock/agentcore/",
|
||
"text": "AWS Bedrock AgentCore"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# AgentCore\n\n[AWS Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/) provides cloud browser sessions with SigV4 authentication. Use it when running agent-browser in AWS environments or when you need managed cloud browsers backed by AWS infrastructure.\n\n## Setup\n\nCredentials are automatically resolved from:\n\n1. Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)\n2. AWS CLI (`aws configure export-credentials`) which supports SSO, profiles, IAM roles, etc.\n\n```bash\nagent-browser -p agentcore open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENTCORE_REGION</code></td><td>AWS region for the AgentCore endpoint</td><td><code>us-east-1</code></td></tr>\n <tr><td><code>AGENTCORE_BROWSER_ID</code></td><td>Browser identifier</td><td><code>aws.browser.v1</code></td></tr>\n <tr><td><code>AGENTCORE_PROFILE_ID</code></td><td>Browser profile for persistent state (cookies, localStorage)</td><td>(none)</td></tr>\n <tr><td><code>AGENTCORE_SESSION_TIMEOUT</code></td><td>Session timeout in seconds</td><td><code>3600</code></td></tr>\n <tr><td><code>AWS_PROFILE</code></td><td>AWS CLI profile for credential resolution</td><td><code>default</code></td></tr>\n <tr><td><code>AWS_ACCESS_KEY_ID</code></td><td>AWS access key (checked before AWS CLI fallback)</td><td>(none)</td></tr>\n <tr><td><code>AWS_SECRET_ACCESS_KEY</code></td><td>AWS secret key</td><td>(none)</td></tr>\n <tr><td><code>AWS_SESSION_TOKEN</code></td><td>Temporary session token (for STS/SSO credentials)</td><td>(none)</td></tr>\n </tbody>\n</table>\n\n## Browser Profiles\n\nUse `AGENTCORE_PROFILE_ID` to persist browser state (cookies, localStorage) across sessions:\n\n```bash\nAGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://example.com\n```\n\nWhen a profile is set, AgentCore stores and restores browser state automatically between sessions.\n\n## Live View\n\nWhen a session starts, AgentCore prints a Live View URL to stderr:\n\n```\nSession: abc123-def456\nLive View: https://us-east-1.console.aws.amazon.com/bedrock-agentcore/browser/aws.browser.v1/session/abc123-def456#\n```\n\nOpen this URL in your browser to watch the agent session in real time from the AWS Console.\n\n## Credential Resolution\n\nAgentCore uses lightweight manual SigV4 signing (no AWS SDK dependency). Credentials are resolved in order:\n\n1. **Environment variables** (`AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY`, optionally `AWS_SESSION_TOKEN`)\n2. **AWS CLI** (`aws configure export-credentials --format env`), which supports SSO, IAM roles, credential files, and profiles\n\nIf using SSO, run `aws sso login` before launching agent-browser. Set `AWS_PROFILE` to select a specific named profile.\n\n## Example\n\n```bash\n# Basic usage (credentials auto-resolved via AWS CLI)\nagent-browser -p agentcore open https://example.com\n\n# With a browser profile for persistent login state\nAGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://x.com/home\n\n# With explicit region\nAGENTCORE_REGION=eu-west-1 agent-browser -p agentcore open https://example.com\n\n# With SSO profile\nAWS_PROFILE=my-sso-profile agent-browser -p agentcore open https://example.com\n```\n\nWhen enabled, agent-browser connects to an AgentCore cloud browser session instead of launching a local browser. All commands work identically.",
|
||
"legacyMarkdownSha256": "a39ef6c7f0851c8ff05961e173e2fc1e5fab5f4c94538ccaa7e0aa287bc9f04c",
|
||
"modernMarkdown": "# AgentCore\n\n[AWS Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/) provides cloud browser sessions with SigV4 authentication. Use it when running agent-browser in AWS environments or when you need managed cloud browsers backed by AWS infrastructure.\n\n## Setup\n\nCredentials are automatically resolved from:\n\n1. Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)\n2. AWS CLI (`aws configure export-credentials`) which supports SSO, profiles, IAM roles, etc.\n\n```bash\nagent-browser -p agentcore open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=agentcore\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENTCORE_REGION</code></td><td>AWS region for the AgentCore endpoint</td><td><code>us-east-1</code></td></tr>\n <tr><td><code>AGENTCORE_BROWSER_ID</code></td><td>Browser identifier</td><td><code>aws.browser.v1</code></td></tr>\n <tr><td><code>AGENTCORE_PROFILE_ID</code></td><td>Browser profile for persistent state (cookies, localStorage)</td><td>(none)</td></tr>\n <tr><td><code>AGENTCORE_SESSION_TIMEOUT</code></td><td>Session timeout in seconds</td><td><code>3600</code></td></tr>\n <tr><td><code>AWS_PROFILE</code></td><td>AWS CLI profile for credential resolution</td><td><code>default</code></td></tr>\n <tr><td><code>AWS_ACCESS_KEY_ID</code></td><td>AWS access key (checked before AWS CLI fallback)</td><td>(none)</td></tr>\n <tr><td><code>AWS_SECRET_ACCESS_KEY</code></td><td>AWS secret key</td><td>(none)</td></tr>\n <tr><td><code>AWS_SESSION_TOKEN</code></td><td>Temporary session token (for STS/SSO credentials)</td><td>(none)</td></tr>\n </tbody>\n</table>\n\n## Browser Profiles\n\nUse `AGENTCORE_PROFILE_ID` to persist browser state (cookies, localStorage) across sessions:\n\n```bash\nAGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://example.com\n```\n\nWhen a profile is set, AgentCore stores and restores browser state automatically between sessions.\n\n## Live View\n\nWhen a session starts, AgentCore prints a Live View URL to stderr:\n\n```\nSession: abc123-def456\nLive View: https://us-east-1.console.aws.amazon.com/bedrock-agentcore/browser/aws.browser.v1/session/abc123-def456#\n```\n\nOpen this URL in your browser to watch the agent session in real time from the AWS Console.\n\n## Credential Resolution\n\nAgentCore uses lightweight manual SigV4 signing (no AWS SDK dependency). Credentials are resolved in order:\n\n1. **Environment variables** (`AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY`, optionally `AWS_SESSION_TOKEN`)\n2. **AWS CLI** (`aws configure export-credentials --format env`), which supports SSO, IAM roles, credential files, and profiles\n\nIf using SSO, run `aws sso login` before launching agent-browser. Set `AWS_PROFILE` to select a specific named profile.\n\n## Example\n\n```bash\n# Basic usage (credentials auto-resolved via AWS CLI)\nagent-browser -p agentcore open https://example.com\n\n# With a browser profile for persistent login state\nAGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://x.com/home\n\n# With explicit region\nAGENTCORE_REGION=eu-west-1 agent-browser -p agentcore open https://example.com\n\n# With SSO profile\nAWS_PROFILE=my-sso-profile agent-browser -p agentcore open https://example.com\n```\n\nWhen enabled, agent-browser connects to an AgentCore cloud browser session instead of launching a local browser. All commands work identically.",
|
||
"modernMarkdownSha256": "7f274f41e7aab9589097c49ca8be55a3889770d9549ebb624b8063f2a6a8b428",
|
||
"navigation": {
|
||
"title": "AgentCore",
|
||
"section": "Providers"
|
||
}
|
||
},
|
||
{
|
||
"path": "/providers/browser-use",
|
||
"source": "docs/src/app/providers/browser-use/page.mdx",
|
||
"layout": "docs/src/app/providers/browser-use/layout.tsx",
|
||
"sourceSha256": "d2f8e0a22f10e56692020e9142f410ba036c8f5b4163bb534bb8b2a9da3a4bda",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Browser Use\n",
|
||
"markdownTitle": "Browser Use",
|
||
"title": "Browser Use | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Browser Use | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Browser Use - agent-browser",
|
||
"twitterTitle": "Browser Use | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Browser Use",
|
||
"id": "browser-use"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Browser settings",
|
||
"id": "browser-settings"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Close and recovery",
|
||
"id": "close-and-recovery"
|
||
}
|
||
],
|
||
"content": [
|
||
"Browser Use is an open-source browser automation project for AI agents with over 100,000 GitHub stars, plus a managed Cloud browser service. Browser Use Cloud is useful when running agent-browser in environments where a local browser isn't available, such as serverless and CI environments.",
|
||
"export BROWSER_USE_API_KEY=\"your-api-key\" agent-browser -p browseruse open https://example.com",
|
||
"Or use environment variables for CI/scripts:",
|
||
"export AGENT_BROWSER_PROVIDER=browseruse export BROWSER_USE_API_KEY=\"your-api-key\" agent-browser open https://example.com",
|
||
"The -p flag takes precedence over AGENT_BROWSER_PROVIDER.",
|
||
"Environment variable",
|
||
"Description",
|
||
"BROWSER_USE_PROFILE_ID",
|
||
"Profile UUID for persistent cookies and logins",
|
||
"BROWSER_USE_PROXY_COUNTRY",
|
||
"Managed proxy country, or none/direct to disable proxy",
|
||
"BROWSER_USE_ENABLE_RECORDING",
|
||
"Record the Cloud browser session",
|
||
"export BROWSER_USE_PROFILE_ID=\"your-profile-uuid\" export BROWSER_USE_PROXY_COUNTRY=\"de\" export BROWSER_USE_ENABLE_RECORDING=\"true\" agent-browser -p browseruse open https://example.com",
|
||
"When enabled, agent-browser creates a Browser Use Cloud V4 session and connects to its CDP endpoint. Browser Use setup is limited to 18 seconds, with up to 4 more seconds for cleanup if setup times out. Within setup, creation waits up to 10 seconds and CDP attachment up to 8 seconds; each stop request waits up to 4 seconds. Navigation and other page commands keep their existing timeouts. If creation fails before a browser id is returned, the outcome is unknown; inspect the Browser Use Cloud dashboard before retrying, since a browser may still have been created.",
|
||
"The Cloud browser stays active between commands. Run agent-browser close when the task finishes. The daemon also attempts cleanup on exit, including its default one-hour idle timeout; a failed stop can leave the Cloud browser running.",
|
||
"If a stop keeps returning 404, verify the browser status in Browser Use Cloud. After confirming it has stopped, use a new --session name to continue; agent-browser does not treat 404 as proof of a successful stop.",
|
||
"close succeeds only after Browser Use acknowledges the browser as stopped. On a failed stop, close returns an error and keeps the session id, so running agent-browser close again retries the same browser, and a new launch is blocked until the pending browser is released.",
|
||
"If the daemon exits before a stop succeeds, inspect the Browser Use Cloud dashboard and stop the browser there.",
|
||
"Get your API key from the Browser Use Cloud Dashboard."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://browser-use.com",
|
||
"text": "Browser Use"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/browser-use/browser-use",
|
||
"text": "over 100,000 GitHub stars"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://cloud.browser-use.com/settings?tab=api-keys",
|
||
"text": "Browser Use Cloud Dashboard"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Browser Use\n\n[Browser Use](https://browser-use.com) is an open-source browser automation project for AI agents with [over 100,000 GitHub stars](https://github.com/browser-use/browser-use), plus a managed Cloud browser service. Browser Use Cloud is useful when running agent-browser in environments where a local browser isn't available, such as serverless and CI environments.\n\n## Setup\n\n```bash\nagent-browser -p browseruse open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Browser settings\n\n<table>\n <thead>\n <tr><th>Environment variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>BROWSER_USE_PROFILE_ID</code></td><td>Profile UUID for persistent cookies and logins</td></tr>\n <tr><td><code>BROWSER_USE_PROXY_COUNTRY</code></td><td>Managed proxy country, or <code>none</code>/<code>direct</code> to disable proxy</td></tr>\n <tr><td><code>BROWSER_USE_ENABLE_RECORDING</code></td><td>Record the Cloud browser session</td></tr>\n </tbody>\n</table>\n\n```bash\nagent-browser -p browseruse open https://example.com\n```\n\nWhen enabled, agent-browser creates a Browser Use Cloud V4 session and connects to its CDP endpoint. Browser Use setup is limited to 18 seconds, with up to 4 more seconds for cleanup if setup times out. Within setup, creation waits up to 10 seconds and CDP attachment up to 8 seconds; each stop request waits up to 4 seconds. Navigation and other page commands keep their existing timeouts. If creation fails before a browser id is returned, the outcome is unknown; inspect the Browser Use Cloud dashboard before retrying, since a browser may still have been created.\n\nThe Cloud browser stays active between commands. Run `agent-browser close` when the task finishes. The daemon also attempts cleanup on exit, including its default one-hour idle timeout; a failed stop can leave the Cloud browser running.\n\n## Close and recovery\n\nIf a stop keeps returning 404, verify the browser status in Browser Use Cloud. After confirming it has stopped, use a new `--session` name to continue; agent-browser does not treat 404 as proof of a successful stop.\n\n`close` succeeds only after Browser Use acknowledges the browser as stopped. On a failed stop, `close` returns an error and keeps the session id, so running `agent-browser close` again retries the same browser, and a new launch is blocked until the pending browser is released.\n\nIf the daemon exits before a stop succeeds, inspect the Browser Use Cloud dashboard and stop the browser there.\n\nGet your API key from the [Browser Use Cloud Dashboard](https://cloud.browser-use.com/settings?tab=api-keys).",
|
||
"legacyMarkdownSha256": "29a1afcea07040917fd9468f4ef8f86de72babf0b7829882ab1983a33c24f180",
|
||
"modernMarkdown": "# Browser Use\n\n[Browser Use](https://browser-use.com) is an open-source browser automation project for AI agents with [over 100,000 GitHub stars](https://github.com/browser-use/browser-use), plus a managed Cloud browser service. Browser Use Cloud is useful when running agent-browser in environments where a local browser isn't available, such as serverless and CI environments.\n\n## Setup\n\n```bash\nexport BROWSER_USE_API_KEY=\"your-api-key\"\nagent-browser -p browseruse open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=browseruse\nexport BROWSER_USE_API_KEY=\"your-api-key\"\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Browser settings\n\n<table>\n <thead>\n <tr><th>Environment variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>BROWSER_USE_PROFILE_ID</code></td><td>Profile UUID for persistent cookies and logins</td></tr>\n <tr><td><code>BROWSER_USE_PROXY_COUNTRY</code></td><td>Managed proxy country, or <code>none</code>/<code>direct</code> to disable proxy</td></tr>\n <tr><td><code>BROWSER_USE_ENABLE_RECORDING</code></td><td>Record the Cloud browser session</td></tr>\n </tbody>\n</table>\n\n```bash\nexport BROWSER_USE_PROFILE_ID=\"your-profile-uuid\"\nexport BROWSER_USE_PROXY_COUNTRY=\"de\"\nexport BROWSER_USE_ENABLE_RECORDING=\"true\"\nagent-browser -p browseruse open https://example.com\n```\n\nWhen enabled, agent-browser creates a Browser Use Cloud V4 session and connects to its CDP endpoint. Browser Use setup is limited to 18 seconds, with up to 4 more seconds for cleanup if setup times out. Within setup, creation waits up to 10 seconds and CDP attachment up to 8 seconds; each stop request waits up to 4 seconds. Navigation and other page commands keep their existing timeouts. If creation fails before a browser id is returned, the outcome is unknown; inspect the Browser Use Cloud dashboard before retrying, since a browser may still have been created.\n\nThe Cloud browser stays active between commands. Run `agent-browser close` when the task finishes. The daemon also attempts cleanup on exit, including its default one-hour idle timeout; a failed stop can leave the Cloud browser running.\n\n## Close and recovery\n\nIf a stop keeps returning 404, verify the browser status in Browser Use Cloud. After confirming it has stopped, use a new `--session` name to continue; agent-browser does not treat 404 as proof of a successful stop.\n\n`close` succeeds only after Browser Use acknowledges the browser as stopped. On a failed stop, `close` returns an error and keeps the session id, so running `agent-browser close` again retries the same browser, and a new launch is blocked until the pending browser is released.\n\nIf the daemon exits before a stop succeeds, inspect the Browser Use Cloud dashboard and stop the browser there.\n\nGet your API key from the [Browser Use Cloud Dashboard](https://cloud.browser-use.com/settings?tab=api-keys).",
|
||
"modernMarkdownSha256": "cefb367cf262ee3e5b64f681225cde2ee04e914bcc12bdee7bf9d35b30171b84",
|
||
"navigation": {
|
||
"title": "Browser Use",
|
||
"section": "Providers"
|
||
}
|
||
},
|
||
{
|
||
"path": "/providers/browserbase",
|
||
"source": "docs/src/app/providers/browserbase/page.mdx",
|
||
"layout": "docs/src/app/providers/browserbase/layout.tsx",
|
||
"sourceSha256": "753fac9b0616339ac0eb14b7db389a31cac79f70f29d18ccb0d50ca7f680e610",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Browserbase\n",
|
||
"markdownTitle": "Browserbase",
|
||
"title": "Browserbase | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Browserbase | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Browserbase - agent-browser",
|
||
"twitterTitle": "Browserbase | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Browserbase",
|
||
"id": "browserbase"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
}
|
||
],
|
||
"content": [
|
||
"Browserbase provides remote browser infrastructure to make deployment of agentic browsing agents easy. Use it when running agent-browser in environments where a local browser isn't feasible.",
|
||
"export BROWSERBASE_API_KEY=\"your-api-key\" agent-browser -p browserbase open https://example.com",
|
||
"Or use environment variables for CI/scripts:",
|
||
"export AGENT_BROWSER_PROVIDER=browserbase export BROWSERBASE_API_KEY=\"your-api-key\" agent-browser open https://example.com",
|
||
"The -p flag takes precedence over AGENT_BROWSER_PROVIDER.",
|
||
"When enabled, agent-browser connects to a Browserbase session instead of launching a local browser. All commands work identically.",
|
||
"Get your API key from the Browserbase Dashboard."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://browserbase.com",
|
||
"text": "Browserbase"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://browserbase.com/overview",
|
||
"text": "Browserbase Dashboard"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Browserbase\n\n[Browserbase](https://browserbase.com) provides remote browser infrastructure to make deployment of agentic browsing agents easy. Use it when running agent-browser in environments where a local browser isn't feasible.\n\n## Setup\n\n```bash\nagent-browser -p browserbase open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\nWhen enabled, agent-browser connects to a Browserbase session instead of launching a local browser. All commands work identically.\n\nGet your API key from the [Browserbase Dashboard](https://browserbase.com/overview).",
|
||
"legacyMarkdownSha256": "672b507bd07c73e60fab3dbf3a0c57c4b7cedeaddca79bf0bd42a2fde5de0051",
|
||
"modernMarkdown": "# Browserbase\n\n[Browserbase](https://browserbase.com) provides remote browser infrastructure to make deployment of agentic browsing agents easy. Use it when running agent-browser in environments where a local browser isn't feasible.\n\n## Setup\n\n```bash\nexport BROWSERBASE_API_KEY=\"your-api-key\"\nagent-browser -p browserbase open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=browserbase\nexport BROWSERBASE_API_KEY=\"your-api-key\"\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\nWhen enabled, agent-browser connects to a Browserbase session instead of launching a local browser. All commands work identically.\n\nGet your API key from the [Browserbase Dashboard](https://browserbase.com/overview).",
|
||
"modernMarkdownSha256": "add7c899651f1061f87d5aa1c0f8ad6f876f0e60be8449e6c7b9c6af2f0e244a",
|
||
"navigation": {
|
||
"title": "Browserbase",
|
||
"section": "Providers"
|
||
}
|
||
},
|
||
{
|
||
"path": "/providers/browserless",
|
||
"source": "docs/src/app/providers/browserless/page.mdx",
|
||
"layout": "docs/src/app/providers/browserless/layout.tsx",
|
||
"sourceSha256": "39299446ceef68d506f24548dd3776a1e6ba714dad77aac115131beb8219e7ce",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Browserless\n",
|
||
"markdownTitle": "Browserless",
|
||
"title": "Browserless | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Browserless | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Browserless - agent-browser",
|
||
"twitterTitle": "Browserless | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Browserless",
|
||
"id": "browserless"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Configuration",
|
||
"id": "configuration"
|
||
}
|
||
],
|
||
"content": [
|
||
"Browserless provides cloud browser infrastructure with a Sessions API. Use it when running agent-browser in environments where a local browser isn't available.",
|
||
"export BROWSERLESS_API_KEY=\"your-api-token\" agent-browser -p browserless open https://example.com",
|
||
"Or use environment variables for CI/scripts:",
|
||
"export AGENT_BROWSER_PROVIDER=browserless export BROWSERLESS_API_KEY=\"your-api-token\" agent-browser open https://example.com",
|
||
"The -p flag takes precedence over AGENT_BROWSER_PROVIDER.",
|
||
"Variable",
|
||
"Description",
|
||
"Default",
|
||
"BROWSERLESS_API_KEY",
|
||
"API token (required)",
|
||
"BROWSERLESS_API_URL",
|
||
"Base API URL (for custom regions or self-hosted)",
|
||
"https://production-sfo.browserless.io",
|
||
"BROWSERLESS_BROWSER_TYPE",
|
||
"Type of browser to use (chromium or chrome)",
|
||
"chromium",
|
||
"BROWSERLESS_TTL",
|
||
"Session TTL in milliseconds",
|
||
"300000",
|
||
"BROWSERLESS_STEALTH",
|
||
"Enable stealth mode",
|
||
"true",
|
||
"When enabled, agent-browser connects to a Browserless cloud session instead of launching a local browser. All commands work identically.",
|
||
"Get your API token from the Browserless Dashboard."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://browserless.io",
|
||
"text": "Browserless"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://browserless.io",
|
||
"text": "Browserless Dashboard"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Browserless\n\n[Browserless](https://browserless.io) provides cloud browser infrastructure with a Sessions API. Use it when running agent-browser in environments where a local browser isn't available.\n\n## Setup\n\n```bash\nagent-browser -p browserless open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>BROWSERLESS_API_KEY</code></td><td>API token (required)</td><td></td></tr>\n <tr><td><code>BROWSERLESS_API_URL</code></td><td>Base API URL (for custom regions or self-hosted)</td><td><code>https://production-sfo.browserless.io</code></td></tr>\n <tr><td><code>BROWSERLESS_BROWSER_TYPE</code></td><td>Type of browser to use (<code>chromium</code> or <code>chrome</code>)</td><td><code>chromium</code></td></tr>\n <tr><td><code>BROWSERLESS_TTL</code></td><td>Session TTL in milliseconds</td><td><code>300000</code></td></tr>\n <tr><td><code>BROWSERLESS_STEALTH</code></td><td>Enable stealth mode</td><td><code>true</code></td></tr>\n </tbody>\n</table>\n\nWhen enabled, agent-browser connects to a Browserless cloud session instead of launching a local browser. All commands work identically.\n\nGet your API token from the [Browserless Dashboard](https://browserless.io).",
|
||
"legacyMarkdownSha256": "500015d5bb0a41d03e50382233593abc6c0ec8a2dc63ba12d90a291f5f21cf66",
|
||
"modernMarkdown": "# Browserless\n\n[Browserless](https://browserless.io) provides cloud browser infrastructure with a Sessions API. Use it when running agent-browser in environments where a local browser isn't available.\n\n## Setup\n\n```bash\nexport BROWSERLESS_API_KEY=\"your-api-token\"\nagent-browser -p browserless open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=browserless\nexport BROWSERLESS_API_KEY=\"your-api-token\"\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>BROWSERLESS_API_KEY</code></td><td>API token (required)</td><td></td></tr>\n <tr><td><code>BROWSERLESS_API_URL</code></td><td>Base API URL (for custom regions or self-hosted)</td><td><code>https://production-sfo.browserless.io</code></td></tr>\n <tr><td><code>BROWSERLESS_BROWSER_TYPE</code></td><td>Type of browser to use (<code>chromium</code> or <code>chrome</code>)</td><td><code>chromium</code></td></tr>\n <tr><td><code>BROWSERLESS_TTL</code></td><td>Session TTL in milliseconds</td><td><code>300000</code></td></tr>\n <tr><td><code>BROWSERLESS_STEALTH</code></td><td>Enable stealth mode</td><td><code>true</code></td></tr>\n </tbody>\n</table>\n\nWhen enabled, agent-browser connects to a Browserless cloud session instead of launching a local browser. All commands work identically.\n\nGet your API token from the [Browserless Dashboard](https://browserless.io).",
|
||
"modernMarkdownSha256": "6edd13bf3c40f475a0c525182c1050c1a23e52a31a87eccec5d7ab24bf0856c1",
|
||
"navigation": {
|
||
"title": "Browserless",
|
||
"section": "Providers"
|
||
}
|
||
},
|
||
{
|
||
"path": "/providers/kernel",
|
||
"source": "docs/src/app/providers/kernel/page.mdx",
|
||
"layout": "docs/src/app/providers/kernel/layout.tsx",
|
||
"sourceSha256": "bad05fbb931da566d7fbfe258bcc5e7838e8f2c2fb7760f84a5544e6ee1a8c31",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Kernel\n",
|
||
"markdownTitle": "Kernel",
|
||
"title": "Kernel | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Kernel | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Kernel - agent-browser",
|
||
"twitterTitle": "Kernel | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Kernel",
|
||
"id": "kernel"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Configuration",
|
||
"id": "configuration"
|
||
}
|
||
],
|
||
"content": [
|
||
"Kernel provides cloud browser infrastructure for AI agents with features like stealth mode and persistent profiles.",
|
||
"export KERNEL_API_KEY=\"your-api-key\" agent-browser -p kernel open https://example.com",
|
||
"Or use environment variables for CI/scripts:",
|
||
"export AGENT_BROWSER_PROVIDER=kernel export KERNEL_API_KEY=\"your-api-key\" agent-browser open https://example.com",
|
||
"The -p flag takes precedence over AGENT_BROWSER_PROVIDER.",
|
||
"Variable",
|
||
"Description",
|
||
"Default",
|
||
"KERNEL_API_KEY",
|
||
"API key (required)",
|
||
"KERNEL_HEADLESS",
|
||
"Run browser in headless mode",
|
||
"true",
|
||
"KERNEL_STEALTH",
|
||
"Enable stealth mode to avoid bot detection",
|
||
"false",
|
||
"KERNEL_TIMEOUT_SECONDS",
|
||
"Session timeout in seconds",
|
||
"300",
|
||
"KERNEL_PROFILE_NAME",
|
||
"Name of an existing browser profile to load",
|
||
"(none)",
|
||
"KERNEL_PROFILE_SAVE_CHANGES",
|
||
"Save session changes back to the profile",
|
||
"Profile persistence: KERNEL_PROFILE_NAME loads an existing Kernel profile (create it first in Kernel). Set KERNEL_PROFILE_SAVE_CHANGES=true to save cookies, logins, and session data back to the profile when the session ends.",
|
||
"When enabled, agent-browser connects to a Kernel cloud session instead of launching a local browser. All commands work identically.",
|
||
"Get your API key from the Kernel Dashboard."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://www.kernel.sh",
|
||
"text": "Kernel"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://dashboard.onkernel.com",
|
||
"text": "Kernel Dashboard"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Kernel\n\n[Kernel](https://www.kernel.sh) provides cloud browser infrastructure for AI agents with features like stealth mode and persistent profiles.\n\n## Setup\n\n```bash\nagent-browser -p kernel open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>KERNEL_API_KEY</code></td><td>API key (required)</td><td></td></tr>\n <tr><td><code>KERNEL_HEADLESS</code></td><td>Run browser in headless mode</td><td><code>true</code></td></tr>\n <tr><td><code>KERNEL_STEALTH</code></td><td>Enable stealth mode to avoid bot detection</td><td><code>false</code></td></tr>\n <tr><td><code>KERNEL_TIMEOUT_SECONDS</code></td><td>Session timeout in seconds</td><td><code>300</code></td></tr>\n <tr><td><code>KERNEL_PROFILE_NAME</code></td><td>Name of an existing browser profile to load</td><td>(none)</td></tr>\n <tr><td><code>KERNEL_PROFILE_SAVE_CHANGES</code></td><td>Save session changes back to the profile</td><td><code>false</code></td></tr>\n </tbody>\n</table>\n\n**Profile persistence:** `KERNEL_PROFILE_NAME` loads an existing Kernel profile (create it first in Kernel). Set `KERNEL_PROFILE_SAVE_CHANGES=true` to save cookies, logins, and session data back to the profile when the session ends.\n\nWhen enabled, agent-browser connects to a Kernel cloud session instead of launching a local browser. All commands work identically.\n\nGet your API key from the [Kernel Dashboard](https://dashboard.onkernel.com).",
|
||
"legacyMarkdownSha256": "5c83bec67e12bc6280e896b1c985540ae480318d6d1b132cbe4186b231f2d9b7",
|
||
"modernMarkdown": "# Kernel\n\n[Kernel](https://www.kernel.sh) provides cloud browser infrastructure for AI agents with features like stealth mode and persistent profiles.\n\n## Setup\n\n```bash\nexport KERNEL_API_KEY=\"your-api-key\"\nagent-browser -p kernel open https://example.com\n```\n\nOr use environment variables for CI/scripts:\n\n```bash\nexport AGENT_BROWSER_PROVIDER=kernel\nexport KERNEL_API_KEY=\"your-api-key\"\nagent-browser open https://example.com\n```\n\nThe `-p` flag takes precedence over `AGENT_BROWSER_PROVIDER`.\n\n## Configuration\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>KERNEL_API_KEY</code></td><td>API key (required)</td><td></td></tr>\n <tr><td><code>KERNEL_HEADLESS</code></td><td>Run browser in headless mode</td><td><code>true</code></td></tr>\n <tr><td><code>KERNEL_STEALTH</code></td><td>Enable stealth mode to avoid bot detection</td><td><code>false</code></td></tr>\n <tr><td><code>KERNEL_TIMEOUT_SECONDS</code></td><td>Session timeout in seconds</td><td><code>300</code></td></tr>\n <tr><td><code>KERNEL_PROFILE_NAME</code></td><td>Name of an existing browser profile to load</td><td>(none)</td></tr>\n <tr><td><code>KERNEL_PROFILE_SAVE_CHANGES</code></td><td>Save session changes back to the profile</td><td><code>false</code></td></tr>\n </tbody>\n</table>\n\n**Profile persistence:** `KERNEL_PROFILE_NAME` loads an existing Kernel profile (create it first in Kernel). Set `KERNEL_PROFILE_SAVE_CHANGES=true` to save cookies, logins, and session data back to the profile when the session ends.\n\nWhen enabled, agent-browser connects to a Kernel cloud session instead of launching a local browser. All commands work identically.\n\nGet your API key from the [Kernel Dashboard](https://dashboard.onkernel.com).",
|
||
"modernMarkdownSha256": "a92486a65afce8d3966c9946237e4bb46662c370747ef20fa02baaffdde721fd",
|
||
"navigation": {
|
||
"title": "Kernel",
|
||
"section": "Providers"
|
||
}
|
||
},
|
||
{
|
||
"path": "/providers/remote-agent-browser",
|
||
"source": "docs/src/app/providers/remote-agent-browser/page.mdx",
|
||
"layout": "docs/src/app/providers/remote-agent-browser/layout.tsx",
|
||
"sourceSha256": "f362d2f933cebdd41a22b6ad5ac3514e77eb076a23f593a0266561185569968a",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Remote Agent Browser\n",
|
||
"markdownTitle": "Remote Agent Browser",
|
||
"title": "Remote Agent Browser | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Remote Agent Browser | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Remote Agent Browser - agent-browser",
|
||
"twitterTitle": "Remote Agent Browser | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Remote Agent Browser",
|
||
"id": "remote-agent-browser"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Setup",
|
||
"id": "setup"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Create a browser",
|
||
"id": "create-a-browser"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Stable browser sessions",
|
||
"id": "stable-browser-sessions"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Custom browser image",
|
||
"id": "custom-browser-image"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Options",
|
||
"id": "options"
|
||
}
|
||
],
|
||
"content": [
|
||
"Remote Agent Browser runs agent-browser inside an isolated Vercel Sandbox. Use it when a TypeScript application needs to provision a browser on demand without managing a local Chrome process.",
|
||
"Remote Agent Browser is a library rather than an agent-browser -p provider. Import it in your application and use the returned client to run agent-browser commands.",
|
||
"pnpm add remote-agent-browser",
|
||
"Authentication is automatic on Vercel through VERCEL_OIDC_TOKEN. For local development, link a Vercel project and pull its environment:",
|
||
"vercel link vercel env pull .env.local",
|
||
"import { AgentBrowser } from \"remote-agent-browser\"; const browser = await AgentBrowser.create(); try { await browser.exec(\"open\", { args: [\"https://example.com\"], }); const snapshot = await browser.exec(\"snapshot\"); console.log(snapshot.stdout); } finally { await browser.close(); }",
|
||
"Commands issued through the same client share the same page, cookies, tabs, and element references. Always close disposable clients when the work is complete.",
|
||
"Use a stable ID when browser identity needs to survive process boundaries:",
|
||
"const browser = AgentBrowser.session({ id: `chat:${chatId}`, }); const stopKeepalive = browser.keepalive(); try { await browser.exec(\"open\", { args: [\"https://example.com\"], }); } finally { stopKeepalive(); }",
|
||
"The first command finds or creates the named Sandbox. A later process using the same ID can attach to it. If an expired Sandbox resumes, Chromium starts fresh and in-memory page state is reset.",
|
||
"The default image is remote-agent-browser:latest. Pass a Vercel Container Registry repository, tag, digest, or fully qualified reference to use a custom image:",
|
||
"const browser = await AgentBrowser.create({ image: \"vcr.vercel.com/my-team/my-project/my-browser:v1\", });",
|
||
"You can also set REMOTE_AGENT_BROWSER_IMAGE to configure the image for every client.",
|
||
"Option",
|
||
"Description",
|
||
"Default",
|
||
"image",
|
||
"Vercel Container Registry image containing agent-browser and Chromium",
|
||
"remote-agent-browser:latest",
|
||
"timeoutMs",
|
||
"Sandbox wall-clock timeout in milliseconds",
|
||
"600000",
|
||
"vcpus",
|
||
"Number of Sandbox vCPUs",
|
||
"2",
|
||
"env",
|
||
"Additional environment variables for commands in the Sandbox",
|
||
"args",
|
||
"Global agent-browser CLI arguments applied to each command",
|
||
"[]",
|
||
"proxy",
|
||
"Proxy URL or proxy configuration for the browser client",
|
||
"(none)",
|
||
"See the Remote Agent Browser repository for file transfer, proxy configuration, typed JSON output, keepalive, and stable-session examples."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/vercel-labs/remote-agent-browser",
|
||
"text": "Remote Agent Browser"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://vercel.com/docs/vercel-sandbox",
|
||
"text": "Vercel Sandbox"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/vercel-labs/remote-agent-browser",
|
||
"text": "Remote Agent Browser repository"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Remote Agent Browser\n\n[Remote Agent Browser](https://github.com/vercel-labs/remote-agent-browser) runs agent-browser inside an isolated [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox). Use it when a TypeScript application needs to provision a browser on demand without managing a local Chrome process.\n\nRemote Agent Browser is a library rather than an agent-browser `-p` provider. Import it in your application and use the returned client to run agent-browser commands.\n\n## Setup\n\n```bash\npnpm add remote-agent-browser\n```\n\nAuthentication is automatic on Vercel through `VERCEL_OIDC_TOKEN`. For local development, link a Vercel project and pull its environment:\n\n```bash\nvercel link\nvercel env pull .env.local\n```\n\n## Create a browser\n\n```ts\n\nconst browser = await AgentBrowser.create();\n\ntry {\n await browser.exec(\"open\", {\n args: [\"https://example.com\"],\n });\n\n const snapshot = await browser.exec(\"snapshot\");\n console.log(snapshot.stdout);\n} finally {\n await browser.close();\n}\n```\n\nCommands issued through the same client share the same page, cookies, tabs, and element references. Always close disposable clients when the work is complete.\n\n## Stable browser sessions\n\nUse a stable ID when browser identity needs to survive process boundaries:\n\n```ts\nconst browser = AgentBrowser.session({\n id: `chat:${chatId}`,\n});\n\nconst stopKeepalive = browser.keepalive();\n\ntry {\n await browser.exec(\"open\", {\n args: [\"https://example.com\"],\n });\n} finally {\n stopKeepalive();\n}\n```\n\nThe first command finds or creates the named Sandbox. A later process using the same ID can attach to it. If an expired Sandbox resumes, Chromium starts fresh and in-memory page state is reset.\n\n## Custom browser image\n\nThe default image is `remote-agent-browser:latest`. Pass a Vercel Container Registry repository, tag, digest, or fully qualified reference to use a custom image:\n\n```ts\nconst browser = await AgentBrowser.create({\n image: \"vcr.vercel.com/my-team/my-project/my-browser:v1\",\n});\n```\n\nYou can also set `REMOTE_AGENT_BROWSER_IMAGE` to configure the image for every client.\n\n## Options\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>image</code></td><td>Vercel Container Registry image containing agent-browser and Chromium</td><td><code>remote-agent-browser:latest</code></td></tr>\n <tr><td><code>timeoutMs</code></td><td>Sandbox wall-clock timeout in milliseconds</td><td><code>600000</code></td></tr>\n <tr><td><code>vcpus</code></td><td>Number of Sandbox vCPUs</td><td><code>2</code></td></tr>\n <tr><td><code>env</code></td><td>Additional environment variables for commands in the Sandbox</td><td><code>{}</code></td></tr>\n <tr><td><code>args</code></td><td>Global agent-browser CLI arguments applied to each command</td><td><code>[]</code></td></tr>\n <tr><td><code>proxy</code></td><td>Proxy URL or proxy configuration for the browser client</td><td>(none)</td></tr>\n </tbody>\n</table>\n\nSee the [Remote Agent Browser repository](https://github.com/vercel-labs/remote-agent-browser) for file transfer, proxy configuration, typed JSON output, keepalive, and stable-session examples.",
|
||
"legacyMarkdownSha256": "87b17aed10621b5c74dfc8dcbb3b470c22ed4ed7bd6ea025f7b629723cfe5ab8",
|
||
"modernMarkdown": "# Remote Agent Browser\n\n[Remote Agent Browser](https://github.com/vercel-labs/remote-agent-browser) runs agent-browser inside an isolated [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox). Use it when a TypeScript application needs to provision a browser on demand without managing a local Chrome process.\n\nRemote Agent Browser is a library rather than an agent-browser `-p` provider. Import it in your application and use the returned client to run agent-browser commands.\n\n## Setup\n\n```bash\npnpm add remote-agent-browser\n```\n\nAuthentication is automatic on Vercel through `VERCEL_OIDC_TOKEN`. For local development, link a Vercel project and pull its environment:\n\n```bash\nvercel link\nvercel env pull .env.local\n```\n\n## Create a browser\n\n```ts\nimport { AgentBrowser } from \"remote-agent-browser\";\n\nconst browser = await AgentBrowser.create();\n\ntry {\n await browser.exec(\"open\", {\n args: [\"https://example.com\"],\n });\n\n const snapshot = await browser.exec(\"snapshot\");\n console.log(snapshot.stdout);\n} finally {\n await browser.close();\n}\n```\n\nCommands issued through the same client share the same page, cookies, tabs, and element references. Always close disposable clients when the work is complete.\n\n## Stable browser sessions\n\nUse a stable ID when browser identity needs to survive process boundaries:\n\n```ts\nconst browser = AgentBrowser.session({\n id: `chat:${chatId}`,\n});\n\nconst stopKeepalive = browser.keepalive();\n\ntry {\n await browser.exec(\"open\", {\n args: [\"https://example.com\"],\n });\n} finally {\n stopKeepalive();\n}\n```\n\nThe first command finds or creates the named Sandbox. A later process using the same ID can attach to it. If an expired Sandbox resumes, Chromium starts fresh and in-memory page state is reset.\n\n## Custom browser image\n\nThe default image is `remote-agent-browser:latest`. Pass a Vercel Container Registry repository, tag, digest, or fully qualified reference to use a custom image:\n\n```ts\nconst browser = await AgentBrowser.create({\n image: \"vcr.vercel.com/my-team/my-project/my-browser:v1\",\n});\n```\n\nYou can also set `REMOTE_AGENT_BROWSER_IMAGE` to configure the image for every client.\n\n## Options\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th><th>Default</th></tr>\n </thead>\n <tbody>\n <tr><td><code>image</code></td><td>Vercel Container Registry image containing agent-browser and Chromium</td><td><code>remote-agent-browser:latest</code></td></tr>\n <tr><td><code>timeoutMs</code></td><td>Sandbox wall-clock timeout in milliseconds</td><td><code>600000</code></td></tr>\n <tr><td><code>vcpus</code></td><td>Number of Sandbox vCPUs</td><td><code>2</code></td></tr>\n <tr><td><code>env</code></td><td>Additional environment variables for commands in the Sandbox</td><td><code>{}</code></td></tr>\n <tr><td><code>args</code></td><td>Global agent-browser CLI arguments applied to each command</td><td><code>[]</code></td></tr>\n <tr><td><code>proxy</code></td><td>Proxy URL or proxy configuration for the browser client</td><td>(none)</td></tr>\n </tbody>\n</table>\n\nSee the [Remote Agent Browser repository](https://github.com/vercel-labs/remote-agent-browser) for file transfer, proxy configuration, typed JSON output, keepalive, and stable-session examples.",
|
||
"modernMarkdownSha256": "c54b988bef7c1502c165f8382f07d28a881ed9e5eb74172346755c330f55f67a",
|
||
"navigation": {
|
||
"title": "Remote Agent Browser",
|
||
"section": "Providers"
|
||
}
|
||
},
|
||
{
|
||
"path": "/proxy",
|
||
"source": "docs/src/app/proxy/page.mdx",
|
||
"layout": "docs/src/app/proxy/layout.tsx",
|
||
"sourceSha256": "8ed15177ae6618aa48062569477cee3c8a5d23fc6e8d15079eaca14aad064340",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Proxy\n",
|
||
"markdownTitle": "Proxy",
|
||
"title": "Proxy | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Proxy | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Proxy - agent-browser",
|
||
"twitterTitle": "Proxy | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Proxy",
|
||
"id": "proxy"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "CLI flags",
|
||
"id": "cli-flags"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Environment variables",
|
||
"id": "environment-variables"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "HTTPS interception certificates",
|
||
"id": "https-interception-certificates"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "SOCKS proxy",
|
||
"id": "socks-proxy"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Bypass local traffic",
|
||
"id": "bypass-local-traffic"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Verify routing",
|
||
"id": "verify-routing"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Security notes",
|
||
"id": "security-notes"
|
||
}
|
||
],
|
||
"content": [
|
||
"Use proxies for corporate networks, geo-testing, scraping infrastructure, and traffic routing through a controlled egress point.",
|
||
"agent-browser --proxy \"http://proxy.example.com:8080\" open https://example.com agent-browser --proxy \"http://user:pass@proxy.example.com:8080\" open https://example.com agent-browser --proxy \"http://proxy.example.com:8080\" --proxy-bypass \"localhost,*.internal.com\" open https://example.com agent-browser --proxy \"http://proxy.example.com:8080\" --ca-cert /etc/ssl/certs/proxy-ca.pem open https://example.com",
|
||
"Flag",
|
||
"Description",
|
||
"--proxy <url>",
|
||
"Proxy server URL, with optional credentials",
|
||
"--proxy-bypass <hosts>",
|
||
"Hosts that should bypass the proxy",
|
||
"--ca-cert <path>",
|
||
"Trust a CA certificate or PEM bundle in a locally launched Chromium browser on Linux",
|
||
"--no-ca-cert",
|
||
"Clear CA trust retained by the running browser session",
|
||
"Variable",
|
||
"AGENT_BROWSER_PROXY",
|
||
"agent-browser proxy URL",
|
||
"AGENT_BROWSER_PROXY_BYPASS",
|
||
"agent-browser proxy bypass list",
|
||
"AGENT_BROWSER_PROXY_USERNAME",
|
||
"Proxy username when credentials are provided separately",
|
||
"AGENT_BROWSER_PROXY_PASSWORD",
|
||
"Proxy password when credentials are provided separately",
|
||
"AGENT_BROWSER_CA_CERT",
|
||
"Path to a CA certificate or PEM bundle for locally launched Chromium on Linux",
|
||
"HTTP_PROXY / HTTPS_PROXY",
|
||
"Standard proxy environment variables, used as fallbacks",
|
||
"ALL_PROXY",
|
||
"SOCKS or all-traffic proxy fallback",
|
||
"NO_PROXY",
|
||
"Standard proxy bypass fallback",
|
||
"AGENT_BROWSER_PROXY takes precedence over standard proxy variables. The CLI also accepts credentials embedded in the proxy URL and separates them before passing launch options to the daemon.",
|
||
"On Linux, --ca-cert imports each certificate into a private NSS database used only by the Chromium process launched for that session. Normal hostname and validity checks remain enabled. Later commands retain that trust when they omit the flag. A different certificate or --no-ca-cert relaunches Chromium without restarting the daemon. The same certificate content reuses the current browser even when supplied from a different path. agent-browser install --with-deps installs the required certutil; otherwise install libnss3-tools on Debian/Ubuntu or nss-tools on RPM Linux.",
|
||
"The option cannot be combined with --profile, --cdp, --auto-connect, providers, Lightpanda, or --ignore-https-errors. It is not supported on macOS or Windows.",
|
||
"export ALL_PROXY=\"socks5://proxy.example.com:1080\" agent-browser open https://example.com export ALL_PROXY=\"socks5://user:pass@proxy.example.com:1080\" agent-browser open https://example.com",
|
||
"export AGENT_BROWSER_PROXY=\"http://proxy.example.com:8080\" export AGENT_BROWSER_PROXY_BYPASS=\"localhost,127.0.0.1,*.internal.com\" agent-browser open https://external.example.com agent-browser open http://localhost:3000",
|
||
"agent-browser open https://httpbin.org/ip agent-browser get text body",
|
||
"The response should show the proxy egress address, not the machine's direct network address.",
|
||
"Prefer environment variables or secret stores for proxy credentials.",
|
||
"Do not commit proxy usernames, passwords, or session URLs.",
|
||
"HAR exports and network logs may include proxy-authenticated requests."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Proxy\n\nUse proxies for corporate networks, geo-testing, scraping infrastructure, and traffic routing through a controlled egress point.\n\n## CLI flags\n\n```bash\nagent-browser --proxy \"http://proxy.example.com:8080\" open https://example.com\nagent-browser --proxy \"http://user:pass@proxy.example.com:8080\" open https://example.com\nagent-browser --proxy \"http://proxy.example.com:8080\" --proxy-bypass \"localhost,*.internal.com\" open https://example.com\nagent-browser --proxy \"http://proxy.example.com:8080\" --ca-cert /etc/ssl/certs/proxy-ca.pem open https://example.com\n```\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--proxy <url></code></td><td>Proxy server URL, with optional credentials</td></tr>\n <tr><td><code>--proxy-bypass <hosts></code></td><td>Hosts that should bypass the proxy</td></tr>\n <tr><td><code>--ca-cert <path></code></td><td>Trust a CA certificate or PEM bundle in a locally launched Chromium browser on Linux</td></tr>\n <tr><td><code>--no-ca-cert</code></td><td>Clear CA trust retained by the running browser session</td></tr>\n </tbody>\n</table>\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_PROXY</code></td><td>agent-browser proxy URL</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_BYPASS</code></td><td>agent-browser proxy bypass list</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_USERNAME</code></td><td>Proxy username when credentials are provided separately</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_PASSWORD</code></td><td>Proxy password when credentials are provided separately</td></tr>\n <tr><td><code>AGENT_BROWSER_CA_CERT</code></td><td>Path to a CA certificate or PEM bundle for locally launched Chromium on Linux</td></tr>\n <tr><td><code>HTTP_PROXY</code> / <code>HTTPS_PROXY</code></td><td>Standard proxy environment variables, used as fallbacks</td></tr>\n <tr><td><code>ALL_PROXY</code></td><td>SOCKS or all-traffic proxy fallback</td></tr>\n <tr><td><code>NO_PROXY</code></td><td>Standard proxy bypass fallback</td></tr>\n </tbody>\n</table>\n\n`AGENT_BROWSER_PROXY` takes precedence over standard proxy variables. The CLI also accepts credentials embedded in the proxy URL and separates them before passing launch options to the daemon.\n\n## HTTPS interception certificates\n\nOn Linux, `--ca-cert` imports each certificate into a private NSS database used only by the Chromium process launched for that session. Normal hostname and validity checks remain enabled. Later commands retain that trust when they omit the flag. A different certificate or `--no-ca-cert` relaunches Chromium without restarting the daemon. The same certificate content reuses the current browser even when supplied from a different path. `agent-browser install --with-deps` installs the required `certutil`; otherwise install `libnss3-tools` on Debian/Ubuntu or `nss-tools` on RPM Linux.\n\nThe option cannot be combined with `--profile`, `--cdp`, `--auto-connect`, providers, Lightpanda, or `--ignore-https-errors`. It is not supported on macOS or Windows.\n\n## SOCKS proxy\n\n```bash\nagent-browser open https://example.com\n\nagent-browser open https://example.com\n```\n\n## Bypass local traffic\n\n```bash\n\nagent-browser open https://external.example.com\nagent-browser open http://localhost:3000\n```\n\n## Verify routing\n\n```bash\nagent-browser open https://httpbin.org/ip\nagent-browser get text body\n```\n\nThe response should show the proxy egress address, not the machine's direct network address.\n\n## Security notes\n\n- Prefer environment variables or secret stores for proxy credentials.\n- Do not commit proxy usernames, passwords, or session URLs.\n- HAR exports and network logs may include proxy-authenticated requests.",
|
||
"legacyMarkdownSha256": "f63add4103ffe50ebf0cb48c0497f24681c3bfa54578807b467fa285b0131d46",
|
||
"modernMarkdown": "# Proxy\n\nUse proxies for corporate networks, geo-testing, scraping infrastructure, and traffic routing through a controlled egress point.\n\n## CLI flags\n\n```bash\nagent-browser --proxy \"http://proxy.example.com:8080\" open https://example.com\nagent-browser --proxy \"http://user:pass@proxy.example.com:8080\" open https://example.com\nagent-browser --proxy \"http://proxy.example.com:8080\" --proxy-bypass \"localhost,*.internal.com\" open https://example.com\nagent-browser --proxy \"http://proxy.example.com:8080\" --ca-cert /etc/ssl/certs/proxy-ca.pem open https://example.com\n```\n\n<table>\n <thead>\n <tr><th>Flag</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>--proxy <url></code></td><td>Proxy server URL, with optional credentials</td></tr>\n <tr><td><code>--proxy-bypass <hosts></code></td><td>Hosts that should bypass the proxy</td></tr>\n <tr><td><code>--ca-cert <path></code></td><td>Trust a CA certificate or PEM bundle in a locally launched Chromium browser on Linux</td></tr>\n <tr><td><code>--no-ca-cert</code></td><td>Clear CA trust retained by the running browser session</td></tr>\n </tbody>\n</table>\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_PROXY</code></td><td>agent-browser proxy URL</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_BYPASS</code></td><td>agent-browser proxy bypass list</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_USERNAME</code></td><td>Proxy username when credentials are provided separately</td></tr>\n <tr><td><code>AGENT_BROWSER_PROXY_PASSWORD</code></td><td>Proxy password when credentials are provided separately</td></tr>\n <tr><td><code>AGENT_BROWSER_CA_CERT</code></td><td>Path to a CA certificate or PEM bundle for locally launched Chromium on Linux</td></tr>\n <tr><td><code>HTTP_PROXY</code> / <code>HTTPS_PROXY</code></td><td>Standard proxy environment variables, used as fallbacks</td></tr>\n <tr><td><code>ALL_PROXY</code></td><td>SOCKS or all-traffic proxy fallback</td></tr>\n <tr><td><code>NO_PROXY</code></td><td>Standard proxy bypass fallback</td></tr>\n </tbody>\n</table>\n\n`AGENT_BROWSER_PROXY` takes precedence over standard proxy variables. The CLI also accepts credentials embedded in the proxy URL and separates them before passing launch options to the daemon.\n\n## HTTPS interception certificates\n\nOn Linux, `--ca-cert` imports each certificate into a private NSS database used only by the Chromium process launched for that session. Normal hostname and validity checks remain enabled. Later commands retain that trust when they omit the flag. A different certificate or `--no-ca-cert` relaunches Chromium without restarting the daemon. The same certificate content reuses the current browser even when supplied from a different path. `agent-browser install --with-deps` installs the required `certutil`; otherwise install `libnss3-tools` on Debian/Ubuntu or `nss-tools` on RPM Linux.\n\nThe option cannot be combined with `--profile`, `--cdp`, `--auto-connect`, providers, Lightpanda, or `--ignore-https-errors`. It is not supported on macOS or Windows.\n\n## SOCKS proxy\n\n```bash\nexport ALL_PROXY=\"socks5://proxy.example.com:1080\"\nagent-browser open https://example.com\n\nexport ALL_PROXY=\"socks5://user:pass@proxy.example.com:1080\"\nagent-browser open https://example.com\n```\n\n## Bypass local traffic\n\n```bash\nexport AGENT_BROWSER_PROXY=\"http://proxy.example.com:8080\"\nexport AGENT_BROWSER_PROXY_BYPASS=\"localhost,127.0.0.1,*.internal.com\"\n\nagent-browser open https://external.example.com\nagent-browser open http://localhost:3000\n```\n\n## Verify routing\n\n```bash\nagent-browser open https://httpbin.org/ip\nagent-browser get text body\n```\n\nThe response should show the proxy egress address, not the machine's direct network address.\n\n## Security notes\n\n- Prefer environment variables or secret stores for proxy credentials.\n- Do not commit proxy usernames, passwords, or session URLs.\n- HAR exports and network logs may include proxy-authenticated requests.",
|
||
"modernMarkdownSha256": "7edfefc7905a0ad49b253fa665f801d5a6ab5ee5c75fa9ea48b64f02d3f15706",
|
||
"navigation": {
|
||
"title": "Proxy",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/quick-start",
|
||
"source": "docs/src/app/quick-start/page.mdx",
|
||
"layout": "docs/src/app/quick-start/layout.tsx",
|
||
"sourceSha256": "ac4c52686f6bc0420a5d7e616a7011a9e9bf5b256be24afd9b9ea29fa81e7e65",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Quick Start\n",
|
||
"markdownTitle": "Quick Start",
|
||
"title": "Quick Start | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Quick Start | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Quick Start - agent-browser",
|
||
"twitterTitle": "Quick Start | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Quick Start",
|
||
"id": "quick-start"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Core workflow",
|
||
"id": "core-workflow"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Common commands",
|
||
"id": "common-commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Traditional selectors",
|
||
"id": "traditional-selectors"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Headed mode",
|
||
"id": "headed-mode"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Wait for content",
|
||
"id": "wait-for-content"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Command chaining",
|
||
"id": "command-chaining"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "JSON output",
|
||
"id": "json-output"
|
||
}
|
||
],
|
||
"content": [
|
||
"Every browser automation follows this pattern:",
|
||
"# 1. Navigate agent-browser open example.com # 2. Snapshot to get element refs agent-browser snapshot -i # Output: # @e1 [heading] \"Example Domain\" # @e2 [link] \"More information...\" # 3. Interact using refs agent-browser click @e2 # 4. Re-snapshot after page changes agent-browser snapshot -i",
|
||
"agent-browser open example.com agent-browser snapshot -i # Get interactive elements with refs agent-browser click @e2 # Click by ref agent-browser fill @e3 \"test@example.com\" # Fill input by ref agent-browser get text @e1 # Get text content agent-browser screenshot # Save to temp directory agent-browser screenshot page.png # Save to specific path agent-browser close",
|
||
"CSS selectors and semantic locators also supported:",
|
||
"agent-browser click \"#submit\" agent-browser fill \"#email\" \"test@example.com\" agent-browser find role button click --name \"Submit\"",
|
||
"Show browser window for debugging:",
|
||
"agent-browser open example.com --headed",
|
||
"agent-browser wait @e1 # Wait for element agent-browser wait --text \"Welcome\" # Wait for expected text agent-browser wait --url \"**/dashboard\" # Wait for URL pattern agent-browser wait --fn \"window.appReady === true\" # Wait for JS condition agent-browser wait --load domcontentloaded # Wait for the DOM lifecycle event",
|
||
"After a page change, prefer the condition that represents the result you need. Use load or domcontentloaded only when the lifecycle event is the milestone. networkidle remains available for pages known to become quiet, but SSE, WebSockets, polling, and long-polling can keep it from resolving.",
|
||
"Chain commands with && in a single shell call. The browser persists via a background daemon, so chaining is safe and efficient:",
|
||
"# Open, wait, and snapshot in one call agent-browser open example.com && agent-browser wait --load domcontentloaded && agent-browser snapshot -i # Chain multiple interactions agent-browser fill @e1 \"user@example.com\" && agent-browser fill @e2 \"pass\" && agent-browser click @e3 # Navigate and capture agent-browser open example.com && agent-browser wait --load load && agent-browser screenshot page.png",
|
||
"Use && when you don't need intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs before interacting).",
|
||
"For programmatic parsing in scripts:",
|
||
"agent-browser snapshot --json agent-browser get text @e1 --json",
|
||
"Note: The default text output is more compact and preferred for AI agents."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Quick Start\n\n## Core workflow\n\nEvery browser automation follows this pattern:\n\n```bash\n# 1. Navigate\nagent-browser open example.com\n\n# 2. Snapshot to get element refs\nagent-browser snapshot -i\n# Output:\n# @e1 [heading] \"Example Domain\"\n# @e2 [link] \"More information...\"\n\n# 3. Interact using refs\nagent-browser click @e2\n\n# 4. Re-snapshot after page changes\nagent-browser snapshot -i\n```\n\n## Common commands\n\n```bash\nagent-browser open example.com\nagent-browser snapshot -i # Get interactive elements with refs\nagent-browser click @e2 # Click by ref\nagent-browser fill @e3 \"test@example.com\" # Fill input by ref\nagent-browser get text @e1 # Get text content\nagent-browser screenshot # Save to temp directory\nagent-browser screenshot page.png # Save to specific path\nagent-browser close\n```\n\n## Traditional selectors\n\nCSS selectors and semantic locators also supported:\n\n```bash\nagent-browser click \"#submit\"\nagent-browser fill \"#email\" \"test@example.com\"\nagent-browser find role button click --name \"Submit\"\n```\n\n## Headed mode\n\nShow browser window for debugging:\n\n```bash\nagent-browser open example.com --headed\n```\n\n## Wait for content\n\n```bash\nagent-browser wait @e1 # Wait for element\nagent-browser wait --text \"Welcome\" # Wait for expected text\nagent-browser wait --url \"**/dashboard\" # Wait for URL pattern\nagent-browser wait --fn \"window.appReady === true\" # Wait for JS condition\nagent-browser wait --load domcontentloaded # Wait for the DOM lifecycle event\n```\n\nAfter a page change, prefer the condition that represents the result you need. Use `load` or `domcontentloaded` only when the lifecycle event is the milestone. `networkidle` remains available for pages known to become quiet, but SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Command chaining\n\nChain commands with `&&` in a single shell call. The browser persists via a background daemon, so chaining is safe and efficient:\n\n```bash\n# Open, wait, and snapshot in one call\nagent-browser open example.com && agent-browser wait --load domcontentloaded && agent-browser snapshot -i\n\n# Chain multiple interactions\nagent-browser fill @e1 \"user@example.com\" && agent-browser fill @e2 \"pass\" && agent-browser click @e3\n\n# Navigate and capture\nagent-browser open example.com && agent-browser wait --load load && agent-browser screenshot page.png\n```\n\nUse `&&` when you don't need intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs before interacting).\n\n## JSON output\n\nFor programmatic parsing in scripts:\n\n```bash\nagent-browser snapshot --json\nagent-browser get text @e1 --json\n```\n\nNote: The default text output is more compact and preferred for AI agents.",
|
||
"legacyMarkdownSha256": "9d331c45df15a044ab70204a25eb2deb53ff7d9879691b1668b1e6c1a782542e",
|
||
"modernMarkdown": "# Quick Start\n\n## Core workflow\n\nEvery browser automation follows this pattern:\n\n```bash\n# 1. Navigate\nagent-browser open example.com\n\n# 2. Snapshot to get element refs\nagent-browser snapshot -i\n# Output:\n# @e1 [heading] \"Example Domain\"\n# @e2 [link] \"More information...\"\n\n# 3. Interact using refs\nagent-browser click @e2\n\n# 4. Re-snapshot after page changes\nagent-browser snapshot -i\n```\n\n## Common commands\n\n```bash\nagent-browser open example.com\nagent-browser snapshot -i # Get interactive elements with refs\nagent-browser click @e2 # Click by ref\nagent-browser fill @e3 \"test@example.com\" # Fill input by ref\nagent-browser get text @e1 # Get text content\nagent-browser screenshot # Save to temp directory\nagent-browser screenshot page.png # Save to specific path\nagent-browser close\n```\n\n## Traditional selectors\n\nCSS selectors and semantic locators also supported:\n\n```bash\nagent-browser click \"#submit\"\nagent-browser fill \"#email\" \"test@example.com\"\nagent-browser find role button click --name \"Submit\"\n```\n\n## Headed mode\n\nShow browser window for debugging:\n\n```bash\nagent-browser open example.com --headed\n```\n\n## Wait for content\n\n```bash\nagent-browser wait @e1 # Wait for element\nagent-browser wait --text \"Welcome\" # Wait for expected text\nagent-browser wait --url \"**/dashboard\" # Wait for URL pattern\nagent-browser wait --fn \"window.appReady === true\" # Wait for JS condition\nagent-browser wait --load domcontentloaded # Wait for the DOM lifecycle event\n```\n\nAfter a page change, prefer the condition that represents the result you need. Use `load` or `domcontentloaded` only when the lifecycle event is the milestone. `networkidle` remains available for pages known to become quiet, but SSE, WebSockets, polling, and long-polling can keep it from resolving.\n\n## Command chaining\n\nChain commands with `&&` in a single shell call. The browser persists via a background daemon, so chaining is safe and efficient:\n\n```bash\n# Open, wait, and snapshot in one call\nagent-browser open example.com && agent-browser wait --load domcontentloaded && agent-browser snapshot -i\n\n# Chain multiple interactions\nagent-browser fill @e1 \"user@example.com\" && agent-browser fill @e2 \"pass\" && agent-browser click @e3\n\n# Navigate and capture\nagent-browser open example.com && agent-browser wait --load load && agent-browser screenshot page.png\n```\n\nUse `&&` when you don't need intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs before interacting).\n\n## JSON output\n\nFor programmatic parsing in scripts:\n\n```bash\nagent-browser snapshot --json\nagent-browser get text @e1 --json\n```\n\nNote: The default text output is more compact and preferred for AI agents.",
|
||
"modernMarkdownSha256": "9d331c45df15a044ab70204a25eb2deb53ff7d9879691b1668b1e6c1a782542e",
|
||
"navigation": {
|
||
"title": "Quick Start",
|
||
"section": ""
|
||
}
|
||
},
|
||
{
|
||
"path": "/react",
|
||
"source": "docs/src/app/react/page.mdx",
|
||
"layout": "docs/src/app/react/layout.tsx",
|
||
"sourceSha256": "033725f2963bf79beee4ec81cd43aee68921eb6943379894d4456deadfa13dfb",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# React & Web Vitals\n",
|
||
"markdownTitle": "React & Web Vitals",
|
||
"title": "React & Web Vitals | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "React & Web Vitals | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "React & Web Vitals - agent-browser",
|
||
"twitterTitle": "React & Web Vitals | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "React & Web Vitals",
|
||
"id": "react-web-vitals"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Enable React inspection",
|
||
"id": "enable-react-inspection"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "React commands",
|
||
"id": "react-commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Web Vitals",
|
||
"id": "web-vitals"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "SPA navigation",
|
||
"id": "spa-navigation"
|
||
}
|
||
],
|
||
"content": [
|
||
"agent-browser can inspect React component trees, record re-renders, classify Suspense boundaries, measure Core Web Vitals, and perform SPA navigation.",
|
||
"React inspection requires the React DevTools hook to be installed before page JavaScript runs:",
|
||
"agent-browser open --enable react-devtools http://localhost:3000 agent-browser react tree",
|
||
"If the session already has a browser without the hook, passing --enable react-devtools relaunches that session with the hook installed.",
|
||
"Command",
|
||
"Description",
|
||
"react tree",
|
||
"Print the React component tree with fiber IDs",
|
||
"react inspect <fiberId>",
|
||
"Inspect props, hooks, state, and source for one component",
|
||
"react renders start",
|
||
"Begin recording component render commits",
|
||
"react renders stop [--json]",
|
||
"Stop recording and print a render profile",
|
||
"react suspense [--only-dynamic] [--json]",
|
||
"Walk Suspense boundaries and classify static versus dynamic boundaries",
|
||
"agent-browser react tree agent-browser react inspect 42 agent-browser react renders start agent-browser click @e3 agent-browser react renders stop agent-browser react suspense --only-dynamic",
|
||
"vitals works on any site. When a React profiling build is detected, it also reports hydration phases.",
|
||
"agent-browser vitals agent-browser vitals https://example.com --json",
|
||
"By default, vitals prints a summary using the same fields as the structured --json response. Reported metrics include LCP, CLS, TTFB, FCP, INP, and hydration timing when available.",
|
||
"pushstate performs client-side navigation without forcing a full browser reload. On Next.js apps, it attempts to use window.next.router.push so RSC fetches still run. Other frameworks fall back to history.pushState plus navigation events.",
|
||
"agent-browser pushstate /dashboard agent-browser wait --url \"**/dashboard\" agent-browser snapshot -i",
|
||
"Use open for full navigation and pushstate when the workflow needs SPA behavior."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# React & Web Vitals\n\nagent-browser can inspect React component trees, record re-renders, classify Suspense boundaries, measure Core Web Vitals, and perform SPA navigation.\n\n## Enable React inspection\n\nReact inspection requires the React DevTools hook to be installed before page JavaScript runs:\n\n```bash\nagent-browser open --enable react-devtools http://localhost:3000\nagent-browser react tree\n```\n\nIf the session already has a browser without the hook, passing `--enable react-devtools` relaunches that session with the hook installed.\n\n## React commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>react tree</code></td><td>Print the React component tree with fiber IDs</td></tr>\n <tr><td><code>react inspect <fiberId></code></td><td>Inspect props, hooks, state, and source for one component</td></tr>\n <tr><td><code>react renders start</code></td><td>Begin recording component render commits</td></tr>\n <tr><td><code>react renders stop [--json]</code></td><td>Stop recording and print a render profile</td></tr>\n <tr><td><code>react suspense [--only-dynamic] [--json]</code></td><td>Walk Suspense boundaries and classify static versus dynamic boundaries</td></tr>\n </tbody>\n</table>\n\n```bash\nagent-browser react tree\nagent-browser react inspect 42\n\nagent-browser react renders start\nagent-browser click @e3\nagent-browser react renders stop\n\nagent-browser react suspense --only-dynamic\n```\n\n## Web Vitals\n\n`vitals` works on any site. When a React profiling build is detected, it also reports hydration phases.\n\n```bash\nagent-browser vitals\nagent-browser vitals https://example.com --json\n```\n\nBy default, `vitals` prints a summary using the same fields as the structured `--json` response. Reported metrics include LCP, CLS, TTFB, FCP, INP, and hydration timing when available.\n\n## SPA navigation\n\n`pushstate` performs client-side navigation without forcing a full browser reload. On Next.js apps, it attempts to use `window.next.router.push` so RSC fetches still run. Other frameworks fall back to `history.pushState` plus navigation events.\n\n```bash\nagent-browser pushstate /dashboard\nagent-browser wait --url \"**/dashboard\"\nagent-browser snapshot -i\n```\n\nUse `open` for full navigation and `pushstate` when the workflow needs SPA behavior.",
|
||
"legacyMarkdownSha256": "8cd71f9993c524149669e992c755491e65597f21464c47d35fd9a7db42922b19",
|
||
"modernMarkdown": "# React & Web Vitals\n\nagent-browser can inspect React component trees, record re-renders, classify Suspense boundaries, measure Core Web Vitals, and perform SPA navigation.\n\n## Enable React inspection\n\nReact inspection requires the React DevTools hook to be installed before page JavaScript runs:\n\n```bash\nagent-browser open --enable react-devtools http://localhost:3000\nagent-browser react tree\n```\n\nIf the session already has a browser without the hook, passing `--enable react-devtools` relaunches that session with the hook installed.\n\n## React commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>react tree</code></td><td>Print the React component tree with fiber IDs</td></tr>\n <tr><td><code>react inspect <fiberId></code></td><td>Inspect props, hooks, state, and source for one component</td></tr>\n <tr><td><code>react renders start</code></td><td>Begin recording component render commits</td></tr>\n <tr><td><code>react renders stop [--json]</code></td><td>Stop recording and print a render profile</td></tr>\n <tr><td><code>react suspense [--only-dynamic] [--json]</code></td><td>Walk Suspense boundaries and classify static versus dynamic boundaries</td></tr>\n </tbody>\n</table>\n\n```bash\nagent-browser react tree\nagent-browser react inspect 42\n\nagent-browser react renders start\nagent-browser click @e3\nagent-browser react renders stop\n\nagent-browser react suspense --only-dynamic\n```\n\n## Web Vitals\n\n`vitals` works on any site. When a React profiling build is detected, it also reports hydration phases.\n\n```bash\nagent-browser vitals\nagent-browser vitals https://example.com --json\n```\n\nBy default, `vitals` prints a summary using the same fields as the structured `--json` response. Reported metrics include LCP, CLS, TTFB, FCP, INP, and hydration timing when available.\n\n## SPA navigation\n\n`pushstate` performs client-side navigation without forcing a full browser reload. On Next.js apps, it attempts to use `window.next.router.push` so RSC fetches still run. Other frameworks fall back to `history.pushState` plus navigation events.\n\n```bash\nagent-browser pushstate /dashboard\nagent-browser wait --url \"**/dashboard\"\nagent-browser snapshot -i\n```\n\nUse `open` for full navigation and `pushstate` when the workflow needs SPA behavior.",
|
||
"modernMarkdownSha256": "8cd71f9993c524149669e992c755491e65597f21464c47d35fd9a7db42922b19",
|
||
"navigation": {
|
||
"title": "React & Web Vitals",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/recording",
|
||
"source": "docs/src/app/recording/page.mdx",
|
||
"layout": "docs/src/app/recording/layout.tsx",
|
||
"sourceSha256": "ac02ee70297ad625b21a82f1868006b5031ba1d841076213b7a4e59ff24d5464",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Video Recording\n",
|
||
"markdownTitle": "Video Recording",
|
||
"title": "Video Recording | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Video Recording | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Video Recording - agent-browser",
|
||
"twitterTitle": "Video Recording | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Video Recording",
|
||
"id": "video-recording"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Requirements",
|
||
"id": "requirements"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Basic workflow",
|
||
"id": "basic-workflow"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Visible cursor",
|
||
"id": "visible-cursor"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Contact sheets",
|
||
"id": "contact-sheets"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Frame rate",
|
||
"id": "frame-rate"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Commands",
|
||
"id": "commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "CI evidence",
|
||
"id": "ci-evidence"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Human-readable demos",
|
||
"id": "human-readable-demos"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Output format",
|
||
"id": "output-format"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Limitations",
|
||
"id": "limitations"
|
||
}
|
||
],
|
||
"content": [
|
||
"Use record to capture browser automation as a WebM or MP4 video for debugging, CI evidence, product walkthroughs, or repro reports.",
|
||
"Recording pipes frames into ffmpeg, which must be on PATH with the libvpx and libx264 encoders (the default builds from Homebrew and Debian/Ubuntu include both):",
|
||
"brew install ffmpeg # macOS sudo apt install ffmpeg # Debian/Ubuntu agent-browser doctor # reports ffmpeg and its encoders under \"Recording\"",
|
||
"The supported formats are .webm (VP8 via libvpx) and .mp4 (H.264 via libx264). Any other extension is handed to ffmpeg as-is with H.264 video, so .mkv or .mov work if ffmpeg knows the container. A path with no extension is rejected before recording starts, since ffmpeg would have nothing to pick a container from. Nothing else in agent-browser needs ffmpeg.",
|
||
"agent-browser open https://example.com agent-browser record start ./demo.webm agent-browser snapshot -i agent-browser click @e1 agent-browser record stop",
|
||
"After launching a session, record start can also navigate immediately:",
|
||
"agent-browser open agent-browser record start ./demo.webm https://example.com",
|
||
"record start records the current active page as-is. With no URL, nothing is navigated or replaced: the recorder attaches to the tab you already have open, so capture begins on a hydrated page rather than at load on a cold navigation. With a URL, the active tab navigates there first and recording starts once the page has loaded. No extra tab or browser context is created.",
|
||
"To record in a separate tab, open one first:",
|
||
"agent-browser tab new https://example.com agent-browser record start ./demo.webm",
|
||
"Chrome recordings do not normally include the native pointer. Add --cursor for an animated pointer and click ripple rendered with the page, keeping drags synchronized in every captured frame. The temporary overlay is inert, hidden from accessibility snapshots, and removed when recording stops. Screenshots taken during the recording include it:",
|
||
"agent-browser record start ./walkthrough.webm --cursor",
|
||
"Add --contact-sheet for a timestamped PNG with highlighted changes.",
|
||
"agent-browser record start ./checkout.webm --contact-sheet # Select a frame when at least 2% of pixels change agent-browser record start ./checkout.webm --contact-sheet-threshold 0.02",
|
||
"The threshold accepts 0 to 1, defaults to 0.05, and implies --contact-sheet. Contact sheets contain at most 100 frames.",
|
||
"Recording captures 30 frames per second by default, which is enough for scrolling, hover states, and CSS transitions to read as motion rather than as a slideshow. Use --fps to change it:",
|
||
"# 60 fps for a short, motion-heavy take agent-browser record start ./scroll.webm --fps 60 # 10 fps for a long soak run where file size matters more than motion agent-browser record start ./soak.webm --fps 10",
|
||
"Rate",
|
||
"When to use it",
|
||
"60",
|
||
"Drag interactions, animation and scroll polish work, anything where a single frame is the evidence. Best on short clips.",
|
||
"30 (default)",
|
||
"Everything else: flows, CI evidence, walkthroughs.",
|
||
"1 to 15",
|
||
"Long sessions where the video is a timeline rather than a motion study.",
|
||
"Valid rates are 1 to 60. The latest Chrome frame is held between repaints so the file duration matches wall clock.",
|
||
"record stop reports frames written to the file and distinct capturedFrames received from Chrome.",
|
||
"Command",
|
||
"Description",
|
||
"record start <path.webm|path.mp4> [url] [--fps <n>] [--cursor] [--contact-sheet]",
|
||
"Start recording the active page; a URL navigates the active tab first",
|
||
"record stop",
|
||
"Stop the active recording and save the file",
|
||
"record restart <path.webm|path.mp4> [url] [--fps <n>] [--cursor] [--contact-sheet]",
|
||
"Stop the current recording and immediately start another",
|
||
"#!/bin/bash set -e cleanup() { agent-browser record stop 2>/dev/null || true agent-browser close 2>/dev/null || true } trap cleanup EXIT agent-browser open https://app.example.com/login agent-browser record start \"./artifacts/login-flow.webm\" agent-browser snapshot -i agent-browser fill @e1 \"demo@example.com\" agent-browser fill @e2 \"password\" agent-browser click @e3 agent-browser wait --url \"**/dashboard\"",
|
||
"Keep recordings as CI artifacts when browser failures are hard to diagnose from text output alone.",
|
||
"Add small waits when the video is meant for a person to watch:",
|
||
"agent-browser open https://shop.example.com agent-browser record start ./checkout.webm agent-browser wait 500 agent-browser click @e4 agent-browser wait 500 agent-browser screenshot ./screenshots/cart.png agent-browser record stop",
|
||
"Screenshots and videos work well together: screenshots capture precise still states, while the video shows timing, transitions, and unexpected overlays.",
|
||
"Property",
|
||
"Value",
|
||
"Container",
|
||
"WebM (.webm, VP8 via libvpx) or MP4 (.mp4, H.264 via libx264), chosen by the extension; other extensions get H.264 in whatever container ffmpeg maps them to",
|
||
"Encoder",
|
||
"ffmpeg on PATH",
|
||
"Frame rate",
|
||
"30 fps by default, 1 to 60 with --fps",
|
||
"Viewport",
|
||
"Uses the active browser viewport settings",
|
||
"State",
|
||
"Records the active page in place, including its session and in-page state",
|
||
"Recording adds overhead to automation, and higher frame rates add more.",
|
||
"Long recordings can use significant disk space; 60 fps roughly doubles the bitrate of 30 fps.",
|
||
"Distinct frames per second are bounded by how often the page repaints, so a page that renders below 60 fps records below it too.",
|
||
"Use record stop before closing a session if you need the file flushed.",
|
||
"Some constrained headless environments may have codec or GPU limitations. An ffmpeg built without libvpx or libx264 cannot write the matching format; agent-browser doctor reports which encoders are present."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "image",
|
||
"url": "/recording/contact-sheet-example.png",
|
||
"text": "Example contact sheet with timestamps and highlighted change regions"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Video Recording\n\nUse `record` to capture browser automation as a WebM or MP4 video for debugging, CI evidence, product walkthroughs, or repro reports.\n\n## Requirements\n\nRecording pipes frames into `ffmpeg`, which must be on `PATH` with the `libvpx` and `libx264` encoders (the default builds from Homebrew and Debian/Ubuntu include both):\n\n```bash\nbrew install ffmpeg # macOS\nsudo apt install ffmpeg # Debian/Ubuntu\nagent-browser doctor # reports ffmpeg and its encoders under \"Recording\"\n```\n\nThe supported formats are `.webm` (VP8 via libvpx) and `.mp4` (H.264 via libx264). Any other extension is handed to ffmpeg as-is with H.264 video, so `.mkv` or `.mov` work if ffmpeg knows the container. A path with no extension is rejected before recording starts, since ffmpeg would have nothing to pick a container from. Nothing else in agent-browser needs ffmpeg.\n\n## Basic workflow\n\n```bash\nagent-browser open https://example.com\nagent-browser record start ./demo.webm\nagent-browser snapshot -i\nagent-browser click @e1\n\nagent-browser record stop\n```\n\nAfter launching a session, `record start` can also navigate immediately:\n\n```bash\nagent-browser open\nagent-browser record start ./demo.webm https://example.com\n```\n\n`record start` records the current active page as-is. With no URL, nothing is navigated or replaced: the recorder attaches to the tab you already have open, so capture begins on a hydrated page rather than at `load` on a cold navigation. With a URL, the active tab navigates there first and recording starts once the page has loaded. No extra tab or browser context is created.\n\nTo record in a separate tab, open one first:\n\n```bash\nagent-browser tab new https://example.com\nagent-browser record start ./demo.webm\n```\n\n## Visible cursor\n\nChrome recordings do not normally include the native pointer. Add `--cursor` for an animated pointer and click ripple rendered with the page, keeping drags synchronized in every captured frame. The temporary overlay is inert, hidden from accessibility snapshots, and removed when recording stops. Screenshots taken during the recording include it:\n\n```bash\nagent-browser record start ./walkthrough.webm --cursor\n```\n\n## Contact sheets\n\nAdd `--contact-sheet` for a timestamped PNG with highlighted changes.\n\n```bash\nagent-browser record start ./checkout.webm --contact-sheet\n\n# Select a frame when at least 2% of pixels change\nagent-browser record start ./checkout.webm --contact-sheet-threshold 0.02\n```\n\nThe threshold accepts `0` to `1`, defaults to `0.05`, and implies `--contact-sheet`. Contact sheets contain at most 100 frames.\n\n\n\n## Frame rate\n\nRecording captures 30 frames per second by default, which is enough for scrolling, hover states, and CSS transitions to read as motion rather than as a slideshow. Use `--fps` to change it:\n\n```bash\n# 60 fps for a short, motion-heavy take\nagent-browser record start ./scroll.webm --fps 60\n\n# 10 fps for a long soak run where file size matters more than motion\nagent-browser record start ./soak.webm --fps 10\n```\n\n<table>\n <thead>\n <tr><th>Rate</th><th>When to use it</th></tr>\n </thead>\n <tbody>\n <tr><td>60</td><td>Drag interactions, animation and scroll polish work, anything where a single frame is the evidence. Best on short clips.</td></tr>\n <tr><td>30 (default)</td><td>Everything else: flows, CI evidence, walkthroughs.</td></tr>\n <tr><td>1 to 15</td><td>Long sessions where the video is a timeline rather than a motion study.</td></tr>\n </tbody>\n</table>\n\nValid rates are 1 to 60. The latest Chrome frame is held between repaints so the file duration matches wall clock.\n\n`record stop` reports `frames` written to the file and distinct `capturedFrames` received from Chrome.\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>record start <path.webm|path.mp4> [url] [--fps <n>] [--cursor] [--contact-sheet]</code></td><td>Start recording the active page; a URL navigates the active tab first</td></tr>\n <tr><td><code>record stop</code></td><td>Stop the active recording and save the file</td></tr>\n <tr><td><code>record restart <path.webm|path.mp4> [url] [--fps <n>] [--cursor] [--contact-sheet]</code></td><td>Stop the current recording and immediately start another</td></tr>\n </tbody>\n</table>\n\n## CI evidence\n\n```bash\n#!/bin/bash\nset -e\n\ncleanup() {\n agent-browser record stop 2>/dev/null || true\n agent-browser close 2>/dev/null || true\n}\ntrap cleanup EXIT\n\nagent-browser open https://app.example.com/login\nagent-browser record start \"./artifacts/login-flow.webm\"\nagent-browser snapshot -i\nagent-browser fill @e1 \"demo@example.com\"\nagent-browser fill @e2 \"password\"\nagent-browser click @e3\nagent-browser wait --url \"**/dashboard\"\n```\n\nKeep recordings as CI artifacts when browser failures are hard to diagnose from text output alone.\n\n## Human-readable demos\n\nAdd small waits when the video is meant for a person to watch:\n\n```bash\nagent-browser open https://shop.example.com\nagent-browser record start ./checkout.webm\nagent-browser wait 500\nagent-browser click @e4\nagent-browser wait 500\nagent-browser screenshot ./screenshots/cart.png\nagent-browser record stop\n```\n\nScreenshots and videos work well together: screenshots capture precise still states, while the video shows timing, transitions, and unexpected overlays.\n\n## Output format\n\n<table>\n <thead>\n <tr><th>Property</th><th>Value</th></tr>\n </thead>\n <tbody>\n <tr><td>Container</td><td>WebM (<code>.webm</code>, VP8 via libvpx) or MP4 (<code>.mp4</code>, H.264 via libx264), chosen by the extension; other extensions get H.264 in whatever container ffmpeg maps them to</td></tr>\n <tr><td>Encoder</td><td>ffmpeg on <code>PATH</code></td></tr>\n <tr><td>Frame rate</td><td>30 fps by default, 1 to 60 with <code>--fps</code></td></tr>\n <tr><td>Viewport</td><td>Uses the active browser viewport settings</td></tr>\n <tr><td>State</td><td>Records the active page in place, including its session and in-page state</td></tr>\n </tbody>\n</table>\n\n## Limitations\n\n- Recording adds overhead to automation, and higher frame rates add more.\n- Long recordings can use significant disk space; 60 fps roughly doubles the bitrate of 30 fps.\n- Distinct frames per second are bounded by how often the page repaints, so a page that renders below 60 fps records below it too.\n- Use `record stop` before closing a session if you need the file flushed.\n- Some constrained headless environments may have codec or GPU limitations. An ffmpeg built without libvpx or libx264 cannot write the matching format; `agent-browser doctor` reports which encoders are present.",
|
||
"legacyMarkdownSha256": "39501a136e49247ffcc268734764fcf88414b8ab448d0acc84438ce8a126af48",
|
||
"modernMarkdown": "# Video Recording\n\nUse `record` to capture browser automation as a WebM or MP4 video for debugging, CI evidence, product walkthroughs, or repro reports.\n\n## Requirements\n\nRecording pipes frames into `ffmpeg`, which must be on `PATH` with the `libvpx` and `libx264` encoders (the default builds from Homebrew and Debian/Ubuntu include both):\n\n```bash\nbrew install ffmpeg # macOS\nsudo apt install ffmpeg # Debian/Ubuntu\nagent-browser doctor # reports ffmpeg and its encoders under \"Recording\"\n```\n\nThe supported formats are `.webm` (VP8 via libvpx) and `.mp4` (H.264 via libx264). Any other extension is handed to ffmpeg as-is with H.264 video, so `.mkv` or `.mov` work if ffmpeg knows the container. A path with no extension is rejected before recording starts, since ffmpeg would have nothing to pick a container from. Nothing else in agent-browser needs ffmpeg.\n\n## Basic workflow\n\n```bash\nagent-browser open https://example.com\nagent-browser record start ./demo.webm\nagent-browser snapshot -i\nagent-browser click @e1\n\nagent-browser record stop\n```\n\nAfter launching a session, `record start` can also navigate immediately:\n\n```bash\nagent-browser open\nagent-browser record start ./demo.webm https://example.com\n```\n\n`record start` records the current active page as-is. With no URL, nothing is navigated or replaced: the recorder attaches to the tab you already have open, so capture begins on a hydrated page rather than at `load` on a cold navigation. With a URL, the active tab navigates there first and recording starts once the page has loaded. No extra tab or browser context is created.\n\nTo record in a separate tab, open one first:\n\n```bash\nagent-browser tab new https://example.com\nagent-browser record start ./demo.webm\n```\n\n## Visible cursor\n\nChrome recordings do not normally include the native pointer. Add `--cursor` for an animated pointer and click ripple rendered with the page, keeping drags synchronized in every captured frame. The temporary overlay is inert, hidden from accessibility snapshots, and removed when recording stops. Screenshots taken during the recording include it:\n\n```bash\nagent-browser record start ./walkthrough.webm --cursor\n```\n\n## Contact sheets\n\nAdd `--contact-sheet` for a timestamped PNG with highlighted changes.\n\n```bash\nagent-browser record start ./checkout.webm --contact-sheet\n\n# Select a frame when at least 2% of pixels change\nagent-browser record start ./checkout.webm --contact-sheet-threshold 0.02\n```\n\nThe threshold accepts `0` to `1`, defaults to `0.05`, and implies `--contact-sheet`. Contact sheets contain at most 100 frames.\n\n\n\n## Frame rate\n\nRecording captures 30 frames per second by default, which is enough for scrolling, hover states, and CSS transitions to read as motion rather than as a slideshow. Use `--fps` to change it:\n\n```bash\n# 60 fps for a short, motion-heavy take\nagent-browser record start ./scroll.webm --fps 60\n\n# 10 fps for a long soak run where file size matters more than motion\nagent-browser record start ./soak.webm --fps 10\n```\n\n<table>\n <thead>\n <tr><th>Rate</th><th>When to use it</th></tr>\n </thead>\n <tbody>\n <tr><td>60</td><td>Drag interactions, animation and scroll polish work, anything where a single frame is the evidence. Best on short clips.</td></tr>\n <tr><td>30 (default)</td><td>Everything else: flows, CI evidence, walkthroughs.</td></tr>\n <tr><td>1 to 15</td><td>Long sessions where the video is a timeline rather than a motion study.</td></tr>\n </tbody>\n</table>\n\nValid rates are 1 to 60. The latest Chrome frame is held between repaints so the file duration matches wall clock.\n\n`record stop` reports `frames` written to the file and distinct `capturedFrames` received from Chrome.\n\n## Commands\n\n<table>\n <thead>\n <tr><th>Command</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>record start <path.webm|path.mp4> [url] [--fps <n>] [--cursor] [--contact-sheet]</code></td><td>Start recording the active page; a URL navigates the active tab first</td></tr>\n <tr><td><code>record stop</code></td><td>Stop the active recording and save the file</td></tr>\n <tr><td><code>record restart <path.webm|path.mp4> [url] [--fps <n>] [--cursor] [--contact-sheet]</code></td><td>Stop the current recording and immediately start another</td></tr>\n </tbody>\n</table>\n\n## CI evidence\n\n```bash\n#!/bin/bash\nset -e\n\ncleanup() {\n agent-browser record stop 2>/dev/null || true\n agent-browser close 2>/dev/null || true\n}\ntrap cleanup EXIT\n\nagent-browser open https://app.example.com/login\nagent-browser record start \"./artifacts/login-flow.webm\"\nagent-browser snapshot -i\nagent-browser fill @e1 \"demo@example.com\"\nagent-browser fill @e2 \"password\"\nagent-browser click @e3\nagent-browser wait --url \"**/dashboard\"\n```\n\nKeep recordings as CI artifacts when browser failures are hard to diagnose from text output alone.\n\n## Human-readable demos\n\nAdd small waits when the video is meant for a person to watch:\n\n```bash\nagent-browser open https://shop.example.com\nagent-browser record start ./checkout.webm\nagent-browser wait 500\nagent-browser click @e4\nagent-browser wait 500\nagent-browser screenshot ./screenshots/cart.png\nagent-browser record stop\n```\n\nScreenshots and videos work well together: screenshots capture precise still states, while the video shows timing, transitions, and unexpected overlays.\n\n## Output format\n\n<table>\n <thead>\n <tr><th>Property</th><th>Value</th></tr>\n </thead>\n <tbody>\n <tr><td>Container</td><td>WebM (<code>.webm</code>, VP8 via libvpx) or MP4 (<code>.mp4</code>, H.264 via libx264), chosen by the extension; other extensions get H.264 in whatever container ffmpeg maps them to</td></tr>\n <tr><td>Encoder</td><td>ffmpeg on <code>PATH</code></td></tr>\n <tr><td>Frame rate</td><td>30 fps by default, 1 to 60 with <code>--fps</code></td></tr>\n <tr><td>Viewport</td><td>Uses the active browser viewport settings</td></tr>\n <tr><td>State</td><td>Records the active page in place, including its session and in-page state</td></tr>\n </tbody>\n</table>\n\n## Limitations\n\n- Recording adds overhead to automation, and higher frame rates add more.\n- Long recordings can use significant disk space; 60 fps roughly doubles the bitrate of 30 fps.\n- Distinct frames per second are bounded by how often the page repaints, so a page that renders below 60 fps records below it too.\n- Use `record stop` before closing a session if you need the file flushed.\n- Some constrained headless environments may have codec or GPU limitations. An ffmpeg built without libvpx or libx264 cannot write the matching format; `agent-browser doctor` reports which encoders are present.",
|
||
"modernMarkdownSha256": "39501a136e49247ffcc268734764fcf88414b8ab448d0acc84438ce8a126af48",
|
||
"navigation": {
|
||
"title": "Video Recording",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/security",
|
||
"source": "docs/src/app/security/page.mdx",
|
||
"layout": "docs/src/app/security/layout.tsx",
|
||
"sourceSha256": "b229140618468ea7f0f4c22651cd1e8642d5ac9bb56e1583a66159c75fc79405",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Security\n",
|
||
"markdownTitle": "Security",
|
||
"title": "Security | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Security | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Security - agent-browser",
|
||
"twitterTitle": "Security | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Security",
|
||
"id": "security"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Threat Model",
|
||
"id": "threat-model"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Known limitations",
|
||
"id": "known-limitations"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Authentication Vault",
|
||
"id": "authentication-vault"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Plugins",
|
||
"id": "plugins"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Content Boundary Markers",
|
||
"id": "content-boundary-markers"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Domain Allowlist",
|
||
"id": "domain-allowlist"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Action Policy",
|
||
"id": "action-policy"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Action Confirmation",
|
||
"id": "action-confirmation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Output Length Limits",
|
||
"id": "output-length-limits"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Environment Variables",
|
||
"id": "environment-variables"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Recommended Configuration",
|
||
"id": "recommended-configuration"
|
||
}
|
||
],
|
||
"content": [
|
||
"agent-browser includes security features to protect against credential exposure, prompt injection via untrusted page content, and unauthorized browser actions.",
|
||
"All security features are opt-in. By default, agent-browser imposes no restrictions on navigation, actions, or output. Enable these features as needed for your deployment -- existing workflows are unaffected until you explicitly activate a feature.",
|
||
"These features are designed to mitigate the following threats when an LLM-based agent drives a browser:",
|
||
"Credential exposure -- Passwords stored in the auth vault are never included in LLM context. The CLI handles vault operations locally; credentials do not pass through the daemon's IPC channel.",
|
||
"Plugin secret access: Credential provider plugins run out-of-process and only receive a structured credential resolution request. Core agent-browser keeps browser automation, policy checks, and redaction-sensitive output handling.",
|
||
"Prompt injection via page content -- Malicious pages can embed text that looks like tool output or system instructions. Content boundary markers (--content-boundaries) let the orchestrator distinguish trusted tool output from untrusted page content.",
|
||
"Unauthorized navigation / data exfiltration — A compromised or manipulated agent could navigate to attacker-controlled domains to exfiltrate data. The domain allowlist (--allowed-domains) blocks navigations, sub-resource requests, WebSocket connections, EventSource streams, and sendBeacon calls to non-allowed domains. In supported Chromium sessions, it disables WebRTC peer connections so STUN, TURN, and related DNS traffic cannot bypass HTTP interception.",
|
||
"Unauthorized destructive actions -- Action policy (--action-policy) and confirmation gating (--confirm-actions) prevent the agent from performing dangerous operations (eval, downloads, uploads) without explicit approval.",
|
||
"Context flooding -- Large page outputs can overwhelm an LLM's context window. Output truncation (--max-output) caps the size of page-sourced content.",
|
||
"WebSocket/EventSource blocking is best-effort. It works by overriding browser constructors via an init script. If the eval action category is allowed, page scripts could theoretically restore the original constructors. Deny eval via --action-policy for maximum protection.",
|
||
"Domain filter timing on cloud providers. Cloud providers run outside the local Chrome process, so resources loaded by provider-side startup behavior before agent-browser connects are not retroactively blocked. agent-browser rejects pre-existing browser attach modes, Chrome profiles, direct-page provider plugins, restore/state replay, and raw startup Chrome args when the allowlist is active.",
|
||
"The domain allowlist is not an operating-system firewall. Locally launched Chrome disables non-proxied WebRTC UDP in addition to blocking RTCPeerConnection in page JavaScript. Combine the allowlist with host, container, or network egress controls when you require a boundary below the browser process.",
|
||
"Pre-existing attach modes, profiles, saved state, and startup args do not support the domain allowlist. agent-browser rejects --allowed-domains with --cdp, --auto-connect, --profile, --restore, --state, state load, and raw Chrome args that select profiles, restore sessions, or open startup pages because pages or saved origins may run before agent-browser can verify containment.",
|
||
"iOS, Safari, and direct-page provider plugins do not support the domain allowlist. agent-browser rejects --allowed-domains with these providers because their automation backends cannot install the Chromium network controls or enforce equivalent WebRTC containment.",
|
||
"Content boundaries are defense-in-depth. They rely on the LLM and orchestrator respecting the structural markers. A sufficiently capable adversarial page could attempt to mimic the boundary format, though the per-process CSPRNG nonce makes this impractical to predict.",
|
||
"Plugins are local executables. Install credential plugins only from maintainers you trust. agent-browser limits the data it sends to plugins and supports policy gates, but it does not sandbox arbitrary local executables.",
|
||
"Plugin config is not secret storage. Do not put vault tokens or passwords in plugin command args. Use the vendor's own login/session mechanism or environment outside agent-browser config.",
|
||
"Confirmation timeout. Pending confirmations auto-deny after 60 seconds. Orchestrators must respond within that window.",
|
||
"Non-TTY auto-deny. When --confirm-interactive is set but stdin is not a terminal (e.g., piped input), actions are automatically denied to prevent accidental approval in non-interactive contexts.",
|
||
"Store credentials locally and reference them by name. The LLM never sees passwords.",
|
||
"# Save credentials (encrypted if AGENT_BROWSER_ENCRYPTION_KEY is set) # Recommended: pipe password via stdin to avoid shell history / process listing exposure echo \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin # Or pass directly (a warning will be shown) agent-browser auth save github --url https://github.com/login --username user --password pass # Login using saved credentials agent-browser auth login github # List saved profiles (names and URLs only, no secrets) agent-browser auth list # Show profile metadata agent-browser auth show github # Delete a profile agent-browser auth delete github",
|
||
"auth login filters matching controls by their layout size, computed visibility and opacity, and disabled/readonly state, including custom CSS selectors. If a selected credential field is replaced or redirects focus before entry, the command fails without submitting.",
|
||
"auth login navigates with the load lifecycle event and then waits for form selectors to appear before filling/clicking. This makes delayed SPA login pages more reliable while avoiding networkidle hangs on pages with long-lived background requests.",
|
||
"If a login form depends on state established by an in-page click, challenge clearance, consent dismissal, or another setup step, use --no-navigate to retain the active document:",
|
||
"agent-browser open https://example.com/ agent-browser click \"a[href='/login']\" agent-browser auth login work --no-navigate",
|
||
"No-navigation mode requires an existing active top-level HTTP(S) page. It compares the page origin with the effective credential URL by scheme, host, and effective port before either credential is filled, and rechecks before each credential-bearing fill. Paths, queries, and fragments may differ. The flag suppresses only the initial navigation; selector waits, fills, the submit click, and submit-triggered navigation remain enabled. A command-level --url takes precedence over profile or provider URL metadata and becomes the origin constraint.",
|
||
"Custom selectors can be specified if auto-detection fails:",
|
||
"agent-browser auth save myapp \\ --url https://app.example.com/login \\ --username user --password pass \\ --username-selector \"#email\" \\ --password-selector \"#password\" \\ --submit-selector \"button.login\"",
|
||
"Profiles are stored in ~/.agent-browser/auth/ and always encrypted with AES-256-GCM. If AGENT_BROWSER_ENCRYPTION_KEY is not set, a key is auto-generated at ~/.agent-browser/.encryption-key on first use. Back up this file or set the environment variable explicitly for portability.",
|
||
"File permissions are enforced on both Unix (chmod 600/700) and Windows (icacls restricted to the current user) to prevent other users from reading encryption keys or auth profiles.",
|
||
"Plugins run out-of-process over the agent-browser.plugin.v1 stdio JSON protocol. Configure them in agent-browser.json:",
|
||
"See Plugins for the plugin author protocol and implementation examples. Use agent-browser plugin add <ref> to create plugin config automatically.",
|
||
"{ \"plugins\": [ { \"name\": \"vault\", \"command\": \"agent-browser-plugin-vault\", \"capabilities\": [\"credential.read\"] }, { \"name\": \"cloud-browser\", \"command\": \"agent-browser-plugin-cloud-browser\", \"capabilities\": [\"browser.provider\"] }, { \"name\": \"stealth\", \"command\": \"agent-browser-plugin-stealth\", \"capabilities\": [\"launch.mutate\"] }, { \"name\": \"captcha\", \"command\": \"agent-browser-plugin-captcha\", \"capabilities\": [\"command.run\", \"captcha.solve\"] } ] }",
|
||
"Inspect configured plugins:",
|
||
"agent-browser plugin list agent-browser plugin show vault",
|
||
"Use the plugin for login:",
|
||
"agent-browser auth login my-app --credential-provider vault --item \"My App\" agent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login",
|
||
"Use a plugin as a browser provider:",
|
||
"agent-browser --provider cloud-browser open https://example.com",
|
||
"Use a generic plugin command:",
|
||
"agent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'",
|
||
"Credential plugins receive credential.resolve and return username, password, and optionally URL or selector metadata. Browser provider plugins receive browser.launch and return a CDP WebSocket URL. Launch mutator plugins receive launch.mutate and can append local launch args, extensions, or init script source before Chrome starts. Generic command plugins receive the request type passed to plugin run.",
|
||
"plugin run is for command.run and custom capabilities. Core capabilities and protocol request types use their dedicated command paths so credential, browser-provider, and launch-mutator access stays inside the normal policy gates.",
|
||
"agent-browser keeps browser automation, redaction-sensitive output, and policy enforcement in core. Credential plugin secrets do not appear in command arguments, dashboard events, or normal command output.",
|
||
"Gate plugin access with capability actions:",
|
||
"agent-browser --confirm-actions plugin:vault:credential.read auth login my-app --credential-provider vault --item \"My App\" agent-browser --confirm-actions plugin:cloud-browser:browser.provider --provider cloud-browser open https://example.com agent-browser --confirm-actions plugin:stealth:launch.mutate open https://example.com",
|
||
"When --content-boundaries is enabled, all page-sourced output is wrapped in structural markers so LLMs can distinguish tool output from untrusted page content:",
|
||
"--- AGENT_BROWSER_PAGE_CONTENT nonce=a1b2c3d4 origin=https://example.com --- [snapshot / text / html / eval output here] --- END_AGENT_BROWSER_PAGE_CONTENT nonce=a1b2c3d4 ---",
|
||
"The nonce is a random value generated per CLI process invocation, making it unpredictable to page content that might attempt to spoof the boundary.",
|
||
"Enable via flag or environment variable:",
|
||
"agent-browser --content-boundaries snapshot # or export AGENT_BROWSER_CONTENT_BOUNDARIES=1",
|
||
"Affected output types: snapshot, get text, get html, eval, console.",
|
||
"In --json mode, boundary metadata is injected into the JSON response as a _boundary object containing nonce and origin fields, allowing orchestrators to verify provenance programmatically:",
|
||
"{ \"success\": true, \"data\": { \"snapshot\": \"...\", \"origin\": \"https://example.com\" }, \"_boundary\": { \"nonce\": \"a1b2c3d4e5f6...\", \"origin\": \"https://example.com\" } }",
|
||
"Restrict which domains the browser can interact with, preventing redirect-based attacks and data exfiltration:",
|
||
"agent-browser --allowed-domains \"example.com,*.example.com,github.com\" open https://example.com # or export AGENT_BROWSER_ALLOWED_DOMAINS=\"example.com,*.example.com\"",
|
||
"Supports exact match (github.com) and wildcard prefix (*.example.com, which also matches the bare domain example.com). Both page navigations and sub-resource requests (scripts, images, fetch, XHR, etc.) to non-allowed domains are blocked. WebSocket and EventSource connections are blocked via constructor-level patching, and sendBeacon returns false for blocked destinations. Dedicated and shared workers are guarded with a bootstrap wrapper; if a page CSP forbids that wrapper, the worker fails closed rather than running without the allowlist guard. WebRTC peer connections are disabled entirely in supported Chromium sessions while the allowlist is active because STUN, TURN, and DNS traffic do not pass through CDP Fetch interception. Locally launched Chrome also uses disable_non_proxied_udp as a second layer. Pre-existing CDP sessions, auto-connect, Chrome profiles, direct-page provider plugins, agent-browser restore or state-file replay, raw Chrome args that select profiles, restore sessions, or open startup pages, iOS, and Safari reject this option because agent-browser cannot install equivalent containment before page scripts run. Non-http(s) sub-resources such as data URIs and blobs remain allowed. When a request is blocked, the command returns an error.",
|
||
"Note: WebSocket and EventSource blocking is best-effort because it overrides browser constructors via an init script. If the eval action category is allowed, page scripts could theoretically restore those original constructors. The WebRTC replacement is installed as a non-configurable constructor, with the Chrome UDP policy providing defense in depth for local launches. For maximum protection, deny the eval category via --action-policy and enforce operating-system egress policy when using --allowed-domains.",
|
||
"Config file:",
|
||
"{ \"allowedDomains\": [\"example.com\", \"*.example.com\", \"github.com\"] }",
|
||
"CDN and third-party resources: The domain filter blocks all sub-resource requests (scripts, stylesheets, images, fonts, fetch/XHR) to non-allowed domains. Most websites load assets from CDN domains. Include these in your allowlist or pages will break. For example:",
|
||
"--allowed-domains \"myapp.com,*.myapp.com,cdn.jsdelivr.net,fonts.googleapis.com,fonts.gstatic.com\"",
|
||
"Gate actions using a static policy file. The policy is enforced by the daemon -- denied actions fail immediately.",
|
||
"agent-browser --action-policy ./policy.json open https://example.com # or export AGENT_BROWSER_ACTION_POLICY=./policy.json",
|
||
"Example policy (permissive with specific denials):",
|
||
"{ \"default\": \"allow\", \"deny\": [\"eval\", \"download\", \"upload\"] }",
|
||
"Example policy (restrictive):",
|
||
"{ \"default\": \"deny\", \"allow\": [\"navigate\", \"snapshot\", \"click\", \"scroll\", \"wait\", \"get\"] }",
|
||
"Category",
|
||
"Actions",
|
||
"navigate",
|
||
"open, back, forward, reload, tab new",
|
||
"click",
|
||
"click, dblclick, tap",
|
||
"fill",
|
||
"fill, type, keyboard type/inserttext, select, check, uncheck",
|
||
"eval",
|
||
"eval, evalhandle, addscript, addinitscript, addstyle, expose, setcontent",
|
||
"download",
|
||
"download, waitfordownload",
|
||
"upload",
|
||
"snapshot",
|
||
"snapshot, screenshot, pdf, diff",
|
||
"scroll",
|
||
"scroll, scrollintoview",
|
||
"wait",
|
||
"wait, waitforurl, waitforloadstate, waitforfunction",
|
||
"read",
|
||
"get",
|
||
"get text/html/url/title, count, isvisible, getbyrole, getbytext, getbylabel, etc.",
|
||
"interact",
|
||
"hover, focus, drag, press, keydown, keyup, mousemove, dispatch",
|
||
"network",
|
||
"network route/unroute, requests, har start/stop",
|
||
"state",
|
||
"state save/load, cookies set, storage set",
|
||
"Auth vault operations keep secrets out of normal command output and LLM context. Domain allowlist restrictions still apply to auth login navigations. Plugin-backed logins also expose the capability action plugin:<name>:credential.read for policy and confirmation gates.",
|
||
"For actions that require explicit approval, use --confirm-actions to specify categories that require confirmation:",
|
||
"# Orchestrator mode: returns confirmation_required response agent-browser --confirm-actions eval,download eval \"document.title\" # Then approve or deny: agent-browser confirm c_8f3a1234 agent-browser deny c_8f3a1234",
|
||
"For interactive (human-in-the-loop) confirmation:",
|
||
"agent-browser --confirm-actions eval,download --confirm-interactive eval \"document.title\" # Prompts: Allow? [y/N]",
|
||
"Pending confirmations auto-deny after 60 seconds.",
|
||
"Non-TTY behavior: When --confirm-interactive is set but stdin is not a TTY (e.g., piped input or running inside an automated pipeline), actions are automatically denied. This prevents accidental approval in non-interactive contexts.",
|
||
"Prevent context flooding by truncating large page outputs:",
|
||
"agent-browser --max-output 50000 get text body # or export AGENT_BROWSER_MAX_OUTPUT=50000",
|
||
"Variable",
|
||
"Description",
|
||
"AGENT_BROWSER_CONTENT_BOUNDARIES",
|
||
"Wrap page output in boundary markers",
|
||
"AGENT_BROWSER_MAX_OUTPUT",
|
||
"Max characters for page output",
|
||
"AGENT_BROWSER_ALLOWED_DOMAINS",
|
||
"Comma-separated allowed domain patterns; requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins",
|
||
"AGENT_BROWSER_ACTION_POLICY",
|
||
"Path to action policy JSON file",
|
||
"AGENT_BROWSER_CONFIRM_ACTIONS",
|
||
"Comma-separated action categories requiring confirmation",
|
||
"AGENT_BROWSER_CONFIRM_INTERACTIVE",
|
||
"Enable interactive confirmation prompts",
|
||
"AGENT_BROWSER_ENCRYPTION_KEY",
|
||
"64-char hex key for AES-256-GCM encryption (auth vault + sessions)",
|
||
"AGENT_BROWSER_PLUGINS",
|
||
"JSON plugin registry override",
|
||
"For production AI agent deployments:",
|
||
"{ \"contentBoundaries\": true, \"maxOutput\": 50000, \"allowedDomains\": [\"your-app.com\", \"*.your-app.com\"], \"actionPolicy\": \"./policy.json\" }"
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/plugins",
|
||
"text": "Plugins"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Security\n\nagent-browser includes security features to protect against credential exposure, prompt injection via untrusted page content, and unauthorized browser actions.\n\nAll security features are opt-in. By default, agent-browser imposes no restrictions on navigation, actions, or output. Enable these features as needed for your deployment -- existing workflows are unaffected until you explicitly activate a feature.\n\n## Threat Model\n\nThese features are designed to mitigate the following threats when an LLM-based agent drives a browser:\n\n- **Credential exposure** -- Passwords stored in the auth vault are never included in LLM context. The CLI handles vault operations locally; credentials do not pass through the daemon's IPC channel.\n- **Plugin secret access**: Credential provider plugins run out-of-process and only receive a structured credential resolution request. Core agent-browser keeps browser automation, policy checks, and redaction-sensitive output handling.\n- **Prompt injection via page content** -- Malicious pages can embed text that looks like tool output or system instructions. Content boundary markers (`--content-boundaries`) let the orchestrator distinguish trusted tool output from untrusted page content.\n- **Unauthorized navigation / data exfiltration** — A compromised or manipulated agent could navigate to attacker-controlled domains to exfiltrate data. The domain allowlist (`--allowed-domains`) blocks navigations, sub-resource requests, WebSocket connections, EventSource streams, and `sendBeacon` calls to non-allowed domains. In supported Chromium sessions, it disables WebRTC peer connections so STUN, TURN, and related DNS traffic cannot bypass HTTP interception.\n- **Unauthorized destructive actions** -- Action policy (`--action-policy`) and confirmation gating (`--confirm-actions`) prevent the agent from performing dangerous operations (eval, downloads, uploads) without explicit approval.\n- **Context flooding** -- Large page outputs can overwhelm an LLM's context window. Output truncation (`--max-output`) caps the size of page-sourced content.\n\n### Known limitations\n\n- **WebSocket/EventSource blocking is best-effort.** It works by overriding browser constructors via an init script. If the `eval` action category is allowed, page scripts could theoretically restore the original constructors. Deny `eval` via `--action-policy` for maximum protection.\n- **Domain filter timing on cloud providers.** Cloud providers run outside the local Chrome process, so resources loaded by provider-side startup behavior before agent-browser connects are not retroactively blocked. agent-browser rejects pre-existing browser attach modes, Chrome profiles, direct-page provider plugins, restore/state replay, and raw startup Chrome args when the allowlist is active.\n- **The domain allowlist is not an operating-system firewall.** Locally launched Chrome disables non-proxied WebRTC UDP in addition to blocking `RTCPeerConnection` in page JavaScript. Combine the allowlist with host, container, or network egress controls when you require a boundary below the browser process.\n- **Pre-existing attach modes, profiles, saved state, and startup args do not support the domain allowlist.** agent-browser rejects `--allowed-domains` with `--cdp`, `--auto-connect`, `--profile`, `--restore`, `--state`, `state load`, and raw Chrome args that select profiles, restore sessions, or open startup pages because pages or saved origins may run before agent-browser can verify containment.\n- **iOS, Safari, and direct-page provider plugins do not support the domain allowlist.** agent-browser rejects `--allowed-domains` with these providers because their automation backends cannot install the Chromium network controls or enforce equivalent WebRTC containment.\n- **Content boundaries are defense-in-depth.** They rely on the LLM and orchestrator respecting the structural markers. A sufficiently capable adversarial page could attempt to mimic the boundary format, though the per-process CSPRNG nonce makes this impractical to predict.\n- **Plugins are local executables.** Install credential plugins only from maintainers you trust. agent-browser limits the data it sends to plugins and supports policy gates, but it does not sandbox arbitrary local executables.\n- **Plugin config is not secret storage.** Do not put vault tokens or passwords in plugin command args. Use the vendor's own login/session mechanism or environment outside agent-browser config.\n- **Confirmation timeout.** Pending confirmations auto-deny after 60 seconds. Orchestrators must respond within that window.\n- **Non-TTY auto-deny.** When `--confirm-interactive` is set but stdin is not a terminal (e.g., piped input), actions are automatically denied to prevent accidental approval in non-interactive contexts.\n\n## Authentication Vault\n\nStore credentials locally and reference them by name. The LLM never sees passwords.\n\n```bash\n# Save credentials (encrypted if AGENT_BROWSER_ENCRYPTION_KEY is set)\n# Recommended: pipe password via stdin to avoid shell history / process listing exposure\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\n\n# Or pass directly (a warning will be shown)\nagent-browser auth save github --url https://github.com/login --username user --password pass\n\n# Login using saved credentials\nagent-browser auth login github\n\n# List saved profiles (names and URLs only, no secrets)\nagent-browser auth list\n\n# Show profile metadata\nagent-browser auth show github\n\n# Delete a profile\nagent-browser auth delete github\n```\n\n`auth login` filters matching controls by their layout size, computed visibility and opacity, and disabled/readonly state, including custom CSS selectors. If a selected credential field is replaced or redirects focus before entry, the command fails without submitting.\n\n`auth login` navigates with the `load` lifecycle event and then waits for form selectors to appear before filling/clicking. This makes delayed SPA login pages more reliable while avoiding `networkidle` hangs on pages with long-lived background requests.\n\nIf a login form depends on state established by an in-page click, challenge clearance, consent dismissal, or another setup step, use `--no-navigate` to retain the active document:\n\n```bash\nagent-browser open https://example.com/\nagent-browser click \"a[href='/login']\"\nagent-browser auth login work --no-navigate\n```\n\nNo-navigation mode requires an existing active top-level HTTP(S) page. It compares the page origin with the effective credential URL by scheme, host, and effective port before either credential is filled, and rechecks before each credential-bearing fill. Paths, queries, and fragments may differ. The flag suppresses only the initial navigation; selector waits, fills, the submit click, and submit-triggered navigation remain enabled. A command-level `--url` takes precedence over profile or provider URL metadata and becomes the origin constraint.\n\nCustom selectors can be specified if auto-detection fails:\n\n```bash\nagent-browser auth save myapp \\\n --url https://app.example.com/login \\\n --username user --password pass \\\n --username-selector \"#email\" \\\n --password-selector \"#password\" \\\n --submit-selector \"button.login\"\n```\n\nProfiles are stored in `~/.agent-browser/auth/` and always encrypted with AES-256-GCM. If `AGENT_BROWSER_ENCRYPTION_KEY` is not set, a key is auto-generated at `~/.agent-browser/.encryption-key` on first use. Back up this file or set the environment variable explicitly for portability.\n\nFile permissions are enforced on both Unix (`chmod 600`/`700`) and Windows (`icacls` restricted to the current user) to prevent other users from reading encryption keys or auth profiles.\n\n### Plugins\n\nPlugins run out-of-process over the `agent-browser.plugin.v1` stdio JSON protocol. Configure them in `agent-browser.json`:\n\nSee [Plugins](/plugins) for the plugin author protocol and implementation examples. Use `agent-browser plugin add <ref>` to create plugin config automatically.\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"cloud-browser\",\n \"command\": \"agent-browser-plugin-cloud-browser\",\n \"capabilities\": [\"browser.provider\"]\n },\n {\n \"name\": \"stealth\",\n \"command\": \"agent-browser-plugin-stealth\",\n \"capabilities\": [\"launch.mutate\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nInspect configured plugins:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show vault\n```\n\nUse the plugin for login:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\n```\n\nUse a plugin as a browser provider:\n\n```bash\nagent-browser --provider cloud-browser open https://example.com\n```\n\nUse a generic plugin command:\n\n```bash\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\n```\n\nCredential plugins receive `credential.resolve` and return username, password, and optionally URL or selector metadata. Browser provider plugins receive `browser.launch` and return a CDP WebSocket URL. Launch mutator plugins receive `launch.mutate` and can append local launch args, extensions, or init script source before Chrome starts. Generic command plugins receive the request type passed to `plugin run`.\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths so credential, browser-provider, and launch-mutator access stays inside the normal policy gates.\n\nagent-browser keeps browser automation, redaction-sensitive output, and policy enforcement in core. Credential plugin secrets do not appear in command arguments, dashboard events, or normal command output.\n\nGate plugin access with capability actions:\n\n```bash\nagent-browser --confirm-actions plugin:vault:credential.read auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --confirm-actions plugin:cloud-browser:browser.provider --provider cloud-browser open https://example.com\nagent-browser --confirm-actions plugin:stealth:launch.mutate open https://example.com\n```\n\n## Content Boundary Markers\n\nWhen `--content-boundaries` is enabled, all page-sourced output is wrapped in structural markers so LLMs can distinguish tool output from untrusted page content:\n\n```\n--- AGENT_BROWSER_PAGE_CONTENT nonce=a1b2c3d4 origin=https://example.com ---\n[snapshot / text / html / eval output here]\n--- END_AGENT_BROWSER_PAGE_CONTENT nonce=a1b2c3d4 ---\n```\n\nThe nonce is a random value generated per CLI process invocation, making it unpredictable to page content that might attempt to spoof the boundary.\n\nEnable via flag or environment variable:\n\n```bash\nagent-browser --content-boundaries snapshot\n# or\n```\n\nAffected output types: `snapshot`, `get text`, `get html`, `eval`, `console`.\n\nIn `--json` mode, boundary metadata is injected into the JSON response as a `_boundary` object containing `nonce` and `origin` fields, allowing orchestrators to verify provenance programmatically:\n\n```json\n{\n \"success\": true,\n \"data\": { \"snapshot\": \"...\", \"origin\": \"https://example.com\" },\n \"_boundary\": { \"nonce\": \"a1b2c3d4e5f6...\", \"origin\": \"https://example.com\" }\n}\n```\n\n## Domain Allowlist\n\nRestrict which domains the browser can interact with, preventing redirect-based attacks and data exfiltration:\n\n```bash\nagent-browser --allowed-domains \"example.com,*.example.com,github.com\" open https://example.com\n# or\n```\n\nSupports exact match (`github.com`) and wildcard prefix (`*.example.com`, which also matches the bare domain `example.com`). Both page navigations and sub-resource requests (scripts, images, fetch, XHR, etc.) to non-allowed domains are blocked. WebSocket and EventSource connections are blocked via constructor-level patching, and `sendBeacon` returns `false` for blocked destinations. Dedicated and shared workers are guarded with a bootstrap wrapper; if a page CSP forbids that wrapper, the worker fails closed rather than running without the allowlist guard. WebRTC peer connections are disabled entirely in supported Chromium sessions while the allowlist is active because STUN, TURN, and DNS traffic do not pass through CDP Fetch interception. Locally launched Chrome also uses `disable_non_proxied_udp` as a second layer. Pre-existing CDP sessions, auto-connect, Chrome profiles, direct-page provider plugins, agent-browser restore or state-file replay, raw Chrome args that select profiles, restore sessions, or open startup pages, iOS, and Safari reject this option because agent-browser cannot install equivalent containment before page scripts run. Non-http(s) sub-resources such as data URIs and blobs remain allowed. When a request is blocked, the command returns an error.\n\n> **Note:** WebSocket and EventSource blocking is best-effort because it overrides browser constructors via an init script. If the `eval` action category is allowed, page scripts could theoretically restore those original constructors. The WebRTC replacement is installed as a non-configurable constructor, with the Chrome UDP policy providing defense in depth for local launches. For maximum protection, deny the `eval` category via `--action-policy` and enforce operating-system egress policy when using `--allowed-domains`.\n\nConfig file:\n\n```json\n{\n \"allowedDomains\": [\"example.com\", \"*.example.com\", \"github.com\"]\n}\n```\n\n> **CDN and third-party resources:** The domain filter blocks all sub-resource requests (scripts, stylesheets, images, fonts, fetch/XHR) to non-allowed domains. Most websites load assets from CDN domains. Include these in your allowlist or pages will break. For example:\n>\n> ```bash\n> --allowed-domains \"myapp.com,*.myapp.com,cdn.jsdelivr.net,fonts.googleapis.com,fonts.gstatic.com\"\n> ```\n\n## Action Policy\n\nGate actions using a static policy file. The policy is enforced by the daemon -- denied actions fail immediately.\n\n```bash\nagent-browser --action-policy ./policy.json open https://example.com\n# or\n```\n\nExample policy (permissive with specific denials):\n\n```json\n{\n \"default\": \"allow\",\n \"deny\": [\"eval\", \"download\", \"upload\"]\n}\n```\n\nExample policy (restrictive):\n\n```json\n{\n \"default\": \"deny\",\n \"allow\": [\"navigate\", \"snapshot\", \"click\", \"scroll\", \"wait\", \"get\"]\n}\n```\n\n<table>\n <thead>\n <tr><th>Category</th><th>Actions</th></tr>\n </thead>\n <tbody>\n <tr><td><code>navigate</code></td><td>open, back, forward, reload, tab new</td></tr>\n <tr><td><code>click</code></td><td>click, dblclick, tap</td></tr>\n <tr><td><code>fill</code></td><td>fill, type, keyboard type/inserttext, select, check, uncheck</td></tr>\n <tr><td><code>eval</code></td><td>eval, evalhandle, addscript, addinitscript, addstyle, expose, setcontent</td></tr>\n <tr><td><code>download</code></td><td>download, waitfordownload</td></tr>\n <tr><td><code>upload</code></td><td>upload</td></tr>\n <tr><td><code>snapshot</code></td><td>snapshot, screenshot, pdf, diff</td></tr>\n <tr><td><code>scroll</code></td><td>scroll, scrollintoview</td></tr>\n <tr><td><code>wait</code></td><td>wait, waitforurl, waitforloadstate, waitforfunction</td></tr>\n <tr><td><code>read</code></td><td>read</td></tr>\n <tr><td><code>get</code></td><td>get text/html/url/title, count, isvisible, getbyrole, getbytext, getbylabel, etc.</td></tr>\n <tr><td><code>interact</code></td><td>hover, focus, drag, press, keydown, keyup, mousemove, dispatch</td></tr>\n <tr><td><code>network</code></td><td>network route/unroute, requests, har start/stop</td></tr>\n <tr><td><code>state</code></td><td>state save/load, cookies set, storage set</td></tr>\n </tbody>\n</table>\n\nAuth vault operations keep secrets out of normal command output and LLM context. Domain allowlist restrictions still apply to `auth login` navigations. Plugin-backed logins also expose the capability action `plugin:<name>:credential.read` for policy and confirmation gates.\n\n## Action Confirmation\n\nFor actions that require explicit approval, use `--confirm-actions` to specify categories that require confirmation:\n\n```bash\n# Orchestrator mode: returns confirmation_required response\nagent-browser --confirm-actions eval,download eval \"document.title\"\n\n# Then approve or deny:\nagent-browser confirm c_8f3a1234\nagent-browser deny c_8f3a1234\n```\n\nFor interactive (human-in-the-loop) confirmation:\n\n```bash\nagent-browser --confirm-actions eval,download --confirm-interactive eval \"document.title\"\n# Prompts: Allow? [y/N]\n```\n\nPending confirmations auto-deny after 60 seconds.\n\n> **Non-TTY behavior:** When `--confirm-interactive` is set but stdin is not a TTY (e.g., piped input or running inside an automated pipeline), actions are automatically denied. This prevents accidental approval in non-interactive contexts.\n\n## Output Length Limits\n\nPrevent context flooding by truncating large page outputs:\n\n```bash\nagent-browser --max-output 50000 get text body\n# or\n```\n\nAffected output types: `snapshot`, `get text`, `get html`, `eval`, `console`.\n\n## Environment Variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_CONTENT_BOUNDARIES</code></td><td>Wrap page output in boundary markers</td></tr>\n <tr><td><code>AGENT_BROWSER_MAX_OUTPUT</code></td><td>Max characters for page output</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOWED_DOMAINS</code></td><td>Comma-separated allowed domain patterns; requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins</td></tr>\n <tr><td><code>AGENT_BROWSER_ACTION_POLICY</code></td><td>Path to action policy JSON file</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_ACTIONS</code></td><td>Comma-separated action categories requiring confirmation</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_INTERACTIVE</code></td><td>Enable interactive confirmation prompts</td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM encryption (auth vault + sessions)</td></tr>\n <tr><td><code>AGENT_BROWSER_PLUGINS</code></td><td>JSON plugin registry override</td></tr>\n </tbody>\n</table>\n\n## Recommended Configuration\n\nFor production AI agent deployments:\n\n```json\n{\n \"contentBoundaries\": true,\n \"maxOutput\": 50000,\n \"allowedDomains\": [\"your-app.com\", \"*.your-app.com\"],\n \"actionPolicy\": \"./policy.json\"\n}\n```",
|
||
"legacyMarkdownSha256": "13eb736ab74043f719014bf50168626fa4c0edc39419c8187aa9193eac7853f9",
|
||
"modernMarkdown": "# Security\n\nagent-browser includes security features to protect against credential exposure, prompt injection via untrusted page content, and unauthorized browser actions.\n\nAll security features are opt-in. By default, agent-browser imposes no restrictions on navigation, actions, or output. Enable these features as needed for your deployment -- existing workflows are unaffected until you explicitly activate a feature.\n\n## Threat Model\n\nThese features are designed to mitigate the following threats when an LLM-based agent drives a browser:\n\n- **Credential exposure** -- Passwords stored in the auth vault are never included in LLM context. The CLI handles vault operations locally; credentials do not pass through the daemon's IPC channel.\n- **Plugin secret access**: Credential provider plugins run out-of-process and only receive a structured credential resolution request. Core agent-browser keeps browser automation, policy checks, and redaction-sensitive output handling.\n- **Prompt injection via page content** -- Malicious pages can embed text that looks like tool output or system instructions. Content boundary markers (`--content-boundaries`) let the orchestrator distinguish trusted tool output from untrusted page content.\n- **Unauthorized navigation / data exfiltration** — A compromised or manipulated agent could navigate to attacker-controlled domains to exfiltrate data. The domain allowlist (`--allowed-domains`) blocks navigations, sub-resource requests, WebSocket connections, EventSource streams, and `sendBeacon` calls to non-allowed domains. In supported Chromium sessions, it disables WebRTC peer connections so STUN, TURN, and related DNS traffic cannot bypass HTTP interception.\n- **Unauthorized destructive actions** -- Action policy (`--action-policy`) and confirmation gating (`--confirm-actions`) prevent the agent from performing dangerous operations (eval, downloads, uploads) without explicit approval.\n- **Context flooding** -- Large page outputs can overwhelm an LLM's context window. Output truncation (`--max-output`) caps the size of page-sourced content.\n\n### Known limitations\n\n- **WebSocket/EventSource blocking is best-effort.** It works by overriding browser constructors via an init script. If the `eval` action category is allowed, page scripts could theoretically restore the original constructors. Deny `eval` via `--action-policy` for maximum protection.\n- **Domain filter timing on cloud providers.** Cloud providers run outside the local Chrome process, so resources loaded by provider-side startup behavior before agent-browser connects are not retroactively blocked. agent-browser rejects pre-existing browser attach modes, Chrome profiles, direct-page provider plugins, restore/state replay, and raw startup Chrome args when the allowlist is active.\n- **The domain allowlist is not an operating-system firewall.** Locally launched Chrome disables non-proxied WebRTC UDP in addition to blocking `RTCPeerConnection` in page JavaScript. Combine the allowlist with host, container, or network egress controls when you require a boundary below the browser process.\n- **Pre-existing attach modes, profiles, saved state, and startup args do not support the domain allowlist.** agent-browser rejects `--allowed-domains` with `--cdp`, `--auto-connect`, `--profile`, `--restore`, `--state`, `state load`, and raw Chrome args that select profiles, restore sessions, or open startup pages because pages or saved origins may run before agent-browser can verify containment.\n- **iOS, Safari, and direct-page provider plugins do not support the domain allowlist.** agent-browser rejects `--allowed-domains` with these providers because their automation backends cannot install the Chromium network controls or enforce equivalent WebRTC containment.\n- **Content boundaries are defense-in-depth.** They rely on the LLM and orchestrator respecting the structural markers. A sufficiently capable adversarial page could attempt to mimic the boundary format, though the per-process CSPRNG nonce makes this impractical to predict.\n- **Plugins are local executables.** Install credential plugins only from maintainers you trust. agent-browser limits the data it sends to plugins and supports policy gates, but it does not sandbox arbitrary local executables.\n- **Plugin config is not secret storage.** Do not put vault tokens or passwords in plugin command args. Use the vendor's own login/session mechanism or environment outside agent-browser config.\n- **Confirmation timeout.** Pending confirmations auto-deny after 60 seconds. Orchestrators must respond within that window.\n- **Non-TTY auto-deny.** When `--confirm-interactive` is set but stdin is not a terminal (e.g., piped input), actions are automatically denied to prevent accidental approval in non-interactive contexts.\n\n## Authentication Vault\n\nStore credentials locally and reference them by name. The LLM never sees passwords.\n\n```bash\n# Save credentials (encrypted if AGENT_BROWSER_ENCRYPTION_KEY is set)\n# Recommended: pipe password via stdin to avoid shell history / process listing exposure\necho \"pass\" | agent-browser auth save github --url https://github.com/login --username user --password-stdin\n\n# Or pass directly (a warning will be shown)\nagent-browser auth save github --url https://github.com/login --username user --password pass\n\n# Login using saved credentials\nagent-browser auth login github\n\n# List saved profiles (names and URLs only, no secrets)\nagent-browser auth list\n\n# Show profile metadata\nagent-browser auth show github\n\n# Delete a profile\nagent-browser auth delete github\n```\n\n`auth login` filters matching controls by their layout size, computed visibility and opacity, and disabled/readonly state, including custom CSS selectors. If a selected credential field is replaced or redirects focus before entry, the command fails without submitting.\n\n`auth login` navigates with the `load` lifecycle event and then waits for form selectors to appear before filling/clicking. This makes delayed SPA login pages more reliable while avoiding `networkidle` hangs on pages with long-lived background requests.\n\nIf a login form depends on state established by an in-page click, challenge clearance, consent dismissal, or another setup step, use `--no-navigate` to retain the active document:\n\n```bash\nagent-browser open https://example.com/\nagent-browser click \"a[href='/login']\"\nagent-browser auth login work --no-navigate\n```\n\nNo-navigation mode requires an existing active top-level HTTP(S) page. It compares the page origin with the effective credential URL by scheme, host, and effective port before either credential is filled, and rechecks before each credential-bearing fill. Paths, queries, and fragments may differ. The flag suppresses only the initial navigation; selector waits, fills, the submit click, and submit-triggered navigation remain enabled. A command-level `--url` takes precedence over profile or provider URL metadata and becomes the origin constraint.\n\nCustom selectors can be specified if auto-detection fails:\n\n```bash\nagent-browser auth save myapp \\\n --url https://app.example.com/login \\\n --username user --password pass \\\n --username-selector \"#email\" \\\n --password-selector \"#password\" \\\n --submit-selector \"button.login\"\n```\n\nProfiles are stored in `~/.agent-browser/auth/` and always encrypted with AES-256-GCM. If `AGENT_BROWSER_ENCRYPTION_KEY` is not set, a key is auto-generated at `~/.agent-browser/.encryption-key` on first use. Back up this file or set the environment variable explicitly for portability.\n\nFile permissions are enforced on both Unix (`chmod 600`/`700`) and Windows (`icacls` restricted to the current user) to prevent other users from reading encryption keys or auth profiles.\n\n### Plugins\n\nPlugins run out-of-process over the `agent-browser.plugin.v1` stdio JSON protocol. Configure them in `agent-browser.json`:\n\nSee [Plugins](/plugins) for the plugin author protocol and implementation examples. Use `agent-browser plugin add <ref>` to create plugin config automatically.\n\n```json\n{\n \"plugins\": [\n {\n \"name\": \"vault\",\n \"command\": \"agent-browser-plugin-vault\",\n \"capabilities\": [\"credential.read\"]\n },\n {\n \"name\": \"cloud-browser\",\n \"command\": \"agent-browser-plugin-cloud-browser\",\n \"capabilities\": [\"browser.provider\"]\n },\n {\n \"name\": \"stealth\",\n \"command\": \"agent-browser-plugin-stealth\",\n \"capabilities\": [\"launch.mutate\"]\n },\n {\n \"name\": \"captcha\",\n \"command\": \"agent-browser-plugin-captcha\",\n \"capabilities\": [\"command.run\", \"captcha.solve\"]\n }\n ]\n}\n```\n\nInspect configured plugins:\n\n```bash\nagent-browser plugin list\nagent-browser plugin show vault\n```\n\nUse the plugin for login:\n\n```bash\nagent-browser auth login my-app --credential-provider vault --item \"My App\"\nagent-browser auth login my-app --credential-provider vault --item \"My App\" --no-navigate --url https://identity.example.com/login\n```\n\nUse a plugin as a browser provider:\n\n```bash\nagent-browser --provider cloud-browser open https://example.com\n```\n\nUse a generic plugin command:\n\n```bash\nagent-browser plugin run captcha captcha.solve --payload '{\"siteKey\":\"...\",\"url\":\"https://example.com\"}'\n```\n\nCredential plugins receive `credential.resolve` and return username, password, and optionally URL or selector metadata. Browser provider plugins receive `browser.launch` and return a CDP WebSocket URL. Launch mutator plugins receive `launch.mutate` and can append local launch args, extensions, or init script source before Chrome starts. Generic command plugins receive the request type passed to `plugin run`.\n\n`plugin run` is for `command.run` and custom capabilities. Core capabilities and protocol request types use their dedicated command paths so credential, browser-provider, and launch-mutator access stays inside the normal policy gates.\n\nagent-browser keeps browser automation, redaction-sensitive output, and policy enforcement in core. Credential plugin secrets do not appear in command arguments, dashboard events, or normal command output.\n\nGate plugin access with capability actions:\n\n```bash\nagent-browser --confirm-actions plugin:vault:credential.read auth login my-app --credential-provider vault --item \"My App\"\nagent-browser --confirm-actions plugin:cloud-browser:browser.provider --provider cloud-browser open https://example.com\nagent-browser --confirm-actions plugin:stealth:launch.mutate open https://example.com\n```\n\n## Content Boundary Markers\n\nWhen `--content-boundaries` is enabled, all page-sourced output is wrapped in structural markers so LLMs can distinguish tool output from untrusted page content:\n\n```\n--- AGENT_BROWSER_PAGE_CONTENT nonce=a1b2c3d4 origin=https://example.com ---\n[snapshot / text / html / eval output here]\n--- END_AGENT_BROWSER_PAGE_CONTENT nonce=a1b2c3d4 ---\n```\n\nThe nonce is a random value generated per CLI process invocation, making it unpredictable to page content that might attempt to spoof the boundary.\n\nEnable via flag or environment variable:\n\n```bash\nagent-browser --content-boundaries snapshot\n# or\nexport AGENT_BROWSER_CONTENT_BOUNDARIES=1\n```\n\nAffected output types: `snapshot`, `get text`, `get html`, `eval`, `console`.\n\nIn `--json` mode, boundary metadata is injected into the JSON response as a `_boundary` object containing `nonce` and `origin` fields, allowing orchestrators to verify provenance programmatically:\n\n```json\n{\n \"success\": true,\n \"data\": { \"snapshot\": \"...\", \"origin\": \"https://example.com\" },\n \"_boundary\": { \"nonce\": \"a1b2c3d4e5f6...\", \"origin\": \"https://example.com\" }\n}\n```\n\n## Domain Allowlist\n\nRestrict which domains the browser can interact with, preventing redirect-based attacks and data exfiltration:\n\n```bash\nagent-browser --allowed-domains \"example.com,*.example.com,github.com\" open https://example.com\n# or\nexport AGENT_BROWSER_ALLOWED_DOMAINS=\"example.com,*.example.com\"\n```\n\nSupports exact match (`github.com`) and wildcard prefix (`*.example.com`, which also matches the bare domain `example.com`). Both page navigations and sub-resource requests (scripts, images, fetch, XHR, etc.) to non-allowed domains are blocked. WebSocket and EventSource connections are blocked via constructor-level patching, and `sendBeacon` returns `false` for blocked destinations. Dedicated and shared workers are guarded with a bootstrap wrapper; if a page CSP forbids that wrapper, the worker fails closed rather than running without the allowlist guard. WebRTC peer connections are disabled entirely in supported Chromium sessions while the allowlist is active because STUN, TURN, and DNS traffic do not pass through CDP Fetch interception. Locally launched Chrome also uses `disable_non_proxied_udp` as a second layer. Pre-existing CDP sessions, auto-connect, Chrome profiles, direct-page provider plugins, agent-browser restore or state-file replay, raw Chrome args that select profiles, restore sessions, or open startup pages, iOS, and Safari reject this option because agent-browser cannot install equivalent containment before page scripts run. Non-http(s) sub-resources such as data URIs and blobs remain allowed. When a request is blocked, the command returns an error.\n\n> **Note:** WebSocket and EventSource blocking is best-effort because it overrides browser constructors via an init script. If the `eval` action category is allowed, page scripts could theoretically restore those original constructors. The WebRTC replacement is installed as a non-configurable constructor, with the Chrome UDP policy providing defense in depth for local launches. For maximum protection, deny the `eval` category via `--action-policy` and enforce operating-system egress policy when using `--allowed-domains`.\n\nConfig file:\n\n```json\n{\n \"allowedDomains\": [\"example.com\", \"*.example.com\", \"github.com\"]\n}\n```\n\n> **CDN and third-party resources:** The domain filter blocks all sub-resource requests (scripts, stylesheets, images, fonts, fetch/XHR) to non-allowed domains. Most websites load assets from CDN domains. Include these in your allowlist or pages will break. For example:\n>\n> ```bash\n> --allowed-domains \"myapp.com,*.myapp.com,cdn.jsdelivr.net,fonts.googleapis.com,fonts.gstatic.com\"\n> ```\n\n## Action Policy\n\nGate actions using a static policy file. The policy is enforced by the daemon -- denied actions fail immediately.\n\n```bash\nagent-browser --action-policy ./policy.json open https://example.com\n# or\nexport AGENT_BROWSER_ACTION_POLICY=./policy.json\n```\n\nExample policy (permissive with specific denials):\n\n```json\n{\n \"default\": \"allow\",\n \"deny\": [\"eval\", \"download\", \"upload\"]\n}\n```\n\nExample policy (restrictive):\n\n```json\n{\n \"default\": \"deny\",\n \"allow\": [\"navigate\", \"snapshot\", \"click\", \"scroll\", \"wait\", \"get\"]\n}\n```\n\n<table>\n <thead>\n <tr><th>Category</th><th>Actions</th></tr>\n </thead>\n <tbody>\n <tr><td><code>navigate</code></td><td>open, back, forward, reload, tab new</td></tr>\n <tr><td><code>click</code></td><td>click, dblclick, tap</td></tr>\n <tr><td><code>fill</code></td><td>fill, type, keyboard type/inserttext, select, check, uncheck</td></tr>\n <tr><td><code>eval</code></td><td>eval, evalhandle, addscript, addinitscript, addstyle, expose, setcontent</td></tr>\n <tr><td><code>download</code></td><td>download, waitfordownload</td></tr>\n <tr><td><code>upload</code></td><td>upload</td></tr>\n <tr><td><code>snapshot</code></td><td>snapshot, screenshot, pdf, diff</td></tr>\n <tr><td><code>scroll</code></td><td>scroll, scrollintoview</td></tr>\n <tr><td><code>wait</code></td><td>wait, waitforurl, waitforloadstate, waitforfunction</td></tr>\n <tr><td><code>read</code></td><td>read</td></tr>\n <tr><td><code>get</code></td><td>get text/html/url/title, count, isvisible, getbyrole, getbytext, getbylabel, etc.</td></tr>\n <tr><td><code>interact</code></td><td>hover, focus, drag, press, keydown, keyup, mousemove, dispatch</td></tr>\n <tr><td><code>network</code></td><td>network route/unroute, requests, har start/stop</td></tr>\n <tr><td><code>state</code></td><td>state save/load, cookies set, storage set</td></tr>\n </tbody>\n</table>\n\nAuth vault operations keep secrets out of normal command output and LLM context. Domain allowlist restrictions still apply to `auth login` navigations. Plugin-backed logins also expose the capability action `plugin:<name>:credential.read` for policy and confirmation gates.\n\n## Action Confirmation\n\nFor actions that require explicit approval, use `--confirm-actions` to specify categories that require confirmation:\n\n```bash\n# Orchestrator mode: returns confirmation_required response\nagent-browser --confirm-actions eval,download eval \"document.title\"\n\n# Then approve or deny:\nagent-browser confirm c_8f3a1234\nagent-browser deny c_8f3a1234\n```\n\nFor interactive (human-in-the-loop) confirmation:\n\n```bash\nagent-browser --confirm-actions eval,download --confirm-interactive eval \"document.title\"\n# Prompts: Allow? [y/N]\n```\n\nPending confirmations auto-deny after 60 seconds.\n\n> **Non-TTY behavior:** When `--confirm-interactive` is set but stdin is not a TTY (e.g., piped input or running inside an automated pipeline), actions are automatically denied. This prevents accidental approval in non-interactive contexts.\n\n## Output Length Limits\n\nPrevent context flooding by truncating large page outputs:\n\n```bash\nagent-browser --max-output 50000 get text body\n# or\nexport AGENT_BROWSER_MAX_OUTPUT=50000\n```\n\nAffected output types: `snapshot`, `get text`, `get html`, `eval`, `console`.\n\n## Environment Variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_CONTENT_BOUNDARIES</code></td><td>Wrap page output in boundary markers</td></tr>\n <tr><td><code>AGENT_BROWSER_MAX_OUTPUT</code></td><td>Max characters for page output</td></tr>\n <tr><td><code>AGENT_BROWSER_ALLOWED_DOMAINS</code></td><td>Comma-separated allowed domain patterns; requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins</td></tr>\n <tr><td><code>AGENT_BROWSER_ACTION_POLICY</code></td><td>Path to action policy JSON file</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_ACTIONS</code></td><td>Comma-separated action categories requiring confirmation</td></tr>\n <tr><td><code>AGENT_BROWSER_CONFIRM_INTERACTIVE</code></td><td>Enable interactive confirmation prompts</td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM encryption (auth vault + sessions)</td></tr>\n <tr><td><code>AGENT_BROWSER_PLUGINS</code></td><td>JSON plugin registry override</td></tr>\n </tbody>\n</table>\n\n## Recommended Configuration\n\nFor production AI agent deployments:\n\n```json\n{\n \"contentBoundaries\": true,\n \"maxOutput\": 50000,\n \"allowedDomains\": [\"your-app.com\", \"*.your-app.com\"],\n \"actionPolicy\": \"./policy.json\"\n}\n```",
|
||
"modernMarkdownSha256": "ef251f5f9d35eb125f4d49ea993f900302597fd364163c59dec55e9aba736d87",
|
||
"navigation": {
|
||
"title": "Security",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/selectors",
|
||
"source": "docs/src/app/selectors/page.mdx",
|
||
"layout": "docs/src/app/selectors/layout.tsx",
|
||
"sourceSha256": "03753b9fd8bdf275ea60aac9980099bdea79ed9136e4c6fcff0c1a7ca700de67",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Selectors\n",
|
||
"markdownTitle": "Selectors",
|
||
"title": "Selectors | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Selectors | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Selectors - agent-browser",
|
||
"twitterTitle": "Selectors | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Selectors",
|
||
"id": "selectors"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Refs (recommended)",
|
||
"id": "refs-recommended"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Why refs?",
|
||
"id": "why-refs"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "CSS selectors",
|
||
"id": "css-selectors"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Text & XPath",
|
||
"id": "text-xpath"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Semantic locators",
|
||
"id": "semantic-locators"
|
||
}
|
||
],
|
||
"content": [
|
||
"Refs provide deterministic element selection from snapshots. Best for AI agents.",
|
||
"# 1. Get snapshot with refs agent-browser snapshot # Output: # - heading \"Example Domain\" [ref=e1] [level=1] # - button \"Submit\" [ref=e2] # - textbox \"Email\" [ref=e3] # - link \"Learn more\" [ref=e4] # 2. Use refs to interact agent-browser click @e2 # Click the button agent-browser fill @e3 \"test@example.com\" # Fill the textbox agent-browser get text @e1 # Get heading text agent-browser hover @e4 # Hover the link",
|
||
"Deterministic - Ref points to exact element from snapshot",
|
||
"Fast - No DOM re-query needed",
|
||
"AI-friendly - LLMs can reliably parse and use refs",
|
||
"agent-browser click \"#id\" agent-browser click \".class\" agent-browser click \"div > button\" agent-browser click \"[data-testid='submit']\"",
|
||
"agent-browser click \"text=Submit\" agent-browser click \"xpath=//button[@type='submit']\"",
|
||
"Find elements by role, label, or other semantic properties:",
|
||
"agent-browser find role button click --name \"Submit\" agent-browser find role heading text --name \"Skills\" # implicit roles work: <h2>=heading, <ul>=list, top-level <header>=banner agent-browser find label \"Email\" fill \"test@test.com\" agent-browser find placeholder \"Search...\" fill \"query\" agent-browser find testid \"submit-btn\" click"
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Selectors\n\n## Refs (recommended)\n\nRefs provide deterministic element selection from snapshots. Best for AI agents.\n\n```bash\n# 1. Get snapshot with refs\nagent-browser snapshot\n# Output:\n# - heading \"Example Domain\" [ref=e1] [level=1]\n# - button \"Submit\" [ref=e2]\n# - textbox \"Email\" [ref=e3]\n# - link \"Learn more\" [ref=e4]\n\n# 2. Use refs to interact\nagent-browser click @e2 # Click the button\nagent-browser fill @e3 \"test@example.com\" # Fill the textbox\nagent-browser get text @e1 # Get heading text\nagent-browser hover @e4 # Hover the link\n```\n\n### Why refs?\n\n- **Deterministic** - Ref points to exact element from snapshot\n- **Fast** - No DOM re-query needed\n- **AI-friendly** - LLMs can reliably parse and use refs\n\n## CSS selectors\n\n```bash\nagent-browser click \"#id\"\nagent-browser click \".class\"\nagent-browser click \"div > button\"\nagent-browser click \"[data-testid='submit']\"\n```\n\n## Text & XPath\n\n```bash\nagent-browser click \"text=Submit\"\nagent-browser click \"xpath=//button[@type='submit']\"\n```\n\n## Semantic locators\n\nFind elements by role, label, or other semantic properties:\n\n```bash\nagent-browser find role button click --name \"Submit\"\nagent-browser find role heading text --name \"Skills\" # implicit roles work: <h2>=heading, <ul>=list, top-level <header>=banner\nagent-browser find label \"Email\" fill \"test@test.com\"\nagent-browser find placeholder \"Search...\" fill \"query\"\nagent-browser find testid \"submit-btn\" click\n```",
|
||
"legacyMarkdownSha256": "9fa8fece11f16f1c1b0fde546bb14dfc33380b53f822001ed34513bf668e5a87",
|
||
"modernMarkdown": "# Selectors\n\n## Refs (recommended)\n\nRefs provide deterministic element selection from snapshots. Best for AI agents.\n\n```bash\n# 1. Get snapshot with refs\nagent-browser snapshot\n# Output:\n# - heading \"Example Domain\" [ref=e1] [level=1]\n# - button \"Submit\" [ref=e2]\n# - textbox \"Email\" [ref=e3]\n# - link \"Learn more\" [ref=e4]\n\n# 2. Use refs to interact\nagent-browser click @e2 # Click the button\nagent-browser fill @e3 \"test@example.com\" # Fill the textbox\nagent-browser get text @e1 # Get heading text\nagent-browser hover @e4 # Hover the link\n```\n\n### Why refs?\n\n- **Deterministic** - Ref points to exact element from snapshot\n- **Fast** - No DOM re-query needed\n- **AI-friendly** - LLMs can reliably parse and use refs\n\n## CSS selectors\n\n```bash\nagent-browser click \"#id\"\nagent-browser click \".class\"\nagent-browser click \"div > button\"\nagent-browser click \"[data-testid='submit']\"\n```\n\n## Text & XPath\n\n```bash\nagent-browser click \"text=Submit\"\nagent-browser click \"xpath=//button[@type='submit']\"\n```\n\n## Semantic locators\n\nFind elements by role, label, or other semantic properties:\n\n```bash\nagent-browser find role button click --name \"Submit\"\nagent-browser find role heading text --name \"Skills\" # implicit roles work: <h2>=heading, <ul>=list, top-level <header>=banner\nagent-browser find label \"Email\" fill \"test@test.com\"\nagent-browser find placeholder \"Search...\" fill \"query\"\nagent-browser find testid \"submit-btn\" click\n```",
|
||
"modernMarkdownSha256": "9fa8fece11f16f1c1b0fde546bb14dfc33380b53f822001ed34513bf668e5a87",
|
||
"navigation": {
|
||
"title": "Selectors",
|
||
"section": "Reference"
|
||
}
|
||
},
|
||
{
|
||
"path": "/sessions",
|
||
"source": "docs/src/app/sessions/page.mdx",
|
||
"layout": "docs/src/app/sessions/layout.tsx",
|
||
"sourceSha256": "7c8bc0d5ad8e8efd3cf6224b06e2f5cf18379aeef9692aa30826613fd90d0d4b",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Sessions\n",
|
||
"markdownTitle": "Sessions",
|
||
"title": "Sessions | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Sessions | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Sessions - agent-browser",
|
||
"twitterTitle": "Sessions | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Sessions",
|
||
"id": "sessions"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Session isolation",
|
||
"id": "session-isolation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Tab pinning in a shared browser",
|
||
"id": "tab-pinning-in-a-shared-browser"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Chrome profile reuse",
|
||
"id": "chrome-profile-reuse"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Persistent profiles",
|
||
"id": "persistent-profiles"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Import auth from your browser",
|
||
"id": "import-auth-from-your-browser"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Session persistence",
|
||
"id": "session-persistence"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Restore key rules",
|
||
"id": "restore-key-rules"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "State encryption",
|
||
"id": "state-encryption"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "State auto-expiration",
|
||
"id": "state-auto-expiration"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "State management commands",
|
||
"id": "state-management-commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Authenticated sessions",
|
||
"id": "authenticated-sessions"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Multiple origins",
|
||
"id": "multiple-origins"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Global headers",
|
||
"id": "global-headers"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Environment variables",
|
||
"id": "environment-variables"
|
||
}
|
||
],
|
||
"content": [
|
||
"Run multiple isolated browser instances:",
|
||
"# Different sessions agent-browser --session agent1 open site-a.com agent-browser --session agent2 open site-b.com # Or via environment variable AGENT_BROWSER_SESSION=agent1 agent-browser click \"#btn\" # List active sessions agent-browser session list # Output: # Active sessions: # -> default # agent1 # Show current session agent-browser session # Generate a stable worktree-scoped session id agent-browser session id --scope worktree --prefix next-dev-loop # Inspect daemon, launch, and restore status agent-browser session info --json",
|
||
"Each session has its own:",
|
||
"Browser instance",
|
||
"Cookies and storage",
|
||
"Navigation history",
|
||
"Authentication state",
|
||
"Full isolation applies when each session launches its own browser. When sessions instead share one Chrome over --cdp, only the tab selection separates them. Each session remembers which tab it is bound to (by CDP target id, persisted across daemon restarts), so a restarted daemon reattaches to the session's own tab instead of adopting the most recently active one.",
|
||
"Add --pin-tab (or set AGENT_BROWSER_PIN_TAB=1) to make the binding strict:",
|
||
"agent-browser --session agent1 --cdp 9222 --pin-tab open https://site-a.com agent-browser --session agent2 --cdp 9222 --pin-tab open https://site-b.com",
|
||
"With --pin-tab, a session whose bound tab was closed gets a tab_gone error instead of silently acting on another session's tab; run tab new <url> or pick a tab from tab list to recover. JSON output includes \"code\": \"tab_gone\", data.targetId, and optional sanitized data.lastUrl. Batch output uses result for the same recovery object. The flag is sticky per session; pass --no-pin-tab to turn it off again. See CDP Mode for details.",
|
||
"The simplest way to reuse your existing login state: pass a Chrome profile name to --profile. agent-browser copies the profile to a temp directory (read-only snapshot) and launches Chrome with your existing cookies and sessions.",
|
||
"# List available Chrome profiles agent-browser profiles # Reuse your default Chrome profile's login state agent-browser --profile Default open https://gmail.com # Use a named profile (by display name or directory name) agent-browser --profile \"Work\" open https://app.example.com # Or via environment variable AGENT_BROWSER_PROFILE=Default agent-browser open https://gmail.com",
|
||
"Detail",
|
||
"Description",
|
||
"Supported browsers",
|
||
"Chrome, Chrome Canary, Chromium, Brave",
|
||
"What's copied",
|
||
"Cookies, local storage, extensions state (cache dirs excluded for speed)",
|
||
"Original profile",
|
||
"Never modified (read-only snapshot)",
|
||
"Cleanup",
|
||
"Temp copy deleted when browser closes",
|
||
"Windows note",
|
||
"Close Chrome before using --profile <name> if Chrome is running",
|
||
"For a custom profile directory that persists state across browser restarts, pass a path to --profile:",
|
||
"# Use a persistent profile directory agent-browser --profile ~/.myapp-profile open myapp.com # Login once, then reuse the authenticated session agent-browser --profile ~/.myapp-profile open myapp.com/dashboard # Or via environment variable AGENT_BROWSER_PROFILE=~/.myapp-profile agent-browser open myapp.com",
|
||
"The profile directory stores:",
|
||
"Cookies and localStorage",
|
||
"IndexedDB data",
|
||
"Service workers",
|
||
"Browser cache",
|
||
"Login sessions",
|
||
"If you are already logged in to a site in Chrome, you can grab that auth state and reuse it in agent-browser. This is the fastest way to bypass login flows, OAuth, SSO, or 2FA.",
|
||
"Step 1: Start Chrome with remote debugging:",
|
||
"# macOS \"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\" --remote-debugging-port=9222 # Linux google-chrome --remote-debugging-port=9222",
|
||
"Log in to your target site(s) in this Chrome window.",
|
||
"--remote-debugging-port exposes full browser control on localhost. Any local process can connect. Only use on trusted machines and close Chrome when done.",
|
||
"Step 2: Connect and save the authenticated state:",
|
||
"agent-browser --auto-connect state save ./my-auth.json",
|
||
"Step 3: Use the saved auth in future sessions:",
|
||
"# Load auth at launch agent-browser --state ./my-auth.json open https://app.example.com/dashboard # Or load into an already-launched session agent-browser open about:blank agent-browser state load ./my-auth.json agent-browser open https://app.example.com/dashboard",
|
||
"Combine with --session <id> --restore so the imported auth auto-persists across restarts:",
|
||
"SESSION=\"$(agent-browser session id --scope worktree --prefix myapp)\" agent-browser --session \"$SESSION\" --restore --state ./my-auth.json open https://app.example.com/dashboard # From now on, state auto-saves/restores for this session",
|
||
"State files contain session tokens in plaintext. Add them to .gitignore and delete when no longer needed. For encryption at rest, see State encryption below.",
|
||
"Use --restore with a stable --session to automatically save and restore cookies and localStorage across browser restarts:",
|
||
"# Auto-save/load state for this worktree SESSION=\"$(agent-browser session id --scope worktree --prefix twitter)\" agent-browser --session \"$SESSION\" --restore open twitter.com # Login once, then state persists automatically agent-browser --session \"$SESSION\" --restore click \"#login\" # Optional validation prevents a bad restore from overwriting the previous good state agent-browser --session \"$SESSION\" --restore --restore-check-text Dashboard open twitter.com",
|
||
"State files are stored in ~/.agent-browser/sessions/ and automatically loaded before navigation. With the default --restore-save auto policy, failed restore or failed validation skips auto-save.",
|
||
"When --restore or another restore key is configured, state is saved when the browser closes (explicit close, idle timeout, or daemon shutdown) and also periodically while the browser is open, so a browser window you close by hand still leaves a recent save behind. A session ID by itself only isolates the daemon and does not enable persistence; without a restore key, shutdown discards transient browser state and open tabs. Periodic autosave waits for commands to settle, then saves at most once per AGENT_BROWSER_AUTOSAVE_INTERVAL_MS (default 30000; set to 0 to save only on close). Idle sessions with configured persistence keep saving on the same interval, so changes the page makes on its own (token refreshes, background requests) are captured too. The daemon exits after one hour without commands or dashboard input by default; --idle-timeout <time> or AGENT_BROWSER_IDLE_TIMEOUT_MS tunes this, and 0 disables it. Headed, Safari/iOS WebDriver, and user-attached browsers are exempt from the default timeout; provider-owned cloud browsers are not. State saving respects the --restore-save policy.",
|
||
"Session and restore names must contain only alphanumeric characters, hyphens, and underscores. Use agent-browser session id to generate a valid key:",
|
||
"# Valid generated key agent-browser session id --scope worktree --prefix my-project # Invalid (will be rejected) agent-browser --session \"../bad\" --restore open example.com # path traversal agent-browser --session \"my session\" --restore open example.com # spaces agent-browser --session \"foo/bar\" --restore open example.com # slashes",
|
||
"Encrypt saved state files (cookies, localStorage) using AES-256-GCM:",
|
||
"# Generate a 256-bit key (64 hex characters) openssl rand -hex 32 # Set the encryption key export AGENT_BROWSER_ENCRYPTION_KEY=<your-64-char-hex-key> # State files are now encrypted automatically agent-browser --session secure-session --restore open example.com # List states shows encryption status agent-browser state list",
|
||
"Automatically delete old state files to prevent accumulation:",
|
||
"# Set expiration (default: 30 days) export AGENT_BROWSER_STATE_EXPIRE_DAYS=7 # Manually clean old states agent-browser state clean --older-than 7",
|
||
"# List all saved states agent-browser state list # Show state summary (cookies, origins, domains) agent-browser state show my-session-default.json # Rename a state file agent-browser state rename old-name new-name # Clear states for a specific session name agent-browser state clear my-session # Clear all saved states agent-browser state clear --all # Manual save/load (for custom paths) agent-browser state save ./backup.json agent-browser state load ./backup.json",
|
||
"Use --headers to set HTTP headers for a specific origin:",
|
||
"# Headers scoped to api.example.com only agent-browser open api.example.com --headers '{\"Authorization\": \"Bearer <token>\"}' # Requests to api.example.com include the auth header agent-browser snapshot -i --json agent-browser click @e2 # Navigate to another domain - headers NOT sent agent-browser open other-site.com",
|
||
"Useful for:",
|
||
"Skipping login flows - Authenticate via headers",
|
||
"Switching users - Different auth tokens per session",
|
||
"API testing - Access protected endpoints",
|
||
"Security - Headers scoped to origin, not leaked",
|
||
"agent-browser open api.example.com --headers '{\"Authorization\": \"Bearer token1\"}' agent-browser open api.acme.com --headers '{\"Authorization\": \"Bearer token2\"}'",
|
||
"For headers on all domains:",
|
||
"agent-browser set headers '{\"X-Custom-Header\": \"value\"}'",
|
||
"Variable",
|
||
"AGENT_BROWSER_SESSION",
|
||
"Browser session ID (default: \"default\")",
|
||
"AGENT_BROWSER_NAMESPACE",
|
||
"Namespace for daemon sockets and restore-state directories",
|
||
"AGENT_BROWSER_PIN_TAB",
|
||
"Pin the session to its bound tab (strict tab binding)",
|
||
"AGENT_BROWSER_RESTORE",
|
||
"Auto-save/load state persistence key",
|
||
"AGENT_BROWSER_RESTORE_SAVE",
|
||
"Restore save policy: auto, always, or never",
|
||
"AGENT_BROWSER_AUTOSAVE_INTERVAL_MS",
|
||
"Minimum ms between periodic session autosaves (default: 30000, 0 disables)",
|
||
"AGENT_BROWSER_RESTORE_CHECK_URL",
|
||
"URL pattern restored state must match",
|
||
"AGENT_BROWSER_RESTORE_CHECK_TEXT",
|
||
"Page text restored state must contain",
|
||
"AGENT_BROWSER_RESTORE_CHECK_FN",
|
||
"JavaScript expression restored state must satisfy",
|
||
"AGENT_BROWSER_SESSION_NAME",
|
||
"Legacy auto-save/load state persistence name",
|
||
"AGENT_BROWSER_ENCRYPTION_KEY",
|
||
"64-char hex key for AES-256-GCM encryption",
|
||
"AGENT_BROWSER_STATE_EXPIRE_DAYS",
|
||
"Auto-delete states older than N days (default: 30)"
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/cdp-mode",
|
||
"text": "CDP Mode"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "#state-encryption",
|
||
"text": "State encryption"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Sessions\n\nRun multiple isolated browser instances:\n\n```bash\n# Different sessions\nagent-browser --session agent1 open site-a.com\nagent-browser --session agent2 open site-b.com\n\n# Or via environment variable\nAGENT_BROWSER_SESSION=agent1 agent-browser click \"#btn\"\n\n# List active sessions\nagent-browser session list\n# Output:\n# Active sessions:\n# -> default\n# agent1\n\n# Show current session\nagent-browser session\n\n# Generate a stable worktree-scoped session id\nagent-browser session id --scope worktree --prefix next-dev-loop\n\n# Inspect daemon, launch, and restore status\nagent-browser session info --json\n```\n\n## Session isolation\n\nEach session has its own:\n\n- Browser instance\n- Cookies and storage\n- Navigation history\n- Authentication state\n\n## Tab pinning in a shared browser\n\nFull isolation applies when each session launches its own browser. When sessions instead share one Chrome over `--cdp`, only the tab selection separates them. Each session remembers which tab it is bound to (by CDP target id, persisted across daemon restarts), so a restarted daemon reattaches to the session's own tab instead of adopting the most recently active one.\n\nAdd `--pin-tab` (or set `AGENT_BROWSER_PIN_TAB=1`) to make the binding strict:\n\n```bash\nagent-browser --session agent1 --cdp 9222 --pin-tab open https://site-a.com\nagent-browser --session agent2 --cdp 9222 --pin-tab open https://site-b.com\n```\n\nWith `--pin-tab`, a session whose bound tab was closed gets a `tab_gone` error instead of silently acting on another session's tab; run `tab new <url>` or pick a tab from `tab list` to recover. JSON output includes <code>\"code\": \"tab_gone\"</code>, <code>data.targetId</code>, and optional sanitized <code>data.lastUrl</code>. Batch output uses <code>result</code> for the same recovery object. The flag is sticky per session; pass `--no-pin-tab` to turn it off again. See [CDP Mode](/cdp-mode) for details.\n\n## Chrome profile reuse\n\nThe simplest way to reuse your existing login state: pass a Chrome profile name to `--profile`. agent-browser copies the profile to a temp directory (read-only snapshot) and launches Chrome with your existing cookies and sessions.\n\n```bash\n# List available Chrome profiles\nagent-browser profiles\n\n# Reuse your default Chrome profile's login state\nagent-browser --profile Default open https://gmail.com\n\n# Use a named profile (by display name or directory name)\nagent-browser --profile \"Work\" open https://app.example.com\n\n# Or via environment variable\nAGENT_BROWSER_PROFILE=Default agent-browser open https://gmail.com\n```\n\n<table>\n <thead>\n <tr><th>Detail</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td>Supported browsers</td><td>Chrome, Chrome Canary, Chromium, Brave</td></tr>\n <tr><td>What's copied</td><td>Cookies, local storage, extensions state (cache dirs excluded for speed)</td></tr>\n <tr><td>Original profile</td><td>Never modified (read-only snapshot)</td></tr>\n <tr><td>Cleanup</td><td>Temp copy deleted when browser closes</td></tr>\n <tr><td>Windows note</td><td>Close Chrome before using <code>--profile <name></code> if Chrome is running</td></tr>\n </tbody>\n</table>\n\n## Persistent profiles\n\nFor a custom profile directory that persists state across browser restarts, pass a path to `--profile`:\n\n```bash\n# Use a persistent profile directory\nagent-browser --profile ~/.myapp-profile open myapp.com\n\n# Login once, then reuse the authenticated session\nagent-browser --profile ~/.myapp-profile open myapp.com/dashboard\n\n# Or via environment variable\nAGENT_BROWSER_PROFILE=~/.myapp-profile agent-browser open myapp.com\n```\n\nThe profile directory stores:\n\n- Cookies and localStorage\n- IndexedDB data\n- Service workers\n- Browser cache\n- Login sessions\n\n## Import auth from your browser\n\nIf you are already logged in to a site in Chrome, you can grab that auth state and reuse it in agent-browser. This is the fastest way to bypass login flows, OAuth, SSO, or 2FA.\n\n**Step 1:** Start Chrome with remote debugging:\n\n```bash\n# macOS\n\"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\" --remote-debugging-port=9222\n\n# Linux\ngoogle-chrome --remote-debugging-port=9222\n```\n\nLog in to your target site(s) in this Chrome window.\n\n`--remote-debugging-port` exposes full browser control on localhost. Any local process can connect. Only use on trusted machines and close Chrome when done.\n\n**Step 2:** Connect and save the authenticated state:\n\n```bash\nagent-browser --auto-connect state save ./my-auth.json\n```\n\n**Step 3:** Use the saved auth in future sessions:\n\n```bash\n# Load auth at launch\nagent-browser --state ./my-auth.json open https://app.example.com/dashboard\n\n# Or load into an already-launched session\nagent-browser open about:blank\nagent-browser state load ./my-auth.json\nagent-browser open https://app.example.com/dashboard\n```\n\nCombine with `--session <id> --restore` so the imported auth auto-persists across restarts:\n\n```bash\nSESSION=\"$(agent-browser session id --scope worktree --prefix myapp)\"\nagent-browser --session \"$SESSION\" --restore --state ./my-auth.json open https://app.example.com/dashboard\n# From now on, state auto-saves/restores for this session\n```\n\nState files contain session tokens in plaintext. Add them to `.gitignore` and delete when no longer needed. For encryption at rest, see [State encryption](#state-encryption) below.\n\n## Session persistence\n\nUse `--restore` with a stable `--session` to automatically save and restore cookies and localStorage across browser restarts:\n\n```bash\n# Auto-save/load state for this worktree\nSESSION=\"$(agent-browser session id --scope worktree --prefix twitter)\"\nagent-browser --session \"$SESSION\" --restore open twitter.com\n\n# Login once, then state persists automatically\nagent-browser --session \"$SESSION\" --restore click \"#login\"\n\n# Optional validation prevents a bad restore from overwriting the previous good state\nagent-browser --session \"$SESSION\" --restore --restore-check-text Dashboard open twitter.com\n```\n\nState files are stored in `~/.agent-browser/sessions/` and automatically loaded before navigation. With the default `--restore-save auto` policy, failed restore or failed validation skips auto-save.\n\nWhen `--restore` or another restore key is configured, state is saved when the browser closes (explicit `close`, idle timeout, or daemon shutdown) and also periodically while the browser is open, so a browser window you close by hand still leaves a recent save behind. A session ID by itself only isolates the daemon and does not enable persistence; without a restore key, shutdown discards transient browser state and open tabs. Periodic autosave waits for commands to settle, then saves at most once per `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS` (default 30000; set to `0` to save only on close). Idle sessions with configured persistence keep saving on the same interval, so changes the page makes on its own (token refreshes, background requests) are captured too. The daemon exits after one hour without commands or dashboard input by default; `--idle-timeout <time>` or `AGENT_BROWSER_IDLE_TIMEOUT_MS` tunes this, and `0` disables it. Headed, Safari/iOS WebDriver, and user-attached browsers are exempt from the default timeout; provider-owned cloud browsers are not. State saving respects the `--restore-save` policy.\n\n### Restore key rules\n\nSession and restore names must contain only alphanumeric characters, hyphens, and underscores. Use `agent-browser session id` to generate a valid key:\n\n```bash\n# Valid generated key\nagent-browser session id --scope worktree --prefix my-project\n\n# Invalid (will be rejected)\nagent-browser --session \"../bad\" --restore open example.com # path traversal\nagent-browser --session \"my session\" --restore open example.com # spaces\nagent-browser --session \"foo/bar\" --restore open example.com # slashes\n```\n\n## State encryption\n\nEncrypt saved state files (cookies, localStorage) using AES-256-GCM:\n\n```bash\n# Generate a 256-bit key (64 hex characters)\nopenssl rand -hex 32\n\n# Set the encryption key\n\n# State files are now encrypted automatically\nagent-browser --session secure-session --restore open example.com\n\n# List states shows encryption status\nagent-browser state list\n```\n\n## State auto-expiration\n\nAutomatically delete old state files to prevent accumulation:\n\n```bash\n# Set expiration (default: 30 days)\n\n# Manually clean old states\nagent-browser state clean --older-than 7\n```\n\n## State management commands\n\n```bash\n# List all saved states\nagent-browser state list\n\n# Show state summary (cookies, origins, domains)\nagent-browser state show my-session-default.json\n\n# Rename a state file\nagent-browser state rename old-name new-name\n\n# Clear states for a specific session name\nagent-browser state clear my-session\n\n# Clear all saved states\nagent-browser state clear --all\n\n# Manual save/load (for custom paths)\nagent-browser state save ./backup.json\nagent-browser state load ./backup.json\n```\n\n## Authenticated sessions\n\nUse `--headers` to set HTTP headers for a specific origin:\n\n```bash\n# Headers scoped to api.example.com only\nagent-browser open api.example.com --headers '{\"Authorization\": \"Bearer <token>\"}'\n\n# Requests to api.example.com include the auth header\nagent-browser snapshot -i --json\nagent-browser click @e2\n\n# Navigate to another domain - headers NOT sent\nagent-browser open other-site.com\n```\n\nUseful for:\n\n- **Skipping login flows** - Authenticate via headers\n- **Switching users** - Different auth tokens per session\n- **API testing** - Access protected endpoints\n- **Security** - Headers scoped to origin, not leaked\n\n## Multiple origins\n\n```bash\nagent-browser open api.example.com --headers '{\"Authorization\": \"Bearer token1\"}'\nagent-browser open api.acme.com --headers '{\"Authorization\": \"Bearer token2\"}'\n```\n\n## Global headers\n\nFor headers on all domains:\n\n```bash\nagent-browser set headers '{\"X-Custom-Header\": \"value\"}'\n```\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_SESSION</code></td><td>Browser session ID (default: \"default\")</td></tr>\n <tr><td><code>AGENT_BROWSER_NAMESPACE</code></td><td>Namespace for daemon sockets and restore-state directories</td></tr>\n <tr><td><code>AGENT_BROWSER_PIN_TAB</code></td><td>Pin the session to its bound tab (strict tab binding)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE</code></td><td>Auto-save/load state persistence key</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_SAVE</code></td><td>Restore save policy: <code>auto</code>, <code>always</code>, or <code>never</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTOSAVE_INTERVAL_MS</code></td><td>Minimum ms between periodic session autosaves (default: 30000, <code>0</code> disables)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_URL</code></td><td>URL pattern restored state must match</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_TEXT</code></td><td>Page text restored state must contain</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_FN</code></td><td>JavaScript expression restored state must satisfy</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION_NAME</code></td><td>Legacy auto-save/load state persistence name</td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM encryption</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code></td><td>Auto-delete states older than N days (default: 30)</td></tr>\n </tbody>\n</table>",
|
||
"legacyMarkdownSha256": "caee06a1dd0d2a7b82cd18937ef5dc391c14f93991607a61545a5be714e297a2",
|
||
"modernMarkdown": "# Sessions\n\nRun multiple isolated browser instances:\n\n```bash\n# Different sessions\nagent-browser --session agent1 open site-a.com\nagent-browser --session agent2 open site-b.com\n\n# Or via environment variable\nAGENT_BROWSER_SESSION=agent1 agent-browser click \"#btn\"\n\n# List active sessions\nagent-browser session list\n# Output:\n# Active sessions:\n# -> default\n# agent1\n\n# Show current session\nagent-browser session\n\n# Generate a stable worktree-scoped session id\nagent-browser session id --scope worktree --prefix next-dev-loop\n\n# Inspect daemon, launch, and restore status\nagent-browser session info --json\n```\n\n## Session isolation\n\nEach session has its own:\n\n- Browser instance\n- Cookies and storage\n- Navigation history\n- Authentication state\n\n## Tab pinning in a shared browser\n\nFull isolation applies when each session launches its own browser. When sessions instead share one Chrome over `--cdp`, only the tab selection separates them. Each session remembers which tab it is bound to (by CDP target id, persisted across daemon restarts), so a restarted daemon reattaches to the session's own tab instead of adopting the most recently active one.\n\nAdd `--pin-tab` (or set `AGENT_BROWSER_PIN_TAB=1`) to make the binding strict:\n\n```bash\nagent-browser --session agent1 --cdp 9222 --pin-tab open https://site-a.com\nagent-browser --session agent2 --cdp 9222 --pin-tab open https://site-b.com\n```\n\nWith `--pin-tab`, a session whose bound tab was closed gets a `tab_gone` error instead of silently acting on another session's tab; run `tab new <url>` or pick a tab from `tab list` to recover. JSON output includes <code>\"code\": \"tab_gone\"</code>, <code>data.targetId</code>, and optional sanitized <code>data.lastUrl</code>. Batch output uses <code>result</code> for the same recovery object. The flag is sticky per session; pass `--no-pin-tab` to turn it off again. See [CDP Mode](/cdp-mode) for details.\n\n## Chrome profile reuse\n\nThe simplest way to reuse your existing login state: pass a Chrome profile name to `--profile`. agent-browser copies the profile to a temp directory (read-only snapshot) and launches Chrome with your existing cookies and sessions.\n\n```bash\n# List available Chrome profiles\nagent-browser profiles\n\n# Reuse your default Chrome profile's login state\nagent-browser --profile Default open https://gmail.com\n\n# Use a named profile (by display name or directory name)\nagent-browser --profile \"Work\" open https://app.example.com\n\n# Or via environment variable\nAGENT_BROWSER_PROFILE=Default agent-browser open https://gmail.com\n```\n\n<table>\n <thead>\n <tr><th>Detail</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td>Supported browsers</td><td>Chrome, Chrome Canary, Chromium, Brave</td></tr>\n <tr><td>What's copied</td><td>Cookies, local storage, extensions state (cache dirs excluded for speed)</td></tr>\n <tr><td>Original profile</td><td>Never modified (read-only snapshot)</td></tr>\n <tr><td>Cleanup</td><td>Temp copy deleted when browser closes</td></tr>\n <tr><td>Windows note</td><td>Close Chrome before using <code>--profile <name></code> if Chrome is running</td></tr>\n </tbody>\n</table>\n\n## Persistent profiles\n\nFor a custom profile directory that persists state across browser restarts, pass a path to `--profile`:\n\n```bash\n# Use a persistent profile directory\nagent-browser --profile ~/.myapp-profile open myapp.com\n\n# Login once, then reuse the authenticated session\nagent-browser --profile ~/.myapp-profile open myapp.com/dashboard\n\n# Or via environment variable\nAGENT_BROWSER_PROFILE=~/.myapp-profile agent-browser open myapp.com\n```\n\nThe profile directory stores:\n\n- Cookies and localStorage\n- IndexedDB data\n- Service workers\n- Browser cache\n- Login sessions\n\n## Import auth from your browser\n\nIf you are already logged in to a site in Chrome, you can grab that auth state and reuse it in agent-browser. This is the fastest way to bypass login flows, OAuth, SSO, or 2FA.\n\n**Step 1:** Start Chrome with remote debugging:\n\n```bash\n# macOS\n\"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\" --remote-debugging-port=9222\n\n# Linux\ngoogle-chrome --remote-debugging-port=9222\n```\n\nLog in to your target site(s) in this Chrome window.\n\n`--remote-debugging-port` exposes full browser control on localhost. Any local process can connect. Only use on trusted machines and close Chrome when done.\n\n**Step 2:** Connect and save the authenticated state:\n\n```bash\nagent-browser --auto-connect state save ./my-auth.json\n```\n\n**Step 3:** Use the saved auth in future sessions:\n\n```bash\n# Load auth at launch\nagent-browser --state ./my-auth.json open https://app.example.com/dashboard\n\n# Or load into an already-launched session\nagent-browser open about:blank\nagent-browser state load ./my-auth.json\nagent-browser open https://app.example.com/dashboard\n```\n\nCombine with `--session <id> --restore` so the imported auth auto-persists across restarts:\n\n```bash\nSESSION=\"$(agent-browser session id --scope worktree --prefix myapp)\"\nagent-browser --session \"$SESSION\" --restore --state ./my-auth.json open https://app.example.com/dashboard\n# From now on, state auto-saves/restores for this session\n```\n\nState files contain session tokens in plaintext. Add them to `.gitignore` and delete when no longer needed. For encryption at rest, see [State encryption](#state-encryption) below.\n\n## Session persistence\n\nUse `--restore` with a stable `--session` to automatically save and restore cookies and localStorage across browser restarts:\n\n```bash\n# Auto-save/load state for this worktree\nSESSION=\"$(agent-browser session id --scope worktree --prefix twitter)\"\nagent-browser --session \"$SESSION\" --restore open twitter.com\n\n# Login once, then state persists automatically\nagent-browser --session \"$SESSION\" --restore click \"#login\"\n\n# Optional validation prevents a bad restore from overwriting the previous good state\nagent-browser --session \"$SESSION\" --restore --restore-check-text Dashboard open twitter.com\n```\n\nState files are stored in `~/.agent-browser/sessions/` and automatically loaded before navigation. With the default `--restore-save auto` policy, failed restore or failed validation skips auto-save.\n\nWhen `--restore` or another restore key is configured, state is saved when the browser closes (explicit `close`, idle timeout, or daemon shutdown) and also periodically while the browser is open, so a browser window you close by hand still leaves a recent save behind. A session ID by itself only isolates the daemon and does not enable persistence; without a restore key, shutdown discards transient browser state and open tabs. Periodic autosave waits for commands to settle, then saves at most once per `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS` (default 30000; set to `0` to save only on close). Idle sessions with configured persistence keep saving on the same interval, so changes the page makes on its own (token refreshes, background requests) are captured too. The daemon exits after one hour without commands or dashboard input by default; `--idle-timeout <time>` or `AGENT_BROWSER_IDLE_TIMEOUT_MS` tunes this, and `0` disables it. Headed, Safari/iOS WebDriver, and user-attached browsers are exempt from the default timeout; provider-owned cloud browsers are not. State saving respects the `--restore-save` policy.\n\n### Restore key rules\n\nSession and restore names must contain only alphanumeric characters, hyphens, and underscores. Use `agent-browser session id` to generate a valid key:\n\n```bash\n# Valid generated key\nagent-browser session id --scope worktree --prefix my-project\n\n# Invalid (will be rejected)\nagent-browser --session \"../bad\" --restore open example.com # path traversal\nagent-browser --session \"my session\" --restore open example.com # spaces\nagent-browser --session \"foo/bar\" --restore open example.com # slashes\n```\n\n## State encryption\n\nEncrypt saved state files (cookies, localStorage) using AES-256-GCM:\n\n```bash\n# Generate a 256-bit key (64 hex characters)\nopenssl rand -hex 32\n\n# Set the encryption key\nexport AGENT_BROWSER_ENCRYPTION_KEY=<your-64-char-hex-key>\n\n# State files are now encrypted automatically\nagent-browser --session secure-session --restore open example.com\n\n# List states shows encryption status\nagent-browser state list\n```\n\n## State auto-expiration\n\nAutomatically delete old state files to prevent accumulation:\n\n```bash\n# Set expiration (default: 30 days)\nexport AGENT_BROWSER_STATE_EXPIRE_DAYS=7\n\n# Manually clean old states\nagent-browser state clean --older-than 7\n```\n\n## State management commands\n\n```bash\n# List all saved states\nagent-browser state list\n\n# Show state summary (cookies, origins, domains)\nagent-browser state show my-session-default.json\n\n# Rename a state file\nagent-browser state rename old-name new-name\n\n# Clear states for a specific session name\nagent-browser state clear my-session\n\n# Clear all saved states\nagent-browser state clear --all\n\n# Manual save/load (for custom paths)\nagent-browser state save ./backup.json\nagent-browser state load ./backup.json\n```\n\n## Authenticated sessions\n\nUse `--headers` to set HTTP headers for a specific origin:\n\n```bash\n# Headers scoped to api.example.com only\nagent-browser open api.example.com --headers '{\"Authorization\": \"Bearer <token>\"}'\n\n# Requests to api.example.com include the auth header\nagent-browser snapshot -i --json\nagent-browser click @e2\n\n# Navigate to another domain - headers NOT sent\nagent-browser open other-site.com\n```\n\nUseful for:\n\n- **Skipping login flows** - Authenticate via headers\n- **Switching users** - Different auth tokens per session\n- **API testing** - Access protected endpoints\n- **Security** - Headers scoped to origin, not leaked\n\n## Multiple origins\n\n```bash\nagent-browser open api.example.com --headers '{\"Authorization\": \"Bearer token1\"}'\nagent-browser open api.acme.com --headers '{\"Authorization\": \"Bearer token2\"}'\n```\n\n## Global headers\n\nFor headers on all domains:\n\n```bash\nagent-browser set headers '{\"X-Custom-Header\": \"value\"}'\n```\n\n## Environment variables\n\n<table>\n <thead>\n <tr><th>Variable</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>AGENT_BROWSER_SESSION</code></td><td>Browser session ID (default: \"default\")</td></tr>\n <tr><td><code>AGENT_BROWSER_NAMESPACE</code></td><td>Namespace for daemon sockets and restore-state directories</td></tr>\n <tr><td><code>AGENT_BROWSER_PIN_TAB</code></td><td>Pin the session to its bound tab (strict tab binding)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE</code></td><td>Auto-save/load state persistence key</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_SAVE</code></td><td>Restore save policy: <code>auto</code>, <code>always</code>, or <code>never</code></td></tr>\n <tr><td><code>AGENT_BROWSER_AUTOSAVE_INTERVAL_MS</code></td><td>Minimum ms between periodic session autosaves (default: 30000, <code>0</code> disables)</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_URL</code></td><td>URL pattern restored state must match</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_TEXT</code></td><td>Page text restored state must contain</td></tr>\n <tr><td><code>AGENT_BROWSER_RESTORE_CHECK_FN</code></td><td>JavaScript expression restored state must satisfy</td></tr>\n <tr><td><code>AGENT_BROWSER_SESSION_NAME</code></td><td>Legacy auto-save/load state persistence name</td></tr>\n <tr><td><code>AGENT_BROWSER_ENCRYPTION_KEY</code></td><td>64-char hex key for AES-256-GCM encryption</td></tr>\n <tr><td><code>AGENT_BROWSER_STATE_EXPIRE_DAYS</code></td><td>Auto-delete states older than N days (default: 30)</td></tr>\n </tbody>\n</table>",
|
||
"modernMarkdownSha256": "ab774a35c68e6314aba847d1fb8af98fdf47f2ca26ccf02133dd08cc2f43f029",
|
||
"navigation": {
|
||
"title": "Sessions",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/skills",
|
||
"source": "docs/src/app/skills/page.mdx",
|
||
"layout": "docs/src/app/skills/layout.tsx",
|
||
"sourceSha256": "8faf0c95a62d5690178b16fb18e93527215eb5444d3a58e9be1bd7325d370e7c",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Skills\n",
|
||
"markdownTitle": "Skills",
|
||
"title": "Skills | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Skills | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Skills - agent-browser",
|
||
"twitterTitle": "Skills | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Skills",
|
||
"id": "skills"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Installation",
|
||
"id": "installation"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "CLI Command",
|
||
"id": "cli-command"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "How It Works",
|
||
"id": "how-it-works"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Available Skills",
|
||
"id": "available-skills"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "eve agents",
|
||
"id": "eve-agents"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Source",
|
||
"id": "source"
|
||
}
|
||
],
|
||
"content": [
|
||
"agent-browser ships with skills that teach AI coding agents how to use it for specific workflows. Install a skill and your agent in Cursor, Claude Code, or Codex can automate browser tasks without manual guidance.",
|
||
"npx skills add vercel-labs/agent-browser",
|
||
"This installs a single discovery skill that teaches your agent about agent-browser and directs it to use the agent-browser skills CLI command for current instructions. The discovery skill contains trigger words so agents prefer agent-browser over built-in browser tools.",
|
||
"Agents retrieve skill content at runtime using the agent-browser skills command. This always serves content matching the installed CLI version, so instructions never go stale.",
|
||
"Command",
|
||
"Description",
|
||
"agent-browser skills",
|
||
"List all available skills (same as skills list)",
|
||
"agent-browser skills list",
|
||
"List all available skills with names and descriptions",
|
||
"agent-browser skills get <name>",
|
||
"Output a skill's full content",
|
||
"agent-browser skills get <name> --full",
|
||
"Include references and templates alongside the skill",
|
||
"agent-browser skills get --all",
|
||
"Output every skill",
|
||
"agent-browser skills path [name]",
|
||
"Print the filesystem path to a skill directory",
|
||
"All commands support --json for structured output.",
|
||
"Set the AGENT_BROWSER_SKILLS_DIR environment variable to override the skills directory path.",
|
||
"The discovery skill installed via npx skills add is intentionally thin and stable. It makes agents aware of agent-browser, provides trigger words for activation, and points to the agent-browser skills command. Actual usage instructions, command references, workflows, and specialized knowledge all live in the CLI-served skills.",
|
||
"This design solves the version drift problem: the installed SKILL.md rarely changes, while the CLI always serves content matching its own version.",
|
||
"core — Core browser automation: navigation, snapshots, forms, screenshots, data extraction, sessions, authentication, diffing, and the full command reference. Start here for most browser tasks.",
|
||
"dogfood — Systematic exploratory testing. Navigates an app like a real user, finds bugs and UX issues, and produces a structured report with screenshots and repro videos.",
|
||
"derive-client — Reverse-engineer a site's internal API. Records network traffic into a HAR (with response bodies embedded), identifies the real endpoints, and generates a standalone client or CLI that skips the browser entirely.",
|
||
"electron — Automate any Electron app (VS Code, Slack, Discord, Figma, etc.) by connecting to its built-in Chrome DevTools Protocol port.",
|
||
"slack — Browser-based Slack automation. Check unreads, navigate channels, search conversations, send messages, and extract data.",
|
||
"vercel-sandbox — Run agent-browser + headless Chrome inside ephemeral Vercel Sandbox microVMs.",
|
||
"protected-vercel-deployments — Access and test Vercel deployments behind Vercel Authentication, SSO, or Deployment Protection with short-lived Trusted Sources OIDC tokens.",
|
||
"agentcore — Run agent-browser on AWS Bedrock AgentCore cloud browsers.",
|
||
"Use agent-browser skills list to see all available skills, then agent-browser skills get <name> to load one. agent-browser skills get core --full is the recommended starting point for most browser tasks.",
|
||
"For eve agents, mount the @agent-browser/eve extension instead of writing browser tools by hand. It gives the agent namespaced browser tools backed by agent-browser inside the eve sandbox.",
|
||
"All skill files are in the skills/ and skill-data/ directories of the repository. The skills/ directory holds the discovery stub that npx skills add installs; the skill-data/ directory holds the runtime skill content served by the CLI."
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/eve",
|
||
"text": "@agent-browser/eve"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/vercel-labs/agent-browser/tree/main/skills",
|
||
"text": "skills/"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://github.com/vercel-labs/agent-browser/tree/main/skill-data",
|
||
"text": "skill-data/"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Skills\n\nagent-browser ships with skills that teach AI coding agents how to use it for specific workflows. Install a skill and your agent in Cursor, Claude Code, or Codex can automate browser tasks without manual guidance.\n\n## Installation\n\n```bash\nnpx skills add vercel-labs/agent-browser\n```\n\nThis installs a single discovery skill that teaches your agent about agent-browser and directs it to use the `agent-browser skills` CLI command for current instructions. The discovery skill contains trigger words so agents prefer agent-browser over built-in browser tools.\n\n## CLI Command\n\nAgents retrieve skill content at runtime using the `agent-browser skills` command. This always serves content matching the installed CLI version, so instructions never go stale.\n\n<table>\n <thead>\n <tr>\n <th>Command</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code>agent-browser skills</code></td>\n <td>List all available skills (same as <code>skills list</code>)</td>\n </tr>\n <tr>\n <td><code>agent-browser skills list</code></td>\n <td>List all available skills with names and descriptions</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get <name></code></td>\n <td>Output a skill's full content</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get <name> --full</code></td>\n <td>Include references and templates alongside the skill</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get --all</code></td>\n <td>Output every skill</td>\n </tr>\n <tr>\n <td><code>agent-browser skills path [name]</code></td>\n <td>Print the filesystem path to a skill directory</td>\n </tr>\n </tbody>\n</table>\n\nAll commands support `--json` for structured output.\n\nSet the `AGENT_BROWSER_SKILLS_DIR` environment variable to override the skills directory path.\n\n## How It Works\n\nThe discovery skill installed via `npx skills add` is intentionally thin and stable. It makes agents aware of agent-browser, provides trigger words for activation, and points to the `agent-browser skills` command. Actual usage instructions, command references, workflows, and specialized knowledge all live in the CLI-served skills.\n\nThis design solves the version drift problem: the installed SKILL.md rarely changes, while the CLI always serves content matching its own version.\n\n## Available Skills\n\n- **core** — Core browser automation: navigation, snapshots, forms, screenshots, data extraction, sessions, authentication, diffing, and the full command reference. Start here for most browser tasks.\n- **dogfood** — Systematic exploratory testing. Navigates an app like a real user, finds bugs and UX issues, and produces a structured report with screenshots and repro videos.\n- **derive-client** — Reverse-engineer a site's internal API. Records network traffic into a HAR (with response bodies embedded), identifies the real endpoints, and generates a standalone client or CLI that skips the browser entirely.\n- **electron** — Automate any Electron app (VS Code, Slack, Discord, Figma, etc.) by connecting to its built-in Chrome DevTools Protocol port.\n- **slack** — Browser-based Slack automation. Check unreads, navigate channels, search conversations, send messages, and extract data.\n- **vercel-sandbox** — Run agent-browser + headless Chrome inside ephemeral Vercel Sandbox microVMs.\n- **protected-vercel-deployments** — Access and test Vercel deployments behind Vercel Authentication, SSO, or Deployment Protection with short-lived Trusted Sources OIDC tokens.\n- **agentcore** — Run agent-browser on AWS Bedrock AgentCore cloud browsers.\n\nUse `agent-browser skills list` to see all available skills, then `agent-browser skills get <name>` to load one. `agent-browser skills get core --full` is the recommended starting point for most browser tasks.\n\n## eve agents\n\nFor eve agents, mount the [`@agent-browser/eve`](/eve) extension instead of writing browser tools by hand. It gives the agent namespaced browser tools backed by agent-browser inside the eve sandbox.\n\n## Source\n\nAll skill files are in the [`skills/`](https://github.com/vercel-labs/agent-browser/tree/main/skills) and [`skill-data/`](https://github.com/vercel-labs/agent-browser/tree/main/skill-data) directories of the repository. The `skills/` directory holds the discovery stub that `npx skills add` installs; the `skill-data/` directory holds the runtime skill content served by the CLI.",
|
||
"legacyMarkdownSha256": "3721bb0823c5eeb4a00c3570492ee21c2f4c5f66c2b7a552361ee2f9b3cb3366",
|
||
"modernMarkdown": "# Skills\n\nagent-browser ships with skills that teach AI coding agents how to use it for specific workflows. Install a skill and your agent in Cursor, Claude Code, or Codex can automate browser tasks without manual guidance.\n\n## Installation\n\n```bash\nnpx skills add vercel-labs/agent-browser\n```\n\nThis installs a single discovery skill that teaches your agent about agent-browser and directs it to use the `agent-browser skills` CLI command for current instructions. The discovery skill contains trigger words so agents prefer agent-browser over built-in browser tools.\n\n## CLI Command\n\nAgents retrieve skill content at runtime using the `agent-browser skills` command. This always serves content matching the installed CLI version, so instructions never go stale.\n\n<table>\n <thead>\n <tr>\n <th>Command</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code>agent-browser skills</code></td>\n <td>List all available skills (same as <code>skills list</code>)</td>\n </tr>\n <tr>\n <td><code>agent-browser skills list</code></td>\n <td>List all available skills with names and descriptions</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get <name></code></td>\n <td>Output a skill's full content</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get <name> --full</code></td>\n <td>Include references and templates alongside the skill</td>\n </tr>\n <tr>\n <td><code>agent-browser skills get --all</code></td>\n <td>Output every skill</td>\n </tr>\n <tr>\n <td><code>agent-browser skills path [name]</code></td>\n <td>Print the filesystem path to a skill directory</td>\n </tr>\n </tbody>\n</table>\n\nAll commands support `--json` for structured output.\n\nSet the `AGENT_BROWSER_SKILLS_DIR` environment variable to override the skills directory path.\n\n## How It Works\n\nThe discovery skill installed via `npx skills add` is intentionally thin and stable. It makes agents aware of agent-browser, provides trigger words for activation, and points to the `agent-browser skills` command. Actual usage instructions, command references, workflows, and specialized knowledge all live in the CLI-served skills.\n\nThis design solves the version drift problem: the installed SKILL.md rarely changes, while the CLI always serves content matching its own version.\n\n## Available Skills\n\n- **core** — Core browser automation: navigation, snapshots, forms, screenshots, data extraction, sessions, authentication, diffing, and the full command reference. Start here for most browser tasks.\n- **dogfood** — Systematic exploratory testing. Navigates an app like a real user, finds bugs and UX issues, and produces a structured report with screenshots and repro videos.\n- **derive-client** — Reverse-engineer a site's internal API. Records network traffic into a HAR (with response bodies embedded), identifies the real endpoints, and generates a standalone client or CLI that skips the browser entirely.\n- **electron** — Automate any Electron app (VS Code, Slack, Discord, Figma, etc.) by connecting to its built-in Chrome DevTools Protocol port.\n- **slack** — Browser-based Slack automation. Check unreads, navigate channels, search conversations, send messages, and extract data.\n- **vercel-sandbox** — Run agent-browser + headless Chrome inside ephemeral Vercel Sandbox microVMs.\n- **protected-vercel-deployments** — Access and test Vercel deployments behind Vercel Authentication, SSO, or Deployment Protection with short-lived Trusted Sources OIDC tokens.\n- **agentcore** — Run agent-browser on AWS Bedrock AgentCore cloud browsers.\n\nUse `agent-browser skills list` to see all available skills, then `agent-browser skills get <name>` to load one. `agent-browser skills get core --full` is the recommended starting point for most browser tasks.\n\n## eve agents\n\nFor eve agents, mount the [`@agent-browser/eve`](/eve) extension instead of writing browser tools by hand. It gives the agent namespaced browser tools backed by agent-browser inside the eve sandbox.\n\n## Source\n\nAll skill files are in the [`skills/`](https://github.com/vercel-labs/agent-browser/tree/main/skills) and [`skill-data/`](https://github.com/vercel-labs/agent-browser/tree/main/skill-data) directories of the repository. The `skills/` directory holds the discovery stub that `npx skills add` installs; the `skill-data/` directory holds the runtime skill content served by the CLI.",
|
||
"modernMarkdownSha256": "3721bb0823c5eeb4a00c3570492ee21c2f4c5f66c2b7a552361ee2f9b3cb3366",
|
||
"navigation": {
|
||
"title": "Skills",
|
||
"section": ""
|
||
}
|
||
},
|
||
{
|
||
"path": "/snapshots",
|
||
"source": "docs/src/app/snapshots/page.mdx",
|
||
"layout": "docs/src/app/snapshots/layout.tsx",
|
||
"sourceSha256": "999aea629ff9489036f38a65d6fbb42806d333ae6e61ce0efd3aae405f97cb34",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Snapshots\n",
|
||
"markdownTitle": "Snapshots",
|
||
"title": "Snapshots | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Snapshots | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Snapshots - agent-browser",
|
||
"twitterTitle": "Snapshots | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Snapshots",
|
||
"id": "snapshots"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Options",
|
||
"id": "options"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Output format",
|
||
"id": "output-format"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Using refs",
|
||
"id": "using-refs"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Ref lifecycle",
|
||
"id": "ref-lifecycle"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Annotated screenshots",
|
||
"id": "annotated-screenshots"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Iframes",
|
||
"id": "iframes"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Best practices",
|
||
"id": "best-practices"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "JSON output",
|
||
"id": "json-output"
|
||
}
|
||
],
|
||
"content": [
|
||
"The snapshot command returns a compact accessibility tree with refs for element interaction.",
|
||
"Filter output to reduce size:",
|
||
"agent-browser snapshot # Full accessibility tree agent-browser snapshot -i # Interactive elements only (recommended) agent-browser snapshot -c # Compact (remove empty elements) agent-browser snapshot -d 3 # Limit depth to 3 levels agent-browser snapshot -s \"#main\" # Scope to CSS selector agent-browser snapshot -i -c -d 5 # Combine options",
|
||
"Option",
|
||
"Description",
|
||
"-i, --interactive",
|
||
"Only interactive elements (buttons, links, inputs)",
|
||
"-u, --urls",
|
||
"Include href URLs for link elements",
|
||
"-c, --compact",
|
||
"Remove empty structural elements",
|
||
"-d, --depth",
|
||
"Limit tree depth",
|
||
"-s, --selector",
|
||
"Scope to CSS selector",
|
||
"The default text output is compact and AI-friendly:",
|
||
"agent-browser snapshot -i # Output: # @e1 [heading] \"Example Domain\" [level=1] # @e2 [button] \"Submit\" # @e3 [input type=\"email\"] placeholder=\"Email\" # @e4 [link] \"Learn more\"",
|
||
"Refs from the snapshot map directly to commands:",
|
||
"agent-browser click @e2 # Click the Submit button agent-browser fill @e3 \"a@b.com\" # Fill the email input agent-browser get text @e1 # Get heading text",
|
||
"Surviving DOM elements retain their refs across snapshots and same-document updates. Replacing an element or navigating its page or iframe invalidates its refs without recycling IDs. Virtual accessibility nodes have snapshot-local refs. Re-snapshot after interactions to observe changes, and always after navigation:",
|
||
"agent-browser click @e4 # Navigates to new page agent-browser snapshot -i # Get fresh refs agent-browser click @e8 # Use a ref from the new snapshot",
|
||
"For visual context alongside text snapshots, use screenshot --annotate to overlay numbered labels on interactive elements. Each label [N] maps to ref @eN:",
|
||
"In native mode, annotated screenshots currently work on the CDP-backed browser path (Chromium/Lightpanda). The Safari/WebDriver backend does not yet support --annotate.",
|
||
"agent-browser screenshot --annotate ./page.png # -> Screenshot saved to ./page.png # [1] @e1 button \"Submit\" # [2] @e2 link \"Home\" # [3] @e3 textbox \"Email\" agent-browser click @e2",
|
||
"Headless Chromium screenshots hide native scrollbars for consistent image output. Pass --hide-scrollbars false when launching to keep native scrollbars visible.",
|
||
"Annotated screenshots also cache refs, so you can interact with elements immediately. This is useful when the text snapshot is insufficient for unlabeled icons, canvas content, or visual layout verification.",
|
||
"Snapshots automatically detect and inline iframe content. Each Iframe node in the main frame is resolved and its child accessibility tree is included directly beneath it. Refs assigned to elements inside iframes carry frame context, so interactions work without switching frames first.",
|
||
"agent-browser snapshot -i # @e1 [heading] \"Checkout\" # @e2 [Iframe] \"payment-frame\" # @e3 [input] \"Card number\" # @e4 [button] \"Pay\" agent-browser fill @e3 \"4111111111111111\" agent-browser click @e4",
|
||
"Only one level of iframe nesting is expanded. Cross-origin iframes that block accessibility tree access and empty iframes are silently omitted.",
|
||
"To scope a snapshot to a single iframe, switch into it first:",
|
||
"agent-browser frame @e2 agent-browser snapshot -i # Only elements inside that iframe agent-browser frame main # Return to main frame",
|
||
"Use -i to reduce output to actionable elements",
|
||
"Re-snapshot after page changes to get updated refs",
|
||
"Scope with -s for specific page sections",
|
||
"Use -d to limit depth on complex pages",
|
||
"Use screenshot --annotate when visual context is needed alongside refs",
|
||
"For programmatic parsing in scripts:",
|
||
"agent-browser snapshot --json # {\"success\":true,\"data\":{\"snapshot\":\"...\",\"refs\":{\"e1\":{\"role\":\"heading\",\"name\":\"Title\"},...}}}",
|
||
"Note: JSON uses more tokens than text output. The default text format is preferred for AI agents."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# Snapshots\n\nThe `snapshot` command returns a compact accessibility tree with refs for element interaction.\n\n## Options\n\nFilter output to reduce size:\n\n```bash\nagent-browser snapshot # Full accessibility tree\nagent-browser snapshot -i # Interactive elements only (recommended)\nagent-browser snapshot -c # Compact (remove empty elements)\nagent-browser snapshot -d 3 # Limit depth to 3 levels\nagent-browser snapshot -s \"#main\" # Scope to CSS selector\nagent-browser snapshot -i -c -d 5 # Combine options\n```\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-i, --interactive</code></td><td>Only interactive elements (buttons, links, inputs)</td></tr>\n <tr><td><code>-u, --urls</code></td><td>Include href URLs for link elements</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Remove empty structural elements</td></tr>\n <tr><td><code>-d, --depth</code></td><td>Limit tree depth</td></tr>\n <tr><td><code>-s, --selector</code></td><td>Scope to CSS selector</td></tr>\n </tbody>\n</table>\n\n## Output format\n\nThe default text output is compact and AI-friendly:\n\n```bash\nagent-browser snapshot -i\n# Output:\n# @e1 [heading] \"Example Domain\" [level=1]\n# @e2 [button] \"Submit\"\n# @e3 [input type=\"email\"] placeholder=\"Email\"\n# @e4 [link] \"Learn more\"\n```\n\n## Using refs\n\nRefs from the snapshot map directly to commands:\n\n```bash\nagent-browser click @e2 # Click the Submit button\nagent-browser fill @e3 \"a@b.com\" # Fill the email input\nagent-browser get text @e1 # Get heading text\n```\n\n## Ref lifecycle\n\nSurviving DOM elements retain their refs across snapshots and same-document updates. Replacing an element or navigating its page or iframe invalidates its refs without recycling IDs. Virtual accessibility nodes have snapshot-local refs. Re-snapshot after interactions to observe changes, and always after navigation:\n\n```bash\nagent-browser click @e4 # Navigates to new page\nagent-browser snapshot -i # Get fresh refs\nagent-browser click @e8 # Use a ref from the new snapshot\n```\n\n## Annotated screenshots\n\nFor visual context alongside text snapshots, use `screenshot --annotate` to overlay numbered labels on interactive elements. Each label `[N]` maps to ref `@eN`:\n\nIn native mode, annotated screenshots currently work on the CDP-backed browser path (Chromium/Lightpanda). The Safari/WebDriver backend does not yet support `--annotate`.\n\n```bash\nagent-browser screenshot --annotate ./page.png\n# -> Screenshot saved to ./page.png\n# [1] @e1 button \"Submit\"\n# [2] @e2 link \"Home\"\n# [3] @e3 textbox \"Email\"\nagent-browser click @e2\n```\n\nHeadless Chromium screenshots hide native scrollbars for consistent image output. Pass `--hide-scrollbars false` when launching to keep native scrollbars visible.\n\nAnnotated screenshots also cache refs, so you can interact with elements immediately. This is useful when the text snapshot is insufficient for unlabeled icons, canvas content, or visual layout verification.\n\n## Iframes\n\nSnapshots automatically detect and inline iframe content. Each `Iframe` node in the main frame is resolved and its child accessibility tree is included directly beneath it. Refs assigned to elements inside iframes carry frame context, so interactions work without switching frames first.\n\n```bash\nagent-browser snapshot -i\n# @e1 [heading] \"Checkout\"\n# @e2 [Iframe] \"payment-frame\"\n# @e3 [input] \"Card number\"\n# @e4 [button] \"Pay\"\n\nagent-browser fill @e3 \"4111111111111111\"\nagent-browser click @e4\n```\n\nOnly one level of iframe nesting is expanded. Cross-origin iframes that block accessibility tree access and empty iframes are silently omitted.\n\nTo scope a snapshot to a single iframe, switch into it first:\n\n```bash\nagent-browser frame @e2\nagent-browser snapshot -i # Only elements inside that iframe\nagent-browser frame main # Return to main frame\n```\n\n## Best practices\n\n1. Use `-i` to reduce output to actionable elements\n2. Re-snapshot after page changes to get updated refs\n3. Scope with `-s` for specific page sections\n4. Use `-d` to limit depth on complex pages\n5. Use `screenshot --annotate` when visual context is needed alongside refs\n\n## JSON output\n\nFor programmatic parsing in scripts:\n\n```bash\nagent-browser snapshot --json\n# {\"success\":true,\"data\":{\"snapshot\":\"...\",\"refs\":{\"e1\":{\"role\":\"heading\",\"name\":\"Title\"},...}}}\n```\n\nNote: JSON uses more tokens than text output. The default text format is preferred for AI agents.",
|
||
"legacyMarkdownSha256": "e69ece644cda7011a1df7ffc87b0c20396f6101c1a17790d0bca62e848d4c316",
|
||
"modernMarkdown": "# Snapshots\n\nThe `snapshot` command returns a compact accessibility tree with refs for element interaction.\n\n## Options\n\nFilter output to reduce size:\n\n```bash\nagent-browser snapshot # Full accessibility tree\nagent-browser snapshot -i # Interactive elements only (recommended)\nagent-browser snapshot -c # Compact (remove empty elements)\nagent-browser snapshot -d 3 # Limit depth to 3 levels\nagent-browser snapshot -s \"#main\" # Scope to CSS selector\nagent-browser snapshot -i -c -d 5 # Combine options\n```\n\n<table>\n <thead>\n <tr><th>Option</th><th>Description</th></tr>\n </thead>\n <tbody>\n <tr><td><code>-i, --interactive</code></td><td>Only interactive elements (buttons, links, inputs)</td></tr>\n <tr><td><code>-u, --urls</code></td><td>Include href URLs for link elements</td></tr>\n <tr><td><code>-c, --compact</code></td><td>Remove empty structural elements</td></tr>\n <tr><td><code>-d, --depth</code></td><td>Limit tree depth</td></tr>\n <tr><td><code>-s, --selector</code></td><td>Scope to CSS selector</td></tr>\n </tbody>\n</table>\n\n## Output format\n\nThe default text output is compact and AI-friendly:\n\n```bash\nagent-browser snapshot -i\n# Output:\n# @e1 [heading] \"Example Domain\" [level=1]\n# @e2 [button] \"Submit\"\n# @e3 [input type=\"email\"] placeholder=\"Email\"\n# @e4 [link] \"Learn more\"\n```\n\n## Using refs\n\nRefs from the snapshot map directly to commands:\n\n```bash\nagent-browser click @e2 # Click the Submit button\nagent-browser fill @e3 \"a@b.com\" # Fill the email input\nagent-browser get text @e1 # Get heading text\n```\n\n## Ref lifecycle\n\nSurviving DOM elements retain their refs across snapshots and same-document updates. Replacing an element or navigating its page or iframe invalidates its refs without recycling IDs. Virtual accessibility nodes have snapshot-local refs. Re-snapshot after interactions to observe changes, and always after navigation:\n\n```bash\nagent-browser click @e4 # Navigates to new page\nagent-browser snapshot -i # Get fresh refs\nagent-browser click @e8 # Use a ref from the new snapshot\n```\n\n## Annotated screenshots\n\nFor visual context alongside text snapshots, use `screenshot --annotate` to overlay numbered labels on interactive elements. Each label `[N]` maps to ref `@eN`:\n\nIn native mode, annotated screenshots currently work on the CDP-backed browser path (Chromium/Lightpanda). The Safari/WebDriver backend does not yet support `--annotate`.\n\n```bash\nagent-browser screenshot --annotate ./page.png\n# -> Screenshot saved to ./page.png\n# [1] @e1 button \"Submit\"\n# [2] @e2 link \"Home\"\n# [3] @e3 textbox \"Email\"\nagent-browser click @e2\n```\n\nHeadless Chromium screenshots hide native scrollbars for consistent image output. Pass `--hide-scrollbars false` when launching to keep native scrollbars visible.\n\nAnnotated screenshots also cache refs, so you can interact with elements immediately. This is useful when the text snapshot is insufficient for unlabeled icons, canvas content, or visual layout verification.\n\n## Iframes\n\nSnapshots automatically detect and inline iframe content. Each `Iframe` node in the main frame is resolved and its child accessibility tree is included directly beneath it. Refs assigned to elements inside iframes carry frame context, so interactions work without switching frames first.\n\n```bash\nagent-browser snapshot -i\n# @e1 [heading] \"Checkout\"\n# @e2 [Iframe] \"payment-frame\"\n# @e3 [input] \"Card number\"\n# @e4 [button] \"Pay\"\n\nagent-browser fill @e3 \"4111111111111111\"\nagent-browser click @e4\n```\n\nOnly one level of iframe nesting is expanded. Cross-origin iframes that block accessibility tree access and empty iframes are silently omitted.\n\nTo scope a snapshot to a single iframe, switch into it first:\n\n```bash\nagent-browser frame @e2\nagent-browser snapshot -i # Only elements inside that iframe\nagent-browser frame main # Return to main frame\n```\n\n## Best practices\n\n1. Use `-i` to reduce output to actionable elements\n2. Re-snapshot after page changes to get updated refs\n3. Scope with `-s` for specific page sections\n4. Use `-d` to limit depth on complex pages\n5. Use `screenshot --annotate` when visual context is needed alongside refs\n\n## JSON output\n\nFor programmatic parsing in scripts:\n\n```bash\nagent-browser snapshot --json\n# {\"success\":true,\"data\":{\"snapshot\":\"...\",\"refs\":{\"e1\":{\"role\":\"heading\",\"name\":\"Title\"},...}}}\n```\n\nNote: JSON uses more tokens than text output. The default text format is preferred for AI agents.",
|
||
"modernMarkdownSha256": "e69ece644cda7011a1df7ffc87b0c20396f6101c1a17790d0bca62e848d4c316",
|
||
"navigation": {
|
||
"title": "Snapshots",
|
||
"section": "Reference"
|
||
}
|
||
},
|
||
{
|
||
"path": "/streaming",
|
||
"source": "docs/src/app/streaming/page.mdx",
|
||
"layout": "docs/src/app/streaming/layout.tsx",
|
||
"sourceSha256": "babea87831dd8d66a859f302b89811aecff952c417e68462e6ac05aadc88751a",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# Streaming\n",
|
||
"markdownTitle": "Streaming",
|
||
"title": "Streaming | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "Streaming | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "Streaming - agent-browser",
|
||
"twitterTitle": "Streaming | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "Streaming",
|
||
"id": "streaming"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Streaming",
|
||
"id": "streaming"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Runtime status response",
|
||
"id": "runtime-status-response"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Relationship to screencast commands",
|
||
"id": "relationship-to-screencast-commands"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "WebSocket protocol",
|
||
"id": "websocket-protocol"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Frame messages",
|
||
"id": "frame-messages"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "URL messages",
|
||
"id": "url-messages"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Status messages",
|
||
"id": "status-messages"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Frame delivery",
|
||
"id": "frame-delivery"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Client configuration",
|
||
"id": "client-configuration"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Ack pacing",
|
||
"id": "ack-pacing"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Input injection",
|
||
"id": "input-injection"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Mouse events",
|
||
"id": "mouse-events"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Keyboard events",
|
||
"id": "keyboard-events"
|
||
},
|
||
{
|
||
"level": 3,
|
||
"text": "Touch events",
|
||
"id": "touch-events"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Programmatic API",
|
||
"id": "programmatic-api"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Use cases",
|
||
"id": "use-cases"
|
||
}
|
||
],
|
||
"content": [
|
||
"Stream the browser viewport via WebSocket for live preview or \"pair browsing\" where a human can watch and interact alongside an AI agent.",
|
||
"Every session automatically starts a WebSocket stream server on an OS-assigned port. The server streams viewport frames and accepts input events (mouse, keyboard, touch).",
|
||
"To bind to a specific port, set AGENT_BROWSER_STREAM_PORT:",
|
||
"AGENT_BROWSER_STREAM_PORT=9223 agent-browser open example.com",
|
||
"You can also manage streaming at runtime:",
|
||
"agent-browser stream status # Show streaming state and bound port agent-browser stream enable --port 9223 # Re-enable on a specific port agent-browser stream disable # Stop streaming for the session",
|
||
"stream status returns the enabled state, active port, browser connection state, and whether screencasting is active. stream disable tears the server down and removes the session's .stream metadata file.",
|
||
"Use Video Recording when you need a saved WebM or MP4 artifact instead of a live WebSocket stream. Recording requires ffmpeg on PATH.",
|
||
"agent-browser stream status --json returns data like:",
|
||
"{ \"enabled\": true, \"port\": 9223, \"connected\": true, \"screencasting\": true }",
|
||
"connected reports whether the daemon currently has a browser attached. screencasting reports whether frames are actively being produced for the stream server.",
|
||
"stream enable creates the WebSocket server and keeps it available for the session. WebSocket clients then trigger live frame delivery automatically.",
|
||
"The lower-level screencast_start and screencast_stop commands still control explicit CDP screencasts directly. Use them when you want a screencast without the WebSocket runtime server.",
|
||
"Connect to ws://localhost:9223 to receive frames and send input.",
|
||
"Frame encoding is set per daemon with AGENT_BROWSER_STREAM_QUALITY (0 to 100), AGENT_BROWSER_STREAM_MAX_WIDTH and AGENT_BROWSER_STREAM_MAX_HEIGHT. The live stream requests jpeg. An explicit screencast_start reconfigures the same underlying screencast, so a client can see the format change mid-stream. Width and height cap the frame and default to the session viewport. On a busy page at 1280x720, quality 80 costs about 54 KB per frame, quality 20 about 25 KB, and quality 20 at 640x360 about 9 KB.",
|
||
"Browser clients must load from localhost, 127.0.0.1, ::1 or file://. Any other origin gets a 403 on the upgrade and needs a proxy.",
|
||
"The server sends frame messages with base64-encoded images:",
|
||
"{ \"type\": \"frame\", \"seq\": 41, \"data\": \"<base64-encoded-jpeg>\", \"metadata\": { \"deviceWidth\": 1280, \"deviceHeight\": 720, \"pageScaleFactor\": 1, \"offsetTop\": 0, \"scrollOffsetX\": 0, \"scrollOffsetY\": 0, \"timestamp\": 1785038682238 } }",
|
||
"seq is a monotonic frame id. It is what an ack pacing client echoes back, and it keeps climbing across browser relaunches so a long-lived client never sees an id go backwards.",
|
||
"metadata.timestamp is the capture time in epoch milliseconds. Comparing it against the clock when the frame is drawn gives the age of what is on screen, which is the number worth watching on a constrained link.",
|
||
"On Chrome, the server sends URL updates for full-document, History API, and fragment navigation in the active tab's main frame:",
|
||
"{ \"type\": \"url\", \"url\": \"https://example.com/dashboard#activity\", \"timestamp\": 1785038682238 }",
|
||
"Navigation inside child frames or background tabs does not emit a URL message or replace the active tab's cached URL.",
|
||
"Connection and screencast status:",
|
||
"{ \"type\": \"status\", \"connected\": true, \"screencasting\": true, \"viewportWidth\": 1280, \"viewportHeight\": 720 }",
|
||
"Frames are delivered latest-first: the server holds only the newest frame and reads it at send time, so every frame produced while an earlier one is still being written is skipped instead of queued. The application never builds a backlog.",
|
||
"In the default push pacing the transport underneath still can: frames already accepted by the socket are delivered in order, so a client that stops reading entirely drains whatever the kernel buffered before the writer blocked. Ack pacing removes that window (see below). Status, console, and tab messages flow through a separate ordered channel, so they are never replaced by a newer message the way frames are. They are not unconditionally durable: a client that falls far enough behind can lag out of that channel and lose messages, so treat console output as a live feed rather than an audit log.",
|
||
"Input handling is independent of frame delivery. Each connection reads input on its own task, so clicks and keystrokes dispatch to the browser immediately even while a large frame is mid-write to a slow client. Events go to the browser without waiting for its reply, so a click stays responsive behind a burst of mouse moves, and ordering is preserved.",
|
||
"A client can cap its own frame rate by sending a config message at any time:",
|
||
"{ \"type\": \"config\", \"maxFps\": 10 }",
|
||
"maxFps caps how many frames per second the server sends to this client (1 to 120). Set 0 to remove the cap (the default). Each client controls its own rate; other connected clients are unaffected.",
|
||
"Push pacing hands each frame to the socket as soon as the rate allows, so a client that stalls drains what the transport buffered. To get one frame at a time instead, opt into ack pacing:",
|
||
"{ \"type\": \"config\", \"pacing\": \"ack\" }",
|
||
"The server then keeps at most one frame in flight and waits for the client to acknowledge it:",
|
||
"{ \"type\": \"ack\", \"seq\": 41 }",
|
||
"Every frame message carries a monotonic seq. Echo the id of the frame you finished rendering. While an ack is outstanding, newer frames replace each other in the server and never reach the socket, so a client that stalls for ten seconds and resumes receives the current page rather than ten seconds of history. This mirrors how Chrome paces its own screencast upstream with Page.screencastFrameAck.",
|
||
"Under ack pacing one frame is in flight at a time, so the rate is one frame per transfer plus one acknowledgement round trip. Both the link's bandwidth and its latency bound it, and a link whose bandwidth-delay product exceeds a single frame goes underused. That headroom is the cost of the freshness guarantee.",
|
||
"Ack pacing bounds one hop. With a proxy in the path, forward the renderer's acks; acks generated on receipt leave frames queued on the far side.",
|
||
"Acks are cumulative: acknowledging a newer id covers every older one, so a client that skips ids still unblocks delivery. A client that opts in and then stops acknowledging simply stops receiving frames, while status, tabs, url, and console keep flowing. Send {\"type\":\"config\",\"pacing\":\"push\"} to return to the default.",
|
||
"pacing and maxFps are independent and compose: pacing bounds how much is in flight, maxFps bounds the rate. A preview on a constrained link usually wants both.",
|
||
"A config message cannot cover the connection's opening frame, because the server sends the most recent frame as soon as the client connects. To have pacing apply from the very first frame, declare it on the URL instead:",
|
||
"ws://127.0.0.1:<port>/?pacing=ack&maxFps=10",
|
||
"A config message sent later still wins. An unrecognized or unparsable value on the URL is ignored rather than failing the connection.",
|
||
"Send input events to control the browser remotely. Mouse, keyboard, and touch input reset the daemon idle timer, so an actively controlled dashboard or streaming session is not shut down by the default timeout.",
|
||
"// Click { \"type\": \"input_mouse\", \"eventType\": \"mousePressed\", \"x\": 100, \"y\": 200, \"button\": \"left\", \"clickCount\": 1 } // Release { \"type\": \"input_mouse\", \"eventType\": \"mouseReleased\", \"x\": 100, \"y\": 200, \"button\": \"left\" } // Move { \"type\": \"input_mouse\", \"eventType\": \"mouseMoved\", \"x\": 150, \"y\": 250 } // Scroll { \"type\": \"input_mouse\", \"eventType\": \"mouseWheel\", \"x\": 100, \"y\": 200, \"deltaX\": 0, \"deltaY\": 100 }",
|
||
"// Key down { \"type\": \"input_keyboard\", \"eventType\": \"keyDown\", \"key\": \"Enter\", \"code\": \"Enter\" } // Key up { \"type\": \"input_keyboard\", \"eventType\": \"keyUp\", \"key\": \"Enter\", \"code\": \"Enter\" } // Type character { \"type\": \"input_keyboard\", \"eventType\": \"char\", \"text\": \"a\" } // With modifiers (1=Alt, 2=Ctrl, 4=Meta, 8=Shift) { \"type\": \"input_keyboard\", \"eventType\": \"keyDown\", \"key\": \"c\", \"code\": \"KeyC\", \"modifiers\": 2 }",
|
||
"// Touch start { \"type\": \"input_touch\", \"eventType\": \"touchStart\", \"touchPoints\": [{ \"x\": 100, \"y\": 200 }] } // Touch move { \"type\": \"input_touch\", \"eventType\": \"touchMove\", \"touchPoints\": [{ \"x\": 150, \"y\": 250 }] } // Touch end { \"type\": \"input_touch\", \"eventType\": \"touchEnd\", \"touchPoints\": [] } // Multi-touch (pinch zoom) { \"type\": \"input_touch\", \"eventType\": \"touchStart\", \"touchPoints\": [ { \"x\": 100, \"y\": 200, \"id\": 0 }, { \"x\": 200, \"y\": 200, \"id\": 1 } ] }",
|
||
"For advanced use, control streaming directly via the TypeScript API:",
|
||
"import { BrowserManager } from 'agent-browser'; const browser = new BrowserManager(); await browser.launch({ headless: true }); await browser.navigate('https://example.com'); // Start screencast with callback await browser.startScreencast((frame) => { console.log('Frame:', frame.metadata.deviceWidth, 'x', frame.metadata.deviceHeight); // frame.data is base64-encoded image }, { format: 'jpeg', // or 'png' quality: 80, // 0-100, jpeg only maxWidth: 1280, maxHeight: 720, everyNthFrame: 1 }); // Inject mouse event await browser.injectMouseEvent({ type: 'mousePressed', x: 100, y: 200, button: 'left', clickCount: 1 }); // Inject keyboard event await browser.injectKeyboardEvent({ type: 'keyDown', key: 'Enter', code: 'Enter' }); // Inject touch event await browser.injectTouchEvent({ type: 'touchStart', touchPoints: [{ x: 100, y: 200 }] }); // Check if screencasting console.log('Active:', browser.isScreencasting()); // Stop screencast await browser.stopScreencast();",
|
||
"Pair browsing - Human watches and assists AI agent in real-time",
|
||
"Remote preview - View browser output in a separate UI",
|
||
"Recording - Capture frames for video generation",
|
||
"Mobile testing - Inject touch events for mobile emulation",
|
||
"Accessibility testing - Manual interaction during automated tests"
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/recording",
|
||
"text": "Video Recording"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# Streaming\n\nStream the browser viewport via WebSocket for live preview or \"pair browsing\" where a human can watch and interact alongside an AI agent.\n\n## Streaming\n\nEvery session automatically starts a WebSocket stream server on an OS-assigned port. The server streams viewport frames and accepts input events (mouse, keyboard, touch).\n\nTo bind to a specific port, set `AGENT_BROWSER_STREAM_PORT`:\n\n```bash\nAGENT_BROWSER_STREAM_PORT=9223 agent-browser open example.com\n```\n\nYou can also manage streaming at runtime:\n\n```bash\nagent-browser stream status # Show streaming state and bound port\nagent-browser stream enable --port 9223 # Re-enable on a specific port\nagent-browser stream disable # Stop streaming for the session\n```\n\n`stream status` returns the enabled state, active port, browser connection state, and whether screencasting is active. `stream disable` tears the server down and removes the session's `.stream` metadata file.\n\nUse [Video Recording](/recording) when you need a saved WebM or MP4 artifact instead of a live WebSocket stream. Recording requires `ffmpeg` on `PATH`.\n\n## Runtime status response\n\n`agent-browser stream status --json` returns data like:\n\n```json\n{\n \"enabled\": true,\n \"port\": 9223,\n \"connected\": true,\n \"screencasting\": true\n}\n```\n\n`connected` reports whether the daemon currently has a browser attached. `screencasting` reports whether frames are actively being produced for the stream server.\n\n## Relationship to screencast commands\n\n`stream enable` creates the WebSocket server and keeps it available for the session. WebSocket clients then trigger live frame delivery automatically.\n\nThe lower-level `screencast_start` and `screencast_stop` commands still control explicit CDP screencasts directly. Use them when you want a screencast without the WebSocket runtime server.\n\n## WebSocket protocol\n\nConnect to `ws://localhost:9223` to receive frames and send input.\n\nFrame encoding is set per daemon with `AGENT_BROWSER_STREAM_QUALITY` (0 to 100), `AGENT_BROWSER_STREAM_MAX_WIDTH` and `AGENT_BROWSER_STREAM_MAX_HEIGHT`. The live stream requests jpeg. An explicit `screencast_start` reconfigures the same underlying screencast, so a client can see the format change mid-stream. Width and height cap the frame and default to the session viewport. On a busy page at 1280x720, quality 80 costs about 54 KB per frame, quality 20 about 25 KB, and quality 20 at 640x360 about 9 KB.\n\nBrowser clients must load from `localhost`, `127.0.0.1`, `::1` or `file://`. Any other origin gets a 403 on the upgrade and needs a proxy.\n\n### Frame messages\n\nThe server sends frame messages with base64-encoded images:\n\n```json\n{\n \"type\": \"frame\",\n \"seq\": 41,\n \"data\": \"<base64-encoded-jpeg>\",\n \"metadata\": {\n \"deviceWidth\": 1280,\n \"deviceHeight\": 720,\n \"pageScaleFactor\": 1,\n \"offsetTop\": 0,\n \"scrollOffsetX\": 0,\n \"scrollOffsetY\": 0,\n \"timestamp\": 1785038682238\n }\n}\n```\n\n`seq` is a monotonic frame id. It is what an ack pacing client echoes back, and it keeps climbing across browser relaunches so a long-lived client never sees an id go backwards.\n\n`metadata.timestamp` is the capture time in epoch milliseconds. Comparing it against the clock when the frame is drawn gives the age of what is on screen, which is the number worth watching on a constrained link.\n\n### URL messages\n\nOn Chrome, the server sends URL updates for full-document, History API, and fragment navigation in the active tab's main frame:\n\n```json\n{\n \"type\": \"url\",\n \"url\": \"https://example.com/dashboard#activity\",\n \"timestamp\": 1785038682238\n}\n```\n\nNavigation inside child frames or background tabs does not emit a URL message or replace the active tab's cached URL.\n\n### Status messages\n\nConnection and screencast status:\n\n```json\n{\n \"type\": \"status\",\n \"connected\": true,\n \"screencasting\": true,\n \"viewportWidth\": 1280,\n \"viewportHeight\": 720\n}\n```\n\n### Frame delivery\n\nFrames are delivered latest-first: the server holds only the newest frame and reads it at send time, so every frame produced while an earlier one is still being written is skipped instead of queued. The application never builds a backlog.\n\nIn the default push pacing the transport underneath still can: frames already accepted by the socket are delivered in order, so a client that stops reading entirely drains whatever the kernel buffered before the writer blocked. Ack pacing removes that window (see below). Status, console, and tab messages flow through a separate ordered channel, so they are never replaced by a newer message the way frames are. They are not unconditionally durable: a client that falls far enough behind can lag out of that channel and lose messages, so treat console output as a live feed rather than an audit log.\n\nInput handling is independent of frame delivery. Each connection reads input on its own task, so clicks and keystrokes dispatch to the browser immediately even while a large frame is mid-write to a slow client. Events go to the browser without waiting for its reply, so a click stays responsive behind a burst of mouse moves, and ordering is preserved.\n\n### Client configuration\n\nA client can cap its own frame rate by sending a `config` message at any time:\n\n```json\n{\n \"type\": \"config\",\n \"maxFps\": 10\n}\n```\n\n`maxFps` caps how many frames per second the server sends to this client (1 to 120). Set `0` to remove the cap (the default). Each client controls its own rate; other connected clients are unaffected.\n\n### Ack pacing\n\nPush pacing hands each frame to the socket as soon as the rate allows, so a client that stalls drains what the transport buffered. To get one frame at a time instead, opt into ack pacing:\n\n```json\n{\n \"type\": \"config\",\n \"pacing\": \"ack\"\n}\n```\n\nThe server then keeps at most one frame in flight and waits for the client to acknowledge it:\n\n```json\n{\n \"type\": \"ack\",\n \"seq\": 41\n}\n```\n\nEvery `frame` message carries a monotonic `seq`. Echo the id of the frame you finished rendering. While an ack is outstanding, newer frames replace each other in the server and never reach the socket, so a client that stalls for ten seconds and resumes receives the current page rather than ten seconds of history. This mirrors how Chrome paces its own screencast upstream with `Page.screencastFrameAck`.\n\nUnder ack pacing one frame is in flight at a time, so the rate is one frame per transfer plus one acknowledgement round trip. Both the link's bandwidth and its latency bound it, and a link whose bandwidth-delay product exceeds a single frame goes underused. That headroom is the cost of the freshness guarantee.\n\nAck pacing bounds one hop. With a proxy in the path, forward the renderer's acks; acks generated on receipt leave frames queued on the far side.\n\nAcks are cumulative: acknowledging a newer id covers every older one, so a client that skips ids still unblocks delivery. A client that opts in and then stops acknowledging simply stops receiving frames, while status, tabs, url, and console keep flowing. Send `{\"type\":\"config\",\"pacing\":\"push\"}` to return to the default.\n\n`pacing` and `maxFps` are independent and compose: pacing bounds how much is in flight, `maxFps` bounds the rate. A preview on a constrained link usually wants both.\n\nA `config` message cannot cover the connection's opening frame, because the server sends the most recent frame as soon as the client connects. To have pacing apply from the very first frame, declare it on the URL instead:\n\n```\nws://127.0.0.1:<port>/?pacing=ack&maxFps=10\n```\n\nA `config` message sent later still wins. An unrecognized or unparsable value on the URL is ignored rather than failing the connection.\n\n## Input injection\n\nSend input events to control the browser remotely. Mouse, keyboard, and touch input reset the daemon idle timer, so an actively controlled dashboard or streaming session is not shut down by the default timeout.\n\n### Mouse events\n\n```json\n// Click\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mousePressed\",\n \"x\": 100,\n \"y\": 200,\n \"button\": \"left\",\n \"clickCount\": 1\n}\n\n// Release\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseReleased\",\n \"x\": 100,\n \"y\": 200,\n \"button\": \"left\"\n}\n\n// Move\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseMoved\",\n \"x\": 150,\n \"y\": 250\n}\n\n// Scroll\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseWheel\",\n \"x\": 100,\n \"y\": 200,\n \"deltaX\": 0,\n \"deltaY\": 100\n}\n```\n\n### Keyboard events\n\n```json\n// Key down\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyDown\",\n \"key\": \"Enter\",\n \"code\": \"Enter\"\n}\n\n// Key up\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyUp\",\n \"key\": \"Enter\",\n \"code\": \"Enter\"\n}\n\n// Type character\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"char\",\n \"text\": \"a\"\n}\n\n// With modifiers (1=Alt, 2=Ctrl, 4=Meta, 8=Shift)\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyDown\",\n \"key\": \"c\",\n \"code\": \"KeyC\",\n \"modifiers\": 2\n}\n```\n\n### Touch events\n\n```json\n// Touch start\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchStart\",\n \"touchPoints\": [{ \"x\": 100, \"y\": 200 }]\n}\n\n// Touch move\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchMove\",\n \"touchPoints\": [{ \"x\": 150, \"y\": 250 }]\n}\n\n// Touch end\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchEnd\",\n \"touchPoints\": []\n}\n\n// Multi-touch (pinch zoom)\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchStart\",\n \"touchPoints\": [\n { \"x\": 100, \"y\": 200, \"id\": 0 },\n { \"x\": 200, \"y\": 200, \"id\": 1 }\n ]\n}\n```\n\n## Programmatic API\n\nFor advanced use, control streaming directly via the TypeScript API:\n\n```typescript\n\nconst browser = new BrowserManager();\nawait browser.launch({ headless: true });\nawait browser.navigate('https://example.com');\n\n// Start screencast with callback\nawait browser.startScreencast((frame) => {\n console.log('Frame:', frame.metadata.deviceWidth, 'x', frame.metadata.deviceHeight);\n // frame.data is base64-encoded image\n}, {\n format: 'jpeg', // or 'png'\n quality: 80, // 0-100, jpeg only\n maxWidth: 1280,\n maxHeight: 720,\n everyNthFrame: 1\n});\n\n// Inject mouse event\nawait browser.injectMouseEvent({\n type: 'mousePressed',\n x: 100,\n y: 200,\n button: 'left',\n clickCount: 1\n});\n\n// Inject keyboard event\nawait browser.injectKeyboardEvent({\n type: 'keyDown',\n key: 'Enter',\n code: 'Enter'\n});\n\n// Inject touch event\nawait browser.injectTouchEvent({\n type: 'touchStart',\n touchPoints: [{ x: 100, y: 200 }]\n});\n\n// Check if screencasting\nconsole.log('Active:', browser.isScreencasting());\n\n// Stop screencast\nawait browser.stopScreencast();\n```\n\n## Use cases\n\n- **Pair browsing** - Human watches and assists AI agent in real-time\n- **Remote preview** - View browser output in a separate UI\n- **Recording** - Capture frames for video generation\n- **Mobile testing** - Inject touch events for mobile emulation\n- **Accessibility testing** - Manual interaction during automated tests",
|
||
"legacyMarkdownSha256": "2f4ac5844f0ec02fd0347ec2e3922ea9fed5199e47bdef16ff16ef0543880b82",
|
||
"modernMarkdown": "# Streaming\n\nStream the browser viewport via WebSocket for live preview or \"pair browsing\" where a human can watch and interact alongside an AI agent.\n\n## Streaming\n\nEvery session automatically starts a WebSocket stream server on an OS-assigned port. The server streams viewport frames and accepts input events (mouse, keyboard, touch).\n\nTo bind to a specific port, set `AGENT_BROWSER_STREAM_PORT`:\n\n```bash\nAGENT_BROWSER_STREAM_PORT=9223 agent-browser open example.com\n```\n\nYou can also manage streaming at runtime:\n\n```bash\nagent-browser stream status # Show streaming state and bound port\nagent-browser stream enable --port 9223 # Re-enable on a specific port\nagent-browser stream disable # Stop streaming for the session\n```\n\n`stream status` returns the enabled state, active port, browser connection state, and whether screencasting is active. `stream disable` tears the server down and removes the session's `.stream` metadata file.\n\nUse [Video Recording](/recording) when you need a saved WebM or MP4 artifact instead of a live WebSocket stream. Recording requires `ffmpeg` on `PATH`.\n\n## Runtime status response\n\n`agent-browser stream status --json` returns data like:\n\n```json\n{\n \"enabled\": true,\n \"port\": 9223,\n \"connected\": true,\n \"screencasting\": true\n}\n```\n\n`connected` reports whether the daemon currently has a browser attached. `screencasting` reports whether frames are actively being produced for the stream server.\n\n## Relationship to screencast commands\n\n`stream enable` creates the WebSocket server and keeps it available for the session. WebSocket clients then trigger live frame delivery automatically.\n\nThe lower-level `screencast_start` and `screencast_stop` commands still control explicit CDP screencasts directly. Use them when you want a screencast without the WebSocket runtime server.\n\n## WebSocket protocol\n\nConnect to `ws://localhost:9223` to receive frames and send input.\n\nFrame encoding is set per daemon with `AGENT_BROWSER_STREAM_QUALITY` (0 to 100), `AGENT_BROWSER_STREAM_MAX_WIDTH` and `AGENT_BROWSER_STREAM_MAX_HEIGHT`. The live stream requests jpeg. An explicit `screencast_start` reconfigures the same underlying screencast, so a client can see the format change mid-stream. Width and height cap the frame and default to the session viewport. On a busy page at 1280x720, quality 80 costs about 54 KB per frame, quality 20 about 25 KB, and quality 20 at 640x360 about 9 KB.\n\nBrowser clients must load from `localhost`, `127.0.0.1`, `::1` or `file://`. Any other origin gets a 403 on the upgrade and needs a proxy.\n\n### Frame messages\n\nThe server sends frame messages with base64-encoded images:\n\n```json\n{\n \"type\": \"frame\",\n \"seq\": 41,\n \"data\": \"<base64-encoded-jpeg>\",\n \"metadata\": {\n \"deviceWidth\": 1280,\n \"deviceHeight\": 720,\n \"pageScaleFactor\": 1,\n \"offsetTop\": 0,\n \"scrollOffsetX\": 0,\n \"scrollOffsetY\": 0,\n \"timestamp\": 1785038682238\n }\n}\n```\n\n`seq` is a monotonic frame id. It is what an ack pacing client echoes back, and it keeps climbing across browser relaunches so a long-lived client never sees an id go backwards.\n\n`metadata.timestamp` is the capture time in epoch milliseconds. Comparing it against the clock when the frame is drawn gives the age of what is on screen, which is the number worth watching on a constrained link.\n\n### URL messages\n\nOn Chrome, the server sends URL updates for full-document, History API, and fragment navigation in the active tab's main frame:\n\n```json\n{\n \"type\": \"url\",\n \"url\": \"https://example.com/dashboard#activity\",\n \"timestamp\": 1785038682238\n}\n```\n\nNavigation inside child frames or background tabs does not emit a URL message or replace the active tab's cached URL.\n\n### Status messages\n\nConnection and screencast status:\n\n```json\n{\n \"type\": \"status\",\n \"connected\": true,\n \"screencasting\": true,\n \"viewportWidth\": 1280,\n \"viewportHeight\": 720\n}\n```\n\n### Frame delivery\n\nFrames are delivered latest-first: the server holds only the newest frame and reads it at send time, so every frame produced while an earlier one is still being written is skipped instead of queued. The application never builds a backlog.\n\nIn the default push pacing the transport underneath still can: frames already accepted by the socket are delivered in order, so a client that stops reading entirely drains whatever the kernel buffered before the writer blocked. Ack pacing removes that window (see below). Status, console, and tab messages flow through a separate ordered channel, so they are never replaced by a newer message the way frames are. They are not unconditionally durable: a client that falls far enough behind can lag out of that channel and lose messages, so treat console output as a live feed rather than an audit log.\n\nInput handling is independent of frame delivery. Each connection reads input on its own task, so clicks and keystrokes dispatch to the browser immediately even while a large frame is mid-write to a slow client. Events go to the browser without waiting for its reply, so a click stays responsive behind a burst of mouse moves, and ordering is preserved.\n\n### Client configuration\n\nA client can cap its own frame rate by sending a `config` message at any time:\n\n```json\n{\n \"type\": \"config\",\n \"maxFps\": 10\n}\n```\n\n`maxFps` caps how many frames per second the server sends to this client (1 to 120). Set `0` to remove the cap (the default). Each client controls its own rate; other connected clients are unaffected.\n\n### Ack pacing\n\nPush pacing hands each frame to the socket as soon as the rate allows, so a client that stalls drains what the transport buffered. To get one frame at a time instead, opt into ack pacing:\n\n```json\n{\n \"type\": \"config\",\n \"pacing\": \"ack\"\n}\n```\n\nThe server then keeps at most one frame in flight and waits for the client to acknowledge it:\n\n```json\n{\n \"type\": \"ack\",\n \"seq\": 41\n}\n```\n\nEvery `frame` message carries a monotonic `seq`. Echo the id of the frame you finished rendering. While an ack is outstanding, newer frames replace each other in the server and never reach the socket, so a client that stalls for ten seconds and resumes receives the current page rather than ten seconds of history. This mirrors how Chrome paces its own screencast upstream with `Page.screencastFrameAck`.\n\nUnder ack pacing one frame is in flight at a time, so the rate is one frame per transfer plus one acknowledgement round trip. Both the link's bandwidth and its latency bound it, and a link whose bandwidth-delay product exceeds a single frame goes underused. That headroom is the cost of the freshness guarantee.\n\nAck pacing bounds one hop. With a proxy in the path, forward the renderer's acks; acks generated on receipt leave frames queued on the far side.\n\nAcks are cumulative: acknowledging a newer id covers every older one, so a client that skips ids still unblocks delivery. A client that opts in and then stops acknowledging simply stops receiving frames, while status, tabs, url, and console keep flowing. Send `{\"type\":\"config\",\"pacing\":\"push\"}` to return to the default.\n\n`pacing` and `maxFps` are independent and compose: pacing bounds how much is in flight, `maxFps` bounds the rate. A preview on a constrained link usually wants both.\n\nA `config` message cannot cover the connection's opening frame, because the server sends the most recent frame as soon as the client connects. To have pacing apply from the very first frame, declare it on the URL instead:\n\n```\nws://127.0.0.1:<port>/?pacing=ack&maxFps=10\n```\n\nA `config` message sent later still wins. An unrecognized or unparsable value on the URL is ignored rather than failing the connection.\n\n## Input injection\n\nSend input events to control the browser remotely. Mouse, keyboard, and touch input reset the daemon idle timer, so an actively controlled dashboard or streaming session is not shut down by the default timeout.\n\n### Mouse events\n\n```json\n// Click\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mousePressed\",\n \"x\": 100,\n \"y\": 200,\n \"button\": \"left\",\n \"clickCount\": 1\n}\n\n// Release\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseReleased\",\n \"x\": 100,\n \"y\": 200,\n \"button\": \"left\"\n}\n\n// Move\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseMoved\",\n \"x\": 150,\n \"y\": 250\n}\n\n// Scroll\n{\n \"type\": \"input_mouse\",\n \"eventType\": \"mouseWheel\",\n \"x\": 100,\n \"y\": 200,\n \"deltaX\": 0,\n \"deltaY\": 100\n}\n```\n\n### Keyboard events\n\n```json\n// Key down\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyDown\",\n \"key\": \"Enter\",\n \"code\": \"Enter\"\n}\n\n// Key up\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyUp\",\n \"key\": \"Enter\",\n \"code\": \"Enter\"\n}\n\n// Type character\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"char\",\n \"text\": \"a\"\n}\n\n// With modifiers (1=Alt, 2=Ctrl, 4=Meta, 8=Shift)\n{\n \"type\": \"input_keyboard\",\n \"eventType\": \"keyDown\",\n \"key\": \"c\",\n \"code\": \"KeyC\",\n \"modifiers\": 2\n}\n```\n\n### Touch events\n\n```json\n// Touch start\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchStart\",\n \"touchPoints\": [{ \"x\": 100, \"y\": 200 }]\n}\n\n// Touch move\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchMove\",\n \"touchPoints\": [{ \"x\": 150, \"y\": 250 }]\n}\n\n// Touch end\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchEnd\",\n \"touchPoints\": []\n}\n\n// Multi-touch (pinch zoom)\n{\n \"type\": \"input_touch\",\n \"eventType\": \"touchStart\",\n \"touchPoints\": [\n { \"x\": 100, \"y\": 200, \"id\": 0 },\n { \"x\": 200, \"y\": 200, \"id\": 1 }\n ]\n}\n```\n\n## Programmatic API\n\nFor advanced use, control streaming directly via the TypeScript API:\n\n```typescript\nimport { BrowserManager } from 'agent-browser';\n\nconst browser = new BrowserManager();\nawait browser.launch({ headless: true });\nawait browser.navigate('https://example.com');\n\n// Start screencast with callback\nawait browser.startScreencast((frame) => {\n console.log('Frame:', frame.metadata.deviceWidth, 'x', frame.metadata.deviceHeight);\n // frame.data is base64-encoded image\n}, {\n format: 'jpeg', // or 'png'\n quality: 80, // 0-100, jpeg only\n maxWidth: 1280,\n maxHeight: 720,\n everyNthFrame: 1\n});\n\n// Inject mouse event\nawait browser.injectMouseEvent({\n type: 'mousePressed',\n x: 100,\n y: 200,\n button: 'left',\n clickCount: 1\n});\n\n// Inject keyboard event\nawait browser.injectKeyboardEvent({\n type: 'keyDown',\n key: 'Enter',\n code: 'Enter'\n});\n\n// Inject touch event\nawait browser.injectTouchEvent({\n type: 'touchStart',\n touchPoints: [{ x: 100, y: 200 }]\n});\n\n// Check if screencasting\nconsole.log('Active:', browser.isScreencasting());\n\n// Stop screencast\nawait browser.stopScreencast();\n```\n\n## Use cases\n\n- **Pair browsing** - Human watches and assists AI agent in real-time\n- **Remote preview** - View browser output in a separate UI\n- **Recording** - Capture frames for video generation\n- **Mobile testing** - Inject touch events for mobile emulation\n- **Accessibility testing** - Manual interaction during automated tests",
|
||
"modernMarkdownSha256": "846cd396790edb50d04a9adee010069ae067fc1132572d05b8d170ecfb047064",
|
||
"navigation": {
|
||
"title": "Streaming",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/webgpu",
|
||
"source": "docs/src/app/webgpu/page.mdx",
|
||
"layout": "docs/src/app/webgpu/layout.tsx",
|
||
"sourceSha256": "cd6645fda964714ddbdc5104957b6ed9ff40f4635405d730697c8cb52a71ac1d",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# WebGPU\n",
|
||
"markdownTitle": "WebGPU",
|
||
"title": "WebGPU | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "WebGPU | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "WebGPU - agent-browser",
|
||
"twitterTitle": "WebGPU | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "WebGPU",
|
||
"id": "webgpu"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Quick start",
|
||
"id": "quick-start"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "What the preset does",
|
||
"id": "what-the-preset-does"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Platform support",
|
||
"id": "platform-support"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Verify with doctor",
|
||
"id": "verify-with-doctor"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Linux, containers, and CI",
|
||
"id": "linux-containers-and-ci"
|
||
},
|
||
{
|
||
"level": 2,
|
||
"text": "Gotchas",
|
||
"id": "gotchas"
|
||
}
|
||
],
|
||
"content": [
|
||
"Take screenshots and record video of WebGPU pages — three.js WebGPURenderer, Babylon.js, or raw WebGPU — with headless Chrome.",
|
||
"Headless Chrome does not expose WebGPU by default. Without setup this fails silently: the page loads, the screenshot command succeeds, and the canvas is black. The --webgpu flag enables a launch preset that makes WebGPU work, including in GPU-less containers and CI.",
|
||
"agent-browser --webgpu open https://my-webgpu-app.example.com agent-browser screenshot app.png",
|
||
"Also available as the AGENT_BROWSER_WEBGPU environment variable or \"webgpu\": true in agent-browser.json.",
|
||
"Platform",
|
||
"Flags applied",
|
||
"All",
|
||
"--enable-unsafe-webgpu (WebGPU is hidden in headless and GPU-blocklisted environments by default)",
|
||
"Linux",
|
||
"--enable-features=Vulkan --use-angle=vulkan --use-vulkan=swiftshader --use-webgpu-adapter=swiftshader --disable-vulkan-surface — WebGPU through SwiftShader's software Vulkan; no GPU required",
|
||
"macOS uses the hardware Metal backend and Windows uses D3D — nothing extra to install on either.",
|
||
"WebGPU rendering (headless)",
|
||
"Screenshots of WebGPU canvases",
|
||
"macOS",
|
||
"works",
|
||
"works headless",
|
||
"Windows",
|
||
"works (hardware D3D)",
|
||
"headless captures black — use --headed on a logged-in desktop",
|
||
"works (SwiftShader Vulkan)",
|
||
"headless capture not supported upstream — add --headed (virtual display starts automatically)",
|
||
"The Windows/Linux screenshot gap is an upstream headless-Chrome limitation: WebGPU canvas presentation never reaches the headless compositor even though rendering works (verifiable by pixel readback). No flag combination is known to fix it.",
|
||
"On Linux, --headed is all you need even on displayless servers and containers: when no DISPLAY is set and Xvfb is installed (apt-get install -y xvfb), agent-browser starts a private virtual display for the browser and tears it down with it (AGENT_BROWSER_NO_XVFB=1 opts out):",
|
||
"agent-browser --webgpu --headed open https://my-webgpu-app.example.com agent-browser screenshot app.png # real WebGPU pixels, no display hardware",
|
||
"On Windows, the headed session must run in a logged-in desktop session — launching from an ssh/service context is not enough (schedule the launch on the interactive desktop with schtasks /IT, then drive the session from anywhere).",
|
||
"agent-browser doctor --webgpu",
|
||
"The probe launches a scratch session with the preset and pixel-checks two stages separately — WebGPU failures are silent black, so only pixel assertions prove anything:",
|
||
"render — requests an adapter (with retries for cold-start nulls), clears an offscreen texture red through a real render pass, and reads the buffer back. Reports the adapter in use.",
|
||
"screenshot — decodes an actual screenshot of a presenting canvas, proving the capture path end to end.",
|
||
"WebGPU probe pass WebGPU rendered and read back pixels in 1.61s (nvidia ampere) fail WebGPU renders, but headless screenshots miss the canvas (expected red, got rgb(0,0,0)); this is a known headless Chrome limitation on this platform fix: run WebGPU sessions with --headed on a logged-in desktop for screenshots",
|
||
"On macOS both checks pass headless; on Windows/Linux the second check tells you when the platform needs --headed for capture. Run agent-browser doctor --webgpu --headed to validate that path itself — on displayless Linux the probe starts its own Xvfb, so both checks should pass.",
|
||
"The SwiftShader Vulkan path needs the system Vulkan loader and Mesa ICD. Without them requestAdapter() returns null:",
|
||
"apt-get install -y libvulkan1 mesa-vulkan-drivers",
|
||
"Container recipe (xvfb only needed for the screenshot path):",
|
||
"FROM node:22-bookworm-slim RUN apt-get update && apt-get install -y \\ ca-certificates libvulkan1 mesa-vulkan-drivers xvfb xauth \\ && rm -rf /var/lib/apt/lists/* RUN npm install -g agent-browser \\ && agent-browser install",
|
||
"No real GPU or /dev/dri is required. To prefer hardware Vulkan on a Linux machine that has working drivers, override both the Vulkan driver and the adapter — the preset pins --use-vulkan=swiftshader, so overriding only the adapter still enumerates SwiftShader (user args win over the preset):",
|
||
"agent-browser --webgpu --args \"--use-vulkan=native,--use-webgpu-adapter=default\" open ...",
|
||
"Secure contexts only. navigator.gpu exists only in secure contexts: https://, http://localhost, and file:// qualify; a plain http:// LAN address does not, regardless of flags.",
|
||
"Don't screenshot too early. WebGPU apps initialize asynchronously — three.js WebGPURenderer awaits an async init() before the first frame. A screenshot at page load captures a blank canvas with no error. Wait for an app-specific ready signal, or give the render loop a couple of frames:",
|
||
"agent-browser eval \"new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)))\" agent-browser screenshot app.png",
|
||
"three.js falls back silently. When no WebGPU adapter is available, WebGPURenderer switches to its WebGL2 backend without an error. To check what a page actually got:",
|
||
"agent-browser eval \"document.querySelector('canvas').getContext('webgpu') ? 'webgpu' : 'webgl-fallback'\"",
|
||
"Custom pixel readbacks: avoid canvas snapshots. drawImage(webgpuCanvas, ...) depends on presentation timing and reads transparent black on some platforms even when rendering works. Render to an offscreen texture and read it back with copyTextureToBuffer + mapAsync — deterministic on every platform (this is how the doctor probe proves rendering).",
|
||
"SwiftShader is a CPU rasterizer. Simple scenes render fine; heavy scenes run at single-digit FPS. That rarely matters for screenshots, but for smooth video of complex scenes use hardware (macOS/Windows, or Linux with real Vulkan drivers and --use-vulkan=native,--use-webgpu-adapter=default)."
|
||
],
|
||
"links": [],
|
||
"legacyMarkdown": "# WebGPU\n\nTake screenshots and record video of WebGPU pages — three.js `WebGPURenderer`, Babylon.js, or raw WebGPU — with headless Chrome.\n\nHeadless Chrome does not expose WebGPU by default. Without setup this fails silently: the page loads, the screenshot command succeeds, and the canvas is black. The `--webgpu` flag enables a launch preset that makes WebGPU work, including in GPU-less containers and CI.\n\n## Quick start\n\n```bash\nagent-browser --webgpu open https://my-webgpu-app.example.com\nagent-browser screenshot app.png\n```\n\nAlso available as the `AGENT_BROWSER_WEBGPU` environment variable or `\"webgpu\": true` in `agent-browser.json`.\n\n## What the preset does\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Flags applied</th></tr>\n </thead>\n <tbody>\n <tr><td>All</td><td><code>--enable-unsafe-webgpu</code> (WebGPU is hidden in headless and GPU-blocklisted environments by default)</td></tr>\n <tr><td>Linux</td><td><code>--enable-features=Vulkan --use-angle=vulkan --use-vulkan=swiftshader --use-webgpu-adapter=swiftshader --disable-vulkan-surface</code> — WebGPU through SwiftShader's software Vulkan; no GPU required</td></tr>\n </tbody>\n</table>\n\nmacOS uses the hardware Metal backend and Windows uses D3D — nothing extra to install on either.\n\n## Platform support\n\n<table>\n <thead>\n <tr><th>Platform</th><th>WebGPU rendering (headless)</th><th>Screenshots of WebGPU canvases</th></tr>\n </thead>\n <tbody>\n <tr><td>macOS</td><td>works</td><td>works headless</td></tr>\n <tr><td>Windows</td><td>works (hardware D3D)</td><td>headless captures black — use <code>--headed</code> on a logged-in desktop</td></tr>\n <tr><td>Linux</td><td>works (SwiftShader Vulkan)</td><td>headless capture not supported upstream — add <code>--headed</code> (virtual display starts automatically)</td></tr>\n </tbody>\n</table>\n\nThe Windows/Linux screenshot gap is an upstream headless-Chrome limitation: WebGPU canvas *presentation* never reaches the headless compositor even though rendering works (verifiable by pixel readback). No flag combination is known to fix it.\n\nOn Linux, `--headed` is all you need even on displayless servers and containers: when no `DISPLAY` is set and Xvfb is installed (`apt-get install -y xvfb`), agent-browser starts a private virtual display for the browser and tears it down with it (`AGENT_BROWSER_NO_XVFB=1` opts out):\n\n```bash\nagent-browser --webgpu --headed open https://my-webgpu-app.example.com\nagent-browser screenshot app.png # real WebGPU pixels, no display hardware\n```\n\nOn Windows, the headed session must run in a logged-in desktop session — launching from an ssh/service context is not enough (schedule the launch on the interactive desktop with `schtasks /IT`, then drive the session from anywhere).\n\n## Verify with doctor\n\n```bash\nagent-browser doctor --webgpu\n```\n\nThe probe launches a scratch session with the preset and pixel-checks two stages separately — WebGPU failures are silent black, so only pixel assertions prove anything:\n\n1. **render** — requests an adapter (with retries for cold-start nulls), clears an offscreen texture red through a real render pass, and reads the buffer back. Reports the adapter in use.\n2. **screenshot** — decodes an actual screenshot of a presenting canvas, proving the capture path end to end.\n\n```\nWebGPU probe\n pass WebGPU rendered and read back pixels in 1.61s (nvidia ampere)\n fail WebGPU renders, but headless screenshots miss the canvas (expected red, got rgb(0,0,0)); this is a known headless Chrome limitation on this platform\n fix: run WebGPU sessions with --headed on a logged-in desktop for screenshots\n```\n\nOn macOS both checks pass headless; on Windows/Linux the second check tells you when the platform needs `--headed` for capture. Run `agent-browser doctor --webgpu --headed` to validate that path itself — on displayless Linux the probe starts its own Xvfb, so both checks should pass.\n\n## Linux, containers, and CI\n\nThe SwiftShader Vulkan path needs the system Vulkan loader and Mesa ICD. Without them `requestAdapter()` returns `null`:\n\n```bash\napt-get install -y libvulkan1 mesa-vulkan-drivers\n```\n\nContainer recipe (xvfb only needed for the screenshot path):\n\n```dockerfile\nFROM node:22-bookworm-slim\nRUN apt-get update && apt-get install -y \\\n ca-certificates libvulkan1 mesa-vulkan-drivers xvfb xauth \\\n && rm -rf /var/lib/apt/lists/*\nRUN npm install -g agent-browser \\\n && agent-browser install\n```\n\nNo real GPU or `/dev/dri` is required. To prefer hardware Vulkan on a Linux machine that has working drivers, override both the Vulkan driver and the adapter — the preset pins `--use-vulkan=swiftshader`, so overriding only the adapter still enumerates SwiftShader (user args win over the preset):\n\n```bash\nagent-browser --webgpu --args \"--use-vulkan=native,--use-webgpu-adapter=default\" open ...\n```\n\n## Gotchas\n\n**Secure contexts only.** `navigator.gpu` exists only in secure contexts: `https://`, `http://localhost`, and `file://` qualify; a plain `http://` LAN address does not, regardless of flags.\n\n**Don't screenshot too early.** WebGPU apps initialize asynchronously — three.js `WebGPURenderer` awaits an async `init()` before the first frame. A screenshot at page `load` captures a blank canvas with no error. Wait for an app-specific ready signal, or give the render loop a couple of frames:\n\n```bash\nagent-browser eval \"new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)))\"\nagent-browser screenshot app.png\n```\n\n**three.js falls back silently.** When no WebGPU adapter is available, `WebGPURenderer` switches to its WebGL2 backend without an error. To check what a page actually got:\n\n```bash\nagent-browser eval \"document.querySelector('canvas').getContext('webgpu') ? 'webgpu' : 'webgl-fallback'\"\n```\n\n**Custom pixel readbacks: avoid canvas snapshots.** `drawImage(webgpuCanvas, ...)` depends on presentation timing and reads transparent black on some platforms even when rendering works. Render to an offscreen texture and read it back with `copyTextureToBuffer` + `mapAsync` — deterministic on every platform (this is how the doctor probe proves rendering).\n\n**SwiftShader is a CPU rasterizer.** Simple scenes render fine; heavy scenes run at single-digit FPS. That rarely matters for screenshots, but for smooth video of complex scenes use hardware (macOS/Windows, or Linux with real Vulkan drivers and `--use-vulkan=native,--use-webgpu-adapter=default`).",
|
||
"legacyMarkdownSha256": "92797e3ca01be2a759eac6766f87f8baeaf323231fb24d5c3eef072916d37477",
|
||
"modernMarkdown": "# WebGPU\n\nTake screenshots and record video of WebGPU pages — three.js `WebGPURenderer`, Babylon.js, or raw WebGPU — with headless Chrome.\n\nHeadless Chrome does not expose WebGPU by default. Without setup this fails silently: the page loads, the screenshot command succeeds, and the canvas is black. The `--webgpu` flag enables a launch preset that makes WebGPU work, including in GPU-less containers and CI.\n\n## Quick start\n\n```bash\nagent-browser --webgpu open https://my-webgpu-app.example.com\nagent-browser screenshot app.png\n```\n\nAlso available as the `AGENT_BROWSER_WEBGPU` environment variable or `\"webgpu\": true` in `agent-browser.json`.\n\n## What the preset does\n\n<table>\n <thead>\n <tr><th>Platform</th><th>Flags applied</th></tr>\n </thead>\n <tbody>\n <tr><td>All</td><td><code>--enable-unsafe-webgpu</code> (WebGPU is hidden in headless and GPU-blocklisted environments by default)</td></tr>\n <tr><td>Linux</td><td><code>--enable-features=Vulkan --use-angle=vulkan --use-vulkan=swiftshader --use-webgpu-adapter=swiftshader --disable-vulkan-surface</code> — WebGPU through SwiftShader's software Vulkan; no GPU required</td></tr>\n </tbody>\n</table>\n\nmacOS uses the hardware Metal backend and Windows uses D3D — nothing extra to install on either.\n\n## Platform support\n\n<table>\n <thead>\n <tr><th>Platform</th><th>WebGPU rendering (headless)</th><th>Screenshots of WebGPU canvases</th></tr>\n </thead>\n <tbody>\n <tr><td>macOS</td><td>works</td><td>works headless</td></tr>\n <tr><td>Windows</td><td>works (hardware D3D)</td><td>headless captures black — use <code>--headed</code> on a logged-in desktop</td></tr>\n <tr><td>Linux</td><td>works (SwiftShader Vulkan)</td><td>headless capture not supported upstream — add <code>--headed</code> (virtual display starts automatically)</td></tr>\n </tbody>\n</table>\n\nThe Windows/Linux screenshot gap is an upstream headless-Chrome limitation: WebGPU canvas *presentation* never reaches the headless compositor even though rendering works (verifiable by pixel readback). No flag combination is known to fix it.\n\nOn Linux, `--headed` is all you need even on displayless servers and containers: when no `DISPLAY` is set and Xvfb is installed (`apt-get install -y xvfb`), agent-browser starts a private virtual display for the browser and tears it down with it (`AGENT_BROWSER_NO_XVFB=1` opts out):\n\n```bash\nagent-browser --webgpu --headed open https://my-webgpu-app.example.com\nagent-browser screenshot app.png # real WebGPU pixels, no display hardware\n```\n\nOn Windows, the headed session must run in a logged-in desktop session — launching from an ssh/service context is not enough (schedule the launch on the interactive desktop with `schtasks /IT`, then drive the session from anywhere).\n\n## Verify with doctor\n\n```bash\nagent-browser doctor --webgpu\n```\n\nThe probe launches a scratch session with the preset and pixel-checks two stages separately — WebGPU failures are silent black, so only pixel assertions prove anything:\n\n1. **render** — requests an adapter (with retries for cold-start nulls), clears an offscreen texture red through a real render pass, and reads the buffer back. Reports the adapter in use.\n2. **screenshot** — decodes an actual screenshot of a presenting canvas, proving the capture path end to end.\n\n```\nWebGPU probe\n pass WebGPU rendered and read back pixels in 1.61s (nvidia ampere)\n fail WebGPU renders, but headless screenshots miss the canvas (expected red, got rgb(0,0,0)); this is a known headless Chrome limitation on this platform\n fix: run WebGPU sessions with --headed on a logged-in desktop for screenshots\n```\n\nOn macOS both checks pass headless; on Windows/Linux the second check tells you when the platform needs `--headed` for capture. Run `agent-browser doctor --webgpu --headed` to validate that path itself — on displayless Linux the probe starts its own Xvfb, so both checks should pass.\n\n## Linux, containers, and CI\n\nThe SwiftShader Vulkan path needs the system Vulkan loader and Mesa ICD. Without them `requestAdapter()` returns `null`:\n\n```bash\napt-get install -y libvulkan1 mesa-vulkan-drivers\n```\n\nContainer recipe (xvfb only needed for the screenshot path):\n\n```dockerfile\nFROM node:22-bookworm-slim\nRUN apt-get update && apt-get install -y \\\n ca-certificates libvulkan1 mesa-vulkan-drivers xvfb xauth \\\n && rm -rf /var/lib/apt/lists/*\nRUN npm install -g agent-browser \\\n && agent-browser install\n```\n\nNo real GPU or `/dev/dri` is required. To prefer hardware Vulkan on a Linux machine that has working drivers, override both the Vulkan driver and the adapter — the preset pins `--use-vulkan=swiftshader`, so overriding only the adapter still enumerates SwiftShader (user args win over the preset):\n\n```bash\nagent-browser --webgpu --args \"--use-vulkan=native,--use-webgpu-adapter=default\" open ...\n```\n\n## Gotchas\n\n**Secure contexts only.** `navigator.gpu` exists only in secure contexts: `https://`, `http://localhost`, and `file://` qualify; a plain `http://` LAN address does not, regardless of flags.\n\n**Don't screenshot too early.** WebGPU apps initialize asynchronously — three.js `WebGPURenderer` awaits an async `init()` before the first frame. A screenshot at page `load` captures a blank canvas with no error. Wait for an app-specific ready signal, or give the render loop a couple of frames:\n\n```bash\nagent-browser eval \"new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)))\"\nagent-browser screenshot app.png\n```\n\n**three.js falls back silently.** When no WebGPU adapter is available, `WebGPURenderer` switches to its WebGL2 backend without an error. To check what a page actually got:\n\n```bash\nagent-browser eval \"document.querySelector('canvas').getContext('webgpu') ? 'webgpu' : 'webgl-fallback'\"\n```\n\n**Custom pixel readbacks: avoid canvas snapshots.** `drawImage(webgpuCanvas, ...)` depends on presentation timing and reads transparent black on some platforms even when rendering works. Render to an offscreen texture and read it back with `copyTextureToBuffer` + `mapAsync` — deterministic on every platform (this is how the doctor probe proves rendering).\n\n**SwiftShader is a CPU rasterizer.** Simple scenes render fine; heavy scenes run at single-digit FPS. That rarely matters for screenshots, but for smooth video of complex scenes use hardware (macOS/Windows, or Linux with real Vulkan drivers and `--use-vulkan=native,--use-webgpu-adapter=default`).",
|
||
"modernMarkdownSha256": "92797e3ca01be2a759eac6766f87f8baeaf323231fb24d5c3eef072916d37477",
|
||
"navigation": {
|
||
"title": "WebGPU",
|
||
"section": "Features"
|
||
}
|
||
},
|
||
{
|
||
"path": "/webmcp",
|
||
"source": "docs/src/app/webmcp/page.mdx",
|
||
"layout": "docs/src/app/webmcp/layout.tsx",
|
||
"sourceSha256": "05f9ab0409bd23c0088ea29a373502eab6b35ea561c84e696657e66cf9204417",
|
||
"h1InsertionOffset": 0,
|
||
"h1Source": "# WebMCP\n",
|
||
"markdownTitle": "WebMCP",
|
||
"title": "WebMCP | agent-browser",
|
||
"description": "Browser automation CLI for AI agents",
|
||
"ogTitle": "WebMCP | agent-browser",
|
||
"ogDescription": "Browser automation CLI for AI agents",
|
||
"ogAlt": "WebMCP - agent-browser",
|
||
"twitterTitle": "WebMCP | agent-browser",
|
||
"headings": [
|
||
{
|
||
"level": 1,
|
||
"text": "WebMCP",
|
||
"id": "webmcp"
|
||
}
|
||
],
|
||
"content": [
|
||
"WebMCP support is experimental. agent-browser enables Chrome's current WebMCP launch features by default for locally managed Chrome sessions. Pass --no-webmcp or set AGENT_BROWSER_NO_WEBMCP=1 to opt out.",
|
||
"Browser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain only names, brief descriptions, origins, and frame IDs. Choose a relevant tool, then fetch its full schema with agent-browser webmcp list <tool> --frame <frame-id> --json before invoking it. Schemas and annotations are never included proactively. Unchanged catalogs and pages without tools add no context. JSON output adds:",
|
||
"{ \"data\": { \"webmcp\": { \"experimental\": true, \"untrusted\": true, \"status\": \"ready\", \"available\": true, \"toolCount\": 1, \"tools\": [{ \"name\": \"search\", \"description\": \"Search products\", \"frameId\": \"frame-id\", \"origin\": \"https://example.com\" }], \"truncated\": false } } }",
|
||
"agent-browser open https://example.com # Announces brief tool summary agent-browser webmcp list search --json # Fetch only the selected schema agent-browser webmcp invoke search --params '{\"query\":\"browser agents\"}' agent-browser webmcp invoke slow_tool --params @input.json --detach agent-browser webmcp result <invocation-id> agent-browser webmcp cancel <invocation-id>",
|
||
"JSON exposes updates as data.webmcp; CLI and MCP text use the same summaries. An omitted field means no update. A one-time status: \"ready\" update with tools: [] clears previously advertised tools; status: \"unavailable\" invalidates them when observation fails. Every emitted summary replaces earlier availability, including schema-only changes. After conversation compaction or joining an existing browser session, use webmcp list to recover context. Administrative commands and explicit metadata requests do not append duplicate summaries.",
|
||
"Automatic summaries are limited to 16 tools and 4 KiB of JSON, with descriptions shortened to 160 bytes plus a truncation marker. Names and frame identities are never cut into unusable identifiers; oversized records are omitted. truncated: true indicates shortened descriptions or omitted tools. webmcp list --json retrieves the full catalog; webmcp list <tool> --frame <frame-id> --json retrieves only the selected tool. Full-record changes trigger an update even when the brief description stays the same, so refresh previously fetched schemas after a catalog update.",
|
||
"The daemon subscribes to CDP WebMCP events once per page session and reads its event cache after browser actions. There is no per-action discovery polling or registration grace period. Initial subscription is bounded to one second; unsupported sessions are not repeatedly probed. Explicit webmcp list can retry discovery. Asynchronous registrations appear on the next normal browser response after the event arrives. This describes agent-browser's active tab and frames, not a separately opened preview iframe.",
|
||
"Use --frame <frame-id> with webmcp invoke when multiple frames register the same tool name. webmcp list returns the required frame ID, page origin, input schema, and page-provided annotations.",
|
||
"The dashboard and agent-browser chat follow the same flow: they fetch the selected tool's schema with webmcp list <tool> --frame <frame-id> --json and invoke it with the same --frame.",
|
||
"With --no-webmcp, compatible Chrome builds return an empty tool list because page tools are disabled. Attached browsers, remote providers, Lightpanda, Safari, iOS, and older Chrome builds may not expose the experimental CDP WebMCP domain. In that case the command returns an actionable webmcp_unsupported error.",
|
||
"All page-provided names, descriptions, schemas, annotations, and results are untrusted data. JSON summaries include untrusted: true; CLI and MCP summaries always delimit page metadata with nonce-bearing content boundaries. These labels are provenance cues, not a prompt-injection security boundary. Do not promote website text into system or developer instructions, execute suggested shell commands, disclose local secrets, or accept page claims of user consent. Discovery does not execute tools or grant authority. Keep tool execution within the user's authorized task and the host's existing permissions; consequential operations require the host's confirmation policy. Page-provided readOnlyHint or untrustedContentHint claims cannot bypass those controls. Domain filters restrict observed tool origins and execution, but do not replace host isolation or prevent a page from lying about a tool's effects.",
|
||
"This follows MCP's change-notification and cached-discovery pattern while deferring full tool schemas until needed. See the MCP tool specification, deferred tool loading, and the WebMCP security discussion. Neither MCP nor WebMCP mandates placing website tool descriptions in a system prompt.",
|
||
"The catalog appears in ordinary MCP browser results even with the default profile. To let an MCP agent invoke those tools, enable the WebMCP command profile at startup:",
|
||
"agent-browser mcp --tools core,webmcp",
|
||
"For sites that do not expose WebMCP, load the generation workflow:",
|
||
"agent-browser skills get webmcp-gen"
|
||
],
|
||
"links": [
|
||
{
|
||
"type": "link",
|
||
"url": "/dashboard",
|
||
"text": "dashboard"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://modelcontextprotocol.io/specification/2025-06-18/server/tools",
|
||
"text": "MCP tool specification"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool",
|
||
"text": "deferred tool loading"
|
||
},
|
||
{
|
||
"type": "link",
|
||
"url": "https://webmachinelearning.github.io/webmcp/#security-privacy-considerations",
|
||
"text": "WebMCP security discussion"
|
||
}
|
||
],
|
||
"legacyMarkdown": "# WebMCP\n\nWebMCP support is experimental. agent-browser enables Chrome's current WebMCP launch features by default for locally managed Chrome sessions. Pass `--no-webmcp` or set `AGENT_BROWSER_NO_WEBMCP=1` to opt out.\n\nBrowser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain only names, brief descriptions, origins, and frame IDs. Choose a relevant tool, then fetch its full schema with `agent-browser webmcp list <tool> --frame <frame-id> --json` before invoking it. Schemas and annotations are never included proactively. Unchanged catalogs and pages without tools add no context. JSON output adds:\n\n```json\n{\n \"data\": {\n \"webmcp\": {\n \"experimental\": true,\n \"untrusted\": true,\n \"status\": \"ready\",\n \"available\": true,\n \"toolCount\": 1,\n \"tools\": [{\n \"name\": \"search\",\n \"description\": \"Search products\",\n \"frameId\": \"frame-id\",\n \"origin\": \"https://example.com\"\n }],\n \"truncated\": false\n }\n }\n}\n```\n\n```bash\nagent-browser open https://example.com # Announces brief tool summary\nagent-browser webmcp list search --json # Fetch only the selected schema\nagent-browser webmcp invoke search --params '{\"query\":\"browser agents\"}'\nagent-browser webmcp invoke slow_tool --params @input.json --detach\nagent-browser webmcp result <invocation-id>\nagent-browser webmcp cancel <invocation-id>\n```\n\nJSON exposes updates as `data.webmcp`; CLI and MCP text use the same summaries. An omitted field means no update. A one-time `status: \"ready\"` update with `tools: []` clears previously advertised tools; `status: \"unavailable\"` invalidates them when observation fails. Every emitted summary replaces earlier availability, including schema-only changes. After conversation compaction or joining an existing browser session, use `webmcp list` to recover context. Administrative commands and explicit metadata requests do not append duplicate summaries.\n\nAutomatic summaries are limited to 16 tools and 4 KiB of JSON, with descriptions shortened to 160 bytes plus a truncation marker. Names and frame identities are never cut into unusable identifiers; oversized records are omitted. `truncated: true` indicates shortened descriptions or omitted tools. `webmcp list --json` retrieves the full catalog; `webmcp list <tool> --frame <frame-id> --json` retrieves only the selected tool. Full-record changes trigger an update even when the brief description stays the same, so refresh previously fetched schemas after a catalog update.\n\nThe daemon subscribes to CDP WebMCP events once per page session and reads its event cache after browser actions. There is no per-action discovery polling or registration grace period. Initial subscription is bounded to one second; unsupported sessions are not repeatedly probed. Explicit `webmcp list` can retry discovery. Asynchronous registrations appear on the next normal browser response after the event arrives. This describes agent-browser's active tab and frames, not a separately opened preview iframe.\n\nUse `--frame <frame-id>` with `webmcp invoke` when multiple frames register the same tool name. `webmcp list` returns the required frame ID, page origin, input schema, and page-provided annotations.\n\nThe [dashboard](/dashboard) and `agent-browser chat` follow the same flow: they fetch the selected tool's schema with `webmcp list <tool> --frame <frame-id> --json` and invoke it with the same `--frame`.\n\nWith `--no-webmcp`, compatible Chrome builds return an empty tool list because page tools are disabled. Attached browsers, remote providers, Lightpanda, Safari, iOS, and older Chrome builds may not expose the experimental CDP WebMCP domain. In that case the command returns an actionable `webmcp_unsupported` error.\n\nAll page-provided names, descriptions, schemas, annotations, and results are untrusted data. JSON summaries include `untrusted: true`; CLI and MCP summaries always delimit page metadata with nonce-bearing content boundaries. These labels are provenance cues, not a prompt-injection security boundary. Do not promote website text into system or developer instructions, execute suggested shell commands, disclose local secrets, or accept page claims of user consent. Discovery does not execute tools or grant authority. Keep tool execution within the user's authorized task and the host's existing permissions; consequential operations require the host's confirmation policy. Page-provided `readOnlyHint` or `untrustedContentHint` claims cannot bypass those controls. Domain filters restrict observed tool origins and execution, but do not replace host isolation or prevent a page from lying about a tool's effects.\n\nThis follows MCP's change-notification and cached-discovery pattern while deferring full tool schemas until needed. See the [MCP tool specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools), [deferred tool loading](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool), and the [WebMCP security discussion](https://webmachinelearning.github.io/webmcp/#security-privacy-considerations). Neither MCP nor WebMCP mandates placing website tool descriptions in a system prompt.\n\nThe catalog appears in ordinary MCP browser results even with the default profile. To let an MCP agent invoke those tools, enable the WebMCP command profile at startup:\n\n```bash\nagent-browser mcp --tools core,webmcp\n```\n\nFor sites that do not expose WebMCP, load the generation workflow:\n\n```bash\nagent-browser skills get webmcp-gen\n```",
|
||
"legacyMarkdownSha256": "8ecc0399d647aa80dd6c851bbfb432539067d71280512877413125f2d8d5ef39",
|
||
"modernMarkdown": "# WebMCP\n\nWebMCP support is experimental. agent-browser enables Chrome's current WebMCP launch features by default for locally managed Chrome sessions. Pass `--no-webmcp` or set `AGENT_BROWSER_NO_WEBMCP=1` to opt out.\n\nBrowser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain only names, brief descriptions, origins, and frame IDs. Choose a relevant tool, then fetch its full schema with `agent-browser webmcp list <tool> --frame <frame-id> --json` before invoking it. Schemas and annotations are never included proactively. Unchanged catalogs and pages without tools add no context. JSON output adds:\n\n```json\n{\n \"data\": {\n \"webmcp\": {\n \"experimental\": true,\n \"untrusted\": true,\n \"status\": \"ready\",\n \"available\": true,\n \"toolCount\": 1,\n \"tools\": [{\n \"name\": \"search\",\n \"description\": \"Search products\",\n \"frameId\": \"frame-id\",\n \"origin\": \"https://example.com\"\n }],\n \"truncated\": false\n }\n }\n}\n```\n\n```bash\nagent-browser open https://example.com # Announces brief tool summary\nagent-browser webmcp list search --json # Fetch only the selected schema\nagent-browser webmcp invoke search --params '{\"query\":\"browser agents\"}'\nagent-browser webmcp invoke slow_tool --params @input.json --detach\nagent-browser webmcp result <invocation-id>\nagent-browser webmcp cancel <invocation-id>\n```\n\nJSON exposes updates as `data.webmcp`; CLI and MCP text use the same summaries. An omitted field means no update. A one-time `status: \"ready\"` update with `tools: []` clears previously advertised tools; `status: \"unavailable\"` invalidates them when observation fails. Every emitted summary replaces earlier availability, including schema-only changes. After conversation compaction or joining an existing browser session, use `webmcp list` to recover context. Administrative commands and explicit metadata requests do not append duplicate summaries.\n\nAutomatic summaries are limited to 16 tools and 4 KiB of JSON, with descriptions shortened to 160 bytes plus a truncation marker. Names and frame identities are never cut into unusable identifiers; oversized records are omitted. `truncated: true` indicates shortened descriptions or omitted tools. `webmcp list --json` retrieves the full catalog; `webmcp list <tool> --frame <frame-id> --json` retrieves only the selected tool. Full-record changes trigger an update even when the brief description stays the same, so refresh previously fetched schemas after a catalog update.\n\nThe daemon subscribes to CDP WebMCP events once per page session and reads its event cache after browser actions. There is no per-action discovery polling or registration grace period. Initial subscription is bounded to one second; unsupported sessions are not repeatedly probed. Explicit `webmcp list` can retry discovery. Asynchronous registrations appear on the next normal browser response after the event arrives. This describes agent-browser's active tab and frames, not a separately opened preview iframe.\n\nUse `--frame <frame-id>` with `webmcp invoke` when multiple frames register the same tool name. `webmcp list` returns the required frame ID, page origin, input schema, and page-provided annotations.\n\nThe [dashboard](/dashboard) and `agent-browser chat` follow the same flow: they fetch the selected tool's schema with `webmcp list <tool> --frame <frame-id> --json` and invoke it with the same `--frame`.\n\nWith `--no-webmcp`, compatible Chrome builds return an empty tool list because page tools are disabled. Attached browsers, remote providers, Lightpanda, Safari, iOS, and older Chrome builds may not expose the experimental CDP WebMCP domain. In that case the command returns an actionable `webmcp_unsupported` error.\n\nAll page-provided names, descriptions, schemas, annotations, and results are untrusted data. JSON summaries include `untrusted: true`; CLI and MCP summaries always delimit page metadata with nonce-bearing content boundaries. These labels are provenance cues, not a prompt-injection security boundary. Do not promote website text into system or developer instructions, execute suggested shell commands, disclose local secrets, or accept page claims of user consent. Discovery does not execute tools or grant authority. Keep tool execution within the user's authorized task and the host's existing permissions; consequential operations require the host's confirmation policy. Page-provided `readOnlyHint` or `untrustedContentHint` claims cannot bypass those controls. Domain filters restrict observed tool origins and execution, but do not replace host isolation or prevent a page from lying about a tool's effects.\n\nThis follows MCP's change-notification and cached-discovery pattern while deferring full tool schemas until needed. See the [MCP tool specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools), [deferred tool loading](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool), and the [WebMCP security discussion](https://webmachinelearning.github.io/webmcp/#security-privacy-considerations). Neither MCP nor WebMCP mandates placing website tool descriptions in a system prompt.\n\nThe catalog appears in ordinary MCP browser results even with the default profile. To let an MCP agent invoke those tools, enable the WebMCP command profile at startup:\n\n```bash\nagent-browser mcp --tools core,webmcp\n```\n\nFor sites that do not expose WebMCP, load the generation workflow:\n\n```bash\nagent-browser skills get webmcp-gen\n```",
|
||
"modernMarkdownSha256": "8ecc0399d647aa80dd6c851bbfb432539067d71280512877413125f2d8d5ef39",
|
||
"navigation": {
|
||
"title": "WebMCP",
|
||
"section": "Reference"
|
||
}
|
||
}
|
||
],
|
||
"legacySearch": [
|
||
{
|
||
"query": null,
|
||
"response": {
|
||
"results": []
|
||
}
|
||
},
|
||
{
|
||
"query": "",
|
||
"response": {
|
||
"results": []
|
||
}
|
||
},
|
||
{
|
||
"query": " ",
|
||
"response": {
|
||
"results": []
|
||
}
|
||
},
|
||
{
|
||
"query": "zzzyyy-nonexistent-123456",
|
||
"response": {
|
||
"results": []
|
||
}
|
||
},
|
||
{
|
||
"query": "installation",
|
||
"response": {
|
||
"results": [
|
||
{
|
||
"title": "Installation",
|
||
"href": "/installation",
|
||
"section": "",
|
||
"snippet": "Installation Global installation (recommended) Installs the native Rust binary for maximum performance: This is the f..."
|
||
},
|
||
{
|
||
"title": "Skills",
|
||
"href": "/skills",
|
||
"section": "",
|
||
"snippet": "...browser tasks without manual guidance. Installation This installs a single discovery skill that teaches your agent about agent-browser and directs it to use t..."
|
||
},
|
||
{
|
||
"title": "Commands",
|
||
"href": "/commands",
|
||
"section": "Reference",
|
||
"snippet": "...rnings are fine), if any fail. See the Installation page for the full check catalog. Chat Use natural language to control the browser via AI. The command tr..."
|
||
},
|
||
{
|
||
"title": "eve Extension",
|
||
"href": "/eve",
|
||
"section": "Features",
|
||
"snippet": "...er them. - , , , and control first-use installation. - and control browser session naming. - points at the executable inside the sandbox. - configures bro..."
|
||
},
|
||
{
|
||
"title": "Lightpanda",
|
||
"href": "/engines/lightpanda",
|
||
"section": "Engines",
|
||
"snippet": "...rk through the same CDP protocol path. Installation Install the Lightpanda binary before using it with agent-browser: PlatformCommand ..."
|
||
},
|
||
{
|
||
"title": "Obscura",
|
||
"href": "/engines/obscura",
|
||
"section": "Engines",
|
||
"snippet": "... so on) run through the same CDP path. Installation Install the Obscura binary before using it with agent-browser: PlatformCommand Li..."
|
||
},
|
||
{
|
||
"title": "Changelog",
|
||
"href": "/changelog",
|
||
"section": "",
|
||
"snippet": "...retry logic for more reliable dashboard installation (#1154) --- v0.24.1 April 4, 2026 New Features - Chrome profile login state reuse - now resolves Chro..."
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"query": "snapshot",
|
||
"response": {
|
||
"results": [
|
||
{
|
||
"title": "Snapshots",
|
||
"href": "/snapshots",
|
||
"section": "Reference",
|
||
"snippet": "Snapshots The command returns a compact accessibility tree with refs for element interaction. Options Filter output ..."
|
||
},
|
||
{
|
||
"title": "Introduction",
|
||
"href": "/",
|
||
"section": "",
|
||
"snippet": "... for AI context efficiency - Ref-based: Snapshot returns accessibility tree with refs for deterministic element selection - Complete: 50+ commands for navigatio..."
|
||
},
|
||
{
|
||
"title": "Quick Start",
|
||
"href": "/quick-start",
|
||
"section": "",
|
||
"snippet": "...n you need to parse output first (e.g., snapshot to discover refs before interacting). JSON output For programmatic parsing in scripts: Note: The default tex..."
|
||
},
|
||
{
|
||
"title": "Skills",
|
||
"href": "/skills",
|
||
"section": "",
|
||
"snippet": "... — Core browser automation: navigation, snapshots, forms, screenshots, data extraction, sessions, authentication, diffing, and the full command reference. Start..."
|
||
},
|
||
{
|
||
"title": "Commands",
|
||
"href": "/commands",
|
||
"section": "Reference",
|
||
"snippet": "...nteract with that element, take a fresh snapshot, then retry the original action. Headless Chromium screenshots hide native scrollbars for consistent image out..."
|
||
},
|
||
{
|
||
"title": "Selectors",
|
||
"href": "/selectors",
|
||
"section": "Reference",
|
||
"snippet": "...de deterministic element selection from snapshots. Best for AI agents. Why refs? - Deterministic - Ref points to exact element from snapshot - Fast - No DOM r..."
|
||
},
|
||
{
|
||
"title": "Sessions",
|
||
"href": "/sessions",
|
||
"section": "Features",
|
||
"snippet": "... profile to a temp directory (read-only snapshot) and launches Chrome with your existing cookies and sessions. DetailDescription Supported bro..."
|
||
},
|
||
{
|
||
"title": "Diffing",
|
||
"href": "/diffing",
|
||
"section": "Features",
|
||
"snippet": "... -- structurally via accessibility tree snapshots, visually via pixel comparison, or across two different URLs. Commands CommandDescription d..."
|
||
},
|
||
{
|
||
"title": "Video Recording",
|
||
"href": "/recording",
|
||
"section": "Features",
|
||
"snippet": "...lay is inert, hidden from accessibility snapshots, and removed when recording stops. Screenshots taken during the recording include it: Contact sheets Add fo..."
|
||
},
|
||
{
|
||
"title": "WebGPU",
|
||
"href": "/webgpu",
|
||
"section": "Features",
|
||
"snippet": "...: Custom pixel readbacks: avoid canvas snapshots. depends on presentation timing and reads transparent black on some platforms even when rendering works. Rend..."
|
||
},
|
||
{
|
||
"title": "Security",
|
||
"href": "/security",
|
||
"section": "Features",
|
||
"snippet": "...d, waitfordownload uploadupload snapshotsnapshot, screenshot, pdf, diff scrollscroll, scrollintoview waitwait, waitforurl, waitforloadstate, wai..."
|
||
},
|
||
{
|
||
"title": "Next.js + Vercel",
|
||
"href": "/next",
|
||
"section": "Features",
|
||
"snippet": "...rowser can launch Chrome. Use a sandbox snapshot (below) to skip this entirely in production. The helper installs those system dependencies by default and hand..."
|
||
},
|
||
{
|
||
"title": "eve Extension",
|
||
"href": "/eve",
|
||
"section": "Features",
|
||
"snippet": "...gent workflow Have the agent navigate, snapshot, then act on snapshot refs. Snapshot refs like become selectors for interaction tools. For reading articles ..."
|
||
},
|
||
{
|
||
"title": "Lightpanda",
|
||
"href": "/engines/lightpanda",
|
||
"section": "Engines",
|
||
"snippet": "...tting it down. All downstream commands (snapshot, click, fill, screenshot, etc.) work through the same CDP protocol path. Installation Install the Lightpanda ..."
|
||
},
|
||
{
|
||
"title": "Obscura",
|
||
"href": "/engines/obscura",
|
||
"section": "Engines",
|
||
"snippet": "...own when done. All downstream commands (snapshot, click, fill, screenshot, and so on) run through the same CDP path. Installation Install the Obscura binary b..."
|
||
},
|
||
{
|
||
"title": "Changelog",
|
||
"href": "/changelog",
|
||
"section": "",
|
||
"snippet": "...o save tokens (#1813) - Added automatic snapshot deltas with , which returns a full baseline followed by an unchanged revision or compact structural changes. Us..."
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"query": " SNAPSHOT ",
|
||
"response": {
|
||
"results": [
|
||
{
|
||
"title": "Snapshots",
|
||
"href": "/snapshots",
|
||
"section": "Reference",
|
||
"snippet": "Snapshots The command returns a compact accessibility tree with refs for element interaction. Options Filter output ..."
|
||
},
|
||
{
|
||
"title": "Introduction",
|
||
"href": "/",
|
||
"section": "",
|
||
"snippet": "... for AI context efficiency - Ref-based: Snapshot returns accessibility tree with refs for deterministic element selection - Complete: 50+ commands for navigatio..."
|
||
},
|
||
{
|
||
"title": "Quick Start",
|
||
"href": "/quick-start",
|
||
"section": "",
|
||
"snippet": "...n you need to parse output first (e.g., snapshot to discover refs before interacting). JSON output For programmatic parsing in scripts: Note: The default tex..."
|
||
},
|
||
{
|
||
"title": "Skills",
|
||
"href": "/skills",
|
||
"section": "",
|
||
"snippet": "... — Core browser automation: navigation, snapshots, forms, screenshots, data extraction, sessions, authentication, diffing, and the full command reference. Start..."
|
||
},
|
||
{
|
||
"title": "Commands",
|
||
"href": "/commands",
|
||
"section": "Reference",
|
||
"snippet": "...nteract with that element, take a fresh snapshot, then retry the original action. Headless Chromium screenshots hide native scrollbars for consistent image out..."
|
||
},
|
||
{
|
||
"title": "Selectors",
|
||
"href": "/selectors",
|
||
"section": "Reference",
|
||
"snippet": "...de deterministic element selection from snapshots. Best for AI agents. Why refs? - Deterministic - Ref points to exact element from snapshot - Fast - No DOM r..."
|
||
},
|
||
{
|
||
"title": "Sessions",
|
||
"href": "/sessions",
|
||
"section": "Features",
|
||
"snippet": "... profile to a temp directory (read-only snapshot) and launches Chrome with your existing cookies and sessions. DetailDescription Supported bro..."
|
||
},
|
||
{
|
||
"title": "Diffing",
|
||
"href": "/diffing",
|
||
"section": "Features",
|
||
"snippet": "... -- structurally via accessibility tree snapshots, visually via pixel comparison, or across two different URLs. Commands CommandDescription d..."
|
||
},
|
||
{
|
||
"title": "Video Recording",
|
||
"href": "/recording",
|
||
"section": "Features",
|
||
"snippet": "...lay is inert, hidden from accessibility snapshots, and removed when recording stops. Screenshots taken during the recording include it: Contact sheets Add fo..."
|
||
},
|
||
{
|
||
"title": "WebGPU",
|
||
"href": "/webgpu",
|
||
"section": "Features",
|
||
"snippet": "...: Custom pixel readbacks: avoid canvas snapshots. depends on presentation timing and reads transparent black on some platforms even when rendering works. Rend..."
|
||
},
|
||
{
|
||
"title": "Security",
|
||
"href": "/security",
|
||
"section": "Features",
|
||
"snippet": "...d, waitfordownload uploadupload snapshotsnapshot, screenshot, pdf, diff scrollscroll, scrollintoview waitwait, waitforurl, waitforloadstate, wai..."
|
||
},
|
||
{
|
||
"title": "Next.js + Vercel",
|
||
"href": "/next",
|
||
"section": "Features",
|
||
"snippet": "...rowser can launch Chrome. Use a sandbox snapshot (below) to skip this entirely in production. The helper installs those system dependencies by default and hand..."
|
||
},
|
||
{
|
||
"title": "eve Extension",
|
||
"href": "/eve",
|
||
"section": "Features",
|
||
"snippet": "...gent workflow Have the agent navigate, snapshot, then act on snapshot refs. Snapshot refs like become selectors for interaction tools. For reading articles ..."
|
||
},
|
||
{
|
||
"title": "Lightpanda",
|
||
"href": "/engines/lightpanda",
|
||
"section": "Engines",
|
||
"snippet": "...tting it down. All downstream commands (snapshot, click, fill, screenshot, etc.) work through the same CDP protocol path. Installation Install the Lightpanda ..."
|
||
},
|
||
{
|
||
"title": "Obscura",
|
||
"href": "/engines/obscura",
|
||
"section": "Engines",
|
||
"snippet": "...own when done. All downstream commands (snapshot, click, fill, screenshot, and so on) run through the same CDP path. Installation Install the Obscura binary b..."
|
||
},
|
||
{
|
||
"title": "Changelog",
|
||
"href": "/changelog",
|
||
"section": "",
|
||
"snippet": "...o save tokens (#1813) - Added automatic snapshot deltas with , which returns a full baseline followed by an unchanged revision or compact structural changes. Us..."
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"query": "browser automation",
|
||
"response": {
|
||
"results": [
|
||
{
|
||
"title": "Introduction",
|
||
"href": "/",
|
||
"section": "",
|
||
"snippet": "agent-browser Browser automation CLI designed for AI agents. Compact text output minimizes context usage. 100% native Rust. ..."
|
||
},
|
||
{
|
||
"title": "Installation",
|
||
"href": "/installation",
|
||
"section": "",
|
||
"snippet": "...hain (rustup.rs). From source Windows browser sessions Headless Chrome runs on a private Windows desktop. This prevents hidden browser windows from leaving v..."
|
||
},
|
||
{
|
||
"title": "Quick Start",
|
||
"href": "/quick-start",
|
||
"section": "",
|
||
"snippet": "Quick Start Core workflow Every browser automation follows this pattern: Common commands Traditional selectors CSS selectors and semantic locators al..."
|
||
},
|
||
{
|
||
"title": "Skills",
|
||
"href": "/skills",
|
||
"section": "",
|
||
"snippet": "Skills agent-browser ships with skills that teach AI coding agents how to use it for specific workflows. Install a skill and your age..."
|
||
},
|
||
{
|
||
"title": "Commands",
|
||
"href": "/commands",
|
||
"section": "Reference",
|
||
"snippet": "Commands Core Browser responses automatically announce WebMCP tools on first discovery and when the catalog changes. Summaries contain..."
|
||
},
|
||
{
|
||
"title": "Plugins",
|
||
"href": "/plugins",
|
||
"section": "Reference",
|
||
"snippet": "Plugins Plugins let agent-browser integrate with external tools without adding those tools to core. A plugin is a local executable that reads one ..."
|
||
},
|
||
{
|
||
"title": "Network",
|
||
"href": "/network",
|
||
"section": "Features",
|
||
"snippet": "...ct traffic, and export HAR files during browser automation. Request routing Routes apply before matching requests are sent. Set them before navigation when yo..."
|
||
},
|
||
{
|
||
"title": "Video Recording",
|
||
"href": "/recording",
|
||
"section": "Features",
|
||
"snippet": "Video Recording Use to capture browser automation as a WebM or MP4 video for debugging, CI evidence, product walkthroughs, or repro reports. Requireme..."
|
||
},
|
||
{
|
||
"title": "Debugging",
|
||
"href": "/debugging",
|
||
"section": "Features",
|
||
"snippet": "...ging Use debugging commands to inspect browser logs, page errors, JavaScript dialogs, Chrome DevTools traces, highlighted elements, and the live DevTools front..."
|
||
},
|
||
{
|
||
"title": "Profiler",
|
||
"href": "/profiler",
|
||
"section": "Features",
|
||
"snippet": "...me DevTools performance profiles during browser automation. Use profiles to diagnose slow page loads, expensive JavaScript, layout thrashing, and other performa..."
|
||
},
|
||
{
|
||
"title": "iOS Simulator",
|
||
"href": "/ios",
|
||
"section": "Features",
|
||
"snippet": "...g. Uses Appium with XCUITest for native automation. Requirements - macOS with Xcode installed - iOS Simulator runtimes (download via Xcode) - Appium with XCUI..."
|
||
},
|
||
{
|
||
"title": "Security",
|
||
"href": "/security",
|
||
"section": "Features",
|
||
"snippet": "Security agent-browser includes security features to protect against credential exposure, prompt injection via untrusted page content, ..."
|
||
},
|
||
{
|
||
"title": "Browser Use",
|
||
"href": "/providers/browser-use",
|
||
"section": "Providers",
|
||
"snippet": "Browser Use Browser Use is an open-source browser automation project for AI agents with over 100,000 GitHub stars, plus..."
|
||
},
|
||
{
|
||
"title": "Lightpanda",
|
||
"href": "/engines/lightpanda",
|
||
"section": "Engines",
|
||
"snippet": "Lightpanda Lightpanda is a headless browser engine built from scratch in Zig for machines. It starts instantly, uses 10x less memory than Chrome, and execut..."
|
||
},
|
||
{
|
||
"title": "Obscura",
|
||
"href": "/engines/obscura",
|
||
"section": "Engines",
|
||
"snippet": "...hoosing Obscura. Obscura is a headless browser engine written in Rust. It runs real JavaScript through V8, speaks the Chrome DevTools Protocol, and targets web..."
|
||
},
|
||
{
|
||
"title": "Changelog",
|
||
"href": "/changelog",
|
||
"section": "",
|
||
"snippet": "...t mode to allow , , and other top-level browser commands, so the model uses page WebMCP tools instead of falling back to (#2015) - Fixed Kernel profiles so se..."
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"query": "restoreCheckFn",
|
||
"response": {
|
||
"results": [
|
||
{
|
||
"title": "Configuration",
|
||
"href": "/configuration",
|
||
"section": "Reference",
|
||
"snippet": "...CheckText--restore-check-textstring restoreCheckFn--restore-check-fnstring namespace--namespacestring sessionName--session-namestring, legacy restor..."
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"query": "WebRTC",
|
||
"response": {
|
||
"results": [
|
||
{
|
||
"title": "Commands",
|
||
"href": "/commands",
|
||
"section": "Reference",
|
||
"snippet": "... array maps to and activates the same WebRTC containment and launch-mode restrictions. The common string maps to , accepts values such as , , , or raw millis..."
|
||
},
|
||
{
|
||
"title": "Configuration",
|
||
"href": "/configuration",
|
||
"section": "Reference",
|
||
"snippet": "...-allowed-domainsstring[]; also disables WebRTC in supported Chromium sessions and requires a fresh controllable browser context without profile/session startup ..."
|
||
},
|
||
{
|
||
"title": "Security",
|
||
"href": "/security",
|
||
"section": "Features",
|
||
"snippet": "...upported Chromium sessions, it disables WebRTC peer connections so STUN, TURN, and related DNS traffic cannot bypass HTTP interception. - Unauthorized destructi..."
|
||
},
|
||
{
|
||
"title": "Changelog",
|
||
"href": "/changelog",
|
||
"section": "",
|
||
"snippet": "... Hardened domain allowlists by blocking WebRTC bypasses, applying network containment across launch modes, workers, popups, restored state, and reused daemon se..."
|
||
}
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"query": "ffmpeg",
|
||
"response": {
|
||
"results": [
|
||
{
|
||
"title": "Video Recording",
|
||
"href": "/recording",
|
||
"section": "Features",
|
||
"snippet": "...x264). Any other extension is handed to ffmpeg as-is with H.264 video, so or work if ffmpeg knows the container. A path with no extension is rejected before r..."
|
||
},
|
||
{
|
||
"title": "Changelog",
|
||
"href": "/changelog",
|
||
"section": "",
|
||
"snippet": "...output are documented, and reports the ffmpeg recording dependencies (#1763, #1776, #1778) - Added WebMCP availability output so navigation responses advertise..."
|
||
}
|
||
]
|
||
}
|
||
}
|
||
],
|
||
"resources": [
|
||
{
|
||
"source": "docs/public/Geist-Regular.ttf",
|
||
"path": "/Geist-Regular.ttf",
|
||
"sha256": "5e7c3b25da393b1619253c655f95c5d123184759a4961562add5b0f5386e63c9",
|
||
"size": 71112
|
||
},
|
||
{
|
||
"source": "docs/public/GeistPixel-Square.ttf",
|
||
"path": "/GeistPixel-Square.ttf",
|
||
"sha256": "a077fa6e645fae15e59df7662e486d8dad785a0eff9aa34c9a685411c6125d17",
|
||
"size": 94800
|
||
},
|
||
{
|
||
"source": "docs/public/recording/contact-sheet-example.png",
|
||
"path": "/recording/contact-sheet-example.png",
|
||
"sha256": "19ede794a3b04fc9a5616b21cde4d846caf19026c1ffa270d73f9b0e629f7699",
|
||
"size": 134285
|
||
},
|
||
{
|
||
"source": "docs/public/schema.json",
|
||
"path": "/schema.json",
|
||
"sha256": "78be6579fce544edc534074780308605de1042499a42c102d018fdb91eec23d6",
|
||
"size": 9100
|
||
},
|
||
{
|
||
"source": "docs/src/app/favicon.ico",
|
||
"path": "/favicon.ico",
|
||
"sha256": "2b8ad2d33455a8f736fc3a8ebf8f0bdea8848ad4c0db48a2833bd0f9cd775932",
|
||
"size": 25931
|
||
}
|
||
]
|
||
}
|