> For the complete documentation index, see [llms.txt](https://docs.simulacrum.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.simulacrum.network/synthetic-blockchain/organization/commands.md).

# Commands

A command is the core building block of The Simulacra. A command is similar to a traditional blockchain transaction. A command is structured with some consistent fields.

A command is structured:

```
struct Command {
    bytes32 id; // Identifier from the source
    uint256 chainId; // chainId, if blank can be executed on any chain
    uint256 nonce; // nonce to enable cancellation of commands
    uint256 value; // amount of NATIVE

    // wallet info
    bytes32 ownerId; // command owner's identifier
    bytes32 namespace; // namespace of the wallet (used for source)
    uint16 walletIndex; // defaults to 0
    
    // command definition
    bytes32 metaprotocol;
    bytes32[] modifiers; // additional command indicators
    Reference[] references; // additional information about a referenced entity
    string[] args;
    Field[] kwargs;
    
    // additional data
    uint64 timestamp; // timestamp with ms
    uint256 gas;
    uint256 bribe; // bribe for priority in mempool
    bytes32 hash; // maybe we don't need this
    
    // validate the execution
    CommandStatus status;
    uint256 gasUsed;
}

enum CommandStatus {
    PENDING,
    SUCCESS,
    FAILURE,
    CANCELLED
}

struct Field {
    bytes32 key;
    string value;
}

struct Reference {
    bytes32 source; // This simplifies handling of the reference
    bytes32 identifier; // globally unique identifier
}
```


---

# 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.simulacrum.network/synthetic-blockchain/organization/commands.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.
