Skip to content

API Reference

Webtask

Manages browser lifecycle and creates agents.

wt = Webtask()
agent = await wt.create_agent(llm=llm)

Agent

Main interface for web automation.

await agent.goto("https://example.com")
await agent.do("Click the login button")
verdict = await agent.verify("user is logged in")

Browser

Low-level browser components for advanced use cases.

  • Browser - Browser lifecycle management
  • Context - Isolated browsing sessions
  • Page - Page operations
  • Element - Element interactions

LLM

LLM providers and custom model integration.

from webtask.integrations.llm import Gemini

llm = Gemini(model="gemini-2.5-flash", api_key=os.getenv("GEMINI_API_KEY"))

Result

Data classes returned by agent methods.

  • Result - Returned by agent.do()
  • Verdict - Returned by agent.verify()
  • Status - Task status enum