Skip to main content
The AgentRail Python SDK (agentrail) is an async HTTP client for the Task Lifecycle API. It requires Python 3.10 or newer, uses httpx for transport, and exposes Pydantic v2 models for all request and response types.

Install from PyPI

Install from the local repository

If you need to work against the SDK before a package release, install it in editable mode from the repository source:
Editable installs (-e) reflect changes to the source immediately without reinstalling.

Use as an async context manager

The Python client manages an httpx.AsyncClient internally. Use it as an async context manager to ensure the connection pool is closed when your code finishes:
If you need the client to outlive a single async with block, you can call await client.close() manually instead.

Model conventions

Python models expose snake_case attributes. All response models are validated Pydantic v2 objects. Request models also accept the API’s camelCase aliases, but prefer snake_case in Python code.

Next steps