> For the complete documentation index, see [llms.txt](https://docs.internetobject.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.internetobject.org/definitions/variables.md).

# Variables

Value variables — reusable values referenced with @.

A **value variable** is a reusable value defined in the header with an `@`-prefixed key and used anywhere a value is expected by writing `@name`. Variables reduce repetition, shrink payloads, and let you keep sensitive values in one place.

> `@` is for **values**. For reusable *schemas and types*, use `$` references — see [Schema References](/definitions/schema-references.md).

## Defining and using

```ruby
~ @active: T
~ $schema: { name: string, isActive: bool }
---
~ John, @active
~ Jane, @active
```

## In schema constraints

A variable can supply a constraint value, such as a `choices` list:

```ruby
~ @r: red
~ @g: green
~ @b: blue
~ $schema: { name: string, color: { string, choices: [@r, @g, @b] } }
---
~ John, red
```

## Use cases

### Reduce size and repetition

Define a value once and reference it many times:

```ruby
~ @co: 'ACME Corporation'
~ $schema: { name: string, employer: string }
---
~ John, @co
~ Jane, @co
```

### Keep sensitive values together

Variables let you isolate secrets/keys in the header instead of scattering them through the data:

```ruby
~ @key: 'sk_live_8f3a9c2b'
~ $schema: { account: string, apiKey: string }
---
~ acct_001, @key
```

## See Also

* [Definitions](/definitions/definitions.md) · [Schema References](/definitions/schema-references.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.internetobject.org/definitions/variables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
