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

# Deploy

> Load a trained policy and run the control loop. One command.

`rfx deploy` is the entry point for running a policy on a robot. It handles
loading weights, resolving the robot config, connecting hardware, and running
the control loop with rate control, jitter tracking, and clean shutdown.

## Sources

<CodeGroup>
  ```bash saved checkpoint theme={null}
  rfx deploy runs/my-policy --robot so101
  ```

  ```bash huggingface hub theme={null}
  rfx deploy hf://rfx-community/go2-walk-v1 --robot go2
  ```

  ```bash python file theme={null}
  rfx deploy my_policy.py --robot so101
  ```

  ```bash dry run theme={null}
  rfx deploy runs/my-policy --robot so101 --mock
  ```
</CodeGroup>

Auto-detection: if the policy artifact stored a robot config, `--robot` is
inferred.

## From Python

```python theme={null}
import rfx

stats = rfx.deploy(
    "runs/my-policy",
    robot="so101",
    rate_hz=50,
    duration=30,
)

print(stats.iterations, stats.overruns)
print(stats.p50_jitter_s, stats.p95_jitter_s)
```

See the [Deploy API reference](/sdk/deploy) for all options.

## Stats

Every deploy returns a stats object with:

* `iterations` — total control loop steps executed
* `overruns` — steps that missed their rate deadline
* `p50_jitter_s` / `p95_jitter_s` — per-step timing distribution

Use these to detect regressions when upgrading a policy or swapping backends.

## Safe stop

Ctrl+C performs a clean shutdown: the policy stops receiving observations,
the robot returns home (when safe), and hardware resources are released.
Signal handlers are installed by `rfx.deploy()` — do not install your own.

## Before a production deploy

Run the [operator checklist](/guides/operator-checklist). It exists because
every gate on it has caught a real production-blocking issue at least once.
