Files
Dorod-Sky/fern/getting-started/quickstart.mdx
2025-05-21 20:06:34 -07:00

64 lines
2.0 KiB
Plaintext

---
title: Quickstart
slug: getting-started/quickstart
---
## Quickstart
### Python SDK Installation
> ⚠️ **REQUIREMENT**: Skyvern runs with Python 3.11 ⚠️
```bash
pip install skyvern
```
### Run Task
#### Run Task On A Skyvern Service
Get your API key from [Skyvern Cloud](https://app.skyvern.com/settings). Send the task to Skyvern Cloud:
```python
from skyvern import Skyvern
skyvern = Skyvern(api_key="YOUR API KEY")
# OR pass the base_url to use any Skyvern service
# skyvern = Skyvern(base_url="http://localhost:8000", api_key="YOUR API KEY")
task = await skyvern.agent.run_task(prompt="Find the top post on hackernews today")
print(task)
```
More API & SDK information can be found in the [API Reference](/api-reference) section.
#### Run Task Locally
You can also run browser tasks locally in your python code but it takes a bit more effort to set up the environment:
1. **Configure Skyvern** Run the setup wizard which will guide you through the configuration process, including Skyvern [MCP](https://github.com/Skyvern-AI/skyvern/blob/main/integrations/mcp/README.md) integration. This will generate a `.env` as the configuration settings file.
```bash
skyvern init
```
2. **Run Task In Python Code**
```python
from skyvern import Skyvern
skyvern = Skyvern()
task = await skyvern.agent.run_task(prompt="Find the top post on hackernews today")
print(task)
```
A local browser will pop up. Skyvern will start executing the task in the browser and close it when the task is done. You will be able to review the task from http://localhost:8080/history
<CardGroup cols={2}>
<Card
title="Quickstart (Skyvern Cloud)"
icon="cloud"
href="https://app.skyvern.com"
>
Start automating tasks with the hosted version of Skyvern
</Card>
<Card
title="Quickstart (Open Source)"
icon="github"
href="https://github.com/Skyvern-AI/Skyvern"
>
Start automating tasks in your own cloud
</Card>
</CardGroup>