In Python, the browser and page methods need the
local extra, which adds Playwright: pip install "skyvern[local]". You need it even when the browser runs in Skyvern Cloud. The TypeScript package (@skyvern/client) already includes Playwright.Launch a browser
launch_cloud_browserstarts a new cloud session and logs a link to watch it live.timeout: session length in minutes, from 5 to 240, default 60. Values above 240 are capped at 240.proxy_location: route traffic through a proxy, for example"RESIDENTIAL"(US) or"RESIDENTIAL_GB". See Browsers for locations.browser_profile_id(Python): start with a saved profile’s cookies and storage, so you skip the login.browser.close()closes the browser and ends the cloud session. Always call it infinally.
Use AI on the page
Four methods take natural language.act, extract and validate read the current page. prompt sends only your text to the model.
validate for yes/no checks. It returns a plain boolean. act performs one action per call; for a multi-step goal, make several calls or use page.agent.
Mix selectors and AI
The page is a full Playwright page, sogoto, wait_for_selector, locator and the rest work as usual. click, fill and select_option also accept a prompt:
- Selector only: fast and deterministic.
- Prompt only: no selector; Skyvern finds the element.
- Both: Skyvern tries the selector first and uses the prompt only if the selector fails. This is the safest choice for production.
Extract structured data
Pass a JSON Schema to get the same shape every time.page.extract takes schema; page.agent.run_task and run_task take data_extraction_schema.
- Write specific
descriptions. They steer extraction more than anything else. “Price in USD, number only” beats “the price”. - Expect missing values. A field that isn’t on the page comes back
nullor absent. Handle it in your code. - Limit arrays. Without a limit, an array schema collects everything visible. Say “top 5” in the prompt.
- Supported types are the standard ones:
string,number,integer,boolean,array,object, nested as deep as you need.
Hand a goal to the agent
page.agent runs a full Skyvern agent inside your browser. Use it for multi-step goals, logins and downloads. Each call waits for the run to finish (30 minutes by default, set with timeout in seconds) and leaves the page where the agent stopped, so you can keep going with page methods.
login also works with Bitwarden ("bitwarden"), 1Password ("1password") and Azure Key Vault ("azure_vault"). Store credentials and set up 2FA in Credentials and 2FA.
Agent calls return a run with status, output, failure_reason, downloaded_files and app_url. In TypeScript the fields are snake_case too (result.app_url). Check status before you use output; anything other than completed means the goal wasn’t met.
Download and upload files
page.agent.download_files finds and clicks the download for you, then returns the files as presigned URLs.
download_suffixsets the saved file name. Without an extension, Skyvern keeps the downloaded file’s ("statement-2026-09"becomesstatement-2026-09.pdf). With an extension, it’s the full name. Don’t pass a bare extension like".pdf"; that saves as.pdf.pdf. Without a suffix, files get a generated name likedownload-<timestamp>-<random>.pdf. To keep the name the site gave the file, use{{ original_filename }}, alone or with other text:"{{ fund }}_{{ original_filename }}"savesFund A_Q4 Report.pdf. Use it as a plain placeholder, without filters.download_timeoutis a hint, in seconds, for how long to wait for the download to start. The overalltimeoutis what fails the call.- Each file has
url(presigned, expires),filename,checksum(SHA-256),file_sizeandmodified_at. Files stay in Skyvern’s storage; fetch the URL to save a copy, as the worked example does.
upload_file takes a selector, a prompt, or both:
Tabs and frames
Every tab in the browser shares the same login state.page.frameLocator) for selector work inside iframes.
Run tasks and agents from code
You don’t need to hold a browser to use Skyvern from code. The client methods start a run on a fresh cloud browser and, withwait_for_completion, return when it ends:
page.agent.* when the run must start from a browser you prepared, for example after your own login or setup. Use the client methods when the run can start fresh. For webhooks instead of waiting, retries and error handling, see Going to production.
Replay agents as cached code
After an agent run succeeds, Skyvern can generate code from the actions it took. Later runs can execute that code directly instead of asking the model at each step, which makes them faster and cheaper.- In Studio, open the agent’s Start block settings and set Run With to Code. Skyvern Agent always uses the model.
- AI Fallback (cached scripts) is on by default: if the cached code fails, for example because the page changed, Skyvern falls back to the agent and regenerates the code.
- From code, override the setting for one run with
run_with:
"agent" and "code"; leave it out to use the agent’s setting. Cached code pairs well with schedules: the first successful run produces the code and later runs reuse it.
Worked example: download invoices from a vendor portal
This script logs in to a vendor portal with a stored credential, filters the order history by date, extracts the orders, downloads each invoice PDF and saves it locally. It uses selectors where the portal is predictable and AI where it isn’t. Before you run it:- Store the portal login in Skyvern and copy its
cred_...ID (Credentials and 2FA). - Replace
PORTAL_URLwith your portal’s login page.
python download_invoices.py or npx tsx download_invoices.ts. Each page.agent call returns an app_url. Open it for an order that failed to see the recording and every step the agent took.
To run this every month without your own server, build the same steps as an agent in Studio with Login, Extraction, Loop and File Download blocks, and put it on a schedule.
More examples
The same building blocks cover most portal work:- Data behind a login, many pages deep (for example a records portal): log in once, save a browser profile so later runs skip the login, use a residential
proxy_locationfor sites that block data-center traffic, and loopextractplus a “next page”clickuntilvalidate("There is no next page")is true. - Filling application forms:
fillandselect_optionwith prompts handle forms that differ from site to site, andupload_fileattaches a resume or document. For job applications, the Job Apps recipe in the app already does this end to end. - Recurring downloads and reports: the worked example above, moved into an agent in Studio with cached code and a schedule.
Next
Actions reference
Every page and agent method, with parameters and return types.
Browsers
Sessions, profiles, proxies and connecting your own Chrome.
Going to production
Webhooks, retries, error handling and cost control.

