Skip to main content
The Deployment API packages an agent folder and runs it on Celesto’s managed infrastructure. Use it when you are ready to move an agent from local development into a hosted Celesto environment.
The Deployment API is currently available in the Python SDK.

Deploy an agent

Create a folder named weather-agent with your agent code, then deploy it:
deploy_agent.py
import os
from pathlib import Path

from celesto import Celesto


client = Celesto()
result = client.deployment.deploy(
    folder=Path("./weather-agent"),
    name="weather-agent-v1",
    description="Weather assistant",
    envs={"OPENAI_API_KEY": os.environ["OPENAI_API_KEY"]},
)

print(f"Deployment ID: {result['id']}")
print(f"Status: {result['status']}")
print(f"URL: {result.get('url', 'pending')}")
Run it:
export CELESTO_API_KEY="your-api-key"
export OPENAI_API_KEY="your-openai-api-key"
python deploy_agent.py
folder
Path
required
Path to the directory containing your agent code.
name
string
required
Unique name for the deployment.
description
string
Human-readable description of the deployment.
envs
object
Environment variables as key-value pairs.
project_name
string
Project name to scope the deployment. Defaults to your first project.

Deployment response

id
string
required
Unique deployment identifier.
status
string
required
Deployment status: BUILDING, READY, or FAILED.
url
string
Endpoint URL, available when status is READY.
message
string
Additional information about the deployment result.

List deployments

list_deployments.py
from celesto import Celesto


client = Celesto()
deployments = client.deployment.list()

for deployment in deployments:
    print(f"{deployment['name']}: {deployment['status']}")
Each deployment object includes:
id
string
required
Unique deployment identifier.
name
string
required
Deployment name.
description
string
Human-readable description, if provided during deploy.
status
string
required
Deployment status: READY, BUILDING, FAILED, or STOPPED.
created_at
string
ISO 8601 timestamp of when the deployment was created.
updated_at
string
ISO 8601 timestamp of the most recent update.
Last modified on June 7, 2026