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

# Quickstart

> Install relay, point it at a server and get your first action chunk.

<Steps>
  <Step title="Install">
    `relay` needs Python 3.10 or newer.

    ```bash theme={null}
    pip install relay-intelligence
    ```
  </Step>

  <Step title="Set the server URL">
    Put `WALLE_URL` in your environment or in a `.env` file in your working directory. `{model}` stays as written: the client replaces it with the model you connect to.

    ```bash .env theme={null}
    WALLE_URL=https://<workspace>--walle-{model}.modal.run
    ```

    Replace `<workspace>` with the Modal workspace the servers are deployed in. For a development server started with `modal serve`, add `-dev` before `.modal.run`.
  </Step>

  <Step title="Get actions">
    ```python first_call.py theme={null}
    import numpy as np
    from relay import PolicyClient

    policy = PolicyClient("pi05")

    frame = np.zeros((224, 224, 3), np.uint8)   # replace with your camera frames
    actions = policy.infer({
        "observation.images.base_0_rgb": frame,
        "observation.images.left_wrist_0_rgb": frame,
        "observation.images.right_wrist_0_rgb": frame,
        "state": np.zeros(32, np.float32),        # replace with your joint state
        "prompt": "pick up the cup",
    })

    print(actions.shape)   # (50, 32): 50 future steps × 32 action dims
    policy.close()
    ```

    `actions[0]` is the action to execute now, `actions[1]` the one after, and so on.
  </Step>

  <Step title="Check what the server expects">
    Each server describes its model on connect. Read this before you build observations for a new model.

    ```python theme={null}
    print(policy.get_server_metadata())
    # {'image_resolution': [224, 224], 'max_cameras': 3, 'action_horizon': 50,
    #  'action_dim': 32, 'action_space': 'joint_position', ...}
    ```
  </Step>
</Steps>

<Note>
  If a server has just been deployed or scaled up, the first connection waits while the model loads. That can take a few minutes. `PolicyClient` waits rather than timing out, and later connections take under a second.
</Note>

## Run the demo

The repository includes a demo. It sends synthetic frames, shows each action chunk as it arrives and reports latency percentiles at the end. It's the quickest way to check your setup and see the latency from your network.

```bash theme={null}
git clone https://github.com/WALLservE/robot-client && cd robot-client
pip install -e .
python examples/demo.py                 # π0.5, 500 steps
python examples/demo.py pi0 --steps 50  # another model, fewer steps
```

Replace `get_observation()` in [`examples/demo.py`](https://github.com/WALLservE/robot-client/blob/main/examples/demo.py) with your robot's cameras and joint state to turn it into a real control loop.

## Next steps

<CardGroup cols={2}>
  <Card title="Observations" icon="camera" href="/observations">
    Camera, state and option keys for each model.
  </Card>

  <Card title="Control loops" icon="arrows-rotate" href="/control-loop">
    Running a policy on a real robot, episode after episode.
  </Card>
</CardGroup>


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