Every Selenium script eventually dies the same death: the website redesigns one button, the XPath goes stale, and the automation that ran for months starts failing on a Tuesday. Skyvern attacks that fragility at the root — instead of hand-written selectors, it points vision LLMs at the page and lets them find the login button, fill the form, and extract the data. The result is a browser-automation platform that works on sites it has never seen, shrugs off layout changes, and, per the project’s own evaluation, reaches 85.8 percent on the WebVoyager benchmark. The developer contract is deliberately thin: install with pip install "skyvern[all]", run skyvern quickstart, and you get a local API server with a SQLite database and a React UI at localhost:8080; or import the SDK and call page.act("Click the login button") on a plain Playwright page. Traditional Playwright still works everywhere — selectors, waits, assertions — with an optional prompt parameter bolted onto every action for when the selector is not worth maintaining.

The repository is a platform, not a script. The heart is skyvern/forge, where an eleven-thousand-line agent.py holds the ForgeAgent class and its see-plan-act step loop, surrounded by a task v3 rewrite that turns the loop into an explicit tool registry, a Workflow Copilot that builds workflows conversationally, and a services layer where the Observer compiles messy agent explorations into structured workflow DAGs. Around the core sit skyvern/webeye — browser managers, CDP connections, and a fifteen-thousand-line action handler — plus skyvern/core/script_generations, which converts completed runs into deterministic Playwright scripts that no longer need the LLM at all. There is a React frontend, a generated TypeScript client, Bitwarden integration, and an evaluation harness. The whole thing is AGPL-3.0-licensed, with a quickstart that defaults to SQLite so the pip path works without Postgres or Docker. As always in this series, what follows is an educational tour of published source code.

Skyvern overview architecture diagram

Skyvern at a glance: SDKs and the React UI land on the FastAPI server, which dispatches runs to ForgeAgent, the task v3 engine, the Observer, and the Workflow Copilot; agents drive the webeye browser layer, and completed runs are exported through the script generator into deterministic Playwright replay.

Reading the overview from left to right:

  • The Python entry point is the Skyvern class, with Skyvern.local() for embedded servers and an api_key for cloud mode.
  • The AI page commands add act, extract, validate, and prompt to any Playwright page.
  • Node projects talk through the TypeScript client, a generated SDK mirroring the Python surface.
  • The React workflow builder lives in the frontend, served by the packaged UI.
  • Every request lands on the FastAPI app, which mounts the route registry and dispatches execution.
  • ForgeAgent is the core agent loop driving tasks step by step.
  • The task v3 engine reorganizes the same loop around explicit tools and goal checks.
  • The browser layer launches Chromium through Playwright with proxies and CDP attach.

Why You Need This

The first reason is the agent loop itself, which is one of the most complete production agent designs in open source. ForgeAgent is eleven thousand lines covering the full life of a step: building the task state through the agent functions module, scraping the page into an element tree that fits a prompt, rendering instructions from the hundred-plus Jinja2 templates under skyvern/forge/prompts, dispatching the call through the LiteLLM-backed handler, and then applying whichever action the model chose — with speculative planning that lines up the next prompt while the current action executes, prompt ceilings that stop runaway context growth, and artifact tracking that persists every screenshot and LLM response for later inspection. The engineering maturity shows in the edge cases: replaced one-time password plans, validation evidence routing, step cancellation, and workflow-inherited page resolution are all named, tested paths rather than TODOs.

The second reason is that Skyvern shows what happens after the demo: the run-to-product assembly line. The Observer service at twenty-seven hundred lines watches an agent complete a task once, then compiles that exploration into a structured agent workflow — the prompt-to-DAG idea that turns a one-off success into a repeatable asset. The Workflow Copilot goes the other direction, authoring and editing workflows conversationally through a tool registry spanning credential handling, code-block synthesis, and completion verification. The definitions themselves are worth reading in the block model: tasks, loops, code blocks, email sends, PDF splits, data exports, and termination blocks, each with retry and loop semantics. This is the missing chapter in most agent tutorials — how an LLM’s improvisation gets hardened into something an operations team can schedule.

The third reason is the browser engineering, which is deep enough to be its own course. The action handler is fifteen thousand lines of click, input, select, upload, scroll, and dialog execution — the unglamorous code that decides whether “the model said click” actually clicks, including dropdown special cases and multi-field one-time password entry. The element parser compresses raw HTML into the compact element trees that make vision prompts affordable. The real browser manager handles proxies, persistent profiles, and extensions, while the CDP connection attaches to your own Chrome with all its cookies. And the story closes the loop on cost: the script generator turns a successful run into a standalone Playwright script that replays without any LLM in the path.

Skyvern detail architecture diagram

The detail view: the SDK surface with Skyvern, page agents, AI commands, and AI locators; the API tier with routes, run service, repositories, and artifact storage; the agent loops with prompt engine, LLM handler, task v3 tools, and goal checks; the browser execution tier with managers, CDP, the action handler, element parsing, and the script replay path; and the configuration layer underneath.

Walking the detail diagram, a task’s life is traceable end to end. The SDK facade in skyvern.py lazily loads the package so that importing skyvern stays fast, then either spins up an embedded API server or streams requests to the cloud. The AI command layer is where the four core verbs live: act returns the executed action, extract fills an optional JSON schema, validate answers a yes-or-no question about the page, and prompt is the raw escape hatch. When a selector needs to be found rather than guessed, the AI locator upgrades the query to a natural-language lookup. On the server side, the route registry wires endpoint groups from workflows and credentials to streaming screencasts, and the run service creates the run row, checks quotas, and hands execution to ForgeAgent.

Inside the loop, the agent functions module assembles what the model sees — goal, URL, element tree, action history, memories — and the prompt engine renders it through templates like single-click-action and extract-information. Every model call funnels through the LLM API handler, which resolves the named configuration from the config registry, retries transient failures, and repairs malformed JSON before schema validation. The task v3 rewrite in the loop module makes this machinery explicit: tools are declared as ToolSpecs in the tool registry, each round produces a RoundAction, and the goal check grades termination instead of trusting the model to say done. Reliability is a first-class citizen: the script reviewer gates generated code and the self-heal service re-triages failures when sites drift.

From Install to Your First Automation

The fastest path is pip. pip install "skyvern[all]" brings the server, the packaged UI, and browser dependencies; skyvern quickstart provisions a SQLite database at ~/.skyvern/data.db by default — pass --database-string for an existing Postgres, or let the command start a Postgres container for you — and opens the UI at localhost:8080. Docker Compose gives you the same stack fully containerized. From the SDK, three lines get a browser: Skyvern.local(), launch_cloud_browser(), get_working_page(), and then the page object behaves like Playwright with superpowers — page.click("#login-button") for the deterministic case, page.click(prompt="Click the green Submit button") for the LLM fallback, or page.agent.run_task("Complete checkout with: John Snow, 12345") for full autonomy. Credentials come from Skyvern, Bitwarden, or 1Password through the login command, and every run produces screenshots, video recordings, and a generated script you can promote to the deterministic path.

Honest limits: the AGPL-3.0 license means hosting it as a service obligates you to open your modifications, which matters for internal platform teams. The full stack is heavy — Python plus Node plus a browser fleet plus, on Windows, a Rust toolchain for some dependencies. The pip quickstart had a rocky 1.0.31 release that the README itself troubleshoots, a reminder of how fast this codebase moves. Vision-agent reliability is real but probabilistic: an 85.8 percent benchmark score means the remaining runs need the script generation and self-heal machinery this review spent its time on, and the cloud-oriented features — proxies, CAPTCHA solving, anti-bot detection — live in Skyvern Cloud rather than this repository. What remains is still the most complete open source answer to “what does a production browser agent look like,” and reading it beats reimplementing it.

Watch PyShine on YouTube

Contents