Deploy a built agent image
Deploy a successfully built agent image to Kubernetes as a Helm release.
Takes a completed build (referenced by build_id, or by image_name +
image_tag) together with the agent manifest and environment config, then
starts an asynchronous Temporal workflow that provisions the agent as a Helm
release. The call returns immediately with the deployment record in PENDING
status — it does not wait for the release to become healthy; poll
GET /v5/agentex/deployments/{deployment_id} for status and Kubernetes events
and GET /v5/agentex/deployments/{deployment_id}/logs for progress. This is the
deploy counterpart to POST /v5/agentex/builds: a build produces the container
image, a deployment runs that image. The referenced build must have finished
successfully, and the manifest’s agent name must match the build’s agent.
Set preview=True for an ephemeral deployment: it gets a globally unique Helm
release name (so concurrent redeploys never collide), an optional preview_label
for grouping, and an expiry (expires_at, defaulting to 8 hours from now);
preview_label and expires_at are rejected on non-preview deploys. A
non-preview (production) deploy instead supersedes any prior active deployment
that shares its Helm release name. Fails with a client error if the build is
missing or not in a successful state, if the manifest or environment YAML is
invalid or their agent names disagree, or if a secret referenced by the manifest
does not exist.
Deploy a built agent image
import SGPClient from 'scale-gp';
const client = new SGPClient({
accountID: 'My Account ID',
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const agentexCloudDeploy = await client.deploy.create({
environment_config: 'environment_config',
manifest_file: 'manifest_file',
});
console.log(agentexCloudDeploy.id);{
"id": "id",
"account_id": "account_id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"environment_config": "environment_config",
"manifest_file": "manifest_file",
"namespace": "namespace",
"status": "status",
"build_id": "build_id",
"deploy_events": [
{
"message": "message",
"reason": "reason",
"timestamp": "2019-12-27T18:11:19.117Z",
"type": "type"
}
],
"expires_at": "2019-12-27T18:11:19.117Z",
"helm_release_name": "helm_release_name",
"object": "agentex_cloud_deploy",
"preview_label": "preview_label"
}Returns Examples
{
"id": "id",
"account_id": "account_id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"environment_config": "environment_config",
"manifest_file": "manifest_file",
"namespace": "namespace",
"status": "status",
"build_id": "build_id",
"deploy_events": [
{
"message": "message",
"reason": "reason",
"timestamp": "2019-12-27T18:11:19.117Z",
"type": "type"
}
],
"expires_at": "2019-12-27T18:11:19.117Z",
"helm_release_name": "helm_release_name",
"object": "agentex_cloud_deploy",
"preview_label": "preview_label"
}