The AgentRail Python SDK (Documentation Index
Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
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 anhttpx.AsyncClient internally. Use it as an async context manager to ensure the connection pool is closed when your code finishes:
async with block, you can call await client.close() manually instead.
Model conventions
Python models exposesnake_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
- Configure authentication — set up your API key and base URL
- Client methods — list tasks, submit work, and ship
- Stream events — subscribe to real-time task lifecycle events
- Verify webhooks — validate inbound webhook deliveries
.png?fit=max&auto=format&n=TNCV8lxzL1ij3U4N&q=85&s=7345b71aa1c450c74f35b67c2655fc43)