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

# unmute compile

> Write the compiled project for each target, and read the report written next to it.

```text theme={null}
$ unmute compile --help
Compile a v1 agent package to its resolved target artifacts.

With no package-dir, the package is the current directory, so you can cd into an agent and run this with no arguments.

Usage:
  unmute compile [package-dir] [flags]

Flags:
  -h, --help             help for compile
      --target strings   target instance name (repeatable; default: all)
```

## Usage

```sh theme={null}
unmute compile my-agent
```

Every file written is printed. This is a package scaffolded by
[`unmute init`](/reference/cli/init), which declares one LiveKit target:

```text theme={null}
generated my-agent/build/livekit/.dockerignore
generated my-agent/build/livekit/.env.example
generated my-agent/build/livekit/Dockerfile
generated my-agent/build/livekit/README.md
generated my-agent/build/livekit/agent.py
generated my-agent/build/livekit/compile-report.json
generated my-agent/build/livekit/compose.dev.yaml
generated my-agent/build/livekit/dev_metrics.py
generated my-agent/build/livekit/pyproject.toml
```

A package with tools, knowledge files, tracing, or a phone route writes more:
`tools/<name>.py` per tool, `knowledge.py`, `tracing.py`, and on Pipecat
`pcc-deploy.toml`.

Output goes to `<package>/build/<target-instance-name>/`. With no `--target`,
every declared target is compiled. `--target` is repeatable.

## The report

The compiler does not print what it decided. It writes that to
`build/<target>/compile-report.json`, next to the files it describes, one JSON
object per target:

* `bindings`: what each model role resolved to, forwarded to the provider
  without being checked. A LiveKit OpenAI Responses binding is the one
  exception: its entry names the compiler directive it consumed and the
  reasoning setting it lowered, instead of claiming every param passed through
  unchanged.
* `sizing`: your `capacity:` block turned into numbers, tagged with the
  assumption they came from.
* `telephony`: present only for a target with a phone route. The resolved
  route, its endpoints, and an evidence line per capability.
* `route_prerequisites`: setup work you must do outside Unmute before a real
  call, when the route needs any.
* `required_env`, `variables`, `secrets`: what the generated project reads
  from its environment, and where each name comes from.
* `generated_files`: the same paths `compile` printed above.
* `supported`: the framework version window this build was verified against.
* `notes`: driver detail, such as how a role was routed or how a turn pace
  resolved to a silence window.

Open the file to see what a package resolved to. None of it appears on the
terminal.

## Warnings

Warnings print on standard error, and do not change the exit code:

```text theme={null}
warning: livekit: environment variables referenced but not declared in secrets: SIP_TRUNK_HOSTNAME (connections/twilio_sip.yaml environment sip_address)
```

## Compiling is safe to repeat

`build/` is output. Compile as often as you like; never edit inside it.

## Where to go next

<Card title="unmute deploy" icon="rocket" href="/reference/cli/deploy">
  Push the package you just compiled.
</Card>
