Skip to main content
AgentKit CLI currently uses two agentkit.yaml files:
  • Root agentkit.yaml: created by agentkit init or agentkit config --init, read by build, deploy, launch, status, and destroy for lifecycle-style build and deploy.
  • .agentkit/agentkit.yaml: created by agentkit release config, read by release, release build, and release apply for the full cloud release flow that can include IM channels and frontend BFF.
This page covers the root lifecycle config first, then the .agentkit/agentkit.yaml release config. Do not mix the two: lifecycle commands read root agentkit.yaml by default, while release reads .agentkit/agentkit.yaml by default.

Lifecycle Config

Root agentkit.yaml describes how an agent application is built, deployed, and inspected. common.launch_type selects the active strategy: local means local Docker build and local container deploy, cloud means cloud build and cloud runtime deploy, and hybrid means local build followed by cloud runtime deploy.
agentkit.yaml

Common Fields

Local Strategy

Cloud And Hybrid Strategies

cloud and hybrid share most runtime, auth, networking, and container registry fields. cloud also includes TOS and Code Pipeline fields; hybrid uses the local build result and omits those cloud-build fields. When deploying a cloud runtime from lifecycle config, runtime_network.mode: hybrid enables both public ingress and private VPC networking. Use runtime_network.mode: private when the runtime should be private-only, or omit runtime_network / use runtime_network.mode: public for the platform’s default public behavior.

Build Fields

Release Config

.agentkit/agentkit.yaml is the release config. Generate it with agentkit release config; agentkit release, release build, and release apply all read from it. In the generated file, required and common fields are active, and optional fields are shown commented-out with their full shape, so you uncomment and fill them to enable them. Secrets are not written in plaintext; instead, reference the deploy environment with ${VAR}, resolved by the CLI at deploy time:
  • ${VAR} — required; the deploy fails if it is unset;
  • ${VAR:-default} — use the default when unset or empty;
  • ${VAR:?message} — required; fail with message when unset;
  • $$ — a literal $.
The CLI loads the project’s .env (from the working directory) before resolving these, so it is enough to put the values in .env — no manual export is needed. Variables already set in your shell take precedence, and .env is never uploaded to the runtime.

Release Config Full Example

.agentkit/agentkit.yaml

Project

The top-level fields provide the default cloud provider, region, and project inherited by resource blocks. A resource block may override its region and project, but one release cannot mix cloud providers.

Runtime resources

The runtime block configures compute resources and the scaling policy.

Runtime network

runtime.network is optional. Before enabling private networking, confirm that the VPC, subnets, and security groups are in the Runtime region.

Harness Sidecar

harness_sidecar enables Product Component capabilities for a managed Harness Runtime. When it is enabled, release uses a platform-provided managed Sidecar base image, injects the Sidecar runtime configuration during release, and verifies the Sidecar, model proxy, and required MCP gateway after the runtime becomes ready. When this block is enabled, set at least one selectable component to true in component_overrides.
Managed Harness Sidecar currently supports only Volcengine cn-shanghai, CPython 3.12, linux/amd64, and exactly one runtime instance, so both runtime.min_instance and runtime.max_instance must be 1. It also requires the release environment to provide the platform-managed Sidecar base image configuration; release fails in ordinary local environments where that configuration is unavailable. Sidecar releases must use the default key_auth gateway auth and cannot be combined with custom_jwt or frontend BFF-derived auth.
Available components are listed below. mcp_resilience automatically includes SQL read-only protection; sql_readonly, browser, evaluation, and shadow are not directly selectable component_overrides. Use harness sidecar resolve before release to validate the selected plan.

Environment variables

envs declares the environment variables injected into the runtime. To keep secrets out of the repository, reference the deploy environment with ${VAR} (syntax at the top of this page); the CLI resolves them at deploy time.
For local release, export the variables in your shell or put them in a local .env; in continuous deployment, configure them as repository secrets and export them into the release job environment. The VOLCENGINE_* release credentials are not injected into the runtime.
${VAR} replaces the older AK_-prefix injection: each variable is now declared explicitly in envs and read via ${VAR}, which is clearer and reviewable. Secrets in the auth, im, and frontend blocks use ${VAR} the same way.

Model and associated resources

All optional — specify the model the runtime uses and the platform resources it attaches.

Gateway auth

auth configures the runtime gateway’s authentication, one type of two. When frontend (below) is enabled, gateway auth is set to custom_jwt automatically from its userpool, so you do not repeat it here.

IM channels

The im block deploys a bot proxy to VeFaaS after the runtime to connect a messaging channel. Provide credentials via ${VAR}. Feishu, WeCom, and DingTalk are supported; enable any combination. im.region and im.project control where the messaging proxies are deployed. They inherit the top-level region and project when omitted.

Feishu

WeCom

The WeCom proxy connects over WebSocket. The endpoint (websocket_url, default wss://openws.work.weixin.qq.com) and whether to send an interim “thinking” message (send_thinking_message, default true) can also be set but are rarely needed.

DingTalk

Frontend

The frontend block deploys a public front door on VeFaaS: OAuth login at the edge, then reverse-proxy to the runtime forwarding the user’s JWT (no shared key). Once enabled, the runtime gateway auth is set to custom_jwt from this userpool, the callback is auto-registered, and OAUTH2_REDIRECT_URI is auto-derived, so you only declare the userpool here.

Observability

Set apmplus to true to enable APMPlus monitoring.

Advanced

Infrastructure

infrastructure specifies where the image is built and stored. Auto means the platform creates and manages it for you; replace a value with your own resource to reuse one.

Build

The dockerfile field sets the path to the Dockerfile used for the build, defaulting to .agentkit/Dockerfile (or ./Dockerfile if one exists at the project root). 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.
Last modified on September 19, 2026