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

> ## Agent Instructions
> To build and serve your own model, start at /deploy/development/quickstart and /deploy/development/overview. Deploying is the default path: reactor init scaffolds a workspace, reactor auth login authenticates, and reactor model deploy registers the model, publishes the release with the weights/ folder, and activates it on Reactor's GPUs, in one command from that workspace. Docker must be running, because the publish step builds the image locally. Bump model.version in reactor.yaml before redeploying a change, because a release that already has an image is reactivated as it is. Deployment access is granted per account, so contact team@reactor.inc if a deploy is refused. Every key in reactor.yaml is documented at /deploy/platform/reactor-yaml. Model code imports reactor_runtime; Python client code imports reactor_sdk. The runtime overview explains the model interface. Running the model on your own machine with reactor run is optional and needs a GPU you attach with --gpus; /deploy/development/local-testing covers that loop and pairs a complete brightness model with a Python client test in a separate brightness-test workspace.
> Reactor hosts multiple models, each with its own connect slug (modelName) and command/event schema. The video model catalog — slug, typed SDK package, and links to its schema — is at /model-api-reference/overview. Robotics policy documentation starts at /robotics/overview; X-WAM observations, actions, and client integration are under /robotics/xwam/; Cosmos3 Nano Policy DROID is under /robotics/cosmos/nano-policy-droid/. Some models expose one slug per experience (e.g. HappyOyster); always take the slug from the model's own pages, never guess it.
> Fastest path to a working app: `npx create-reactor-app my-app --model=<slug>` scaffolds a complete app with secure auth wired up. Typed TypeScript SDKs are published as @reactor-models/<model>; Python uses the base reactor-sdk package.
> Auth: exchange an API key (rk_...) for a JWT via POST https://api.reactor.inc/tokens from your server. Never put the API key in client-side code.
> Append .md to any docs URL for clean Markdown. Search these docs via the MCP server at https://docs.reactor.inc/mcp.

# Run in simulation

> Connect the RoboTwin 2.0 evaluation client to hosted X-WAM.

The
[Reactor gateway](https://github.com/reactor-team/reactor-cookbook/tree/main/robotics/sim/robotwin)
connects X-WAM's upstream evaluation client to the hosted policy. RoboTwin owns physics, episode
termination, and task scoring. The gateway translates observations into video tracks and model
commands, then returns actions to the evaluation client.

## Prepare RoboTwin

Use the upstream evaluation environment at the revision below. Install the simulator and its assets
following the
[evaluation setup](https://github.com/sharinka0715/X-WAM/blob/72cfb86b33fc5060963ef63412f16439fcfa472f/evaluation/README.md)
and
[RoboTwin installation guide](https://robotwin-platform.github.io/doc/usage/robotwin-install.html).
The simulator requires a CUDA-capable Linux environment. Model weights and the upstream policy
server are unnecessary when using Reactor.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
git clone https://github.com/sharinka0715/X-WAM.git
cd X-WAM
git checkout 72cfb86b33fc5060963ef63412f16439fcfa472f
git submodule update --init --recursive
cp -R evaluation/X-WAM third_party/RoboTwin/policy/X-WAM
```

Use separate Python environments:

| Environment | Contents |
| - | - |
| Simulator | Upstream evaluation dependencies, Python 3.10, NumPy `1.23.5` |
| Gateway | Reactor SDK and transport dependencies, Python 3.12, NumPy `>=1.26` |

The selected `demo_randomized` task configuration uses `aloha-agilex`, a head camera and two wrist
cameras. The upstream checkout pins RoboTwin to `c3ddfa8b97d5519efa828b075999bd0006778e5e`.

## Start the gateway

In a separate terminal, start at the root of the `reactor-cookbook` checkout from the
[quickstart](/robotics/xwam/robotwin/quickstart):

```bash theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
cd robotics/sim/robotwin
uv sync --frozen --python 3.12
export REACTOR_API_KEY='your-api-key'
uv run --frozen python check_wiring.py
uv run --frozen python -m robotwin_sim.main --model reactor/xwam --port 10086
```

The wiring check runs offline. Wait for `tracks published` and the gateway's listening message
before starting the simulator. Keep the gateway port on a trusted local network: this example uses
the upstream client's pickle-based protocol.

## Run an episode

In a second terminal, activate the simulator environment and run this from the **X-WAM repository
root**. The client resolves `third_party/RoboTwin` relative to the working directory.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
python evaluation/robotwin_client.py \
  --task_name adjust_bottle \
  --task_config demo_randomized \
  --num_evals_per_worker 1 \
  --action_length 32 \
  --server_port 10086 \
  --save_root_dir ./eval_results/robotwin
```

The client executes up to 32 actions before requesting another chunk. It saves results and rollout
videos under the output directory. Check the task success result separately from successful API
responses: an episode can finish without solving the task. Stop the gateway with Ctrl-C when done to
close its Reactor session.


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