curl --request POST \
--url https://api.egp.scale.com/v5/agentex/deployments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"manifest_file": "<string>",
"environment_config": "<string>",
"build_id": "<string>",
"image_name": "<string>",
"image_tag": "<string>",
"preview": false,
"preview_label": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.egp.scale.com/v5/agentex/deployments"
payload = {
"manifest_file": "<string>",
"environment_config": "<string>",
"build_id": "<string>",
"image_name": "<string>",
"image_tag": "<string>",
"preview": False,
"preview_label": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
manifest_file: '<string>',
environment_config: '<string>',
build_id: '<string>',
image_name: '<string>',
image_tag: '<string>',
preview: false,
preview_label: '<string>',
expires_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.egp.scale.com/v5/agentex/deployments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/v5/agentex/deployments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'manifest_file' => '<string>',
'environment_config' => '<string>',
'build_id' => '<string>',
'image_name' => '<string>',
'image_tag' => '<string>',
'preview' => false,
'preview_label' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v5/agentex/deployments"
payload := strings.NewReader("{\n \"manifest_file\": \"<string>\",\n \"environment_config\": \"<string>\",\n \"build_id\": \"<string>\",\n \"image_name\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"preview\": false,\n \"preview_label\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v5/agentex/deployments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"manifest_file\": \"<string>\",\n \"environment_config\": \"<string>\",\n \"build_id\": \"<string>\",\n \"image_name\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"preview\": false,\n \"preview_label\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v5/agentex/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"manifest_file\": \"<string>\",\n \"environment_config\": \"<string>\",\n \"build_id\": \"<string>\",\n \"image_name\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"preview\": false,\n \"preview_label\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"namespace": "<string>",
"manifest_file": "<string>",
"environment_config": "<string>",
"status": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"object": "agentex_cloud_deploy",
"build_id": "<string>",
"image_digest": "<string>",
"helm_release_name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"preview_label": "<string>",
"deploy_events": [
{
"type": "<string>",
"reason": "<string>",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}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. Returns 409 if the target agent has an active key migration or
an applicable incomplete managed-key handoff.
curl --request POST \
--url https://api.egp.scale.com/v5/agentex/deployments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"manifest_file": "<string>",
"environment_config": "<string>",
"build_id": "<string>",
"image_name": "<string>",
"image_tag": "<string>",
"preview": false,
"preview_label": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.egp.scale.com/v5/agentex/deployments"
payload = {
"manifest_file": "<string>",
"environment_config": "<string>",
"build_id": "<string>",
"image_name": "<string>",
"image_tag": "<string>",
"preview": False,
"preview_label": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
manifest_file: '<string>',
environment_config: '<string>',
build_id: '<string>',
image_name: '<string>',
image_tag: '<string>',
preview: false,
preview_label: '<string>',
expires_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.egp.scale.com/v5/agentex/deployments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/v5/agentex/deployments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'manifest_file' => '<string>',
'environment_config' => '<string>',
'build_id' => '<string>',
'image_name' => '<string>',
'image_tag' => '<string>',
'preview' => false,
'preview_label' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v5/agentex/deployments"
payload := strings.NewReader("{\n \"manifest_file\": \"<string>\",\n \"environment_config\": \"<string>\",\n \"build_id\": \"<string>\",\n \"image_name\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"preview\": false,\n \"preview_label\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v5/agentex/deployments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"manifest_file\": \"<string>\",\n \"environment_config\": \"<string>\",\n \"build_id\": \"<string>\",\n \"image_name\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"preview\": false,\n \"preview_label\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v5/agentex/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"manifest_file\": \"<string>\",\n \"environment_config\": \"<string>\",\n \"build_id\": \"<string>\",\n \"image_name\": \"<string>\",\n \"image_tag\": \"<string>\",\n \"preview\": false,\n \"preview_label\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"namespace": "<string>",
"manifest_file": "<string>",
"environment_config": "<string>",
"status": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"object": "agentex_cloud_deploy",
"build_id": "<string>",
"image_digest": "<string>",
"helm_release_name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"preview_label": "<string>",
"deploy_events": [
{
"type": "<string>",
"reason": "<string>",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
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 (add sort_order=desc&limit=1 for 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.
Response
Successful Response

