> For the complete documentation index, see [llms.txt](https://docs.smartbot-vk.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smartbot-vk.ru/sozdanie-scenariev/peremennye/vremennye-peremennye.md).

# Временные переменные

Временные переменные существуют с момента выполнения шага, который их создаёт, до завершения обработки текущего сообщения.

В отличие от локальных переменных их значения остаются доступными при смене контекста между пользователями. В отличие от глобальных переменных, их значения доступны только во время обработки одного конкретного сообщения: если бот одновременно получит 2 сообщения от разных пользователей, значения временных переменных будут разными.

Также временные переменные можно и просто использовать для выполнения промежуточных вычислений сложных выражений.

Создать временную переменную можно через шаг Установить переменные, Извлечь данные, Выполнить SmartQuery и другие.

Чтобы создать временную переменную, просто начните вводить её желаемое имя, затем нажмите "Временная переменная".

![](/files/-M7DuEbx21NNiXosa97y)


---

# 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:

```
GET https://docs.smartbot-vk.ru/sozdanie-scenariev/peremennye/vremennye-peremennye.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.
