fix skyvern run docs part 2 (#2386)

This commit is contained in:
Shuchang Zheng
2025-05-19 00:53:57 -07:00
committed by GitHub
parent abf581a8ce
commit 699502ea84
2 changed files with 24 additions and 14 deletions

View File

@@ -71,23 +71,15 @@ Skyvern was inspired by the Task-Driven autonomous agent design popularized by [
## Quickstart
### Python SDK Installation
> ⚠️ **REQUIREMENT**: Skyvern runs with Python 3.11 ⚠️
```bash
pip install skyvern
```
### Run Task
After initializing your local Skyvern setup, you can run agent tasks in any python code:
```python
from skyvern import Skyvern
skyvern = Skyvern()
task = await skyvern.run_task(prompt="Find the top post on hackernews today")
print(task)
```
### Run Task In Skyvern Service
Get your API key from [Skyvern Cloud](https://app.skyvern.com/settings) and to use Skyvern Cloud to run the 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
@@ -100,6 +92,24 @@ 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.run_task(prompt="Find the top post on hackernews today")
print(task)
```
<CardGroup cols={2}>
<Card
title="Quickstart (Skyvern Cloud)"