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

# Config

`config` manages the lifecycle project's `agentkit.yaml`, and with `--global` it manages user-wide defaults in `~/.agentkit/config.yaml`. Project config is used by `build`, `deploy`, `launch`, `status`, and `destroy`; global config provides default cloud provider, region, credentials, and infrastructure settings.

## config

Without `--global`, the command reads or updates the current project's lifecycle config. When no specific field is passed and the terminal is interactive, the CLI opens a configuration wizard; in non-interactive environments, pass flags explicitly. When used with `--init`, the CLI creates the default lifecycle config first and then applies the project-level fields from the same command. Launch-mode-specific fields are written under the mode selected by `--launch_type`, or under `cloud` when `--launch_type` is omitted.

| Flag / Argument | Description | Default |
| - | - | - |
| `-c, --config <path>` | Project config file path. | `agentkit.yaml` |
| `--init` | Initialize a lifecycle config file. | `false` |
| `-i, --interactive` | Force the interactive configuration wizard. | `false` |
| `--dry-run` | Preview changes without saving. | `false` |
| `-s, --show` | Show the current config. | `false` |
| `--region <region>` | Cloud region. | Current cloud-environment default |
| `--agent_name <name>` | Agent application name. | — |
| `--entry_point <path>` | Agent application entry file. | — |
| `--description <text>` | Application description. | — |
| `--language <language>` | Application language, such as `Python` or `Golang`. | — |
| `--language_version <version>` | Language version. | — |
| `--python_version <version>` | Python version; written as `language_version`. | — |
| `--dependencies_file <path>` | Dependency file path. | — |
| `--launch_type <type>` | Launch mode: `local`, `cloud`, or `hybrid`. | Current config value |
| `--cloud_provider <provider>` / `--cloud-provider <provider>` | Cloud provider: `volcengine` or `byteplus`. | Current cloud-environment default |
| `-e, --runtime_envs <KEY=VALUE>` | Common runtime environment variable; repeatable. | — |
| `--strategy-runtime-envs <KEY=VALUE>` | Runtime environment variable for the current launch mode; repeatable. | — |
| `--image_tag <tag>` | Image tag. | Current config value |
| `--tos_bucket <bucket>` | TOS bucket for cloud build artifacts. | Current config value |
| `--cr_instance_name <name>` / `--ve_cr_instance_name <name>` | Container Registry instance name. | Current config value |
| `--cr_namespace_name <name>` / `--ve_cr_namespace_name <name>` | Container Registry namespace. | Current config value |
| `--cr_repo_name <name>` / `--ve_cr_repo_name <name>` | Container Registry repository name. | Current config value |
| `--cr_auto_create_instance_type <type>` | Instance type when auto-creating CR, such as `Micro` or `Enterprise`. | Current config value |
| `--project_name <name>` / `--project-name <name>` | AgentKit project name. | Current config value |
| `--runtime_name <name>` / `--ve_runtime_name <name>` | Runtime name. | Current config value |
| `--runtime_role_name <name>` / `--ve_runtime_role_name <name>` | Runtime IAM role name. | Current config value |
| `--runtime_apikey_name <name>` / `--ve_runtime_apikey_name <name>` | API key name for `key_auth`. | Current config value |
| `--runtime_auth_type <type>` | Runtime gateway auth type: `key_auth` or `custom_jwt`. | Current config value |
| `--runtime_jwt_discovery_url <url>` | OIDC discovery URL for `custom_jwt`. | — |
| `--runtime_jwt_allowed_clients <id>` | Allowed client id for `custom_jwt`; repeatable or comma-separated. | — |
| `--memory_id <id>` | Bound memory collection id. | — |
| `--knowledge_id <id>` | Bound knowledge base id. | — |
| `--tool_id <id>` | Bound tool id. | — |
| `--mcp_toolset_id <id>` | Bound MCP toolset id. | — |
| `--runtime_network_mode <mode>` / `--runtime-network-mode <mode>` | Runtime network mode: `public`, `private`, or `hybrid`. `hybrid` enables both public ingress and private networking. | Current config value |
| `--runtime_vpc_id <id>` / `--runtime-vpc-id <id>` | VPC id for private networking; required with `--runtime_network_mode private` or `hybrid`. | — |
| `--runtime_subnet_ids <id>` / `--runtime-subnet-ids <id>` | Subnet id; repeatable or comma-separated. Provide at least one with `--runtime_network_mode private` or `hybrid`. | — |
| `--runtime_subnet_id <id>` / `--runtime-subnet-id <id>` | Single subnet id. | — |
| `--runtime_enable_shared_internet_access` | Enable shared internet access for private networking. | Current config value |
| `--no-runtime_enable_shared_internet_access` | Disable shared internet access for private networking. | — |
| `--runtime-enable-shared-internet-access` | Kebab-case form of `--runtime_enable_shared_internet_access`. | Current config value |
| `--no-runtime-enable-shared-internet-access` | Kebab-case form of `--no-runtime_enable_shared_internet_access`. | — |
| `--runtime_gateway_mode <mode>` / `--runtime-gateway-mode <mode>` | Gateway mode for new runtimes: `Shared` or `Exclusive` | Current configuration; otherwise `Shared` |
| `--runtime_gateway_instance_id <id>` / `--runtime-gateway-instance-id <id>` | Gateway instance ID, required in Exclusive mode | — |

Export `MODEL_AGENT_API_KEY` in the current terminal before running this example. Double quotes let the shell expand the variable; lifecycle config does not automatically resolve a literal `${MODEL_AGENT_API_KEY}` passed in single quotes

<Warning>
  The configuration command writes the expanded model API key to `agentkit.yaml`. Add that file and `.env` to `.gitignore` and `.dockerignore` before running it to keep credentials out of version control and the image
</Warning>

```bash lines theme={null}
agentkit config --init \
  --agent_name support-agent \
  --launch_type cloud \
  --cloud_provider volcengine \
  --region cn-beijing \
  --project_name default \
  --runtime_envs "MODEL_AGENT_API_KEY=$MODEL_AGENT_API_KEY"

agentkit config \
  --launch_type cloud \
  --runtime_auth_type custom_jwt \
  --runtime_jwt_discovery_url https://identity.example.com/.well-known/openid-configuration \
  --runtime_jwt_allowed_clients web-client-id

agentkit config \
  --launch_type cloud \
  --runtime_network_mode hybrid \
  --runtime_vpc_id vpc-xxxxxxxx \
  --runtime_subnet_ids subnet-xxxxxxxx \
  --runtime_enable_shared_internet_access
```

## config --global

With `--global`, the command reads or updates `~/.agentkit/config.yaml`. Project-level fields such as `--cloud_provider` cannot be combined with `--global`; switch the default provider through the global `--provider` flag or `--set defaults.cloud_provider=<provider>`.

| Flag / Argument | Description | Default |
| - | - | - |
| `-g, --global` | Use user-wide config. | `false` |
| `--init` | Create the user-wide config template; preserves an existing file. | `false` |
| `-s, --show` | Show user-wide config with secrets masked. | `false` |
| `--region <region>` | Default region. | Current user-wide config |
| `--set <key=value>` | Set a user-wide config key; repeatable. | — |

```bash lines theme={null}
agentkit config --global --init

agentkit --provider byteplus config --global --region ap-southeast-1

agentkit config --global --set defaults.cloud_provider=byteplus
```

<Note>
  Commands resolve environment variables first, then project config and user-wide config. Every product command also accepts global `--provider volcengine|byteplus` to override the cloud provider for that command. Region values must be lowercase, hyphen-separated region codes such as `cn-beijing` or `ap-southeast-1`; values containing paths, query strings, uppercase letters, or non-region hostnames are rejected.
</Note>

## Configure an exclusive gateway

Select an existing exclusive gateway before creating the runtime, and remove independent runtime network configuration from that strategy. Bindings cannot change after creation; see [exclusive runtime gateways](/productions/agentkit-cli/preview/en/agentkit-yaml#exclusive-runtime-gateways)

```bash lines theme={null}
agentkit config --runtime_gateway_mode Exclusive --runtime_gateway_instance_id gateway-example
```
