> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abstract.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployments

> Your own copy of a model, held on a GPU for your robot.

A call to [`get_action`](https://docs.abstract.inc/robots/get-action) shares a model with everyone who calls it.
A deployment is yours: one model, loaded on a GPU and held for your robot.
Your episodes never wait for room on the model, and never wait for it to load.
You pay for chunks, exactly as with `get_action`. The time it holds a GPU between chunks is not billed.
Creating, starting or updating one needs a payment method on file or credit you bought; with sign-up credit alone it is refused with `payment_required`.

Deployments need `abstract-client` 0.4.0 or later.

## Create one and run on it

```python deploy.py theme={"theme":"css-variables"}
import abstract

client = abstract.Client()
deployment = client.deployments.create("physical-intelligence/pi0.5", robot="yam", wait=True)
print(deployment.id, deployment.state)  # pi05-yam-a3f2 ready

with client.deployments.connect(deployment.id, "fold the towel") as policy:
    chunk = policy.predict(frames, state)
```

* The id is made from the model and the robot. Pass `name=` to choose it.
* Creating the same name again with the same model, checkpoint, robot and idle timeout returns the deployment that exists. Anything different is refused with `deployment_exists`.
* `wait=True` returns once it is `ready`, or once its launch has failed.
* `predict()` takes the same [frames and state](https://docs.abstract.inc/robots/models.md#request-shapes) as any episode of that model, and returns the same chunk. One deployment runs one episode at a time; a second ends the first.

## States

| State | Meaning |
| - | - |
| `created` | Recorded. No engine asked yet. |
| `launching` | An engine is loading the model. |
| `ready` | It holds a GPU, and no chunk is running. |
| `busy` | Chunks are running. |
| `idle` | It ran no chunk for its idle timeout, and released its GPU. |
| `stopped` | You stopped it. |
| `failed` | Its last attempt failed. `reason` says why. |

`idle`, `stopped` and `failed` hold no GPU, and keep the id, the settings and the history.

## Idle timeout and budget

A deployment releases its GPU after its idle timeout with no chunk: `30m` by default, from `1m` to `24h`, or `never`.
`idle_at` is when that happens if no chunk runs first.

Idle time is covered by the chunk rates, up to a daily budget: **4 hours a UTC day for each model**, shared by all your deployments of it.
Idle time is time spent `ready`; launching and running chunks do not count.
When the budget is spent, idle deployments of that model are released (`idle_timeout`), running ones are released 2 minutes after their last chunk, and new ones are refused with `idle_budget_spent` until the next UTC day.

An engine unreachable for 10 minutes is reclaimed under any timeout (`unreachable`).

Fine-tuned models have no deployments.

## Restart, swap, stop

```python theme={"theme":"css-variables"}
client.deployments.start("pi05-yam-a3f2", wait=True)
client.deployments.update("pi05-yam-a3f2", model="allenai/molmoact2", wait=True)
client.deployments.stop("pi05-yam-a3f2")
client.deployments.delete("pi05-yam-a3f2")
```

* **Start** launches a new attempt and a new episode. It never resumes the episode that ran before. A chunk sent to a deployment that holds no GPU raises `abstract.DeploymentNotRunningError`, with `.state` and `.reason`.
* **Update** swaps the model, or the checkpoint, under the same id. A running chunk completes first; the old episode's next `predict()` raises `abstract.EpisodeEndedError` with `reason` `model_swapped`. Call `connect()` again.
* **Stop** releases the GPU and keeps the deployment and its history. **Delete** removes both. Chunks already run are billed as usual.

## Your own checkpoint

A deployment can serve your own weights, from a public Hugging Face repository at one commit, on the lane of the model they fine-tune.
Inspect first: it reads the repository's file list, its config (`config.json`, or a Rho bundle's `policy.json`) and normalization file, downloads no weights and starts no GPU.

```python theme={"theme":"css-variables"}
found = client.deployments.inspect("hf://acme/yam-towels@main")
print(found.servable, found.model, found.checkpoint_uri)

deployment = client.deployments.create(
    found.model,
    checkpoint=found.checkpoint_uri,
    checkpoint_options=found.options,
    robot="yam",
    wait=True,
)
```

| Pipeline | Runs on | The checkpoint |
| - | - | - |
| `molmoact2` | `allenai/molmoact2` | A fine-tune of `allenai/MolmoAct2-BimanualYAM`, same `config.json` and tensors. |
| `pi05` | `physical-intelligence/pi0.5` | A LeRobot `pi05` policy with the lane's three cameras, 14-value state and 30 actions a chunk. |
| `verne` | `verne/v0.5` | A fine-tune of `vernerobotics/v0.5-base`: `model.safetensors` and the same `config.json`. |
| `praxis1` | `runway/praxis-1` | A fine-tune of `runwayml/praxis-1-yam`: the same `config.json` but for its `normalization`. |
| `rho` | `microsoft/rho` | A fine-tune of `microsoft/rho-yam-box`: its weights, `stats.json` and the bundle's contract. |
| `flux_action` | `black-forest-labs/flux-3-action` | A fine-tune of `black-forest-labs/flux-3-action-droid` that normalizes nothing, as it does. |
| `xiaomi` | `xiaomi/xiaomi-robotics-1` | An XR-1 fine-tune for the bimanual ARX X5, as safetensors with its statistics in `config.json` (below). |
| `isaac` | `perceptron/isaac-0.5` | A fine-tune of `PerceptronAI/Isaac-0.5` in that repository's own layout, for the bimanual YAM. Name its normalization scope as `norm_tag` unless its file holds one. |

Xiaomi-Robotics-1 trains to a pickled checkpoint and a Python config, and neither is ever loaded from a repository here. Push a fine-tune as two files: `model.safetensors`, the policy's `state_dict()`, and `config.json`, the served model's own with your statistics in `normalization`:

```python theme={"theme":"css-variables"}
from safetensors.torch import save_file

save_file({name: value.contiguous() for name, value in policy.state_dict().items()}, "model.safetensors")
config = {
    "model_type": "xr1",
    "embodiment": "arx_x5_bimanual",
    "action_length": 30,
    "action_dim": 60,
    "backbone": "Qwen/Qwen3-VL-4B-Instruct@ebb281ec70b05090aa6165b016eac8ec08e71b17",
    "runtime": "6baccd57ff958570d0db1588370289ee36c8bb70",
    # From your training config's dataset statistics: 30x60, 30x60, 1x60 and 1x60 lists.
    "normalization": {"mean": mean, "std": std, "q01": q01, "q99": q99},
}
```

`checkpoint_uri` is pinned to a full commit, so a restart always loads the same weights. Its chunks are billed at the model's rates and its idle time counts against the model's budget. Only the top-level safetensors weights and normalization data are loaded; code in the repository is never downloaded or run.

A checkpoint that cannot be served is answered with `servable` false and its `problems`:

| Problem | Meaning |
| - | - |
| `repo_not_found` | No public repository has this name. A private one cannot be read. |
| `revision_not_found` | No such commit, branch or tag. |
| `repo_disabled` | The repository is disabled on the Hub. |
| `gated_repo` | The repository is gated. Push it to a public one. |
| `missing_config` | No `config.json`. Merge an adapter into its base first. |
| `invalid_config` | `config.json` is not a JSON object. |
| `unknown_architecture` | `config.json` names an architecture that is not served. |
| `policy_config_required` | An openpi checkpoint, which holds no policy config of its own. |
| `pipeline_not_served` | An openpi or DreamZero checkpoint: those pipelines have no deployments. |
| `missing_weights` | The weights are not safetensors at the top level. |
| `unsafe_weights` | The weights are pickled. Push them as safetensors. |
| `missing_norm_stats` | A MolmoAct2 checkpoint with no readable `norm_stats.json`. |
| `norm_tag_required` | `norm_stats.json` holds several tags. Pass `norm_tag=`. |
| `invalid_option` | An option does not apply, names a tag it does not hold, or its only tag is not a plain name. |
| `architecture_mismatch` | Its `config.json` differs from the lane's checkpoint. |
| `contract_mismatch` | Its cameras, state, action rows or chunk length differ from the lane's. |
| `insufficient_vram` | One copy needs more memory than the model's GPUs have. |

A deployment with its own checkpoint runs in a container of its own, on the model's GPU. Every launch starts that container, which downloads the weights before it loads them, so a launch takes several minutes, and for the largest checkpoints (Isaac's are 143 GB) about 25. A launch is given up to an hour. The container runs for at most 24 hours: a deployment held longer ends as `unreachable`, and `start` launches it again.

## History and metrics

Every launch is one attempt. `client.deployments.history(id)` lists them, with the model and checkpoint each ran, its times, chunks and cost, and the reason it ended:

| Reason | Meaning |
| - | - |
| `capacity` | No GPU was free when it launched. Start it again later. |
| `unreachable` | It held a GPU and lost it: the engine was unreachable for 10 minutes. |
| `idle_timeout` | It ran no chunk for its idle timeout, or the idle budget was spent. |
| `user` | You stopped, swapped or deleted it. |
| `model_error` | The engine could not serve the model or the checkpoint. |

`logs(id)` returns its events. `metrics(id)` returns its chunks, tokens, cost, GPU seconds and idle time today, and a `digest` of what your robots got: chunks answered, failed, superseded and replayed, episode resets, codecs, bytes, and the engine's latency percentiles. Every read is answered from stored state and never starts a GPU.

An account keeps at most 20 deployments, 4 of them holding a GPU at once. An id from another account answers `404 deployment_not_found`.

## HTTP

`client.deployments` has one method for each route, and `abstract.AsyncClient` the same, awaited.

| Route | What it does |
| - | - |
| `POST /v1/deployments` | Creates one. Body: `model`, and optionally `checkpoint_uri`, `checkpoint_options`, `robot`, `name`, `idle_timeout`. |
| `GET /v1/deployments` | Lists them. |
| `GET /v1/deployments/{id}` | Returns one. |
| `PATCH /v1/deployments/{id}` | Swaps its model or checkpoint. Body: `model`, and optionally `checkpoint_uri`, `checkpoint_options`. |
| `DELETE /v1/deployments/{id}` | Deletes it. |
| `POST /v1/deployments/{id}/start` | Launches it again. |
| `POST /v1/deployments/{id}/stop` | Releases its GPU. |
| `GET /v1/deployments/{id}/history` | Lists its attempts. |
| `GET /v1/deployments/{id}/logs` | Lists its events. |
| `GET /v1/deployments/{id}/metrics` | Returns its totals and digest. |
| `POST /v1/models/inspect` | Inspects a checkpoint. Body: `checkpoint_uri`, and optionally `options`. |

Send an `Idempotency-Key` with `POST /v1/deployments` when you pass no `name`: a retry under the same key returns the deployment the first request made.

## Remote operator handoff

An attended YAM can use `abstract_teleop.remote:Headset` as its operator. Give the robot
`ABSTRACT_TELEOP_OPERATORS` with the allowed public IDs from `abstract-teleop --identity`
and set `ABSTRACT_TELEOP_DEPLOYMENT` to the deployment ID. The operator runs
`abstract-teleop --deployment ID --robot ROBOT_STATION_ID --headset HEADSET_LAN_IP` on the
computer beside their headset. A shared-model run can omit the deployment on both stations.

The robot and operator renew their leases by posting to
`/v1/deployments/{id}/teleop/{robot_station_id}/robot` and `/operator` respectively.
The shared-model equivalents start at `/v1/teleop/{robot_station_id}/`. Both roles use
regular API keys. The owner of the deployment registers the robot with its own station ID.
The robot can authorize an operator on another account by their exact public station ID.
An offline robot answers `teleop_offline`, an unlisted operator `teleop_forbidden`,
and a competing live station `teleop_busy`. `teleop_unavailable` means the coordination
service is unavailable. Cameras and controls travel over direct or relayed QUIC.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.