# Conditional Loop

### Description

Decorator looping node while condition is met.

**To create it**, right-click on the node and select <mark style="color:purple;">Add Decorator/Conditional Loop</mark>.

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2FOdawc5EfbY78I6V77yX3%2FConditional%20loop%201.png?alt=media&#x26;token=b4a3fca3-564a-4bbd-8ebb-20dc594237f5" alt=""><figcaption><p>How to create this decorator</p></figcaption></figure>

This decorator has a number of fields, that are highlighted in picture below.

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2FvDhjwuemcBWhqLRmz8eb%2FConditional%20loop%202.png?alt=media&#x26;token=5b9f1dd7-603a-4113-8e0a-d0c9cd50fd01" alt=""><figcaption><p>Fields</p></figcaption></figure>

### Fields

| Name      | Description                |
| --------- | -------------------------- |
| Node Name | Name of node               |
| Key       | Key for verification       |
| Comparer  | Type of value verification |

{% hint style="info" %}
Comparer is only shown after you select a key.
{% endhint %}

{% hint style="info" %}
For more information about Comparers visit ["Decorators"](https://renownedgames.gitbook.io/ai-tree/nodes/decorators) tab.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://renownedgames.gitbook.io/ai-tree/nodes/decorators/conditional-loop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
