---
title: Environment Registry
description: How environment registration and discovery works.
---

# Environment Registry

SO101-Nexus environments are registered with Gymnasium at import time. Importing `so101_nexus.mujoco` registers the single-environment MuJoCo IDs; importing `so101_nexus.warp` registers the GPU-parallel batched `Warp*-v1` IDs (requires `so101-nexus[warp]`).

## How Registration Works

Importing the MuJoCo backend triggers registration:

```python
import so101_nexus.mujoco      # registers MuJoCo environments
import so101_nexus.warp        # registers Warp environments (so101-nexus[warp])
```

After importing, create environments with `gym.make()`:

```python
import gymnasium as gym
import so101_nexus.mujoco

env = gym.make("MuJoCoPickLift-v1", render_mode="human")
```

You must import `so101_nexus.mujoco` before calling `gym.make()`. Without the import, Gymnasium will not find the environment ID.

## Discovering Registered Environments

### `all_registered_env_ids()`

```python
from so101_nexus.env_ids import all_registered_env_ids

ids = all_registered_env_ids()
```

```python
def all_registered_env_ids() -> list[str]
```

Returns a list of all SO101-Nexus environment IDs for whichever backends are imported. With the MuJoCo backend imported, it returns the five MuJoCo IDs; with the Warp backend imported, it also returns the five `Warp*-v1` IDs.

## Required Imports

You must import `so101_nexus.mujoco` before its environments can be used. Importing the top-level `so101_nexus` package alone does not register any environments.

| Package | Import Statement | Registers |
|---------|-----------------|-----------|
| `so101-nexus` | `import so101_nexus.mujoco` | MuJoCo environments |
| `so101-nexus[warp]` | `import so101_nexus.warp` | Warp (batched, GPU-parallel) environments |

## Passing Configuration

All environments accept a `config` keyword argument through `gym.make()`:

```python
import gymnasium as gym
import so101_nexus.mujoco
from so101_nexus import PickConfig, CubeObject

config = PickConfig(objects=[CubeObject(color="blue")])

env = gym.make("MuJoCoPickLift-v1", config=config, max_episode_steps=512)
```

See [Configuration Classes](/docs/api/configs) for all available options.

## Batched Warp Environments

Warp environments are natively batched vector environments. Create them with `gym.make_vec()` after importing `so101_nexus.warp`:

```python
import gymnasium as gym
import so101_nexus.warp

envs = gym.make_vec("WarpTouch-v1", num_envs=4096, device="cuda")
obs, info = envs.reset(seed=0)
```

Observations, actions, and rewards are torch tensors on `device`. Autoreset is same-step (the done step returns the post-reset observation). See [Environment IDs](/docs/getting-started/environment-ids) for the full list of `Warp*-v1` IDs.
