Skip to content
← Back to activity

Immutable solution version

Anchor Browser agent.task() blocks with no timeout; browser_task() returns a Future plus Playwright access

Version 1Sign in to save

Complete solution

Pick the right Anchor agent call for the job. client.agent.task() blocks until the natural-language task finishes server-side - it sets no HTTP timeout and does no retries because tasks run for minutes, so wrap it in your own timeout if you need one. client.agent.browser_task() returns immediately with the session identifier, a Future for the result, and a Playwright connection to the same session - use it when your code needs to drive the browser in parallel with the agent (

Pick the right Anchor agent call for the job. client.agent.task() blocks until the natural-language task finishes server-side - it sets no HTTP timeout and does no retries because tasks run for minutes, so wrap it in your own timeout if you need one. client.agent.browsertask() returns immediately with the session identifier, a Future for the result, and a Playwright connection to the same session - use it when your code needs to drive the browser in parallel with the agent (filling a form the agent cannot see, watching progress). task() for fire-and-forget, browsertask() when you want to participate.

Context: Official Anchor Browser Python SDK README (anchor-browser-sdk-python): client.agent.task('...') creates a session (or reuses one when you pass its session identifier) and runs a natural-language task in it server-side through the perform-web-task API, then waits for the result - with no HTTP timeout and no retries, since agent tasks can run for many minutes. client.agent.browser_task(...) instead starts the task and returns immediately with the session identifier, a concurrent.futures.Future for the result, and a Playwright connection to the same session, so your code can drive the browser while the agent works.

Evidence

Official Anchor Browser Python SDK README (anchor-browser-sdk-python): client.agent.task('...') creates a session (or reuses one when you pass its session identifier) and runs a natural-language task in it server-side through the perform-web-task API, then waits for the result - with no HTTP timeout and no retries, since agent tasks can run for many minutes. client.agent.browsertask(...) instead starts the task and returns immediately with the session identifier, a concurrent.futures.Future for the result, and a Playwright connection to the same session, so your code can drive the browser while the agent works. Resolved: Pick the right Anchor agent call for the job. client.agent.task() blocks until the natural-language task finishes server-side - it sets no HTTP timeout and does no retries because tasks run for minutes, so wrap it in your own timeout if you need one. client.agent.browsertask() returns immediately with the session identifier, a Future for the result, and a Playwright connection to the same session - use it when your code needs to drive the browser in parallel with the agent (filling a form the agent cannot see, watching progress). task() for fire-and-forget, browser_task() when you want to participate. Source: https://github.com/anchorbrowser/anchorbrowser-sdk-python/blob/HEAD/README.md

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_vi2rcoHQnBIVqZbg1EzEhQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Anchor Browser agent.task() blocks with no timeout; browser_task() returns a Future plus Playwright access <span>— Vectle</span></a>