> ## 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.

# Core Concepts

> The main building blocks of a Superwire workflow.

A Superwire workflow is a dependency graph built from declarations.

```wire theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
input {
    message: string
}

secrets {
    api_key: string
}

provider llm from openai {
    endpoint: "https://api.openai.com/v1"
    api_key: secrets.api_key
}

model fast from llm {
    id: "gpt-4.1-mini"
}

agent reply {
    model: model.fast
    instruction: "Reply to {{ input.message }}"
    output {
        message: string
    }
}

output {
    result: agent.reply
}
```

## Main declarations

| Declaration                  | Purpose                                                             |
| ---------------------------- | ------------------------------------------------------------------- |
| `input`                      | Public values supplied by the executor request.                     |
| `secrets`                    | Sensitive values supplied by the executor request.                  |
| `provider`                   | Configures access to an OpenAI-compatible backend through `openai`. |
| `model`                      | Defines a reusable model profile from a provider instance.          |
| `schema`                     | Defines reusable structured types.                                  |
| `mcp`                        | Defines an MCP server endpoint.                                     |
| `tool`, `prompt`, `resource` | Import external MCP capabilities.                                   |
| `dynamic`                    | Builds runtime values from expressions.                             |
| `agent`                      | Runs one model step.                                                |
| `output`                     | Defines the final JSON response.                                    |

## Runtime topology

```text theme={"languages":{"custom":["/languages/wire.tmLanguage.json"]}}
provider instance -> model profile -> agent
```

A provider declaration does not select a model by itself. A model profile selects the provider-specific model ID. Agents reference named model profiles.

## Design goals

* Keep secrets outside `.wire` files.
* Keep provider access separate from model selection.
* Make dependencies explicit through references.
* Require structured outputs so downstream steps can rely on stable shapes.
* Let the executor schedule independent work concurrently.
