Deploy

DeployResource

Methods

create() ->
post/v5/agentex/deployments

Create a new deployment.

Submits a deployment request. The deployment will:

  1. Parse and merge configuration files
  2. Create a Kubernetes Job running helm install
  3. Wait for deployment completion
  4. Return results
Parameters
environment_config: str
manifest_file: str
build_id: Optional[str]

The build_id of the cloud build. Required if image_name and image_tag are not provided.

expires_at: Optional[Union[str, datetime]]
(format: date-time)

ISO 8601 expiry timestamp. Only valid for preview deployments. If omitted on a preview deployment, defaults to 8 hours from now. Previews are always ephemeral and always have an expires_at.

image_name: Optional[str]

Name of the image to deploy. Required if build_id is not provided.

image_tag: Optional[str]

Tag of the image to deploy. Required if build_id is not provided.

preview: Optional[]

When True, creates a preview deployment with a unique deployment-id suffix appended to the helm release name.

preview_label: Optional[str]

Non-unique grouping label for the preview (e.g. branch name, PR number). Persisted on the deployment record so callers can list all deploys for a given label via GET /v5/agentex/deployments?preview_label=X&limit=1 (get the latest). Sanitized to lowercase alphanumeric + hyphens for K8s DNS-label compatibility (max 30 characters after sanitization). Each deploy still gets a unique helm release name regardless of label, so concurrent redeploys never share K8s resources. Only valid when preview=True.

Returns
id: str
account_id: str
created_at:
(format: date-time)
created_by:

The identity that created the entity.

environment_config: str
manifest_file: str
namespace: str
status: str
build_id: Optional[str]
deploy_events: Optional[List[]]

Kubernetes events for this deployment.

expires_at: Optional[datetime]
(format: date-time)
helm_release_name: Optional[str]
object: Optional[Literal["agentex_cloud_deploy"]]
(default: "agentex_cloud_deploy")
preview_label: Optional[str]
Request example
200Example
retrieve() ->
get/v5/agentex/deployments/{deployment_id}

Get a deployment by its ID.

list() -> SyncCursorPage[]
get/v5/agentex/deployments

List all deployments with pagination and optional filters.

logs(, ) ->
get/v5/agentex/deployments/{deployment_id}/logs

Get structured log lines for a deployment with cursor-based pagination.

The CLI can poll this endpoint to stream logs incrementally:

  1. First call: no cursor
  2. Subsequent calls: cursor=next_cursor from the previous response
  3. Stop polling when the deployment reaches a terminal status
delete() ->
delete/v5/agentex/deployments/{deployment_id}

Soft-delete a deployment. Marks it as deleted and triggers K8s resource cleanup.

Domain types

class AgentexCloudDeploy: ...
class AgentexCloudDeployEvent: ...

Slim event representation for the API response.

class DeployLogsResponse: ...

Response containing structured deployment log lines with cursor-based pagination.

The CLI can poll this endpoint to stream logs incrementally:

  1. First call: no after_id
  2. Subsequent calls: after_id=next_cursor from previous response
  3. Stop polling when has_more is False and the deployment reaches a terminal status