> For the complete documentation index, see [llms.txt](https://docs.smartbotpro.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smartbotpro.io/scripts/actions/run-smartquery.md).

# Run SmartQuery

An action is created by right-clicking on a free area of ​​the screen or by selecting an action from the additional menu (on the left):

![](/files/Khubpw6tJayOoN14eXqt)

You will have access to a field for entering expressions in the SmartQuery language specially developed in Smarbot:

![](/files/AOJvHF1IouwOjcLcgj0V)

In addition, in this field you can declare (create) variables and perform arithmetic operations with them.

![%Баллы% = %Баллы%+1 Простейшая операция по увеличению числовой переменной на 1](/files/OPDcqulaxOLekKt4znW0)

The above example could have been done with the Set Variables step, but the Run SmartQuery step allows for much more complex transformations.&#x20;

A [separate section](https://docs.smartbot-vk.ru/smartquery/vvedenie) of our documentation is devoted to the syntax and capabilities of the SmartQuery language.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.smartbotpro.io/scripts/actions/run-smartquery.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
