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

# Initialize a project

The `init` command scaffolds a new agent project from one of the built-in templates, organized by language bucket.

## init

Scaffold a new agent project from a template. When run without options, an interactive prompt guides you through the language and template selection.

| Flag / Argument | Description | Default |
| - | - | - |
| `[name]` | Project name (or `.` for the current directory). | — |
| `-L, --language <id>` | Language bucket (`python`, `java`, `typescript`, `golang`). | — |
| `-t, --template <id>` | Template id within the language. | — |
| `-r, --region <region>` | Cloud region written to the generated project. | Selected provider's default region |
| `-y, --yes` | Skip prompts and use defaults. | `false` |
| `-f, --force` | Scaffold into a non-empty directory. | `false` |
| `-l, --list` | List available languages and templates, then exit. | `false` |

```bash lines theme={null}
agentkit init my-agent --language python --template default --yes
agentkit --provider byteplus init my-agent --language python --template default --region ap-southeast-1 --yes
```

## Set up GitHub CI/CD

The scaffold includes a GitHub Actions workflow at `.github/workflows/deploy.yml`. Once credentials are configured, every push to the `main` branch (or a manual run from the repository's Actions page) builds the image in the cloud and idempotently creates or updates the corresponding AgentKit runtime.

### Configure deploy credentials

Add the following under the repository's Settings → Secrets and variables → Actions:

| Name | Type | Description |
| - | - | - |
| `VOLCENGINE_ACCESS_KEY` | Secret | Volcengine access key, used for deploy authentication. |
| `VOLCENGINE_SECRET_KEY` | Secret | Volcengine secret key. |
| `VOLCENGINE_REGION` | Variable (optional) | Deploy region; defaults to `cn-beijing`. |

<Warning>
  Never hard-code credentials in source or commit them to the repository. The project template already adds `.env` to `.gitignore`; supply credentials through repository secrets only.
</Warning>

### Inject runtime environment variables

Environment variables the agent runtime needs (such as a model API key) are declared in `agentkit.yaml`'s `envs`, with values referenced from the environment via `${VAR}` (see [Build & deploy · Environment variables](/productions/agentkit-cli/archives/0.50.9/en/commands/deploy#environment-variables)). In CI, add those variables as repository secrets and export them into the environment of the deploy step — e.g. declaring `MODEL_AGENT_API_KEY: ${MODEL_AGENT_API_KEY}` means adding a same-named `MODEL_AGENT_API_KEY` secret. `VOLCENGINE_*` are deploy credentials and are not injected into the runtime. To add a variable, add a `${VAR}` line in `agentkit.yaml` plus the matching repository secret; no workflow edits are required.

<Note>
  Single-line values can be added directly; multi-line values need GitHub Actions' multi-line secret form.
</Note>

### What the workflow does

On each trigger, the workflow runs in order:

* Checks out the code and installs the AgentKit CLI (the template installs it via `npm install -g agentkit-cli`; replace this with your distribution channel if you use an internal one).
* Forwards the repository secrets into the job environment for `agentkit deploy` to read.
* Runs `agentkit deploy`: reads `.agentkit/agentkit.yaml` and the `Dockerfile`, builds the image in the cloud, and idempotently creates or updates the runtime by name.
* Smoke-tests the deployed runtime with `agentkit invoke`; a failure here does not block the workflow.

<Note>
  `.agentkit/agentkit.yaml` records the runtime name, region, and project, so commit it to the repository to ensure every CI deploy targets the same runtime. (`.agentkit/artifacts/` holds per-deploy build output and is ignored by default.) For more on the deploy pipeline, see [Deploy a project](/productions/agentkit-cli/archives/0.50.9/en/commands/deploy).
</Note>
