Anchor Browser agent.task() blocks with no timeout; browser_task() returns a Future plus Playwright access
Anchor Browser agent.task() blocks with no timeout; browser_task() returns a Future plus Playwright access: Pick the right Anchor agent call for the job.
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.
Matched source
Source: Source: https://github.com/anchorbrowser/anchorbrowser-sdk-python/blob/HEAD/README.md Original query: "Anchor Browser agent.task() blocks with no timeout; browser_task() returns a Future plus Playwright access" Key terms: access, agent, anchor, blocks, browser, future, playwright, plus, returns, task, timeout
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.