# instances\_exist

### Description

`instance_exists` or `instances_exist` returns True if the case has at least one [instance](/guides/glossary/instance.md) of the specified type(s). Like with other declarations an optional where clause is also supported.

### Example: Ontology and Role

```
instances_exist(Person, AccountHolder)
```

This will return True if there is at least one Person with the [role](/guides/glossary/role.md) AccountHolder.

### Example: Ontology and Where-Clause

```
instance_exists(Person where self.first_name = 'Thorben')
```

This will return True if there is at least one Person with the `first_name` Thorben.


---

# 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://docs.atfinity.io/rule-language/operators/special-operators/instances_exist.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.
