# TES v1.1 Quickstart

## Installation

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

## Create a Task

```python
import asyncio
from ai4gh.specs.tes.client import TESClient


async def main():
    async with TESClient(base_url="https://tes.example.org") as client:
        # Check service info
        info = await client.get_service_info()
        print(f"Service: {info.name}")

        # List existing tasks
        tasks = await client.list_tasks()
        for task in tasks.tasks:
            print(f"  {task.id}: {task.state}")

        # Create a new task
        task = await client.create_task(
            name="my-analysis",
            executors=[
                {
                    "image": "ubuntu:latest",
                    "command": ["echo", "hello"],
                }
            ],
        )
        print(f"Created: {task.id}")


asyncio.run(main())
```

## Compliance Testing

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

## MCP Tool

```json
{
  "tool": "tes_create_task",
  "arguments": {
    "base_url": "https://tes.example.org",
    "name": "my-analysis",
    "executors": [{"image": "ubuntu:latest", "command": ["echo", "hello"]}]
  }
}
```

## Data Models

```python
from ai4gh.specs.tes.models import Task, TaskListResponse, Executor, Input, Output
```
