What is a trained policy?
A trained policy is a checkpoint — the model weights produced by training an RL task locally withcyberwave-rl or cyberwave-rl-experimental (for example a best_agent.pt). The checkpoint belongs to the RL task it was trained against: you author and export the task, train it on your own machine or GPU, then upload the resulting checkpoint back to the same RL task so the platform can serve it.
Once a checkpoint lives on its RL task you can:
- Publish it as an online controller and assign it to a twin.
- Run cloud inference that loops live joint state through the policy.
- Pull it back into MuJoCo locally to replay it with the Python SDK.
Supported checkpoint contract
Read this section before training or uploading. File storage accepts weights; successful upload does not establish that the hosted controller can execute them. The current legacy hosted path loads skrl agent checkpoints produced for an exported Cyberwave RL task usingcyberwave-rl or cyberwave-rl-experimental.
Register genuine skrl checkpoints with metadata={"checkpoint_format": "skrl"}
through the MCP checkpoint registration operation. File extensions such as .pt
do not identify the runtime format. Arbitrary PyTorch modules, TorchScript actors,
and Stable-Baselines3 checkpoints are not currently supported by this path;
renaming files or declaring them as skrl does not convert them.
Follow RL Tasks for the exported task/source contract
and Train an RL Policy for the training workflow.
Keep the checkpoint paired with its task’s observation ordering and history,
preprocessing, action ordering/scaling and units, control timing, runtime versions
and dependencies. Custom observation/action logic belongs in the task’s supported
source/configuration interfaces, not just in a weights file or dimension metadata.
Manifest-based policies retain their separate provenance/evaluation requirements.
With MCP, call cw_deploy_rl_policy(operation="inspect", rl_task_uuid=...) before
training for documentation links and again after registration for compatibility
blockers. Checks at publication, assignment and start are static checks, not proof
of successful execution. Validate the complete policy in simulation before live use.
Resetting a hosted simulation
Usecw_stop_simulation, then cw_start_simulation to reset. Each start creates a
fresh simulation workload and worker with new MuJoCo model/data loaded from the
current scene configuration. Stop also stops the environment’s controllers. Wait
for the new simulation to be running before starting the assigned controller, or
explicitly request auto_run_controllers when starting the simulation. There is
no separate in-place episode-reset API. Keep scene configuration, initial conditions
and any randomization consistent when comparing trials.
The happy path
1
Train locally
Export your RL task, then train it with
cyberwave-rl / cyberwave-rl-experimental on your own machine. Training produces a checkpoint file such as best_agent.pt.2
Upload the checkpoint
Upload the checkpoint file back to its RL task — via the dashboard, the Python SDK, or REST. Runtime and policy-interface fields are inherited from the parent RL task.
3
Use the policy
Choose one (or more):
- Publish as a controller — turn the checkpoint into an assignable online controller.
- Run inference — dispatch a cloud workload that drives a twin through the policy over MQTT.
- Use in MuJoCo locally — download the checkpoint with the SDK and replay it locally.
Upload a checkpoint
Uploading stores the weights and registers the checkpoint against the RL task in a single call. The new checkpoint inherits the parent task’s runtime target, accelerator, version pins, and policy interface.- Dashboard
- Python SDK
- REST
- Open the RL task and go to the Policies tab.
- Choose Upload checkpoint and select your
.pt/.pth/.zipfile. - Optionally give it a name and description.
Register an external URL
If your weights are already hosted elsewhere, register them by URL instead of uploading bytes. This path also lets you override the inherited runtime target, accelerator, version pins, and policy interface.- Python SDK
- REST
Publish as a controller
Publishing a checkpoint creates a ControllerPolicy — anrltask online controller that you can assign to a twin. The controller runs the policy in its own controller-host cloud node and drives the plant over MQTT, so the same policy can target a simulated or a live robot.
- Dashboard
- REST
From the Policies tab, select a checkpoint and choose Publish as controller. Optionally set a controller name and description.
controller_policy_uuid and controller_policy_slug. From there it behaves like any other online controller — see Online controllers for assigning and running it.
Run inference
Inference dispatches a cloud workload that loads the checkpoint, loops Cyberwave joint state through the policy, and publishes commands over MQTT.This inference path does not run MuJoCo. It is a state-through-policy loop — live joint state in, policy commands out — not a physics rollout. If you want a full physics simulation, use a simulated plant with an online controller instead.
- Python SDK
- REST
checkpoint_uuid(preferred) selects which policy to run.twin_uuidis the robot twin the policy drives.mode,max_steps, andcontrol_rate_hzare optional and tune the loop.
GET /api/v1/rl-tasks/{uuid}/inference.
Use in MuJoCo locally
To replay a checkpoint in MuJoCo on your own machine, select it in the Policies tab — the dashboard reveals a copy-paste snippet that uses the Python SDK to download the checkpoint, stage it into the layoutcyberwave-rl’s play step expects, and play it locally.
Endpoint reference
Where to go next
RL Tasks
Author, export, and train the RL task a checkpoint belongs to.
Online controllers
Run a published policy in its own controller host against a simulated or live robot.
Model catalog
Explore other model types and training flows on the platform.