synth_ai.sdk.pools
Container pools, tasks, rollouts, metrics, artifacts, usage, and events.
Access this API through SynthClient().pools. Prefer its task-oriented
namespaces:
pools.rolloutsfor rollouts scoped to one pool.pools.agent_rolloutsfor global rollouts.pools.tasksfor pool task definitions.pools.metricsfor pool utilization.
pools.raw client. Request
and response bodies are backend-owned JSON objects. Rollout creation through
either the task-oriented namespaces or their lower-level implementations
validates a closed set of request keys. Other raw methods pass backend
contracts through without fabricating a second schema authority.
Example:
items list.
Pagination:
limit defaults to 100. Pagination is backend-owned: continue only
when a response supplies a distinct continuation token such as
next_cursor. The current production service may omit a continuation or
echo the supplied cursor; stop in either case to avoid a loop.
Errors:
The four rollout-creation entry points named above reject unsupported keys
locally with ValueError.
Service failures raise httpx.HTTPStatusError. Inspect
error.response.status_code to distinguish authentication,
authorization, validation, capacity, and transient service failures.
Functions
validate_pool_rollout_request
Classes
PoolTarget
Deployment target substrate for a pool.
ContainerPoolsClient
Manage container pools, tasks, rollouts, and metrics.
Args:
api_key: Synth API key. Defaults toSYNTH_API_KEY.backend_base: Preferred API base URL override.base_url: Compatibility alias forbackend_base.timeout: Default request timeout in seconds. Defaults to30.timeout_seconds: Preferred timeout override. When supplied, it takes precedence overtimeout.
rollouts: Pool-scoped rollout operations.agent_rollouts: Global rollout operations.tasks: Pool task operations.metrics: Pool utilization reads.
ValueError: The API key is missing or a rollout request contains a non-canonical key.httpx.HTTPStatusError: The service rejects an operation.
raw
self for advanced raw HTTP access.
create_pool
request: Backend-owned pool definition. Use fields documented by the active pool API contract.
- The created pool JSON object, including its service-assigned ID.
httpx.HTTPStatusError: Authentication, authorization, validation, conflict, quota, or service errors.
create
create_pool).
list_pools
state: Optional service-owned lifecycle-state filter. Defaults to no state filter.limit: Maximum page size. Defaults to100.cursor: Backend-owned continuation token. Defaults toNone.
- The backend page object. Stop if its continuation is missing or unchanged.
httpx.HTTPStatusError: The request is rejected.
list
list_pools).
get_pool
pool_id: Stable ID returned bycreate_poolorlist_pools.
- The current pool JSON object.
httpx.HTTPStatusError: The pool is unavailable or the request is rejected.
get
get_pool).
replace_pool
replace
replace_pool).
update_pool
update
update_pool).
delete_pool
delete
delete_pool).
get_pool_urls
get_urls
get_pool_urls).
get_pool_metrics
list_tasks
create_task
update_task
patch_task
delete_task
create_rollout
pool_id: Target pool ID.request: Rollout request using onlyCANONICAL_ROLLOUT_REQUEST_KEYS.
- The created rollout JSON object.
ValueError:requestcontains a non-canonical key.httpx.HTTPStatusError: The pool cannot accept the rollout or the request is rejected.
get_rollout
list_rollouts
pool_id: Target pool ID.state: Optional service-owned lifecycle-state filter. Defaults to no state filter.limit: Maximum page size. Defaults to100.cursor: Backend-owned continuation token. Defaults toNone.
- The backend page object. Stop if its continuation is missing or unchanged.
httpx.HTTPStatusError: The request is rejected.
cancel_rollout
get_rollout_artifacts
get_rollout_usage
get_rollout_summary
stream_rollout_events
create_global_rollout
list_global_rollouts
get_global_rollout
cancel_global_rollout
get_global_rollout_artifacts
get_global_rollout_usage
get_global_rollout_summary
stream_global_rollout_events
get_pool_container_health
get_task_container_health
get_pool_container_info
get_task_container_info
get_pool_container_metadata
get_task_container_metadata
execute_pool_container_rollout
execute_task_container_rollout
get_queue_status
get_capabilities
AsyncContainerPoolsClient
Async adapter over ContainerPoolsClient.