Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
python installation & run task docs (#2384)
Shuchang Zheng622b4cb71d7c
diff --git a/README.md b/README.mdindex fefb4cfd1..36b616342 100644--- a/README.md+++ b/README.md@@ -102,6 +102,33 @@ This quickstart guide will walk you through getting Skyvern up and running on yoskyvern run ui```+5. **Run task**+Run a skyvern task locally:+```python+from skyvern import Skyvern++skyvern = Skyvern()+task = await skyvern.run_task(prompt="Find the top post on hackernews today")+print(task)+```+You should see your local browser++You can also send a task to Skyvern Cloud+```python+from skyvern import Skyvern++skyvern = Skyvern()+task = await skyvern.agent.run_task(prompt="Find the top post on hackernews today")+print(task)+```++Or anywhere Skyvern is hosted:+```python+skyvern = Skyvern(base_url="http://localhost:8000", api_key="SKYVERN API KEY in LOCAL SKYVERN")+task = await skyvern.agent.run_task(prompt="Find the top post on hackernews today")+print(task)+```+## Docker Compose setup1. Make sure you have [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed and running on your machinediff --git a/fern/introduction.mdx b/fern/introduction.mdxindex cafc367c0..7d0a0391f 100644--- a/fern/introduction.mdx+++ b/fern/introduction.mdx@@ -70,6 +70,36 @@ Skyvern was inspired by the Task-Driven autonomous agent design popularized by [</CardGroup>## Quickstart+### Python SDK Installation+```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:+```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.+<CardGroup cols={2}><Cardtitle="Quickstart (Skyvern Cloud)"diff --git a/fern/openapi/skyvern_openapi.json b/fern/openapi/skyvern_openapi.jsonindex ab6cf95d8..2bb6c0ae8 100644--- a/fern/openapi/skyvern_openapi.json+++ b/fern/openapi/skyvern_openapi.json@@ -106,7 +106,7 @@"code-samples": [{"sdk": "python",- "code": "from skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"your_api_key\")\nawait skyvern.run_task(prompt=\"What's the top post on hackernews?\")\n"+ "code": "from skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"your_api_key\")\nawait skyvern.agent.run_task(prompt=\"What's the top post on hackernews?\")\n"}]}@@ -354,7 +354,7 @@"code-samples": [{"sdk": "python",- "code": "from skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"your_api_key\")\nrun = await skyvern.get_run(run_id=\"tsk_v2_123\")\nprint(run)\n"+ "code": "from skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"your_api_key\")\nrun = await skyvern.agent.get_run(run_id=\"tsk_v2_123\")\nprint(run)\n"}]}diff --git a/skyvern/client/core/client_wrapper.py b/skyvern/client/core/client_wrapper.pyindex 8471a644a..518be9d78 100644--- a/skyvern/client/core/client_wrapper.py+++ b/skyvern/client/core/client_wrapper.py@@ -24,7 +24,7 @@ class BaseClientWrapper:headers: typing.Dict[str, str] = {"X-Fern-Language": "Python","X-Fern-SDK-Name": "skyvern",- "X-Fern-SDK-Version": "0.1.83",+ "X-Fern-SDK-Version": "0.1.85",}if self._api_key is not None:headers["x-api-key"] = self._api_key