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

> ## Agent Instructions
> Unmute compiles to exactly three targets. Pipecat and LiveKit are code targets: compile writes a Python project you run. SLNG is a hosted target: compile writes a deployment body and SLNG runs the agent, so it has no `unmute dev`. Those three are the only values `provider` accepts in `targets.yaml`. Deepgram and ElevenLabs appear in these docs as model vendors, which is not the same thing as a target, and `slng` is both.
> The Go structs in `internal/spec` and `internal/ir` are the schema truth. Check a field against them, or run `unmute validate`, rather than against what you remember.

# How Unmute works

> The four stages between your package and what each target runs.

Unmute is a compiler. You write one package. It reads that package, resolves it
against one target, and writes what the target runs: a Python project for
Pipecat or LiveKit, a deployment body for SLNG.

Nothing of Unmute is left in what it writes.

```mermaid theme={null}
flowchart LR
    P["your package<br/>agent.yaml, prompts, tools"] --> L[Load]
    L --> B[Build]
    B --> V[Validate]
    V --> G[Generate]
    G --> O["build/&lt;target&gt;/<br/>a Python project, or a deployment body"]
```

## The four stages

<Steps>
  <Step title="Load">
    Unmute reads your files: [`agent.yaml`](/reference/agent-yaml),
    [`targets.yaml`](/reference/targets-yaml), your tool files, your
    [connections](/reference/connections-yaml), your prompts, and your local
    Python handlers.

    Decoding is strict. An unknown field is an error, not a shrug, and every
    error carries the file and the line.
  </Step>

  <Step title="Build">
    Names become one description of the agent. Model names point at model
    definitions. The names in an agent's lists are resolved to the tasks, task
    groups, handoffs and tools they mean. Per-target overrides are applied, and
    a telephony route is picked from what the target declares.

    This description knows nothing about Pipecat or LiveKit.
  </Step>

  <Step title="Validate">
    The description is checked against what your chosen target can do.

    Something the target **cannot** do stops the build, before anything is
    written. Something it does **differently** while keeping your contract is a
    warning: the build finishes and the warning tells you the difference.
  </Step>

  <Step title="Generate">
    One driver turns the description into files for one target.

    `validate` and `compile` run the same first three stages, so a package that
    validates cannot surprise you at compile time.
  </Step>
</Steps>

## What you get

`unmute compile` writes one directory per target under `build/`. Name the
package, as in `unmute compile my-agent`, or leave the argument out to compile
the directory you are standing in.

<CodeGroup>
  ```text Pipecat theme={null}
  build/pipecat/
  ├── bot.py              # the agent
  ├── tools/              # your local handlers, copied
  ├── dev_metrics.py      # per-turn timings, read by unmute dev
  ├── pyproject.toml      # pinned dependencies
  ├── Dockerfile
  ├── .dockerignore
  ├── compose.dev.yaml
  ├── pcc-deploy.toml
  ├── .env.example        # exactly the variables you supply
  ├── README.md           # the runbook for this build
  └── compile-report.json
  ```

  ```text LiveKit theme={null}
  build/livekit/
  ├── agent.py            # the agent
  ├── tools/              # your local handlers, copied
  ├── dev_metrics.py      # per-turn timings, read by unmute dev
  ├── pyproject.toml      # pinned dependencies
  ├── Dockerfile
  ├── .dockerignore
  ├── compose.dev.yaml
  ├── .env.example        # exactly the variables you supply
  ├── README.md           # the runbook for this build
  └── compile-report.json
  ```

  ```text SLNG theme={null}
  build/slng/
  ├── agent.json          # the deployment body unmute deploy pushes
  ├── tools/              # one JSON body per tool
  └── README.md           # the runbook for this build
  ```
</CodeGroup>

A code target is a normal Python project. You can read it, run it, and deploy
it. It does not import Unmute.

On SLNG there is nothing to run yourself: `unmute deploy` pushes `agent.json`
and SLNG runs the agent.

<Warning>
  Treat `build/` as output. Edit the package and compile again. Anything you
  change inside `build/` is overwritten on the next compile.
</Warning>

Two files in every build answer "what did it decide?": `README.md` is the
runbook for that build, and <Tooltip tip="A JSON file beside your build listing every choice the compiler made: each model, each route, each number it worked out.">`compile-report.json`</Tooltip> records every binding,
resolved route and derived number the compiler used.

## Where to go next

<Columns cols={2}>
  <Card title="Build the agent" icon="graduation-cap" href="/build/your-first-agent">
    Start the guided path with the smallest real agent.
  </Card>

  <Card title="Targets" icon="boxes" href="/targets/overview">
    What a target is, and what each compiled project looks like.
  </Card>
</Columns>
