# Commands

In contrast to [queries](/z_glossary/queries.md), commands can change the state in the [state machine](https://github.com/tearust/t-rust/blob/master/docs/_gitbook-dev-docs/z_glossary/state_machine.md).

In order to keep the consistency of the state machine, we cannot allow the hosting node to ask one state machine node to change its state directly. We have to put the change request - actually a command - to a [conveyor](/z_glossary/conveyor.md). The conveyor algorithm will make sure all state machine nodes get the same sequence of all comands, and eventually update all of their states to the same new state.

Because it's a sync call, the caller (hosting node) cannot get the execution result of this command immediately. Instead, the caller will poll the result after a few seconds to get the result.

![5](https://user-images.githubusercontent.com/86096370/159343544-f349473c-19ba-4c51-a6cd-4442626eaa02.png) ![6](https://user-images.githubusercontent.com/86096370/159343552-d67709f1-f2cf-4651-8405-f0d9e6b41e4e.png)

![7](https://user-images.githubusercontent.com/86096370/159343554-53cd8bf5-eba3-40d8-889a-039766c39e9b.png)


---

# 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://dev.teaproject.org/z_glossary/commands.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.
