Build

BuildResource

Methods

create() ->
post/v5/builds

Submit a container image build.

Upload a tar.gz archive containing the build context (Dockerfile and any files needed for the build) along with image name, tag, and optional build arguments.

Maximum file size: 500MB

Parameters
agent_name: str

Name of the agent that this build belongs to

context_archive:
(format: binary)

tar.gz archive containing the build context (Dockerfile and any files needed for the build)

image_name: str

Name for the built image

build_args: Optional[str]

JSON string of build arguments

image_tag: Optional[str]
(default: "latest")

Tag for the built image

platform: Optional[Literal["linux/amd64", "linux/arm64", "linux/arm/v7"]]

Target platform for the Docker build. Defaults to the build host's native architecture when not specified.

"linux/amd64"
"linux/arm64"
"linux/arm/v7"
Returns
id: str
account_id: str
agent_name: str
build_status: Literal["queued", "running", "success", "failed", "cancelling", "cancelled", "timed_out", "error", "unknown"]

The current build status from the cloud provider

cloud_provider_build_id: str
created_at:
(format: date-time)
created_by:

The identity that created the entity.

image_name: str
image_tag: str
build_end_time: Optional[datetime]
(format: date-time)

When the cloud provider finished the build

build_start_time: Optional[datetime]
(format: date-time)

When the cloud provider started the build

image_url: Optional[str]
object: Optional[Literal["agentex_cloud_build"]]
(default: "agentex_cloud_build")
Request example
200Example
retrieve() ->
get/v5/builds/{build_id}

Get a build by ID, including current status from the cloud provider.

list() -> SyncCursorPage[]
get/v5/builds

List Builds

logs() ->
get/v5/builds/{build_id}/logs

Stream build logs via Server-Sent Events (SSE).

Returns a streaming response with content-type text/event-stream. Each log line is sent as an SSE data event.

cancel() ->
post/v5/builds/{build_id}/cancel

Cancel a pending or running build.

Returns 202 Accepted — the actual cancellation happens asynchronously via a Temporal workflow.

list_undeployed() ->
get/v5/builds/undeployed

List agents that exist only as cloud builds with no healthy deployment.

Returns distinct agent names from builds that have never had a deploy reach 'healthy' status, along with each agent's latest build info and total build count. Useful for surfacing agents that have been built but not yet deployed.

Domain types

class AgentexCloudBuild: ...
class StreamChunk: ...

A single log line from the build process.