> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superwire.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Variables and References

> Reference input, secrets, agents, tools, resources, prompts, dynamic values, and loop variables.

References use dot paths.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
input.project_id
secrets.api_key
agent.summarize.summary
dynamic.context
schema.shared.status
```

## Root namespaces

| Root       | Meaning                                         |
| ---------- | ----------------------------------------------- |
| `input`    | Values from the request body.                   |
| `secrets`  | Sensitive values from the request body.         |
| `agent`    | Structured outputs from agents.                 |
| `dynamic`  | Values computed by dynamic blocks.              |
| `tool`     | Imported MCP tools.                             |
| `resource` | Imported MCP resources.                         |
| `prompt`   | Imported MCP prompts.                           |
| `schema`   | Schema declarations and nested reusable fields. |
| `model`    | Named model profiles.                           |

## Loop variables

Loop variables are available only inside the looped agent.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
agent summarize_each for task in input.tasks {
    model: model.fast
    instruction: "Summarize task {{ task.title }}."

    output {
        title: string
        summary: string
    }
}
```

Object-shaped items may be destructured in the loop header.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
agent summarize_each for { a, b } in input.something {
    model: model.fast
    instruction: "Summarize A={{ a }} and B={{ b }}."

    output {
        summary: string
    }
}
```
