Skip to main content
Long-running agentic web workflows need structure. Treat the agent run as one part of a workflow, not the whole system.

Break work into phases

Prefer several scoped runs over one vague prompt that tries to finish an entire business process.

Set budgets

Budgets help your product fail clearly when a site is slow, blocked, or more complex than expected.

Return blockers clearly

Do not treat a blocked run as a successful empty result. Persist the status, error, page evidence, and any artifacts.
Use agent.session(...) when multiple related tasks should share one browser.

Production checklist

  • Constrain domains.
  • Request structured output.
  • Set turn, tool, and time budgets.
  • Stream progress for user-facing jobs.
  • Store status, result, source URLs, and artifacts.
  • Return blockers instead of inventing missing data.
  • Require approval for high-impact actions.