> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Python SDK

> vly Python SDK — sync + async clients, full type hints, automatic retries.

The official Python SDK. Sync and async clients, type hints throughout, automatic retries on transient errors.

## Install

```bash theme={null}
pip install vly
```

Requires Python 3.10+.

## Quick start

```python theme={null}
import os
from vly import Vly

vly = Vly(api_key=os.environ["VLY_API_KEY"])

# List projects
projects = vly.projects.list(limit=20).data

# Create a project
project = vly.projects.create(
    name="Tasks for teams",
    prompt="A real-time task tracker...",
    agent="claude-code",
)

# Trigger an agent run and stream output
run = vly.agents.run(project_id=project.id, prompt="Add a settings page")
for chunk in run.stream():
    print(chunk)
```

## Async client

```python theme={null}
from vly import AsyncVly

async with AsyncVly(api_key=os.environ["VLY_API_KEY"]) as vly:
    project = await vly.projects.create(name="...", prompt="...")
    async for chunk in (await vly.agents.run(project_id=project.id, prompt="...")).stream():
        print(chunk)
```

## Pagination

```python theme={null}
for project in vly.projects.iterate(limit=100):
    print(project.name)
```

## Error handling

```python theme={null}
from vly import VlyError

try:
    vly.projects.create(name="...", prompt="...")
except VlyError as err:
    print(err.code, err.message)
    if err.code == "key_rate_limited":
        # wait and retry
        pass
```

## Related

<CardGroup cols={3}>
  <Card title="TypeScript SDK" icon="code" href="/api-reference/sdks/typescript">
    Same surface, TypeScript.
  </Card>

  <Card title="CLI" icon="terminal" href="/api-reference/sdks/cli">
    Terminal access.
  </Card>

  <Card title="Webhooks SDK" icon="webhook" href="/api-reference/sdks/webhooks">
    Signature verification.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.