> 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

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.internetobject.org/definitions/variables.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.
