---
title: "Agent Deployments"
description: "Deploy agent containers to AINative Cloud with auto-scaling and log access"
canonical: "https://docs.ainative.studio/docs/agent-cloud/deployments"
last-updated: "2026-10-06T03:13:52.118Z"
---

# Agent Deployments

Source: https://docs.ainative.studio/docs/agent-cloud/deployments

> Deploy agent containers to AINative Cloud with auto-scaling and log access

# Agent Deployments

Deploy your agent as a real, long-lived container on AINative's managed cloud. Your image is pulled and started, gets a public HTTPS endpoint, and scales to the replica count for your plan. Includes health monitoring and integrated ZeroDB storage.

Provide a valid, publicly-pullable `image_uri`. A deployment starts in `provisioning` and is promoted to `running` automatically once the container's `/health` endpoint responds — health is polled every 60 seconds.

**Base path:** `/api/v1/cloud/deployments`

## POST /

Deploy an agent container. Requires a registered agent and a container image URI.

```python
import requests

response = requests.post(
    "https://api.ainative.studio/api/v1/cloud/deployments",
    headers=HEADERS,
    json={
        "agent_registration_id": "550e8400-e29b-41d4-a716-446655440000",
        "image_uri": "ghcr.io/my-org/my-agent:latest",
        "resource_plan": "standard",
        "runtime_config": {
            "env": {
                "LOG_LEVEL": "info",
                "ZERODB_PROJECT": "my-project",
            }
        },
    },
)

deployment = response.json()
print(f"Deployed: {deployment['endpoint_url']}")
```

**Response (201):**
```json
{
  "id": "dep-uuid",
  "agent_registration_id": "550e8400-...",
  "namespace": "agents-user-123",
  "endpoint_url": "https://agents.ainative.studio/dep-uuid",
  "image_uri": "ghcr.io/my-org/my-agent:latest",
  "resource_plan": "standard",
  "status": "provisioning",
  "min_instances": 1,
  "max_instances": 3,
  "auto_scale_enabled": true,
  "health_status": "unknown"
}
```

## GET /

List your agent deployments.

```bash
curl "https://api.ainative.studio/api/v1/cloud/deployments?status=running" \
  -H "Authorization: Bearer $TOKEN"
```

## GET /\{deployment_id\}

Get deployment details including status, endpoint URL, and scaling configuration.

```bash
curl https://api.ainative.studio/api/v1/cloud/deployments/dep-uuid \
  -H "Authorization: Bearer $TOKEN"
```

## POST /\{deployment_id\}/scale

Scale deployment replicas.

```python
requests.post(
    "https://api.ainative.studio/api/v1/cloud/deployments/dep-uuid/scale",
    headers=HEADERS,
    json={
        "min_instances": 2,
        "max_instances": 10,
    },
)
```

**Constraints:** `min_instances` 0–10, `max_instances` 1–50.

## DELETE /\{deployment_id\}

Teardown and terminate a deployment.

```bash
curl -X DELETE https://api.ainative.studio/api/v1/cloud/deployments/dep-uuid \
  -H "Authorization: Bearer $TOKEN"
```

## GET /\{deployment_id\}/logs

Retrieve recent logs from a running agent.

```bash
curl "https://api.ainative.studio/api/v1/cloud/deployments/dep-uuid/logs?lines=100" \
  -H "Authorization: Bearer $TOKEN"
```

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `lines` | int | 50 | Number of log lines to return |
| `since` | datetime | — | Return logs after this timestamp |

## Resource Plans

| Plan | vCPU | Memory | GPU | Scaling | Use Case |
|------|------|--------|-----|---------|----------|
| `basic` | 0.5 | 512 MB | — | 1 instance | Development, testing |
| `standard` | 1 | 1 GB | — | 1–10 | Production workloads |
| `performance` | 2 | 2 GB | — | 1–20 | High-throughput agents |
| `gpu` | 2 | 4 GB | T4 | 1–5 | ML inference agents |

## Deployment Lifecycle

```
provisioning ──(/health OK)──▶ running ⇄ scaling
     │                            │
     │ (image pull / start fails) │ (stop / teardown)
     ▼                            ▼
   failed                       stopped
```

A deployment stays in `provisioning` until its container answers `/health`; the
health poller (every 60s) then promotes it to `running`. If the image can't be
pulled or the container never becomes healthy, it remains unhealthy — check
`GET /\{deployment_id\}/logs`.
