Run natural-language browser tasks with the perform-web-task API and agentTask SDK method.
Anchor Browser delivers a state-of-the-art 89% Score on the industry-standard benchmark WebVoyager, leveraging browser-use as a core component of the automation capability.
Anchor Browser provides within its SDK the agentTask method that enables natural language control over web browsing sessions. This capability allows you to automate complex web tasks without coding the whole flow.
import { client, agentTask } from 'anchorbrowser';client.setConfig({ auth: () => process.env.ANCHORBROWSER_API_KEY });const response = await agentTask('Extract the main heading', { taskOptions: { url: 'https://example.com' },});console.log(response.data.result);
from anchorbrowser import Anchorbrowserimport osanchor_client = Anchorbrowser(api_key=os.environ.get("ANCHORBROWSER_API_KEY"))response = anchor_client.agent.task( "Extract the main heading", task_options={"url": "https://example.com"},)print(response.data.result)
The prompt is the only required argument — add url (or sessionId) to point the agent at a page.
Everything else (agent, model, provider, max steps, secret values, …) is optional; see
Configuration Options below.
The AI object can also be used to extract structured data from the browser. This is done by providing a JSON schema to the AI object, which will then return the structured data.
The following demonstrates using Zod and Pydantic to utilize the structured output capability.
import { z } from 'zod';import { zodToJsonSchema } from 'zod-to-json-schema';import { agentTask } from 'anchorbrowser';// Define the expected output structure using Zod schemaconst outputSchema = z.object({ nodes_cpu_usage: z.array( z.object({ node: z.string(), // Node name cluster: z.string(), // Cluster identifier cpu_avg_percentage: z.number(), // CPU usage percentage }) )});// Execute the AI task with structured outputconst result = await agentTask('Collect the node names and their CPU average %', { taskOptions: { outputSchema: zodToJsonSchema(outputSchema), // Convert to JSON Schema url: 'https://play.grafana.org/a/grafana-k8s-app/navigation/nodes?from=now-1h&to=now&refresh=1m', }});console.info(result);
# Define data models using Pydantic for structured outputclass NodeCpuUsage(BaseModel): node: str # Node name cluster: str # Cluster identifier cpu_avg_percentage: float # CPU usage percentageclass OutputSchema(BaseModel): nodes_cpu_usage: List[NodeCpuUsage] # List of node CPU usage data# Create task payload with structured output schematask_payload = { 'prompt': 'Collect the node names and their CPU average %', 'output_schema': OutputSchema.model_json_schema() # Convert to JSON Schema}result = anchor_client.agent.task('Collect the node names and their CPU average %', task_options={ 'output_schema': OutputSchema.model_json_schema(), 'url': 'https://play.grafana.org/a/grafana-k8s-app/navigation/nodes?from=now-1h&to=now&refresh=1m', })print(result)
use_action_index_tools (boolean): Let the agent reuse cached web actions from the Action Index. Defaults to true on free plans and false on paid plans.
Securely pass credentials and sensitive data to AI agents during task execution. Secret values are not logged and automatically cleaned up after completion.
{"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 get an API key with Agent Access at https://docs.anchorbrowser.io/quickstart/agent-access — no dashboard account required. Read those two pages 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":""},"chroma":{"liveDeploymentHistoryId":"6ade345d9b15302e6a357d59","collectionId":"1f51a58b-334c-43d4-9e5a-58d3e0f0fffa","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ade345d9b15302e6a357d59"},"feedback":{"issues":false,"thumbs":true,"edits":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ade345d9b15302e6a357d59","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Documentation","count":140},{"language":"default","tag":"API Reference","count":136},{"language":"default","tag":"Integrations","count":70},{"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":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"introduction.css","content":"html[data-current-path=\"/introduction\"] #page-title,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,.18);background:linear-gradient(155deg,#0c0c0c 0,#12100e 45%,#1a1410 100%);padding:2.5rem 2rem;margin:0 0 2.5rem}.intro-hero-glow,.intro-hero-grid{position:absolute;pointer-events:none}.intro-hero-glow{top:-40%;right:-10%;width:55%;height:120%;background:radial-gradient(ellipse at center,rgba(250,128,79,.14) 0,transparent 70%)}.intro-hero-grid{inset:0;background-image:linear-gradient(rgba(250,128,79,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(250,128,79,.06) 1px,transparent 1px);background-size:44px 44px;mask-image:radial-gradient(ellipse 90% 80% at 30% 40%,#000 10%,transparent 75%)}.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:.5rem;padding:.35rem .85rem;border-radius:9999px;border:1px solid rgba(250,128,79,.25);background:rgba(250,128,79,.08);color:#faa380;font-size:.75rem;font-weight:500;letter-spacing:.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,.8)}.intro-title{font-size:2rem;line-height:1.15;font-weight:700;letter-spacing:-.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,.55);max-width:32rem}.intro-cta-row{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.75rem}.intro-action,.intro-cta-primary,.intro-cta-secondary{cursor:pointer;font-family:inherit;text-align:left}button.intro-action,button.intro-cta-secondary{appearance:none;-webkit-appearance:none}button.intro-action:disabled,button.intro-cta-secondary:disabled{opacity:.85;cursor:default}button.intro-action{width:100%}.intro-cta-primary,.intro-cta-secondary{display:inline-flex;align-items:center;gap:.5rem;padding:.7rem 1.35rem;border-radius:.625rem;font-size:.875rem;text-decoration:none!important}.intro-cta-primary{background:linear-gradient(135deg,#fa804f 0,#e85d2a 100%);color:#fff!important;font-weight:600;transition:transform .15s ease,box-shadow .15s ease;box-shadow:0 4px 24px rgba(250,128,79,.4)}.intro-cta-primary:hover{transform:translateY(-2px);box-shadow:0 8px 32px rgba(250,128,79,.5)}.intro-cta-secondary{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:rgba(255,255,255,.85)!important;font-weight:500;transition:background .15s ease,border-color .15s ease}.intro-cta-secondary:hover{background:rgba(255,255,255,.08);border-color:rgba(250,128,79,.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:.5rem;font-size:.7rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#fa804f;margin-bottom:.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:.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:.35rem;padding:1rem;border-radius:.875rem;border:1px solid rgba(250,128,79,.12);background:rgba(250,128,79,.03);text-decoration:none!important;transition:transform .15s ease,border-color .15s ease,background .15s ease}.intro-action:hover{transform:translateY(-2px);border-color:rgba(250,128,79,.35);background:rgba(250,128,79,.07)}.intro-action-title{font-size:.8rem;font-weight:600;color:inherit}.intro-action-desc{font-size:.7rem;opacity:.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,.2)}html:not(.dark) .intro-hero-glow{background:radial-gradient(ellipse at center,rgba(250,128,79,.1) 0,transparent 70%)}html:not(.dark) .intro-title{color:#0a0a0a}html:not(.dark) .intro-subtitle{color:rgba(0,0,0,.55)}html:not(.dark) .intro-cta-secondary{border-color:rgba(0,0,0,.1);background:rgba(0,0,0,.03);color:rgba(0,0,0,.75)!important}html:not(.dark) .intro-cta-secondary:hover{background:rgba(250,128,79,.08);border-color:rgba(250,128,79,.3)}"}],"page":{"pagePath":"agentic-browser-control/ai-task-completion","slug":"/agentic-browser-control/ai-task-completion","pageMetadata":{"title":"Perform Web Task","sidebarTitle":"Perform Web Task","description":"Run natural-language browser tasks with the perform-web-task API and agentTask SDK method.","icon":"list-check","href":"/agentic-browser-control/ai-task-completion"},"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 natural-language browser tasks with the perform-web-task API and agentTask SDK method.\"\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,Expandable,Heading,Note,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Anchor Browser delivers a state-of-the-art 89% Score on the industry-standard benchmark WebVoyager, leveraging browser-use as a core component of the automation capability.`}),`\n`,_jsx(`video`,{autoPlay:true,muted:true,loop:true,playsInline:true,className:`mint-w-full mint-aspect-video`,src:`https://mintcdn.com/anchor-b3ec2715/PYJUK4ovynFtrEAT/images/video-playground.mp4?fit=max\u0026auto=format\u0026n=PYJUK4ovynFtrEAT\u0026q=85\u0026s=9597d75a98b85978c08b9861c99474f4`,\"data-path\":`images/video-playground.mp4`}),`\n`,_jsx(Heading,{level:`2`,id:`the-agent-task-method`,children:`The agent task method`}),`\n`,_jsxs(_components.p,{children:[`Anchor Browser provides within its SDK the `,_jsx(_components.code,{children:`agentTask`}),` method that enables natural language control over web browsing sessions. This capability allows you to `,_jsx(_components.strong,{children:`automate complex web tasks without coding the whole flow.`})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Looking for versioned reusable workflows? See `,_jsx(_components.a,{href:`/tasks/creating-a-task`,children:`Creating a Task`}),` and `,_jsx(_components.a,{href:`/tasks/run-a-task`,children:`Run a Task`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /v1/tools/perform-web-task`}),` does not read an `,_jsx(_components.code,{children:`Idempotency-Key`}),`. Sending the request again starts another task.`]}),`\n`,_jsx(Heading,{level:`3`,id:`code-example`,children:`Code Example`}),`\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:` response`}),_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:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Extract the main heading'`}),_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:` taskOptions:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://example.com'`}),_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:`#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:`response`}),_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:`11`,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:`11`,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:` 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:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\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.environ.get(`}),_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:`response `}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Extract the main heading\"`}),_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:` task_options`}),_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:`\"url\"`}),_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`,_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:`(response.data.result)`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`The prompt is the only required argument — add `,_jsx(_components.code,{children:`url`}),` (or `,_jsx(_components.code,{children:`sessionId`}),`) to point the agent at a page.\nEverything else (agent, model, provider, max steps, secret values, …) is optional; see\n`,_jsx(_components.a,{href:`#configuration-options`,children:`Configuration Options`}),` below.`]}),`\n`,_jsx(Heading,{level:`2`,id:`structured-output`,children:`Structured Output`}),`\n`,_jsxs(_components.p,{children:[`The AI object can also be used to extract structured data from the browser. This is done by providing a `,_jsx(_components.strong,{children:`JSON schema`}),` to the AI object, which will then return the structured data.\nThe following demonstrates using `,_jsx(_components.strong,{children:`Zod`}),` and `,_jsx(_components.strong,{children:`Pydantic`}),` to utilize the structured output capability.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`node.js`,numberOfLines:`23`,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:`23`,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:`z`}),_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:` 'zod'`}),_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:`zodToJsonSchema`}),_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:` 'zod-to-json-schema'`}),_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:`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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Define the expected output structure using Zod schema`})}),`\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:` outputSchema`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`object`}),_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:` nodes_cpu_usage:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`array`}),_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:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`object`}),_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:` node:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Node name`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` cluster:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Cluster identifier`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` cpu_avg_percentage:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// CPU usage percentage`})]}),`\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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Execute the AI task with structured output`})}),`\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:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Collect the node names and their CPU average %'`}),_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:` taskOptions:`}),_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:` outputSchema:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` zodToJsonSchema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`outputSchema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Convert to JSON Schema`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://play.grafana.org/a/grafana-k8s-app/navigation/nodes?from=now-1h\u0026to=now\u0026refresh=1m'`}),_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`,_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:`info`}),_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:`22`,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:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Define data models using Pydantic for structured output`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` NodeCpuUsage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`BaseModel`}),_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:` node: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Node name`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cluster: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Cluster identifier`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cpu_avg_percentage: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`float`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # CPU usage percentage`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` OutputSchema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`BaseModel`}),_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:` nodes_cpu_usage: List[NodeCpuUsage] `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# List of node CPU usage data`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create task payload with structured output schema`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`task_payload `}),_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:` 'prompt'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Collect the node names and their CPU average %'`}),_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:` 'output_schema'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: OutputSchema.model_json_schema() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Convert to JSON Schema`})]}),`\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\":`#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(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Collect the node names and their CPU average %'`}),_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:` task_options`}),_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:` 'output_schema'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: OutputSchema.model_json_schema(),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'url'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://play.grafana.org/a/grafana-k8s-app/navigation/nodes?from=now-1h\u0026to=now\u0026refresh=1m'`}),_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`,_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)`})]}),`\n`]})})})]}),`\n`,_jsxs(Expandable,{title:`Configuration Options`,children:[_jsx(Heading,{level:`2`,id:`configuration-options`,children:`Configuration Options`}),_jsx(_components.p,{children:`The AI agent can be configured with the following parameters:`}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Parameter names use `,_jsx(_components.code,{children:`snake_case`}),` in Python and `,_jsx(_components.code,{children:`camelCase`}),` in JavaScript/TypeScript (e.g., `,_jsx(_components.code,{children:`max_steps`}),` vs `,_jsx(_components.code,{children:`maxSteps`}),`).`]})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`agent`}),` (string): AI agent to use (`,_jsx(_components.code,{children:`browser-use`}),`, `,_jsx(_components.code,{children:`openai-cua`}),`, `,_jsx(_components.code,{children:`gemini-computer-use`}),`, `,_jsx(_components.a,{href:`/agentic-browser-control/computer-use-agents/jev`,children:_jsx(_components.code,{children:`jev`})}),`). Defaults to `,_jsx(_components.code,{children:`browser-use`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`secret_values`}),` | `,_jsx(_components.strong,{children:`secretValues`}),` (object): Secret values to pass to the agent for secure credential handling.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`human_intervention`}),` | `,_jsx(_components.strong,{children:`humanIntervention`}),` (boolean): Allow human intervention during task execution.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`provider`}),` (string): AI provider to use (`,_jsx(_components.code,{children:`openai`}),`, `,_jsx(_components.code,{children:`gemini`}),`, `,_jsx(_components.code,{children:`groq`}),`, `,_jsx(_components.code,{children:`azure`}),`, `,_jsx(_components.code,{children:`anthropic`}),`, `,_jsx(_components.code,{children:`xai`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`model`}),` (string): Specific model to use (see `,_jsx(_components.a,{href:`#available-models-for-browser-use`,children:`Available Models`}),` below).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`url`}),` (string): Target URL to navigate to before executing the task.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`output_schema`}),` | `,_jsx(_components.strong,{children:`outputSchema`}),` (object): JSON Schema defining the expected structure of the output data.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`max_steps`}),` | `,_jsx(_components.strong,{children:`maxSteps`}),` (integer): Maximum number of steps the agent can take (default: 40).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`detect_elements`}),` | `,_jsx(_components.strong,{children:`detectElements`}),` (boolean): Enable element detection for better interaction accuracy.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`extended_system_message`}),` | `,_jsx(_components.strong,{children:`extendedSystemMessage`}),` (string): Custom system message to provide additional context or instructions to the agent.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`use_vision`}),` | `,_jsx(_components.strong,{children:`useVision`}),` (boolean): Enable vision capabilities for enhanced visual understanding.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`use_action_index_tools`}),` (boolean): Let the agent reuse cached web actions from the `,_jsx(_components.a,{href:`/advanced/action-index`,children:`Action Index`}),`. Defaults to `,_jsx(_components.code,{children:`true`}),` on free plans and `,_jsx(_components.code,{children:`false`}),` on paid plans.`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`secret-values`,children:`Secret Values`}),`\n`,_jsx(`p`,{children:`Securely pass credentials and sensitive data to AI agents during task execution. Secret values are not logged and automatically cleaned up after completion.`}),`\n`,_jsx(`p`,{children:_jsx(_components.a,{href:`/agentic-browser-control/secret-values`,children:`Learn more about Secret Values →`})}),`\n`,_jsx(Heading,{level:`2`,id:`available-models-for-browser-use`,children:`Available Models For Browser-Use`}),`\n`,_jsx(Expandable,{title:`Available Models`,defaultOpen:true,children:_jsxs(Tabs,{children:[_jsx(Tab,{title:`OpenAI`,id:`openai`,children:_jsxs(`div`,{className:`mint-grid mint-grid-cols-3 mint-gap-2`,children:[_jsx(`div`,{children:`gpt-5.6-sol`}),_jsx(`div`,{children:`gpt-5.6-terra`}),_jsx(`div`,{children:`gpt-5.6-luna`}),_jsx(`div`,{children:`gpt-5.5`}),_jsx(`div`,{children:`gpt-5.4`}),_jsx(`div`,{children:`gpt-5.4-mini`}),_jsx(`div`,{children:`gpt-5.4-nano`}),_jsx(`div`,{children:`gpt-5.1`}),_jsx(`div`,{children:`gpt-5`}),_jsx(`div`,{children:`gpt-5-mini`}),_jsx(`div`,{children:`gpt-5-nano`}),_jsx(`div`,{children:`gpt-4o`}),_jsx(`div`,{children:`gpt-4o-mini`}),_jsx(`div`,{children:`gpt-4.1`}),_jsx(`div`,{children:`gpt-4.1-mini`}),_jsx(`div`,{children:`gpt-4.1-nano`})]})}),_jsx(Tab,{title:`Gemini`,id:`gemini`,children:_jsxs(`div`,{className:`mint-grid mint-grid-cols-3 mint-gap-2`,children:[_jsx(`div`,{children:`gemini-3.1-pro-preview`}),_jsx(`div`,{children:`gemini-3.6-flash`}),_jsx(`div`,{children:`gemini-3.5-flash`}),_jsx(`div`,{children:`gemini-3-flash-preview`}),_jsx(`div`,{children:`gemini-3.1-flash-lite`}),_jsx(`div`,{children:`gemini-2.5-flash-lite`})]})}),_jsx(Tab,{title:`Groq`,id:`groq`,children:_jsxs(`div`,{className:`mint-grid mint-grid-cols-3 mint-gap-2`,children:[_jsx(`div`,{children:`openai/gpt-oss-120b`}),_jsx(`div`,{children:`meta-llama/llama-4-maverick-17b-128e-instruct`}),_jsx(`div`,{children:`meta-llama/llama-4-scout-17b-16e-instruct`}),_jsx(`div`,{children:`moonshotai/kimi-k2-instruct`})]})}),_jsx(Tab,{title:`Azure`,id:`azure`,children:_jsxs(`div`,{className:`mint-grid mint-grid-cols-3 mint-gap-2`,children:[_jsx(`div`,{children:`o4-mini`}),_jsx(`div`,{children:`o3`})]})}),_jsx(Tab,{title:`Anthropic`,id:`anthropic`,children:_jsxs(`div`,{className:`mint-grid mint-grid-cols-3 mint-gap-2`,children:[_jsx(`div`,{children:`claude-opus-4-8`}),_jsx(`div`,{children:`claude-opus-4-7`}),_jsx(`div`,{children:`claude-opus-4-6`}),_jsx(`div`,{children:`claude-opus-4-5`}),_jsx(`div`,{children:`claude-sonnet-5`}),_jsx(`div`,{children:`claude-sonnet-4-6`}),_jsx(`div`,{children:`claude-sonnet-4-5`}),_jsx(`div`,{children:`claude-haiku-4-5`})]})})]})})]})}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":"Perform Web Task","sidebarTitle":"Perform Web Task","description":"Run natural-language browser tasks with the perform-web-task API and agentTask SDK method.","icon":"list-check","href":"/agentic-browser-control/ai-task-completion"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The agent task method","slug":"the-agent-task-method","depth":2,"children":[{"title":"Code Example","slug":"code-example","depth":3,"children":[]}]},{"title":"Structured Output","slug":"structured-output","depth":2,"children":[]},{"title":"Secret Values","slug":"secret-values","depth":2,"children":[]},{"title":"Available Models For Browser-Use","slug":"available-models-for-browser-use","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/anchor-b3ec2715/32495830127763c8/introduction.js","/_mintlify/custom/anchor-b3ec2715/55bf429a6c2d5cfa/openai-ads.js"],"dynamicCss":".mint-grid {\n display: grid\n}\n.mint-aspect-video {\n aspect-ratio: 16 / 9\n}\n.mint-w-full {\n width: 100%\n}\n.mint-grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr))\n}\n.mint-gap-2 {\n gap: 0.5rem\n}","subdomain":"anchor-b3ec2715","siteName":"Anchor Browser Docs","title":"Perform Web Task - Anchor Browser Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-15T13:45:33.523Z","originalFileLocation":"agentic-browser-control/ai-task-completion.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 natural-language browser tasks with the perform-web-task API and agentTask SDK method.\">\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=\"Perform Web Task - Anchor Browser Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run natural-language browser tasks with the perform-web-task API and agentTask SDK method.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Anchor Browser Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://anchor-b3ec2715.mintlify.app/_mintlify/api/og/v2?division=Perform+Web+Task\u0026amp;title=Perform+Web+Task\u0026amp;description=Run+natural-language+browser+tasks+with+the+perform-web-task+API+and+agentTask+SDK+method.\u0026amp;theme=72cf39fa9be932db66da41a3\u0026amp;signature=ed86c5c2ad2e91459566ba86b9ee6efea2b714543911fcecea47be269c224a28\">\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=\"Perform Web Task - Anchor Browser Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run natural-language browser tasks with the perform-web-task API and agentTask SDK method.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://anchor-b3ec2715.mintlify.app/_mintlify/api/og/v2?division=Perform+Web+Task\u0026amp;title=Perform+Web+Task\u0026amp;description=Run+natural-language+browser+tasks+with+the+perform-web-task+API+and+agentTask+SDK+method.\u0026amp;theme=72cf39fa9be932db66da41a3\u0026amp;signature=ed86c5c2ad2e91459566ba86b9ee6efea2b714543911fcecea47be269c224a28\">\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/agentic-browser-control/ai-task-completion\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agentic-browser-control/ai-task-completion.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/agentic-browser-control/ai-task-completion#webpage\",\"url\":\"https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion\",\"name\":\"Perform Web Task\",\"description\":\"Run natural-language browser tasks with the perform-web-task API and agentTask SDK method.\",\"dateModified\":\"2026-10-15T13:45:33.523Z\",\"isPartOf\":{\"@id\":\"https://docs.anchorbrowser.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform\",\"item\":\"https://docs.anchorbrowser.io/quickstart/browser-sessions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tasks\",\"item\":\"https://docs.anchorbrowser.io/tasks/which-task-type\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Perform Web Task\",\"item\":\"https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion#article\",\"headline\":\"Perform Web Task\",\"name\":\"Perform Web Task\",\"description\":\"Run natural-language browser tasks with the perform-web-task API and agentTask SDK method.\",\"url\":\"https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion\",\"mainEntityOfPage\":{\"@id\":\"https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion#webpage\"},\"dateModified\":\"2026-10-15T13:45:33.523Z\",\"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":"Agent Access","sidebarTitle":"Agent Access","icon":"robot","href":"/quickstart/agent-access"},{"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?","description":"Anchor Browser supports two ways to control the browser: Perform Web Task and Automation Tasks.","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","description":"Run perform-web-task asynchronously and poll for results","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","icon":"box","href":"/integrations/sandboxes/daytona"},{"title":"E2B","icon":"box","href":"/integrations/sandboxes/e2b"},{"title":"Tenki","icon":"box","href":"/integrations/sandboxes/tenki"}]},{"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"}]}]},"title":"Perform Web Task - Anchor Browser Docs","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":[],"chunks":[]}