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

# Harness Infra resources and configuration

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]
>
> Provisioning and model calls can incur charges. Protect the config and Environment Key. Cleanup retains the endpoint, IAM role and PG session store by default. Adding --delete-session-store deletes a workflow-owned store and its data.

Run config init first, then fill in the account and model key name in the printed YAML file. From the project root, create the resources in sequence. Each successful create records its ID and prints the next command. A configured existing PG store is reused. runtime-template is a compatibility alias for runtime.

```bash theme={null}
agentkit harness-infra config init
```

```bash theme={null}
agentkit harness-infra environments create
agentkit harness-infra harness create
agentkit harness-infra session-store create
agentkit harness-infra runtime create
agentkit harness-infra api-key create
agentkit harness-infra sessions create
agentkit harness-infra invoke --message "Hello"
agentkit harness-infra sessions:events list
```

For declarative resources, run validate and review the plan with apply --dry-run. Applying changes writes live resources and maintains a lockfile. With --prune, tracked resources removed locally may be archived or deleted.

## harness-infra config init

Create a shared YAML configuration in the current project.

| Option | Description | Default |
| - | - | - |
| `--config <path>` | Shared Harness Infra YAML file | `.agentkit/harness-infra/config.yaml` |
| `--workspace-id <id>` | Workspace selector (defaults to server DEFAULT workspace) | DEFAULT |

```bash theme={null}
agentkit harness-infra config init
```

## harness-infra cleanup

Clean up resources created by the current workflow.

| Option | Description | Default |
| - | - | - |
| `-y, --yes` | Skip the confirmation prompt | Off |
| `--delete-session-store` | Delete the workflow-owned PG store and its data after deleting its runtime | Off |
| `-r, --region <region>` | Cloud region | — |
| `--timeout <seconds>` | Request or readiness timeout in seconds | 900 |
| `--json` | Return 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 cleanup --yes
```

## harness-infra apply

Compare declarations with live resources and apply the changes.

`agentkit harness-infra apply [paths...]`

| Option | Description | Default |
| - | - | - |
| `--dry-run` | read remote state and print the plan | Off |
| `-y, --yes` | skip confirmation | Off |
| `--force` | reconcile remotely drifted mutable fields | Off |
| `--prune` | archive or delete tracked resources missing locally | Off |
| `--lock-file <path>` | lockfile path | — |
| `-r, --region <region>` | cloud region | — |
| `--timeout <seconds>` | per-resource readiness timeout | 900 |
| `--concurrency <number>` | maximum independent operations | 4 |
| `--json` | output stable JSON | Off |
| `-v, --verbose` | include no-op resources | Off |
| `--detailed-exitcode` | dry-run returns 2 when changes exist | 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 apply ./resources --dry-run
```

## harness-infra validate

Validate resource declarations and references before applying them.

`agentkit harness-infra validate [paths...]`

| Option | Description | Default |
| - | - | - |
| `--lock-file <path>` | lockfile path | — |
| `--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 validate ./resources
```

## harness-infra endpoint create

Create the account endpoint using an existing API gateway ID.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML request | — |
| `--apig-gateway-id <id>` | ApigGatewayId (required by CreateRoute. non-empty contract field) | — |
| `--user-id <id>` | business user reference | — |
| `--custom-domain <domain>` | custom domain declaration | — |
| `-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 endpoint create --apig-gateway-id "$GATEWAY_ID"
```

## harness-infra endpoint list

List endpoints available to the account.

| Option | Description | Default |
| - | - | - |
| `--max-results <number>` | page size, 1 to 100 | 100 |
| `--next-token <token>` | opaque pagination token | — |
| `--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 endpoint list
```

## harness-infra environment-resource create

Create the resource using the active configuration or a request file.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML resource specification without credentials | — |
| `--client-token <token>` | idempotency token (default: generated UUID) | — |
| `--environment-key-env <name>` | environment variable containing the Ark Environment key (default: ANTHROPIC\_ENVIRONMENT\_KEY) | — |
| `--wait` | wait until the resource leaves its active state | Off |
| `--timeout <seconds>` | wait timeout in seconds | 900 |
| `-r, --region <region>` | cloud region | — |
| `--json` | output raw 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 environment-resource create --file resource.yaml --wait
```

## harness-infra environment-resource list

List matching resources, one page at a time.

| Option | Description | Default |
| - | - | - |
| `--target-type <type>` | target type: agentkit or ark | — |
| `--environment-id <id>` | filter by target environment id | — |
| `--status <status>` | filter by resource status | — |
| `--include-deleted` | include deleted tombstones | Off |
| `--all` | fetch every page | Off |
| `--max-results <number>` | page size, from 1 to 100 | 20 |
| `--next-token <token>` | opaque pagination token | — |
| `-r, --region <region>` | cloud region | — |
| `--json` | output raw 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 environment-resource list --target-type ark
```

## harness-infra environment-resource show

Read the specified resource and its state.

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

| Option | Description | Default |
| - | - | - |
| `-r, --region <region>` | cloud region | — |
| `--json` | output raw 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 environment-resource show "$RESOURCE_ID"
```

## harness-infra environment-resource update

Apply the supplied changes to the resource.

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

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML patch without operation fields or credentials | — |
| `--expected-revision <number>` | revision returned by the latest read | — |
| `--client-token <token>` | idempotency token (default: generated UUID) | — |
| `--environment-key-env <name>` | environment variable containing the Ark Environment key (default: ANTHROPIC\_ENVIRONMENT\_KEY) | — |
| `--wait` | wait until the resource leaves its active state | Off |
| `--timeout <seconds>` | wait timeout in seconds | 900 |
| `-r, --region <region>` | cloud region | — |
| `--json` | output raw 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 environment-resource update "$RESOURCE_ID" --file patch.yaml --wait
```

## harness-infra environment-resource delete

Delete the specified resource.

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

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token (default: generated UUID) | — |
| `-y, --yes` | skip the confirmation prompt | Off |
| `--wait` | wait until deletion reaches a terminal state | Off |
| `--timeout <seconds>` | wait timeout in seconds | 900 |
| `-r, --region <region>` | cloud region | — |
| `--json` | output raw 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 environment-resource delete "$RESOURCE_ID"
```

## harness-infra harness create

Create the resource using the active configuration or a request file.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML request | — |
| `--client-token <token>` | idempotency token | — |
| `-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 harness create
```

## harness-infra harness show

Read the specified resource and its state.

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

| Option | Description | Default |
| - | - | - |
| `--harness-version <number>` | specific Harness version | — |
| `-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 harness show "$HARNESS_ID"
```

## harness-infra harness 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 Harness objects | Off |
| `--status <status>` | Active or Archived | — |
| `--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 harness list
```

## harness-infra harness update

Apply the supplied changes to the resource.

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

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML patch | — |
| `--client-token <token>` | idempotency token | — |
| `-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 harness update "$HARNESS_ID" --file patch.yaml
```

## harness-infra harness archive

Archive the specified resource.

`agentkit harness-infra harness archive <harness-id>`

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `-y, --yes` | skip confirmation | 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 harness archive "$HARNESS_ID"
```

## harness-infra harness versions

List the saved versions.

`agentkit harness-infra harness versions <harness-id>`

| Option | Description | Default |
| - | - | - |
| `--max-results <number>` | page size, 1 to 100 | 100 |
| `--next-token <token>` | opaque pagination token | — |
| `--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 harness versions "$HARNESS_ID"
```

## harness-infra runtime create

Create a runtime and return its runtime ID.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML request | — |
| `--client-token <token>` | idempotency token | — |
| `--wait` | wait for Ready (fails on Error/Aborted) | Off |
| `--timeout <seconds>` | wait timeout | 1800 |
| `-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 runtime create
```

## harness-infra runtime show

Read the specified resource and its state.

`agentkit harness-infra runtime show <runtime-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 runtime show "$RUNTIME_ID"
```

## harness-infra runtime delete

Delete the specified resource.

`agentkit harness-infra runtime delete <runtime-id>`

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `-y, --yes` | skip confirmation | Off |
| `--wait` | wait until GetRuntime returns 404 | Off |
| `--timeout <seconds>` | wait timeout | 1800 |
| `-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 runtime delete "$RUNTIME_ID"
```

## harness-infra session-store create

Create a PG session store or validate and reuse the configured ID.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML resource specification | — |
| `--wait` | Wait for completion | Off |
| `--timeout <seconds>` | Request or readiness timeout in seconds | 1800 |
| `-r, --region <region>` | Cloud region | — |
| `--json` | Return 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 session-store create
```

## harness-infra session-store show

Read the specified resource and its state.

`agentkit harness-infra session-store show <session-store-id>`

| Option | Description | Default |
| - | - | - |
| `-r, --region <region>` | Cloud region | — |
| `--json` | Return 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 session-store show "$SESSION_STORE_ID"
```

## harness-infra session-store list

List matching resources, one page at a time.

| Option | Description | Default |
| - | - | - |
| `--max-results <number>` | Results per page, from 1 to 100 | 100 |
| `--next-token <token>` | Next-page cursor | — |
| `--project-name <name>` | Filter by project | — |
| `--all` | Fetch all pages | Off |
| `-r, --region <region>` | Cloud region | — |
| `--json` | Return 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 session-store list
```

## harness-infra session-store delete

Permanently delete the specified store and its managed database.

`agentkit harness-infra session-store delete <session-store-id>`

| Option | Description | Default |
| - | - | - |
| `-y, --yes` | Skip the confirmation prompt | Off |
| `--wait` | Wait for completion | Off |
| `--timeout <seconds>` | Request or readiness timeout in seconds | 1800 |
| `-r, --region <region>` | Cloud region | — |
| `--json` | Return 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 session-store delete "$SESSION_STORE_ID"
```

## harness-infra api-key create

Issue an environment key. In file mode, use --key-output-file to save the value returned at creation.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML request without Key | — |
| `--client-token <token>` | idempotency token | — |
| `--key-output-file <path>` | atomically write the first-response Key with mode 0600 | — |
| `--show-key` | explicitly print the first-response Key to stdout | 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 api-key create
```

## harness-infra api-key show

Read the specified resource and its state.

`agentkit harness-infra api-key show <api-key-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 api-key show "$API_KEY_ID"
```

## harness-infra api-key list

List matching resources, one page at a time.

| Option | Description | Default |
| - | - | - |
| `--environment-id <id>` | filter by Environment | — |
| `--endpoint-id <id>` | filter by Endpoint | — |
| `--max-results <number>` | page size, 1 to 100 | 100 |
| `--next-token <token>` | opaque pagination token | — |
| `--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 api-key list
```

## harness-infra api-key delete

Delete the specified resource.

`agentkit harness-infra api-key delete <api-key-id>`

| Option | Description | Default |
| - | - | - |
| `--client-token <token>` | idempotency token | — |
| `-y, --yes` | skip confirmation | 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 api-key delete "$API_KEY_ID"
```

In shared configuration, set `harness.agent_loop` to `dsh` to select that execution loop. To reuse a PG store, set `session_store.id` and check that it is Ready before creating the runtime.


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