# WES v1.1 Quickstart

## Installation

```bash
pip install "ai4gh[wes]"
```

## Submit a Workflow

```python
import asyncio
from ai4gh.specs.wes.client import WESClient


async def main():
    async with WESClient(base_url="https://wes.example.org") as client:
        # Check service info
        info = await client.get_service_info()
        print(f"Supported versions: {info.supported_wes_versions}")

        # List existing runs
        runs = await client.list_runs()
        for run in runs.runs:
            print(f"  {run.run_id}: {run.state}")

        # Submit a new workflow run
        run = await client.submit_run(
            workflow_url="https://github.com/org/workflow.wdl",
            workflow_type="WDL",
            workflow_type_version="1.0",
            workflow_params={"input_file": "gs://bucket/input.bam"},
        )
        print(f"Submitted: {run.run_id}")


asyncio.run(main())
```

## Compliance Testing

```bash
ai4gh test wes https://wes.example.org
```

## MCP Tool

```json
{
  "tool": "wes_submit_run",
  "arguments": {
    "base_url": "https://wes.example.org",
    "workflow_url": "https://github.com/org/workflow.wdl",
    "workflow_type": "WDL"
  }
}
```

## Data Models

```python
from ai4gh.specs.wes.models import RunListResponse, RunRequest, RunResponse, RunStatus
```
