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.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:Inject runtime environment variables
Environment variables the agent runtime needs (such as a model API key) are declared inagentkit.yaml’s envs, with values referenced from the environment via ${VAR} (see Build & 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.
Single-line values can be added directly; multi-line values need GitHub Actions’ multi-line secret form.
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 deployto read. - Runs
agentkit deploy: reads.agentkit/agentkit.yamland theDockerfile, 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.
.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.