# Builds and versions

Create agent builds, draft and validate build versions from a template or a spec file, mark them ready, and use them in deployments.

Source: https://www.agentclash.dev/docs/guides/builds-and-versions
Markdown export: https://www.agentclash.dev/md/docs/guides/builds-and-versions

An **agent build** is a named agent definition. Each build holds a history of **build versions**. A version is a concrete spec that starts as an editable draft and becomes immutable once you mark it ready. Only ready versions can back a deployment.

Use `agentclash build` when you iterate on an agent from the terminal or a script instead of the web app.

## Create a build

```bash
agentclash build create --name "support-agent" --description "Tier-1 support agent"
agentclash build list
agentclash build get <buildId>
```

`build get` shows the build with its version history.

## Create a draft version

Start from a built-in template:

```bash
agentclash build version templates
agentclash build version create <buildId> --template honest-agent
```

Or supply your own spec as JSON:

```bash
agentclash build version create <buildId> \
  --agent-kind llm_agent \
  --spec-file version-spec.json
```

`--agent-kind` is one of `llm_agent`, `workflow_agent`, `programmatic_agent`, `multi_agent_system`, or `hosted_external`. Run `build version templates` to see the template keys available to you.

## Edit, validate, and mark ready

Drafts can be edited. Check the version before you freeze it:

```bash
agentclash build version get <versionId>
agentclash build version update <versionId> --spec-file version-spec.json
agentclash build version validate <versionId>
agentclash build version ready <versionId>
```

Once a version is ready it is immutable and deployable. To change it, create a new draft version on the same build.

## Feed a deployment

A deployment ties a ready build version to a provider account, a model, and a runtime profile:

```bash
agentclash deployment create \
  --name "support-agent-prod" \
  --agent-build-id <buildId> \
  --build-version-id <versionId> \
  --provider-account-id <providerAccountId> \
  --model <model-id> \
  --runtime-profile-id <runtimeProfileId>
```

The provider account and runtime profile come from [Configure runtime resources](https://www.agentclash.dev/md/docs/guides/configure-runtime-resources).

## See also

- [Configure runtime resources](https://www.agentclash.dev/md/docs/guides/configure-runtime-resources) - secrets, provider accounts, runtime profiles, and deployments
- [Agents and deployments](https://www.agentclash.dev/md/docs/concepts/agents-and-deployments) - how builds, versions, and deployments relate
- [Regression suites](https://www.agentclash.dev/md/docs/guides/regression-suites) - check new versions against past failures
- [CLI reference](https://www.agentclash.dev/md/docs/reference/cli) - every flag for `build` and `build version`