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

# Build & deploy

The `deploy` command builds and deploys the project to AgentKit, running the full pipeline of configuration, build, and apply. It also exposes each stage as a dedicated subcommand.

## deploy

Run the full deployment pipeline (config → build → apply). The top-level options are applied during the configuration stage.

| Flag / Argument | Description | Default |
| - | - | - |
| `-n, --name <name>` | Runtime/app name (config). | — |
| `-r, --region <region>` | Volcengine region (config). | — |
| `-p, --project <name>` | AgentKit project (config). | — |
| `--im-feishu` | Deploy a Feishu bot proxy to VeFaaS after the runtime deploy. | `false` |
| `--im-feishu-app-id <id>` | Feishu app id for the proxy. | — |
| `--im-feishu-app-secret <secret>` | Feishu app secret for the proxy. | — |

```bash lines theme={null}
agentkit deploy --name my-agent --region cn-beijing --project demo
```

IM channels are normally configured in `agentkit.yaml` under the `im` block (Feishu, WeCom, and DingTalk); see [agentkit.yaml](/productions/agentkit-cli/archives/0.50.1/en/agentkit-yaml). The `--im-feishu*` flags are a convenience for deploying a Feishu proxy without editing the file.

## deploy config

Scaffold the `.agentkit/` directory, generating `agentkit.yaml` and a `Dockerfile`.

| Flag / Argument | Description | Default |
| - | - | - |
| `-n, --name <name>` | Runtime/app name. | — |
| `-r, --region <region>` | Volcengine region. | cn-beijing |
| `-p, --project <name>` | AgentKit project. | default |
| `-f, --force` | Overwrite existing generated files. | `false` |

```bash lines theme={null}
agentkit deploy config --name my-agent --force
```

The generated `agentkit.yaml` is the single source of deploy configuration — both `deploy build` and `deploy apply` read from it. For the complete file structure and a field-by-field reference, see [agentkit.yaml](/productions/agentkit-cli/archives/0.50.1/en/agentkit-yaml).

## Container entrypoint and port

`deploy` has no entrypoint setting — how the runtime starts is determined entirely by the Dockerfile used to build the image. The template Dockerfile sets the start command via `CMD`:

```dockerfile lines theme={null}
EXPOSE 8000
CMD ["python", "main.py"]
```

The one hard requirement is that the process inside the container must listen on `0.0.0.0:8000`; the runtime probes that port to decide whether an instance is ready. To change how it starts, edit the Dockerfile's `CMD` (or point the `dockerfile` field at a different file) rather than passing a flag to `deploy`.

## Environment variables

Runtime environment variables are declared in `agentkit.yaml`'s `envs`, with values referencing the deploy environment via `${VAR}` (for the syntax and a field reference, see [agentkit.yaml · Environment variables](/productions/agentkit-cli/archives/0.50.1/en/agentkit-yaml#environment-variables)). The CLI resolves these references at deploy time and injects them into the runtime.

For a local deploy, export the variables (or keep them in a local, uncommitted `.env`), then deploy:

```bash lines theme={null}
export MODEL_AGENT_API_KEY=sk-...
agentkit deploy
```

In continuous deployment, store them as repository secrets and export them into the deploy job's environment. The `VOLCENGINE_*` deploy credentials are not injected into the runtime.

## deploy build

Build the image in the cloud and write the artifact.

| Flag / Argument | Description | Default |
| - | - | - |
| *(no options)* | This subcommand takes no options. | — |

```bash lines theme={null}
agentkit deploy build
```

## deploy apply

Create or update the runtime from the latest built artifact.

| Flag / Argument | Description | Default |
| - | - | - |
| *(no options)* | This subcommand takes no options. | — |

```bash lines theme={null}
agentkit deploy apply
```
