> ## 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.

# Core primitives

> The five package surfaces that make up the Reflex SDK.

`rfx` organizes its API into focused package surfaces:

| Surface          | Purpose                                                             |
| ---------------- | ------------------------------------------------------------------- |
| `rfx.robot`      | Robot contract, config, discovery, and hardware-facing abstractions |
| `rfx.sim`        | Simulation and mock execution                                       |
| `rfx.collection` | Dataset recording and collection contracts                          |
| `rfx.runtime`    | Lifecycle, health, CLI, operational helpers                         |
| `rfx.teleop`     | Teleoperation and high-rate recording built on the same primitives  |

## Intent

* Keep the middleware core small and explicit.
* Treat simulation as a primitive, not an afterthought.
* Treat collection as a primitive, not a script on the side.
* Keep robot adapters separate from framework identity.
* Let workflow helpers compose on top of the primitives instead of defining
  them.

## Usage

```python theme={null}
import rfx

robot = rfx.MockRobot(state_dim=12, action_dim=6)
obs = robot.observe()
```

Access package surfaces directly:

```python theme={null}
import rfx

rfx.robot       # Robot protocol, config, discovery
rfx.sim         # Simulation and mock backends
rfx.collection  # Collection and dataset APIs
rfx.runtime     # Runtime and operational helpers
rfx.teleop      # Teleop on top of the same robot/runtime contracts
```
