subtitle: The building blocks of Skyvern automations
slug: getting-started/core-concepts
---
Skyvern has eight core concepts. Master these and you can build any browser automation.
---
## Tasks
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.
| `max_steps` | Maximum steps allowed (controls cost) |
| `engine` | AI model to use (see [Engines](#engines) below) |
| `browser_session_id` | Run in an existing browser session |
| `webhook_url` | Callback URL for async completion |
**Use Tasks for:** one-off automations, quick data extraction, prototyping before building a workflow.
When you need reusable, multi-step automations, use **Workflows** instead.
---
## Workflows
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.
**Use Workflows for:** repeatable automations, multi-step processes, team-shared templates, complex logic with loops or conditionals.
See [Workflow Blocks](/workflows/workflow-blocks-details) for the full block reference.
---
## Blocks
Blocks are the building units of workflows. Each block performs one specific task, and blocks execute sequentially—each can reference outputs from previous blocks.
### Navigation & Interaction
| Block | Purpose |
|-------|---------|
| **Navigation** | AI-guided navigation toward a goal—Skyvern figures out the clicks and inputs |
| **Action** | Perform a single specific action (click, type, select, upload) |
| **Go to URL** | Navigate directly to a specific URL |
| **Login** | Authenticate using stored credentials |
| **Wait** | Pause execution for a specified duration |
For detailed block configuration, see [Workflow Blocks](/workflows/workflow-blocks-details).
---
## Runs
Every time you execute a task or workflow, Skyvern creates a **Run** to track progress and store outputs.
```
┌→ completed
│
├→ failed
│
created → queued → running ─┼→ timed_out
│
├→ terminated
│
└→ canceled
```
```python
result = await skyvern.run_task(
prompt="Extract the main heading",
url="https://example.com"
)
print(result.run_id) # "tsk_abc123"
print(result.status) # "completed"
print(result.output) # {"heading": "Welcome"}
```
**Run identifiers:**
- Task runs: `tsk_*` prefix
- Workflow runs: `wr_*` prefix
**Run response fields:**
| Field | Description |
|-------|-------------|
| `run_id` | Unique identifier |
| `status` | Current lifecycle state |
| `output` | Extracted data (matches your schema) |
| `recording_url` | Video of the execution |
| `screenshot_urls` | Screenshots captured during execution |
| `downloaded_files` | Files retrieved (with URLs and checksums) |
| `failure_reason` | Error details if failed |
| `step_count` | Number of steps taken |
<Warning>
**Billing:** You're billed per step. A step is one AI decision + action cycle. Use `max_steps` to cap costs during development.
</Warning>
---
## Credentials
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.
```python
# Create a session (default: 60 minutes, max: 24 hours)
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.