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

# Router with Step Choices

> Use the Router step_choices parameter with string, step, and list selector returns.

A Router selector can declare a `step_choices` parameter. The router passes its prepared choices to that parameter. The selector can return a choice name, a step object, or a list of choices to run in sequence.

## Selection options

Use `step_choices` to inspect the prepared choices at runtime. Return a list to run several choices in sequence. A nested list in `choices` is prepared as a grouped `Steps` container.

## Selector Return Types Summary

| Return Type                 | Description                              | Example                                 |
| --------------------------- | ---------------------------------------- | --------------------------------------- |
| `str`                       | Step name - Router resolves from choices | `return "Tech Research"`                |
| `Step`                      | Step object directly                     | `return step_map["writer"]`             |
| `List[Step]` or `List[str]` | Run multiple choices in sequence         | `return [researcher, writer, reviewer]` |

## Examples

<CardGroup cols={2}>
  <Card title="String Selector" icon="code" href="/workflows/usage/examples/router-choices/string-selector">
    Return step names as strings for simple resolution.
  </Card>

  <Card title="Dynamic Selector" icon="code" href="/workflows/usage/examples/router-choices/dynamic-selector">
    Inspect `step_choices` to dynamically select steps.
  </Card>

  <Card title="Nested Selector" icon="code" href="/workflows/usage/examples/router-choices/nested-selector">
    Select nested lists of steps as a single unit.
  </Card>
</CardGroup>

## Developer Resources

* [Router Steps Reference](/reference/workflows/router-steps)
* [Router steps workflow](/workflows/usage/router-steps-workflow)
* [Router with Loop Steps](/workflows/usage/router-with-loop-steps)
