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

# Add conditions to steps

> Running a step only if conditions are met

By default, when running a Tool, each tool step is executed once. However, Relevance supports conditional execution. Where
a step runs only if the defined condition is met

## Conditions

Access loops under the three-dot menu on the top right of steps. Click on **Enable conditions**.

<p align="center">
  <img width="350" height="150" align="center" src="https://mintcdn.com/relevanceai/c92n16pLC3iTZmPg/images/build-custom-tools/tool-step/add-delete-condition-loop.png?fit=max&auto=format&n=c92n16pLC3iTZmPg&q=85&s=2c75810c3f6e84abc3ca871e669fd05e" data-path="images/build-custom-tools/tool-step/add-delete-condition-loop.png" />
</p>

Conditions must follow JavaScript syntax and must be written inside the template handlebars `{{ condition }}`.

<Tip>
  You can use `&&` and `||` for "and" and "or", respectively.
</Tip>

In the example below, the LLM step runs if the input variable `age` is 30 (`{{ age === 30 }}`) and the input variable
`gender` is female (`{{ gender === "female" }}`).

<Frame caption="Screenshot of the Conditions input in a step">
  <img src="https://mintcdn.com/relevanceai/R4_uN_eHr7TJYC-q/images/conditions.png?fit=max&auto=format&n=R4_uN_eHr7TJYC-q&q=85&s=9c67aa01f15432e7d4ec96e4cb872472" width="1944" height="416" data-path="images/conditions.png" />
</Frame>
