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

# jstm agent build

> Compile a committed spec into an immutable, versioned agent package.

Build enqueues a package build, polls it to a terminal status, and prints the receipt.

```bash theme={null}
jstm agent build
jstm agent build acme-corp/finance/month-end-close
jstm agent build month-end-close --version 0.2.0
```

## Arguments and options

<ParamField path="AGENT_ID" default="active draft">
  The agent to build, as a handle, UUID, or FQN. Omit it to build the agent in your current context.
</ParamField>

<ParamField path="--version">
  The package version to build, such as `0.2.0`. Omit to let the platform assign the next version.
</ParamField>

<ParamField path="--wait / --no-wait" default="--wait">
  Wait for the build to reach a terminal status. On by default. `--no-wait` returns as soon as the build is enqueued.
</ParamField>

<ParamField path="--json">
  Output the build receipt as JSON.
</ParamField>

## What a build produces

An immutable package pinned to a version. Nothing about it changes afterward — a fix means a new version, which is what gives every deployment and every run exact provenance.

To draft or change the spec first, use [`jstm agent plan`](/cli/agent-plan). Build compiles what has already been committed.

## Building as part of promotion

The stage commands accept `--build` so you can build and stage in one step:

```bash theme={null}
jstm agent dry-run month-end-close --build
jstm agent pilot month-end-close --build --version 0.3.0
```

See [Stages](/cli/agent-stages).

## After building

```bash theme={null}
jstm agent conform ./month-end-close   # check it against the spec
jstm agent view month-end-close --package   # see the package as a file tree
```

## See also

* [`jstm agent conform`](/cli/agent-conform)
* [Promote to production](/guides/promote-to-production)
