A Task is a single automation job—think of it as asking Skyvern to do one thing. You provide a prompt describing the goal, and Skyvern navigates the browser to complete it.
from skyvern import Skyvernskyvern = Skyvern(api_key="YOUR_API_KEY")result = await skyvern.run_task( prompt="Find the top 3 posts on the front page", url="https://news.ycombinator.com", data_extraction_schema={ "type": "object", "properties": { "posts": { "type": "array", "items": {"type": "string"} } } })print(result.output) # {"posts": ["Post 1", "Post 2", "Post 3"]}
Use Tasks for: one-off automations, quick data extraction, prototyping before building a workflow.When you need reusable, multi-step automations, use Workflows instead.
A Workflow is a reusable template composed of blocks. Unlike tasks, workflows can be versioned, shared across your team, and executed repeatedly with different parameters.
Blocks are the building units of workflows. Each block performs one specific task, and blocks execute sequentially—each can reference outputs from previous blocks.
Credentials provide secure storage for authentication data. Skyvern encrypts credentials at rest and in transit, and injects them directly into the browser—credentials are never sent to or seen by the LLM.
A live browser instance that maintains state across multiple tasks. Use sessions when you need to chain tasks in real-time or allow human intervention.
# Create a session (default: 60 minutes, max: 24 hours)session = await skyvern.create_browser_session(timeout=120)# Run tasks in the same sessionawait skyvern.run_task( prompt="Log in with the test account", url="https://example.com/login", browser_session_id=session.browser_session_id)# Second task reuses the authenticated stateawait skyvern.run_task( prompt="Extract the account balance", url="https://example.com/dashboard", browser_session_id=session.browser_session_id)# Clean upawait skyvern.close_browser_session( browser_session_id=session.browser_session_id)
A saved snapshot of browser state. Unlike sessions, profiles persist indefinitely and can be reused across days or weeks—perfect for skipping login on repeated runs.
# Create a profile from a completed runprofile = await skyvern.create_browser_profile( name="my-authenticated-profile", workflow_run_id=run.run_id)# Future runs restore the authenticated stateawait skyvern.run_workflow( workflow_id="wpid_extract_data", browser_profile_id=profile.browser_profile_id)
What’s saved: Cookies, authentication tokens, local storage, session storage.
Every run generates artifacts for observability, debugging, and audit trails.
result = await skyvern.run_task( prompt="Download the quarterly report", url="https://example.com")print(result.recording_url) # Full video of executionprint(result.screenshot_urls) # List of screenshot URLsprint(result.downloaded_files) # [{"url": "...", "checksum": "..."}]
Artifact
Description
Recordings
End-to-end video of the entire run
Screenshots
Captured after each action
Downloaded files
Files retrieved during execution
Logs
JSON-structured logs at step, task, and workflow levels
HAR files
HTTP Archive data for network debugging
In the Skyvern UI, go to Runs → click a run → view the Actions and Recording tabs.