> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-update-deprecated-models.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Router Steps

## Parameters

| Parameter                   | Type                                                             | Default         | Description                                                                                    |
| --------------------------- | ---------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------- |
| `selector`                  | `Callable[[StepInput], ...] \| Callable[[StepInput, list], ...]` | `None`          | Function to select steps dynamically. Can optionally accept `step_choices` as second parameter |
| `choices`                   | `WorkflowSteps`                                                  | Required        | Available steps for selection. Supports nested lists (becomes Steps container)                 |
| `name`                      | `Optional[str]`                                                  | `None`          | Name of the router step                                                                        |
| `description`               | `Optional[str]`                                                  | `None`          | Description of the router step                                                                 |
| `requires_confirmation`     | `bool`                                                           | `False`         | Pause for user confirmation before executing selected route                                    |
| `confirmation_message`      | `Optional[str]`                                                  | `None`          | Message shown to user when requesting confirmation                                             |
| `requires_user_input`       | `bool`                                                           | `False`         | Pause for user to select route(s) instead of using selector                                    |
| `user_input_message`        | `Optional[str]`                                                  | `None`          | Message shown to user when requesting route selection                                          |
| `allow_multiple_selections` | `bool`                                                           | `False`         | Allow user to select multiple routes                                                           |
| `on_reject`                 | `OnReject`                                                       | `OnReject.skip` | Action when rejected: `skip`, `cancel`                                                         |

## Selector Return Types

The selector function can return any of the following:

| Return Type  | Description                                           |
| ------------ | ----------------------------------------------------- |
| `str`        | Step name as string - Router resolves it from choices |
| `Step`       | Step object directly                                  |
| `List[Step]` | List of steps for chaining execution                  |

## Selector Function Signatures

### Basic Signature

```python theme={null}
def selector(step_input: StepInput) -> Union[str, Step, List[Step]]:
    ...
```

### Extended Signature (with step\_choices)

```python theme={null}
def selector(step_input: StepInput, step_choices: list) -> Union[str, Step, List[Step]]:
    ...
```

The `step_choices` parameter provides access to the prepared Step objects from `Router.choices`, enabling dynamic selection based on available options.

### Async Support

Both signatures support async functions:

```python theme={null}
async def selector(step_input: StepInput, step_choices: list) -> Union[str, Step, List[Step]]:
    ...
```
