skyvern package wraps the Skyvern REST API in a typed, async Python client.
Requires Python 3.11+. If you hit version errors, use
pipx install skyvern to install in an isolated environment.Initialize the client
TheSkyvern class is async — all methods are coroutines. Wrap calls in an async function and use asyncio.run() as the entry point:
await directly without asyncio.run().
Constructor parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | str | — | Required. Your Skyvern API key. Get one at app.skyvern.com/settings. |
environment | SkyvernEnvironment | CLOUD | Target environment. Options: CLOUD, STAGING, LOCAL. |
base_url | str | None | None | Override the API base URL. Use this for self-hosted deployments. |
timeout | float | None | None | HTTP request timeout in seconds. |
follow_redirects | bool | True | Whether to follow HTTP redirects. |
httpx_client | AsyncClient | None | None | Provide your own httpx client for custom TLS, proxying, or connection pooling. |
Environments
The SDK ships with three built-in environment URLs:| Environment | URL | When to use |
|---|---|---|
SkyvernEnvironment.CLOUD | https://api.skyvern.com | Skyvern Cloud (default) |
SkyvernEnvironment.STAGING | https://api.staging.skyvern.com | Staging environment for testing |
SkyvernEnvironment.LOCAL | http://localhost:8000 | Local server started with skyvern run server |
base_url instead:
Local mode
Run Skyvern entirely on your machine — no cloud, no network calls.Skyvern.local() reads your .env file, boots the engine in-process, and connects the client to it.
Prerequisite: Run skyvern quickstart once to create the .env file with your database connection and LLM API keys.
skyvern quickstart, a Chromium window opens on your machine so you can watch the AI work.
| Parameter | Type | Default | Description |
|---|---|---|---|
llm_config | LLMConfig | LLMRouterConfig | None | None | Override the LLM. If omitted, uses LLM_KEY from .env. |
settings | dict | None | None | Override .env settings at runtime. Example: {"MAX_STEPS_PER_RUN": 100} |
wait_for_completion
By default, run_task and run_workflow return immediately after the run is queued — you get a run_id and need to poll get_run() yourself. Pass wait_for_completion=True to have the SDK poll automatically until the run reaches a terminal state (completed, failed, terminated, timed_out, or canceled):
| Parameter | Type | Default | Description |
|---|---|---|---|
wait_for_completion | bool | False | Poll until the run finishes. |
timeout | float | 1800 | Maximum wait time in seconds. Raises Python’s TimeoutError if exceeded. |
run_task, run_workflow, and login.
Request options
Every method accepts an optionalrequest_options parameter for per-request overrides of timeout, retries, and headers:
Next steps
Tasks
Run browser automations with
run_taskWorkflows
Create and run multi-step automations
Browser Sessions
Maintain live browser state between calls
Error Handling
Handle errors and configure retries

