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

# Loop Step • Rust AI Agent SDK

> loop_step: Create a loop workflow step Creates a loop step with an agent and items to iterate over. # Arguments * `agent` - The agent to execute for each item *...

# loop\_step

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**workflow\_aliases**](../modules/workflow_aliases) module.

Create a loop workflow step Creates a loop step with an agent and items to iterate over. # Arguments \* `agent` - The agent to execute for each item \* `items` - Items to iterate over

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def loop_step(
    agent: Arc<crate::agent::Agent>,
    items: Vec<String>,
) -> crate::workflows::FlowStep
```

## Parameters

<ParamField query="agent" type="Arc<crate::agent::Agent>" required={true}>
  No description available.
</ParamField>

<ParamField query="items" type="Vec<String>" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="crate::workflows::FlowStep">
  The result of the operation.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/workflow_aliases.rs#L44">
  `praisonai/src/parity/workflow_aliases.rs` at line 44
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Loops" icon="rotate" href="/docs/rust/loops" />

  <Card title="Rust Conditions" icon="code-branch" href="/docs/rust/conditions" />
</CardGroup>
