Anchor SDK in E2B’s base image → Anchor Cloud. The sandbox stays vanilla and lightweight. Chromium runs as a managed Anchor cloud session; the sandbox just holds the SDK and talks to it over HTTPS + CDP.
E2B stays the code runtime — install packages, run a script, call a model.
Anchor stays the remote browser — stealth, proxies, live view, and session lifecycle.
Do not launch a browser inside the sandbox. Skip E2B Computer use (desktop / VNC) and in-sandbox Chromium — live view for this integration is Anchor’s remote session.
JavaScript timeoutMs is milliseconds. Python timeout is seconds. That value is the E2B sandbox lifetime (Hobby max 1 hour, Pro max 24 hours) — it is separate from Anchor’s session timeout.max_duration / timeout.idle_timeout.Run the snippets below inside the sandbox. From the host you can write them in with files.write and commands.run.
Install into the image app directory — not globally. npm install -g is not importable from user projects.
pip install "anchorbrowser>=1.0" playwright
npm install anchorbrowser playwright-core
playwright / playwright-core are only needed for direct CDP control, not for agent.task / agentTask.Alias the env var the raw SDK actually reads, so code that does not call setConfig / api_key= still works:
ANCHORBROWSER_API_KEY=${ANCHOR_API_KEY}
Put that on Sandbox.createenvs (as above) or in the sandbox entrypoint. Without this alias, session and task calls fail auth (401) even when ANCHOR_API_KEY is set.There is no public Anchor E2B template. Bake anchorbrowser (and Playwright only if you need CDP) into your own tag so every sandbox starts ready:
Build that template with the E2B SDK or CLI, then create from the tag (Sandbox.create('your-tag', { envs, timeoutMs })). Runtime pip install / npm install works if you skip a template, but it adds 30–60s to every sandbox.
Each E2B customer brings their own Anchor API key as a sandbox env: ANCHOR_API_KEY=sk-....Anchor bills the customer directly on usage — E2B does not meter or bill browser usage.
Wrap the SDK so agents call it declaratively. agent.task (Python) / agentTask (Node) return an object; the result string is result.data.result.
import { client, agentTask } from 'anchorbrowser';client.setConfig({ auth: () => process.env.ANCHORBROWSER_API_KEY });const result = await agentTask( 'Go to example.com and return the page title');console.log(result.data.result);
import osfrom anchorbrowser import Anchorbrowseranchor_client = Anchorbrowser(api_key=os.getenv('ANCHORBROWSER_API_KEY'))result = anchor_client.agent.task( 'Go to example.com and return the page title')print(result.data.result)
Connect over CDP to the created cloud session (session.data.cdp_url).
That URL carries the API key in the query string — never log it. Surface session.data.live_view_url to humans instead (https://live.anchorbrowser.io/inspector.html?sessionId=...). Closing Playwright only disconnects — it does not end the cloud session.
If the remote browser needs to visit an app running inside the sandbox, expose the port with getHost / get_host and open that public HTTPS URL. The cloud browser cannot reach localhost inside the VM.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Anchor Browser Docs","colors":{"primary":"#faa380","light":"#fa804f","dark":"#faa380"},"logo":{"light":"https://mintcdn.com/anchor-b3ec2715/Xup_fnaWbXA-R8ya/logo/light.png?fit=max\u0026auto=format\u0026n=Xup_fnaWbXA-R8ya\u0026q=85\u0026s=1e1fc775b816ab5b0086f9f878429aed","dark":"https://mintcdn.com/anchor-b3ec2715/Xup_fnaWbXA-R8ya/logo/dark.png?fit=max\u0026auto=format\u0026n=Xup_fnaWbXA-R8ya\u0026q=85\u0026s=7c3d4ce1298c88a1ee63147d24d74014"},"favicon":"https://mintcdn.com/anchor-b3ec2715/dP4F5grGDxTGWu69/favicon.svg?fit=max\u0026auto=format\u0026n=dP4F5grGDxTGWu69\u0026q=85\u0026s=ba5c0508b037e4a373f08a0a3351687f","api":{"examples":{"defaults":"required","prefill":false}},"navbar":{"links":[{"href":"mailto:support@anchorbrowser.io","label":"Support"}],"primary":{"type":"button","label":"Live Playground","href":"https://app.anchorbrowser.io/playground"}},"footer":{"socials":{"x":"https://x.com/anchorbrowser"}},"integrations":{"ga4":{"measurementId":"G-WX16BX5PE1"},"posthog":{"apiKey":"phc_Glt3S5wLjDhBxQXiauvIHMh4h9P2BAWIsEqyQPwkwC5"}},"markdown":{"instructions":"Anchor Browser is cloud browser infrastructure for AI agents and automation: browser sessions you control over CDP or REST, natural-language web tasks, versioned automation tasks, managed authentication into third-party web apps (identities with MFA), persistent volumes and profiles, recordings, live view, batch sessions, webhooks, and network options including residential proxies, extra stealth, and captcha solving for sites that block standard browsers. AI agents should start at https://docs.anchorbrowser.io/for-agents, then create an API key at https://app.anchorbrowser.io/api-keys. Read the for-agents page before authentication or API calls."},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Interactive Playground","icon":"window-restore","href":"https://app.anchorbrowser.io/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"anchor-b3ec2715","hasAudioNarration":false,"actualSubdomain":"anchor-b3ec2715","customDomains":["docs.anchorbrowser.io"],"gitSource":{"type":"github","owner":"anchorforge","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"issues":false,"thumbs":true,"edits":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af1ae872126ef8f81304229","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Documentation","count":140},{"language":"default","tag":"API Reference","count":136},{"language":"default","tag":"Integrations","count":71},{"language":"default","tag":"Platform","count":60},{"language":"default","tag":"Open Source","count":51},{"language":"default","tag":"Playwright","count":50},{"language":"default","tag":"Business Applications","count":23},{"language":"default","tag":"Tasks","count":22},{"language":"default","tag":"Government","count":21},{"language":"default","tag":"USA","count":21}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"introduction.css","content":"html[data-current-path=\"/introduction\"] #page-title{display:none}html[data-current-path=\"/introduction\"] header#header{display:none}.intro-hero{position:relative;overflow:hidden;border-radius:1.25rem;border:1px solid rgba(250, 128, 79, 0.18);background:linear-gradient(155deg, #0c0c0c 0%, #12100e 45%, #1a1410 100%);padding:2.5rem 2rem;margin:0 0 2.5rem}.intro-hero-glow{position:absolute;top:-40%;right:-10%;width:55%;height:120%;background:radial-gradient(ellipse at center, rgba(250, 128, 79, 0.14) 0%, transparent 70%);pointer-events:none}.intro-hero-grid{position:absolute;inset:0;background-image:linear-gradient(rgba(250, 128, 79, 0.06) 1px, transparent 1px),\n linear-gradient(90deg, rgba(250, 128, 79, 0.06) 1px, transparent 1px);background-size:44px 44px;mask-image:radial-gradient(ellipse 90% 80% at 30% 40%, black 10%, transparent 75%);pointer-events:none}.intro-hero-inner{position:relative;z-index:1;display:grid;grid-template-columns:1fr;gap:2rem;align-items:center}@media (min-width: 900px){.intro-hero-inner{grid-template-columns:1fr 1.05fr;gap:2.5rem;align-items:stretch}}.intro-hero-inner>div{min-width:0}.intro-badge{display:inline-flex;align-items:center;gap:0.5rem;padding:0.35rem 0.85rem;border-radius:9999px;border:1px solid rgba(250, 128, 79, 0.25);background:rgba(250, 128, 79, 0.08);color:#faa380;font-size:0.75rem;font-weight:500;letter-spacing:0.01em;margin-bottom:1.25rem}.intro-badge-dot{width:6px;height:6px;border-radius:50%;background:#fa804f;box-shadow:0 0 8px rgba(250, 128, 79, 0.8)}.intro-title{font-size:2rem;line-height:1.15;font-weight:700;letter-spacing:-0.03em;color:#fafafa;margin:0}@media (min-width: 640px){.intro-title{font-size:2.5rem}}.intro-gradient-text{background:linear-gradient(135deg, #fdd5c0 0%, #fa804f 45%, #ff6b35 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.intro-subtitle{margin:1rem 0 0;font-size:1rem;line-height:1.65;color:rgba(255, 255, 255, 0.55);max-width:32rem}.intro-cta-row{display:flex;flex-wrap:wrap;gap:0.75rem;margin-top:1.75rem}.intro-cta-primary,.intro-cta-secondary,.intro-action{cursor:pointer;font-family:inherit;text-align:left}button.intro-cta-secondary,button.intro-action{appearance:none;-webkit-appearance:none}button.intro-cta-secondary:disabled,button.intro-action:disabled{opacity:0.85;cursor:default}button.intro-action{width:100%}.intro-cta-primary{display:inline-flex;align-items:center;gap:0.5rem;padding:0.7rem 1.35rem;border-radius:0.625rem;background:linear-gradient(135deg, #fa804f 0%, #e85d2a 100%);color:#fff!important;font-weight:600;font-size:0.875rem;text-decoration:none!important;transition:transform 0.15s ease, box-shadow 0.15s ease;box-shadow:0 4px 24px rgba(250, 128, 79, 0.4)}.intro-cta-primary:hover{transform:translateY(-2px);box-shadow:0 8px 32px rgba(250, 128, 79, 0.5)}.intro-cta-secondary{display:inline-flex;align-items:center;gap:0.5rem;padding:0.7rem 1.35rem;border-radius:0.625rem;border:1px solid rgba(255, 255, 255, 0.12);background:rgba(255, 255, 255, 0.04);color:rgba(255, 255, 255, 0.85)!important;font-weight:500;font-size:0.875rem;text-decoration:none!important;transition:background 0.15s ease, border-color 0.15s ease}.intro-cta-secondary:hover{background:rgba(255, 255, 255, 0.08);border-color:rgba(250, 128, 79, 0.35)}.intro-code{min-width:0;width:100%}.intro-code code-group{display:block;width:100%}.intro-section-label{display:inline-flex;align-items:center;gap:0.5rem;font-size:0.7rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:#fa804f;margin-bottom:0.75rem}.intro-section-label::before{content:'';display:block;width:1.5rem;height:2px;background:linear-gradient(90deg, #fa804f, transparent)}.intro-actions{display:grid;grid-template-columns:repeat(2, 1fr);gap:0.75rem;margin-bottom:3rem}@media (min-width: 640px){.intro-actions{grid-template-columns:repeat(3, 1fr)}}@media (min-width: 900px){.intro-actions{grid-template-columns:repeat(4, 1fr)}}.intro-action{display:flex;flex-direction:column;gap:0.35rem;padding:1rem;border-radius:0.875rem;border:1px solid rgba(250, 128, 79, 0.12);background:rgba(250, 128, 79, 0.03);text-decoration:none!important;transition:transform 0.15s ease, border-color 0.15s ease, background 0.15s ease}.intro-action:hover{transform:translateY(-2px);border-color:rgba(250, 128, 79, 0.35);background:rgba(250, 128, 79, 0.07)}.intro-action-title{font-size:0.8rem;font-weight:600;color:inherit}.intro-action-desc{font-size:0.7rem;opacity:0.55;line-height:1.4}html:not(.dark) .intro-hero{background:linear-gradient(155deg, #fafafa 0%, #fff9f6 50%, #fff3ec 100%);border-color:rgba(250, 128, 79, 0.2)}html:not(.dark) .intro-hero-glow{background:radial-gradient(ellipse at center, rgba(250, 128, 79, 0.1) 0%, transparent 70%)}html:not(.dark) .intro-title{color:#0a0a0a}html:not(.dark) .intro-subtitle{color:rgba(0, 0, 0, 0.55)}html:not(.dark) .intro-cta-secondary{border-color:rgba(0, 0, 0, 0.1);background:rgba(0, 0, 0, 0.03);color:rgba(0, 0, 0, 0.75)!important}html:not(.dark) .intro-cta-secondary:hover{background:rgba(250, 128, 79, 0.08);border-color:rgba(250, 128, 79, 0.3)}"}],"page":{"pagePath":"integrations/sandboxes/e2b","slug":"/integrations/sandboxes/e2b","pageMetadata":{"title":"E2B","description":"Run agent code in an E2B sandbox and connect it to an Anchor cloud browser.","icon":"box","href":"/integrations/sandboxes/e2b"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Run agent code in an E2B sandbox and connect it to an Anchor cloud browser.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://e2b.dev`,children:`E2B`}),` sandboxes are isolated cloud VMs for running agent or automation code.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-you’re-integrating`,children:`What you’re integrating`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Anchor SDK in E2B’s base image → Anchor Cloud.`}),` The sandbox stays vanilla and lightweight. Chromium runs as a managed Anchor cloud session; the sandbox just holds the SDK and talks to it over HTTPS + CDP.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`E2B stays the code runtime — install packages, run a script, call a model.`}),`\n`,_jsx(_components.li,{children:`Anchor stays the remote browser — stealth, proxies, live view, and session lifecycle.`}),`\n`,_jsxs(_components.li,{children:[`Do not launch a browser inside the sandbox. Skip E2B `,_jsx(_components.a,{href:`https://docs.e2b.dev/use-cases/computer-use`,children:`Computer use`}),` (desktop / VNC) and in-sandbox Chromium — live view for this integration is Anchor’s remote session.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-the-sandbox`,children:`Create the sandbox`}),`\n`,_jsxs(_components.p,{children:[`Pass keys at create time on `,_jsx(_components.code,{children:`Sandbox.create`}),`. Template `,_jsx(_components.code,{children:`setEnvs`}),` / `,_jsx(_components.code,{children:`set_envs`}),` is build-time only — secrets and the SDK alias belong on create.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`9`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sandbox`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'e2b'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sandbox`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Sandbox`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` envs:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ANCHOR_API_KEY:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`ANCHOR_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ANCHORBROWSER_API_KEY:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`ANCHOR_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` timeoutMs:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 300_000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e2b `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sandbox`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sandbox `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sandbox.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` envs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ANCHOR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ANCHOR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ANCHORBROWSER_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ANCHOR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`300`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`JavaScript `,_jsx(_components.code,{children:`timeoutMs`}),` is milliseconds. Python `,_jsx(_components.code,{children:`timeout`}),` is seconds. That value is the `,_jsx(_components.strong,{children:`E2B sandbox`}),` lifetime (Hobby max 1 hour, Pro max 24 hours) — it is separate from Anchor’s session `,_jsx(_components.code,{children:`timeout.max_duration`}),` / `,_jsx(_components.code,{children:`timeout.idle_timeout`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Run the snippets below inside the sandbox. From the host you can write them in with `,_jsx(_components.code,{children:`files.write`}),` and `,_jsx(_components.code,{children:`commands.run`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`preinstall-the-sdk`,children:`Preinstall the SDK`}),`\n`,_jsxs(_components.p,{children:[`Install into the image app directory — not globally. `,_jsx(_components.code,{children:`npm install -g`}),` is not importable from user projects.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"anchorbrowser>=1.0\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` playwright`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` anchorbrowser`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` playwright-core`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`playwright`}),` / `,_jsx(_components.code,{children:`playwright-core`}),` are only needed for direct CDP control, not for `,_jsx(_components.code,{children:`agent.task`}),` / `,_jsx(_components.code,{children:`agentTask`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Alias the env var the raw SDK actually reads, so code that does not call `,_jsx(_components.code,{children:`setConfig`}),` / `,_jsx(_components.code,{children:`api_key=`}),` still works:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ANCHORBROWSER_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ANCHOR_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Put that on `,_jsx(_components.code,{children:`Sandbox.create`}),` `,_jsx(_components.code,{children:`envs`}),` (as above) or in the sandbox entrypoint. Without this alias, session and task calls fail auth (401) even when `,_jsx(_components.code,{children:`ANCHOR_API_KEY`}),` is set.`]}),`\n`,_jsxs(_components.p,{children:[`There is no public Anchor E2B template. Bake `,_jsx(_components.code,{children:`anchorbrowser`}),` (and Playwright only if you need CDP) into your own tag so every sandbox starts ready:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Template`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'e2b'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` template`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Template`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fromBaseImage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pipInstall`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'anchorbrowser>=1.0'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'playwright'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`npmInstall`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'anchorbrowser'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'playwright-core'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e2b `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Template`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`template `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Template()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .from_base_image()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .pip_install([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'anchorbrowser>=1.0'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'playwright'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .npm_install([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'anchorbrowser'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'playwright-core'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`Build that template with the E2B SDK or CLI, then create from the tag (`,_jsx(_components.code,{children:`Sandbox.create('your-tag', { envs, timeoutMs })`}),`). Runtime `,_jsx(_components.code,{children:`pip install`}),` / `,_jsx(_components.code,{children:`npm install`}),` works if you skip a template, but it adds 30–60s to every sandbox.`]}),`\n`,_jsx(Heading,{level:`2`,id:`api-key-byok`,children:`API key (BYOK)`}),`\n`,_jsxs(_components.p,{children:[`Each E2B customer brings their own Anchor API key as a sandbox env: `,_jsx(_components.code,{children:`ANCHOR_API_KEY=sk-...`}),`.`]}),`\n`,_jsx(_components.p,{children:`Anchor bills the customer directly on usage — E2B does not meter or bill browser usage.`}),`\n`,_jsx(Heading,{level:`2`,id:`expose-a-browser-tool`,children:`Expose a browser tool`}),`\n`,_jsxs(_components.p,{children:[`Wrap the SDK so agents call it declaratively. `,_jsx(_components.code,{children:`agent.task`}),` (Python) / `,_jsx(_components.code,{children:`agentTask`}),` (Node) return an object; the result string is `,_jsx(_components.code,{children:`result.data.result`}),`.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`9`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`agentTask`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'anchorbrowser'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`ANCHORBROWSER_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` agentTask`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Go to example.com and return the page title'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` anchorbrowser `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Anchorbrowser`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`anchor_client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Anchorbrowser(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ANCHORBROWSER_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` anchor_client.agent.task(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Go to example.com and return the page title'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result.data.result)`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`optional-full-playwright-control`,children:`Optional: full Playwright control`}),`\n`,_jsxs(_components.p,{children:[`Connect over CDP to the created cloud session (`,_jsx(_components.code,{children:`session.data.cdp_url`}),`).`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`That URL carries the API key in the query string — `,_jsx(_components.strong,{children:`never log it`}),`. Surface `,_jsx(_components.code,{children:`session.data.live_view_url`}),` to humans instead (`,_jsx(_components.code,{children:`https://live.anchorbrowser.io/inspector.html?sessionId=...`}),`). Closing Playwright only disconnects — it does not end the cloud session.`]})}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Playwright`,numberOfLines:`20`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chromium`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'playwright-core'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sessions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'anchorbrowser'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`ANCHORBROWSER_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` session`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Sessions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` timeout:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`max_duration:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`idle_timeout:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` browser`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chromium`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`connectOverCDP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cdp_url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` page`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` browser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`contexts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pages`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`??`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` browser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newPage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`goto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://example.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Title:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` browser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`close`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Sessions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`deleteSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session_id:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } });`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Playwright`,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` anchorbrowser `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Anchorbrowser`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` playwright.sync_api `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sync_playwright`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`anchor_client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Anchorbrowser(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ANCHORBROWSER_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`session `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` anchor_client.sessions.create_session(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'timeout'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'max_duration'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'idle_timeout'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sync_playwright() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` browser `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p.chromium.connect_over_cdp(session.data.cdp_url)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` page `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` browser.contexts[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].pages[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` browser.contexts[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].pages `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` browser.new_page()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` page.goto(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://example.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Title:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, page.title())`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` browser.close()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`anchor_client.sessions.delete_session(session.data.id)`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`If the remote browser needs to visit an app running `,_jsx(_components.strong,{children:`inside`}),` the sandbox, expose the port with `,_jsx(_components.code,{children:`getHost`}),` / `,_jsx(_components.code,{children:`get_host`}),` and open that public HTTPS URL. The cloud browser cannot reach `,_jsx(_components.code,{children:`localhost`}),` inside the VM.`]}),`\n`,_jsx(Heading,{level:`2`,id:`session-hygiene`,children:`Session hygiene`}),`\n`,_jsx(_components.p,{children:`You have two lifecycles to close:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Reuse `,_jsx(_components.strong,{children:`one`}),` Anchor session per agent run — do not create a session per page.`]}),`\n`,_jsxs(_components.li,{children:[`Set Anchor `,_jsx(_components.code,{children:`timeout.max_duration`}),` / `,_jsx(_components.code,{children:`timeout.idle_timeout`}),` (minutes) so an abandoned sandbox does not hold a browser open. See `,_jsx(_components.a,{href:`/advanced/session-timeout`,children:`Session Timeout`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Delete the Anchor session on teardown (`,_jsx(_components.code,{children:`delete_session`}),` / `,_jsx(_components.code,{children:`deleteSession`}),`). `,_jsx(_components.code,{children:`sandbox.kill()`}),` stops the VM only — it does not end the cloud browser.`]}),`\n`,_jsxs(_components.li,{children:[`Set the E2B sandbox timeout (`,_jsx(_components.code,{children:`timeoutMs`}),` / `,_jsx(_components.code,{children:`timeout`}),`) and call `,_jsx(_components.code,{children:`sandbox.kill()`}),` when the run finishes.`]}),`\n`,_jsxs(_components.li,{children:[`Show `,_jsx(_components.code,{children:`live_view_url`}),` in the sandbox UI so users can watch the browser run. That stream is the remote Anchor session, not E2B’s desktop / VNC view.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`egress`,children:`Egress`}),`\n`,_jsx(_components.p,{children:`If E2B sandboxes restrict egress, allowlist:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`https://api.anchorbrowser.io`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`wss://connect.anchorbrowser.io`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`https://live.anchorbrowser.io`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/integrations/sandboxes`,children:`Sandboxes overview`}),` and `,_jsx(_components.a,{href:`/quickstart/create-session`,children:`Create a Session`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"E2B","description":"Run agent code in an E2B sandbox and connect it to an Anchor cloud browser.","icon":"box","href":"/integrations/sandboxes/e2b"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What you’re integrating","slug":"what-you’re-integrating","depth":2,"children":[]},{"title":"Create the sandbox","slug":"create-the-sandbox","depth":2,"children":[]},{"title":"Preinstall the SDK","slug":"preinstall-the-sdk","depth":2,"children":[]},{"title":"API key (BYOK)","slug":"api-key-byok","depth":2,"children":[]},{"title":"Expose a browser tool","slug":"expose-a-browser-tool","depth":2,"children":[{"title":"Optional: full Playwright control","slug":"optional-full-playwright-control","depth":3,"children":[]}]},{"title":"Session hygiene","slug":"session-hygiene","depth":2,"children":[]},{"title":"Egress","slug":"egress","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/anchor-b3ec2715/32495830127763c8/introduction.js","/_mintlify/custom/anchor-b3ec2715/55bf429a6c2d5cfa/openai-ads.js"],"subdomain":"anchor-b3ec2715","siteName":"Anchor Browser Docs","title":"E2B - Anchor Browser Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-31T18:19:24.180Z","originalFileLocation":"integrations/sandboxes/e2b.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run agent code in an E2B sandbox and connect it to an Anchor cloud browser.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Anchor Browser Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"E2B - Anchor Browser Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run agent code in an E2B sandbox and connect it to an Anchor cloud browser.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Anchor Browser Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://anchor-b3ec2715.mintlify.site/_mintlify/api/og/v2?division=Sandboxes\u0026amp;title=E2B\u0026amp;description=Run+agent+code+in+an+E2B+sandbox+and+connect+it+to+an+Anchor+cloud+browser.\u0026amp;theme=3864d05d65ab473bac59f6de\u0026amp;signature=bac421c4ffd66579b473c15905683a6307dbfdd9189a132b2850929a131e0db8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"E2B - Anchor Browser Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run agent code in an E2B sandbox and connect it to an Anchor cloud browser.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://anchor-b3ec2715.mintlify.site/_mintlify/api/og/v2?division=Sandboxes\u0026amp;title=E2B\u0026amp;description=Run+agent+code+in+an+E2B+sandbox+and+connect+it+to+an+Anchor+cloud+browser.\u0026amp;theme=3864d05d65ab473bac59f6de\u0026amp;signature=bac421c4ffd66579b473c15905683a6307dbfdd9189a132b2850929a131e0db8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/anchor-b3ec2715/hRthG8oihHb8fm3o/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Anchor Browser Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#faa380\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrations/sandboxes/e2b.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.anchorbrowser.io/#organization\",\"name\":\"Anchor Browser Docs\",\"url\":\"https://docs.anchorbrowser.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/anchor-b3ec2715/Xup_fnaWbXA-R8ya/logo/light.png?fit=max\u0026auto=format\u0026n=Xup_fnaWbXA-R8ya\u0026q=85\u0026s=1e1fc775b816ab5b0086f9f878429aed\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.anchorbrowser.io#website\",\"name\":\"Anchor Browser Docs\",\"url\":\"https://docs.anchorbrowser.io\",\"publisher\":{\"@id\":\"https://docs.anchorbrowser.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b#webpage\",\"url\":\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b\",\"name\":\"E2B\",\"description\":\"Run agent code in an E2B sandbox and connect it to an Anchor cloud browser.\",\"dateModified\":\"2026-10-31T18:19:24.180Z\",\"isPartOf\":{\"@id\":\"https://docs.anchorbrowser.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrations\",\"item\":\"https://docs.anchorbrowser.io/advanced/mcp\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sandboxes\",\"item\":\"https://docs.anchorbrowser.io/integrations/sandboxes\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"E2B\",\"item\":\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b#article\",\"headline\":\"E2B\",\"name\":\"E2B\",\"description\":\"Run agent code in an E2B sandbox and connect it to an Anchor cloud browser.\",\"url\":\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b\",\"mainEntityOfPage\":{\"@id\":\"https://docs.anchorbrowser.io/integrations/sandboxes/e2b#webpage\"},\"dateModified\":\"2026-10-31T18:19:24.180Z\",\"publisher\":{\"@id\":\"https://docs.anchorbrowser.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.anchorbrowser.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Anchor Browser Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Anchor Browser Docs","nav":{"global":{"anchors":[{"anchor":"Interactive Playground","icon":"window-restore","href":"https://app.anchorbrowser.io/"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Introduction","pages":[{"title":"Documentation","sidebarTitle":"Introduction","mode":"wide","href":"/introduction"},{"group":"Quickstart","pages":[{"title":"SDK Quick Start","href":"/quickstart/use-via-sdk"},{"title":"Code Quick Start","href":"/quickstart/use-via-code"},{"title":"API Quick Start","href":"/quickstart/use-via-api"}]},{"group":"Example Use-Cases","pages":[{"title":"Task Examples","sidebarTitle":"Task Examples","href":"/examples/task-examples"},{"title":"Form Filling Automation","href":"/examples/form-filling"},{"title":"Buyer Intent Discovery","href":"/examples/buyer-intent"},{"title":"Configuration Collection","href":"/examples/configuration-collection"},{"title":"Deep Research","href":"/examples/research-task"}]}]},{"group":"Platform","pages":[{"group":"Browsers","pages":[{"group":"Create","pages":[{"title":"Browser Sessions","sidebarTitle":"Overview","icon":"browser","href":"/quickstart/browser-sessions"},{"title":"Create a Session","sidebarTitle":"Create a Session","icon":"play","href":"/quickstart/create-session"},{"title":"Async Session","icon":"bolt","href":"/essentials/async-session"},{"title":"Batch Browser Sessions","icon":"layer-group","href":"/advanced/batch-browser-sessions"}]},{"group":"Control and Monitor","pages":[{"title":"Control a Browser Session","sidebarTitle":"Tools","icon":"gamepad","href":"/essentials/control-a-session"},{"title":"OS-Level Control","icon":"computer-mouse","href":"/advanced/os-level-control"},{"title":"Session Recording","icon":"video","href":"/essentials/recording"}]},{"group":"Customize","pages":[{"title":"Browser Extensions","icon":"puzzle-piece","href":"/advanced/extensions"},{"title":"Ad Blocker","icon":"shield","href":"/advanced/adblocker"},{"title":"Popup Blocker","icon":"window-close","href":"/advanced/popup-blocker"},{"title":"Sensitive Data Masking","icon":"eye-slash","href":"/advanced/sensitive-data-masking"},{"title":"CA Certificates","icon":"key","href":"/advanced/ca-certificates"},{"title":"Session Timeout","icon":"timer","href":"/advanced/session-timeout"},{"title":"Session Tags","icon":"tags","href":"/advanced/session-tags"}]}]},{"group":"Tasks","pages":[{"title":"Which task type?","sidebarTitle":"Which task type?","icon":"route","href":"/tasks/which-task-type"},{"group":"Perform Web Task","pages":[{"title":"Perform Web Task","sidebarTitle":"Perform Web Task","icon":"list-check","href":"/agentic-browser-control/ai-task-completion"},{"title":"Async Perform Web Task","sidebarTitle":"Async execution","icon":"clock","href":"/agentic-browser-control/async-perform-web-task"},{"title":"Human-in-the-Loop","icon":"user-check","href":"/agentic-browser-control/human-in-the-loop"},{"title":"Secret Values","icon":"shield-check","href":"/agentic-browser-control/secret-values"},{"title":"Agentic File Usage","icon":"folder-open","href":"/agentic-browser-control/agentic-file-usage"},{"group":"Computer Use Agents","pages":[{"title":"Anthropic Computer Use","icon":"message-bot","href":"/agentic-browser-control/computer-use-agents/anthropic"},{"title":"Gemini Computer Use","icon":"sparkles","href":"/agentic-browser-control/computer-use-agents/gemini"},{"title":"OpenAI Computer Use","icon":"brain","href":"/agentic-browser-control/computer-use-agents/openai"},{"title":"Yutori Browser Use","icon":"y","href":"/agentic-browser-control/computer-use-agents/yutori"},{"title":"Jev Browser Agent","icon":"bolt","tag":"Beta","href":"/agentic-browser-control/computer-use-agents/jev"}]}]},{"title":"Action Index","sidebarTitle":"Action Index","icon":"bolt","href":"/advanced/action-index"},{"group":"Automation Tasks","pages":[{"title":"Automation Tasks Overview","sidebarTitle":"Overview","icon":"layer-group","href":"/tasks/overview"},{"title":"Creating a Task","sidebarTitle":"Creating a Task","icon":"code","href":"/tasks/creating-a-task"},{"title":"Run a Task","sidebarTitle":"Run a Task","icon":"play","href":"/tasks/run-a-task"},{"title":"Async execution","sidebarTitle":"Async execution","icon":"clock","href":"/advanced/async-automation-tasks"},{"title":"Self-healing","sidebarTitle":"Self-healing","icon":"wand-magic-sparkles","href":"/advanced/self-healing"},{"title":"Code Tasks","sidebarTitle":"Code Tasks","icon":"code","href":"/advanced/legacy-tasks"}]}]},{"group":"Network and Stealth","pages":[{"title":"Network and Stealth","sidebarTitle":"Overview","icon":"shield-halved","href":"/network-and-stealth/overview"},{"title":"Proxy","icon":"map","href":"/advanced/proxy"},{"title":"Bring Your Own Proxy","icon":"route","href":"/advanced/bring-your-own-proxy"},{"title":"Dedicated Sticky IP","icon":"globe","href":"/advanced/dedicated-sticky-ip"},{"title":"Anchor VPN","icon":"cloud","href":"/advanced/anchor-vpn"},{"title":"Extra Stealth Mode","icon":"ghost","href":"/essentials/stealth"},{"title":"Captcha Solving","icon":"square-check","href":"/advanced/captcha-solving"},{"title":"Cloudflare Web Bot Auth","icon":"stars","href":"/advanced/cloudflare-web-bot-auth"},{"title":"Web Unlocker","icon":"lock-open","href":"/advanced/web-unlocker"}]},{"group":"Managed Authentication","pages":[{"title":"Managed Authentication","sidebarTitle":"Overview","icon":"shield-check","href":"/essentials/managed-authentication"},{"title":"Applications","icon":"grid-2","href":"/essentials/applications"},{"title":"Identities","sidebarTitle":"Identities","icon":"id-card","href":"/essentials/authenticated-applications"},{"title":"Email MFA","icon":"paper-plane","href":"/advanced/email-otp"},{"title":"Custom MFA","sidebarTitle":"Custom MFA","icon":"comments","href":"/advanced/mfa"},{"title":"1Password","icon":"plug","href":"/integrations/1password"}]},{"group":"Advanced","pages":[{"title":"Volumes","icon":"hard-drive","href":"/advanced/volumes"},{"title":"Bring Your Own Keys (BYOK)","icon":"key","href":"/advanced/bring-your-own-key"},{"group":"Files","pages":[{"title":"File Upload","icon":"upload","href":"/advanced/file-upload"},{"title":"File Download","icon":"download","href":"/advanced/file-download"},{"title":"P2P Download","icon":"download","href":"/advanced/p2p-downloads"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","sidebarTitle":"Overview","icon":"webhook","href":"/webhooks/overview"},{"title":"Events","icon":"list","href":"/webhooks/events"},{"title":"Signature verification","icon":"shield-check","href":"/webhooks/signature-verification"}]},{"group":"Tools","pages":[{"title":"Screenshot Webpage","icon":"camera","href":"/tools/screenshot-webpage"},{"title":"Execute Code Snippet","icon":"code","href":"/tools/execute-code-snippet"}]}]},{"group":"Third-Party Embedding","pages":[{"title":"Demonstrations API","icon":"video","href":"/advanced/demonstrations-api"},{"title":"Embedded Browser Live UI","icon":"check-to-slot","href":"/advanced/browser-live-view"},{"title":"Embedding End-User Authentication UI","sidebarTitle":"Embedding Identity Flow","icon":"window","href":"/essentials/omniconnect"}]}]},{"group":"Integrations","pages":[{"group":"Model Context Protocol (MCP)","icon":"stars","pages":[{"title":"MCP - Hosted Version","icon":"cloud","href":"/advanced/mcp"},{"title":"MCP - Open Source","icon":"code","href":"/advanced/mcp-open-source"}]},{"group":"Sandboxes","icon":"stars","pages":[{"title":"Sandboxes","sidebarTitle":"Overview","icon":"box","href":"/integrations/sandboxes"},{"title":"CreateOS","icon":"box","href":"/integrations/sandboxes/createos"},{"title":"Daytona","description":"Run agent code in a Daytona sandbox and connect it to an Anchor cloud browser.","icon":"box","href":"/integrations/sandboxes/daytona"},{"title":"E2B","icon":"box","href":"/integrations/sandboxes/e2b"},{"title":"Tenki","description":"Run agent code in a Tenki sandbox and connect it to an Anchor cloud browser.","icon":"box","href":"/integrations/sandboxes/tenki"}]},{"title":"Agentcard","icon":"credit-card","href":"/integrations/agentcard"},{"title":"Browser-use","icon":"stars","href":"/integrations/browseruse-deployment"},{"title":"Stagehand","icon":"stars","href":"/integrations/stagehand"},{"title":"Groq GPT-OSS","icon":"stars","href":"/integrations/groq"},{"title":"n8n","icon":"bolt","href":"/integrations/n8n"},{"title":"Make","icon":"bolt","href":"/integrations/make"},{"title":"Zapier","icon":"bolt","href":"/integrations/zapier"},{"title":"CrewAI","icon":"bolt","href":"/agent-frameworks/crewai"},{"title":"LangChain","icon":"bolt","href":"/agent-frameworks/langchain"},{"title":"Custom Integration","icon":"bolt","href":"/agent-frameworks/custom-agent-framework"},{"group":"Open Source","icon":"stars","pages":[{"title":"Integrate Puppeteer with Anchor Browser","icon":"stars","sidebarTitle":"Puppeteer","href":"/integrations/open-source/puppeteer/index"},{"group":"Playwright","icon":"stars","pages":[{"title":"Integrate Playwright with Anchor Browser","icon":"stars","href":"/integrations/open-source/playwright/index"},{"group":"E2E Testing","icon":"stars","pages":[{"title":"Storybook","icon":"stars","href":"/integrations/open-source/playwright/e2e-testing/storybook"},{"title":"Grafana","icon":"stars","href":"/integrations/open-source/playwright/e2e-testing/grafana"},{"title":"Apache Superset","icon":"stars","href":"/integrations/open-source/playwright/e2e-testing/apache-superset"},{"title":"OpenHands","icon":"stars","href":"/integrations/open-source/playwright/e2e-testing/openhands"},{"title":"Twenty","icon":"stars","href":"/integrations/open-source/playwright/e2e-testing/twenty"}]},{"group":"Business Applications","icon":"stars","pages":[{"title":"NetSuite","icon":"stars","href":"/integrations/open-source/playwright/business-applications/netsuite"},{"title":"SAP S/4HANA","icon":"stars","href":"/integrations/open-source/playwright/business-applications/sap-s4-hana"},{"title":"Sage Intact","icon":"stars","href":"/integrations/open-source/playwright/business-applications/sage-intact"},{"title":"Salesforce","icon":"stars","href":"/integrations/open-source/playwright/business-applications/salesforce"},{"title":"Zendesk","icon":"stars","href":"/integrations/open-source/playwright/business-applications/zendesk"},{"title":"Tableau","icon":"stars","href":"/integrations/open-source/playwright/business-applications/tableau"},{"title":"Notion","icon":"stars","href":"/integrations/open-source/playwright/business-applications/notion"},{"title":"Jira","icon":"stars","href":"/integrations/open-source/playwright/business-applications/jira"},{"title":"Attio","icon":"stars","href":"/integrations/open-source/playwright/business-applications/attio"},{"title":"Pipedrive","icon":"stars","href":"/integrations/open-source/playwright/business-applications/pipedrive"},{"title":"HubSpot","icon":"stars","href":"/integrations/open-source/playwright/business-applications/hubspot"},{"title":"Dropbox","icon":"stars","href":"/integrations/open-source/playwright/business-applications/dropbox"},{"title":"Clickup","icon":"stars","href":"/integrations/open-source/playwright/business-applications/clickup"},{"title":"Monday","icon":"stars","href":"/integrations/open-source/playwright/business-applications/monday"},{"title":"DocuSign","icon":"stars","href":"/integrations/open-source/playwright/business-applications/docusign"},{"title":"Airtable","icon":"stars","href":"/integrations/open-source/playwright/business-applications/airtable"},{"title":"Figma","icon":"stars","href":"/integrations/open-source/playwright/business-applications/figma"},{"title":"Miro","icon":"stars","href":"/integrations/open-source/playwright/business-applications/miro"},{"title":"Wrike","icon":"stars","href":"/integrations/open-source/playwright/business-applications/wrike"},{"title":"Bill.com","icon":"stars","href":"/integrations/open-source/playwright/business-applications/bill"},{"title":"UiPath","icon":"stars","href":"/integrations/open-source/playwright/business-applications/uipath"},{"title":"ServiceNow","icon":"stars","href":"/integrations/open-source/playwright/business-applications/servicenow"},{"title":"CrowdStrike","icon":"stars","href":"/integrations/open-source/playwright/business-applications/crowdstrike"}]},{"group":"Government","icon":"stars","pages":[{"group":"USA","icon":"stars","pages":[{"title":"BLM Form 3510","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/blm-3510"},{"title":"BOP Form BP-S0243","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/bop-s243"},{"title":"CBP Form 7501","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/cbp-7501"},{"title":"CCC Form 941","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/ccc-941"},{"title":"CMS Form 10069","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/cms-10069"},{"title":"DOE Form 1845-0031","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/doe-1845-0031"},{"title":"DOJ Form 361","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/doj-361"},{"title":"EPA Form 8700-22","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/epa-8200"},{"title":"FDA Form 2579","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/fda-2579"},{"title":"FinCEN 105 (CMIR)","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/fincen-105"},{"title":"FMCSA Form BMC-40","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/fmcsa-bmc-40"},{"title":"FMCSA Form OP-1(P)","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/fmcsa-op-1-p"},{"title":"FMCSA Form OP-1","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/fmcsa-op-1"},{"title":"Form 122A-1","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/form-122a-1"},{"title":"FS Form 5444","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/fs-5444"},{"title":"FSA Form 578","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/fsa-578"},{"title":"IRS Form 8300","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/irs-8300"},{"title":"IRS Form W-7","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/irs-w7"},{"title":"OWCP Form 915","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/owcp-915"},{"title":"USCIS Form I-9","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/ucis-i9"},{"title":"VA Form 21-526EZ","icon":"stars","href":"/integrations/open-source/playwright/government/USA/federal/va-21-526ez"}]}]}]}]}]},{"group":"Account","pages":[{"group":"Trust \u0026 Security","pages":[{"title":"Trust \u0026 Security","href":"/security"},{"title":"Zero Data Retention (ZDR) Mode","href":"/security/zdr-mode"}]},{"title":"Pricing","icon":"dollar-sign","href":"/pricing"}]}]},{"tab":"API Reference","versions":[{"version":"Latest - v1","default":true,"groups":[{"group":"Agent Access","pages":[{"title":"Agent Access guide","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent-access","href":"/api-reference/agent-access/agent-access-guide"},{"title":"Create Agent Access project","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent-access","href":"/api-reference/agent-access/create-agent-access-project"},{"title":"Get Agent Access challenge","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent-access/challenge","href":"/api-reference/agent-access/get-agent-access-challenge"},{"title":"Agent Access challenge data","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent-access/appendix/{appendixRef}","href":"/api-reference/agent-access/agent-access-challenge-data"}]},{"group":"AI Tools","pages":[{"title":"Perform Web Task","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/tools/perform-web-task","href":"/api-reference/ai-tools/perform-web-task"},{"title":"Get Perform Web Task Status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/tools/perform-web-task/{workflowId}/status","href":"/api-reference/ai-tools/get-perform-web-task-status"}]},{"group":"Browser Sessions","pages":[{"title":"List Sessions History Page","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions","href":"/api-reference/browser-sessions/list-sessions-history-page"},{"title":"Start Browser Session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions","href":"/api-reference/browser-sessions/start-browser-session"},{"title":"Start Browser Session (async)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/async","href":"/api-reference/browser-sessions/start-browser-session-async"},{"title":"Async Session Status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/async/{request_id}/status","href":"/api-reference/browser-sessions/async-session-status"},{"title":"End All Sessions","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/sessions/all","href":"/api-reference/browser-sessions/end-all-sessions"},{"title":"List All Sessions Status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/all/status","href":"/api-reference/browser-sessions/list-all-sessions-status"},{"title":"Get Sessions History","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/history","href":"/api-reference/browser-sessions/get-sessions-history"},{"title":"Get Browser Session","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{session_id}","href":"/api-reference/browser-sessions/get-browser-session"},{"title":"End Browser Session","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/sessions/{session_id}","href":"/api-reference/browser-sessions/end-browser-session"},{"title":"Get Session Tags","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{session_id}/tags","href":"/api-reference/browser-sessions/get-session-tags"},{"title":"Put Session Tags","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/sessions/{session_id}/tags","href":"/api-reference/browser-sessions/put-session-tags"},{"title":"Delete Session Tags","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/sessions/{session_id}/tags","href":"/api-reference/browser-sessions/delete-session-tags"},{"title":"Get Browser Session Pages","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{session_id}/pages","href":"/api-reference/browser-sessions/get-browser-session-pages"},{"title":"Upload Files","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/uploads","href":"/api-reference/browser-sessions/upload-files"},{"title":"List Session Downloads","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{session_id}/downloads","href":"/api-reference/browser-sessions/list-session-downloads"}]},{"group":"Tasks","pages":[{"title":"Run a Task","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v2/tasks/{taskId}/run","href":"/api-reference/tasks/run-a-task"},{"title":"Get Task Run Status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v2/tasks/runs/{runId}/status","href":"/api-reference/tasks/get-task-run-status"},{"title":"Generate a Task","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v2/tasks/generate","href":"/api-reference/tasks/generate-a-task"},{"title":"Get Task Generation Status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v2/tasks/{taskId}/generation-status","href":"/api-reference/tasks/get-task-generation-status"}]},{"group":"Tools","pages":[{"title":"Execute Code Snippet","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/tools/execute-code","href":"/api-reference/tools/execute-code-snippet"},{"title":"Web Unlocker","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/tools/fetch/webpage","href":"/api-reference/tools/web-unlocker"},{"title":"Screenshot Webpage","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/tools/screenshot","href":"/api-reference/tools/screenshot-webpage"},{"title":"Get Page PDF","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/tools/page-pdf","href":"/api-reference/tools/get-page-pdf"}]},{"group":"Applications","pages":[{"title":"List Applications","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/applications","href":"/api-reference/applications/list-applications"},{"title":"Create Application","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/applications","href":"/api-reference/applications/create-application"},{"title":"Get Application","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/applications/{applicationId}","href":"/api-reference/applications/get-application"},{"title":"Delete Application","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/applications/{applicationId}","href":"/api-reference/applications/delete-application"},{"title":"List Application Identities","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/applications/{applicationId}/identities","href":"/api-reference/applications/list-application-identities"},{"title":"List Application Authentication Flows","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/applications/{applicationId}/auth-flows","href":"/api-reference/applications/list-application-authentication-flows"},{"title":"Create Authentication Flow","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/applications/{applicationId}/auth-flows","href":"/api-reference/applications/create-authentication-flow"},{"title":"Delete Authentication Flow","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/applications/{applicationId}/auth-flows/{authFlowId}","href":"/api-reference/applications/delete-authentication-flow"},{"title":"Update Authentication Flow","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/applications/{applicationId}/auth-flows/{authFlowId}","href":"/api-reference/applications/update-authentication-flow"},{"title":"Create Identity Token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/applications/{applicationId}/tokens","href":"/api-reference/applications/create-identity-token"}]},{"group":"Identities","pages":[{"title":"Create Identity","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/identities","href":"/api-reference/identities/create-identity"},{"title":"Get Identity","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/identities/{identityId}","href":"/api-reference/identities/get-identity"},{"title":"Update Identity","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/identities/{identityId}","href":"/api-reference/identities/update-identity"},{"title":"Delete Identity","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/identities/{identityId}","href":"/api-reference/identities/delete-identity"},{"title":"Reauthenticate Identity","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/identities/{identityId}/reauthenticate","href":"/api-reference/identities/reauthenticate-identity"},{"title":"Start Dynamic Auth Flow","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/identities/dynamic/start/{session_id}","href":"/api-reference/identities/start-dynamic-auth-flow"},{"title":"Get Dynamic Auth Flow State","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/identities/dynamic/state/{session_id}","href":"/api-reference/identities/get-dynamic-auth-flow-state"},{"title":"Resolve Dynamic Auth Flow Step","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/identities/dynamic/resolve/{session_id}","href":"/api-reference/identities/resolve-dynamic-auth-flow-step"},{"title":"Finalize Dynamic Auth Flow","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/identities/dynamic/finalize/{session_id}","href":"/api-reference/identities/finalize-dynamic-auth-flow"}]},{"group":"Profiles","pages":[{"title":"List Profiles","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/profiles","href":"/api-reference/profiles/list-profiles"},{"title":"Create Profile","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/profiles","href":"/api-reference/profiles/create-profile"},{"title":"Get Profile","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/profiles/{name}","href":"/api-reference/profiles/get-profile"},{"title":"Delete Profile","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/profiles/{name}","href":"/api-reference/profiles/delete-profile"}]},{"group":"OS Level Control","pages":[{"title":"Take Screenshot","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{sessionId}/screenshot","href":"/api-reference/os-level-control/take-screenshot"},{"title":"Mouse Click","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/mouse/click","href":"/api-reference/os-level-control/mouse-click"},{"title":"Mouse Double Click","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/mouse/doubleClick","href":"/api-reference/os-level-control/mouse-double-click"},{"title":"Mouse Down","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/mouse/down","href":"/api-reference/os-level-control/mouse-down"},{"title":"Mouse Up","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/mouse/up","href":"/api-reference/os-level-control/mouse-up"},{"title":"Mouse Move","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/mouse/move","href":"/api-reference/os-level-control/mouse-move"},{"title":"Drag and Drop","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/drag-and-drop","href":"/api-reference/os-level-control/drag-and-drop"},{"title":"Scroll","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/scroll","href":"/api-reference/os-level-control/scroll"},{"title":"Type Text","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/keyboard/type","href":"/api-reference/os-level-control/type-text"},{"title":"Keyboard Shortcut","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/keyboard/shortcut","href":"/api-reference/os-level-control/keyboard-shortcut"},{"title":"Get Clipboard Content","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{sessionId}/clipboard","href":"/api-reference/os-level-control/get-clipboard-content"},{"title":"Set Clipboard Content","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/clipboard","href":"/api-reference/os-level-control/set-clipboard-content"},{"title":"Copy Selected Text","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/copy","href":"/api-reference/os-level-control/copy-selected-text"},{"title":"Paste Text","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/paste","href":"/api-reference/os-level-control/paste-text"},{"title":"Navigate to URL","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/goto","href":"/api-reference/os-level-control/navigate-to-url"}]},{"group":"Session Recordings","pages":[{"title":"Pause Session Recording","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{session_id}/recordings/pause","href":"/api-reference/session-recordings/pause-session-recording"},{"title":"Resume Session Recording","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{session_id}/recordings/resume","href":"/api-reference/session-recordings/resume-session-recording"},{"title":"List Session Recordings","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{session_id}/recordings","href":"/api-reference/session-recordings/list-session-recordings"},{"title":"Get Session Recording","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{session_id}/recordings/primary/fetch","href":"/api-reference/session-recordings/get-session-recording"},{"title":"Delete Session Recording","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/sessions/{session_id}/recordings/{recording_id}","href":"/api-reference/session-recordings/delete-session-recording"}]},{"group":"Agentic capabilities","pages":[{"title":"List Agent Resources","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{sessionId}/agent/files","href":"/api-reference/agentic-capabilities/list-agent-resources"},{"title":"Upload Agent Resources","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{sessionId}/agent/files","href":"/api-reference/agentic-capabilities/upload-agent-resources"},{"title":"Pause Agent","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{session_id}/agent/pause","href":"/api-reference/agentic-capabilities/pause-agent"},{"title":"Resume Agent","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{session_id}/agent/resume","href":"/api-reference/agentic-capabilities/resume-agent"},{"title":"List Pending Human Interventions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/pending-interventions","href":"/api-reference/agentic-capabilities/list-pending-human-interventions"},{"title":"Get Requested Human Interventions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{session_id}/agent/requested-human-intervention","href":"/api-reference/agentic-capabilities/get-requested-human-interventions"},{"title":"Respond to Human Intervention","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sessions/{session_id}/agent/respond-to-human-intervention","href":"/api-reference/agentic-capabilities/respond-to-human-intervention"}]},{"group":"Extensions","pages":[{"title":"List Extensions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/extensions","href":"/api-reference/extensions/list-extensions"},{"title":"Upload Extension","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/extensions","href":"/api-reference/extensions/upload-extension"},{"title":"Get Extension Details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/extensions/{id}","href":"/api-reference/extensions/get-extension-details"},{"title":"Delete Extension","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/extensions/{id}","href":"/api-reference/extensions/delete-extension"}]},{"group":"Certificates","pages":[{"title":"List Certificates","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/certificates","href":"/api-reference/certificates/list-certificates"},{"title":"Upload Certificate","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/certificates","href":"/api-reference/certificates/upload-certificate"},{"title":"Delete Certificate","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/certificates/{name}","href":"/api-reference/certificates/delete-certificate"}]},{"group":"Integrations","pages":[{"title":"List Integrations","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/integrations","href":"/api-reference/integrations/list-integrations"},{"title":"Create Integration","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/integrations","href":"/api-reference/integrations/create-integration"},{"title":"Delete Integration","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/integrations/{integrationId}","href":"/api-reference/integrations/delete-integration"}]},{"group":"Event Coordination","pages":[{"title":"Wait for Event","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/events/{event_name}/wait","href":"/api-reference/event-coordination/wait-for-event"},{"title":"Signal Event","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/events/{event_name}","href":"/api-reference/event-coordination/signal-event"}]},{"group":"Batch Sessions","pages":[{"title":"List Batch Sessions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/batch-sessions","href":"/api-reference/batch-sessions/list-batch-sessions"},{"title":"Create Batch Sessions","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/batch-sessions","href":"/api-reference/batch-sessions/create-batch-sessions"},{"title":"Get Batch Session Status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/batch-sessions/{batch_id}","href":"/api-reference/batch-sessions/get-batch-session-status"},{"title":"Delete Batch Sessions","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/batch-sessions/{batch_id}","href":"/api-reference/batch-sessions/delete-batch-sessions"},{"title":"Update Batch Session","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/batch-sessions/{batch_id}","href":"/api-reference/batch-sessions/update-batch-session"},{"title":"Retry Failed Batch Sessions","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/batch-sessions/{batch_id}/retry","href":"/api-reference/batch-sessions/retry-failed-batch-sessions"}]},{"group":"Tasks (Legacy)","pages":[{"title":"List Tasks (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/task","href":"/api-reference/tasks-legacy/list-tasks-legacy"},{"title":"Create Task (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/task","href":"/api-reference/tasks-legacy/create-task-legacy"},{"title":"Run Task (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/task/run","href":"/api-reference/tasks-legacy/run-task-legacy"},{"title":"Run Task by Name (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/task/run/{taskName}","href":"/api-reference/tasks-legacy/run-task-by-name-legacy"},{"title":"Get Task Metadata (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/task/{taskId}","href":"/api-reference/tasks-legacy/get-task-metadata-legacy"},{"title":"Update Task Metadata (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/task/{taskId}","href":"/api-reference/tasks-legacy/update-task-metadata-legacy"},{"title":"Delete Task (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/task/{taskId}","href":"/api-reference/tasks-legacy/delete-task-legacy"},{"title":"List Task Versions (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/task/{taskId}/versions","href":"/api-reference/tasks-legacy/list-task-versions-legacy"},{"title":"Get Latest Task Version (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/task/{taskId}/latest","href":"/api-reference/tasks-legacy/get-latest-task-version-legacy"},{"title":"Get Task Draft (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/task/{taskId}/draft","href":"/api-reference/tasks-legacy/get-task-draft-legacy"},{"title":"Create or Update Task Draft (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/task/{taskId}/draft","href":"/api-reference/tasks-legacy/create-or-update-task-draft-legacy"},{"title":"Deploy Task (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/task/{taskId}/deploy","href":"/api-reference/tasks-legacy/deploy-task-legacy"},{"title":"List Task Executions (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/task/{taskId}/executions","href":"/api-reference/tasks-legacy/list-task-executions-legacy"},{"title":"Get Task Execution Result (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/task/{taskId}/executions/{executionId}","href":"/api-reference/tasks-legacy/get-task-execution-result-legacy"},{"title":"Get Task Version (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/task/{taskId}/{taskVersion}","href":"/api-reference/tasks-legacy/get-task-version-legacy"},{"title":"Publish Task Version (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/task/{taskId}/{taskVersion}","href":"/api-reference/tasks-legacy/publish-task-version-legacy"},{"title":"Delete Task Version (Legacy)","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/task/{taskId}/{taskVersion}","href":"/api-reference/tasks-legacy/delete-task-version-legacy"}]},{"group":"Billing","pages":[{"title":"Get Billing Info","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/billing","href":"/api-reference/billing/get-billing-info"}]},{"group":"Webhooks","pages":[{"title":"List Webhooks","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/webhooks","href":"/api-reference/webhooks/list-webhooks"},{"title":"Create Webhook","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/webhooks","href":"/api-reference/webhooks/create-webhook"},{"title":"Get Webhook","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/webhooks/{id}","href":"/api-reference/webhooks/get-webhook"},{"title":"Delete Webhook","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/webhooks/{id}","href":"/api-reference/webhooks/delete-webhook"},{"title":"Update Webhook","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/webhooks/{id}","href":"/api-reference/webhooks/update-webhook"},{"title":"Rotate Webhook Signing Secret","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/webhooks/{id}/rotate-secret","href":"/api-reference/webhooks/rotate-webhook-signing-secret"},{"title":"Send Test Event","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/webhooks/{id}/test","href":"/api-reference/webhooks/send-test-event"},{"title":"List Webhook Deliveries","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/webhooks/{id}/events","href":"/api-reference/webhooks/list-webhook-deliveries"}]},{"group":"Volumes","pages":[{"title":"List Volumes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/volumes","href":"/api-reference/volumes/list-volumes"},{"title":"Create Volume","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/volumes","href":"/api-reference/volumes/create-volume"},{"title":"Get Volume By Name","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/volumes/by-name/{name}","href":"/api-reference/volumes/get-volume-by-name"},{"title":"Get Volume","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/volumes/{volume_id}","href":"/api-reference/volumes/get-volume"},{"title":"Delete Volume","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/volumes/{volume_id}","href":"/api-reference/volumes/delete-volume"}]},{"group":"Volume Files","pages":[{"title":"List Files","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/volumes/{volume_id}/files","href":"/api-reference/volume-files/list-files"},{"title":"Upload File","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/volumes/{volume_id}/files","href":"/api-reference/volume-files/upload-file"},{"title":"Delete Files","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/volumes/{volume_id}/files","href":"/api-reference/volume-files/delete-files"},{"title":"Create Upload URL","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/volumes/{volume_id}/files/upload-url","href":"/api-reference/volume-files/create-upload-url"},{"title":"Get File Info","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/volumes/{volume_id}/files/stat","href":"/api-reference/volume-files/get-file-info"},{"title":"Download File","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/volumes/{volume_id}/files/download","href":"/api-reference/volume-files/download-file"},{"title":"List All Paths","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/volumes/{volume_id}/paths","href":"/api-reference/volume-files/list-all-paths"},{"title":"Create Directory","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/volumes/{volume_id}/directories","href":"/api-reference/volume-files/create-directory"}]}]}]},{"tab":"SDK Reference","pages":[{"title":"SDK Reference","href":"/sdk-reference/overview"}]}]},"basePath":"","title":"E2B - Anchor Browser Docs","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":[],"chunks":[]}