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

# Environments, images and Devboxes

Manage control-plane resources with Volcengine account credentials. Session and event requests use the endpoint and Environment Key. Use --workspace-id to select a workspace and --config to select project configuration.

> [!WARNING]
>
> Image builds and Devboxes consume cloud resources. Save any data you need before deleting an instance.

A Cloud-ECS environment requires an available regional Linux Cloud-Init amd64 base image and network configuration. Ordinary creation installs packages at first boot. An image build requires a nonempty package list and bakes the dependencies into the image. Wait with environments build-status. Existing Devboxes retain their environment snapshot when you update an environment.

```bash theme={null}
agentkit harness-infra environments list --json
agentkit harness-infra devbox create --name build-devbox --environment-id "$ENVIRONMENT_ID" --wait
agentkit harness-infra devbox list --environment-id "$ENVIRONMENT_ID" --all
```

## harness-infra environments create

Create an environment from shared configuration or a specification file.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML request (camelCase top-level, PascalCase Config) | — |
| `--name <name>` | environment name | — |
| `--description <text>` | environment description | — |
| `--type <type>` | Cloud, Cloud-ECS, or SelfHosted | — |
| `--image-id <id>` | Cloud-ECS base image ID | — |
| `--image-url <url>` | Cloud or SelfHosted container image | — |
| `--cpu-milli <number>` | CPU in millicores | — |
| `--memory-mb <number>` | memory in MiB | — |
| `--disk-size <size>` | disk declaration, e.g. 80Gi | — |
| `--env <KEY=VALUE>` | environment variable. repeat for multiple variables | — |
| `--compose-file <path>` | Docker Compose YAML. encode original bytes as Base64 | — |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for completion | Off |
| `--timeout <seconds>` | wait timeout | 900 |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra environments create
```

## harness-infra environments create-with-image-build

Build a Cloud-ECS image and create an environment asynchronously.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML request (camelCase top-level, PascalCase Config) | — |
| `--name <name>` | environment name | — |
| `--description <text>` | environment description | — |
| `--type <type>` | Cloud, Cloud-ECS, or SelfHosted | — |
| `--image-id <id>` | Cloud-ECS base image ID | — |
| `--image-url <url>` | Cloud or SelfHosted container image | — |
| `--cpu-milli <number>` | CPU in millicores | — |
| `--memory-mb <number>` | memory in MiB | — |
| `--disk-size <size>` | disk declaration, e.g. 80Gi | — |
| `--env <KEY=VALUE>` | environment variable. repeat for multiple variables | — |
| `--compose-file <path>` | Docker Compose YAML. encode original bytes as Base64 | — |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for completion | Off |
| `--timeout <seconds>` | wait timeout | 900 |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--build-script-file <path>` | UTF-8 build script. encode as Base64 | — |
| `--architecture <architecture>` | image architecture (amd64) | — |
| `--apt-package <package>` | image build apt package. repeat to append packages | — |
| `--pip-package <package>` | image build pip package. repeat to append packages | — |
| `--npm-package <package>` | image build npm package. repeat to append packages | — |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra environments create-with-image-build --name build-env --type Cloud-ECS --image-id "$IMAGE_ID" --file network.yaml --apt-package git --wait
```

## harness-infra environments build-status

Read build status or wait for completion.

`agentkit harness-infra environments build-status <environment-id>`

| Option | Description | Default |
| - | - | - |
| `--wait` | wait until the image build completes | Off |
| `--timeout <seconds>` | wait timeout | 900 |
| `-r, --region <region>` | cloud region | — |
| `--json` | output JSON | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra environments build-status "$ENVIRONMENT_ID"
```

## harness-infra environments show

Read the specified resource and its state.

`agentkit harness-infra environments show <environment-id>`

| Option | Description | Default |
| - | - | - |
| `-r, --region <region>` | cloud region | — |
| `--json` | output JSON | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra environments show "$ENVIRONMENT_ID"
```

## harness-infra environments list

List matching resources, one page at a time.

| Option | Description | Default |
| - | - | - |
| `--max-results <number>` | page size, 1 to 100 | 100 |
| `--next-token <token>` | opaque pagination token | — |
| `--include-archived` | include archived environments | Off |
| `--metadata-file <path>` | JSON or YAML metadata filter (preserves JSON types) | — |
| `--project-name <name>` | Workspace project name selector | — |
| `--all` | fetch every page | Off |
| `-r, --region <region>` | cloud region | — |
| `--json` | output JSON | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra environments list
```

## harness-infra environments update

Apply the supplied changes to the resource.

`agentkit harness-infra environments update <environment-id>`

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML patch | — |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for requested lifecycle status | Off |
| `--timeout <seconds>` | wait timeout | 900 |
| `-r, --region <region>` | cloud region | — |
| `--json` | output JSON | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra environments update "$ENVIRONMENT_ID" --file patch.yaml
```

## harness-infra environments delete

Delete the specified resource.

`agentkit harness-infra environments delete <environment-id>`

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `-y, --yes` | skip confirmation | Off |
| `--wait` | wait until Get returns 404 | Off |
| `--timeout <seconds>` | wait timeout | 900 |
| `-r, --region <region>` | cloud region | — |
| `--json` | output JSON | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra environments delete "$ENVIRONMENT_ID"
```

## harness-infra devbox create

Create a development instance with the environment’s resources and network settings.

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for lifecycle completion | Off |
| `--timeout <seconds>` | CLI wait timeout | 900 |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--file <path>` | JSON or YAML create request | — |
| `--name <name>` | instance name | — |
| `--environment-id <id>` | active Cloud-ECS Environment ID | — |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox create --name build-devbox --environment-id "$ENVIRONMENT_ID" --wait
```

## harness-infra devbox show

Read the specified resource and its state.

`agentkit harness-infra devbox show <devbox-instance-id>`

| Option | Description | Default |
| - | - | - |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox show "$DEVBOX_INSTANCE_ID"
```

## harness-infra devbox list

List matching resources, one page at a time.

| Option | Description | Default |
| - | - | - |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--environment-id <id>` | filter by Environment ID | — |
| `--image-id <id>` | filter by image ID | — |
| `--user-id <id>` | filter by creating user | — |
| `--filter-region <region>` | filter instance region (independent of API/signing region) | — |
| `--status <status>` | filter status. repeat for multiple states | — |
| `--max-results <number>` | page size, 1 to 100 | 20 |
| `--next-token <token>` | opaque pagination token | — |
| `--all` | fetch every page | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox list
```

## harness-infra devbox start

Start the specified instance.

`agentkit harness-infra devbox start <devbox-instance-id>`

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for lifecycle completion | Off |
| `--timeout <seconds>` | CLI wait timeout | 900 |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--expected-revision <number>` | require the current concurrency revision | — |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox start "$DEVBOX_INSTANCE_ID"
```

## harness-infra devbox stop

Stop the specified instance.

`agentkit harness-infra devbox stop <devbox-instance-id>`

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for lifecycle completion | Off |
| `--timeout <seconds>` | CLI wait timeout | 900 |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--expected-revision <number>` | require the current concurrency revision | — |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox stop "$DEVBOX_INSTANCE_ID"
```

## harness-infra devbox reboot

Restart the specified instance.

`agentkit harness-infra devbox reboot <devbox-instance-id>`

Alias `restart`.

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for lifecycle completion | Off |
| `--timeout <seconds>` | CLI wait timeout | 900 |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--expected-revision <number>` | require the current concurrency revision | — |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox reboot "$DEVBOX_INSTANCE_ID"
```

## harness-infra devbox delete

Delete the specified resource.

`agentkit harness-infra devbox delete <devbox-instance-id>`

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for lifecycle completion | Off |
| `--timeout <seconds>` | CLI wait timeout | 900 |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--expected-revision <number>` | require the current concurrency revision | — |
| `--force` | submit forced deletion intent | Off |
| `-y, --yes` | skip deletion confirmation | Off |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox delete "$DEVBOX_INSTANCE_ID"
```

## harness-infra devbox exec

Submit a command and use its execution ID to retrieve the result.

`agentkit harness-infra devbox exec <devbox-instance-id>`

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for lifecycle completion | Off |
| `--timeout <seconds>` | CLI wait timeout | 900 |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--command <text>` | shell command text | — |
| `--command-file <path>` | UTF-8 shell script | — |
| `--command-timeout <seconds>` | remote command timeout, 1 to 1800 | — |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox exec "$DEVBOX_ID" --command "pwd" --wait
```

## harness-infra devbox command-result

Retrieve output and status for a submitted command.

`agentkit harness-infra devbox command-result <command-execution-id>`

| Option | Description | Default |
| - | - | - |
| `-r, --region <region>` | cloud API and signing region | — |
| `--json` | output JSON | Off |
| `--wait` | wait for command completion | Off |
| `--timeout <seconds>` | CLI wait timeout | 900 |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra devbox command-result "$COMMAND_EXECUTION_ID" --json
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.