agentkit.yaml files:
- Root
agentkit.yaml: created byagentkit initoragentkit config --init, read bybuild,deploy,launch,status, anddestroyfor lifecycle-style build and deploy. .agentkit/agentkit.yaml: created byagentkit release config, read byrelease,release build, andrelease applyfor the full cloud release flow that can include IM channels and frontend BFF.
.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
Rootagentkit.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 withmessagewhen unset;$$— a literal$.
.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
Theruntime 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, the enabled model proxy, and the required MCP gateway after the runtime becomes ready. When this block is enabled, set at least one selectable component to true in component_overrides.
With
apig_runtime_port transport, the resolved plan must enable at least one of the model proxy or MCP gateway. For tool-only components such as mcp_resilience, the model proxy can stay disabled, and release readiness checks only validate the Sidecar and MCP gateway.
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.
.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
Theim 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
Thefrontend 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
Setapmplus 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
Thedockerfile 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.
Exclusive runtime gateways
Lifecycle configuration usesruntime_gateway_mode and runtime_gateway_instance_id under launch_types.cloud or launch_types.hybrid. Release configuration uses gateway_mode and gateway_instance_id under runtime
.agentkit/agentkit.yaml
Exclusive mode cannot include runtime network configuration because the gateway supplies the network. Shared mode cannot specify an instance ID. Gateway bindings cannot change after creation; deployment stops when desired settings conflict with an existing binding