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

# Sessions and events

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.

Create a session with the configured runtime and Ark API key name. Use its session ID to send further messages, read events or open the viewer. Save any required history before archiving or deleting a session.

```bash theme={null}
agentkit harness-infra sessions create
agentkit harness-infra invoke --message "Hello"
agentkit harness-infra sessions:events list
```

## harness-infra invoke

Send a message to an existing session and wait for completion.

| Option | Description | Default |
| - | - | - |
| `--message <text>` | Message to send to the session | — |
| `--verify` | Run the configured checks on the message | Off |
| `--base-url <url>` | Override the data-plane endpoint | — |
| `--api-key-env <name>` | Environment variable containing the Environment Key | — |
| `--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 invoke --message "Hello"
```

## harness-infra sessions create

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

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML request without credentials | — |
| `--runtime-id <id>` | AgentKit Runtime ID for --file requests (r-...) | — |
| `--rt-id <id>` | alias of --runtime-id | — |
| `--ark-key-name <name>` | Ark API Key Name (or MODEL\_API\_KEY\_NAME) | — |
| `--idempotency-key <key>` | create idempotency key | — |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions create
```

## harness-infra sessions show

Read the specified resource and its state.

`agentkit harness-infra sessions show [session-id]`

| Option | Description | Default |
| - | - | - |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions show
```

## harness-infra sessions list

List matching resources, one page at a time.

| Option | Description | Default |
| - | - | - |
| `--agent-id <id>` | Filter by agent ID | — |
| `--agent-version <number>` | Filter by agent version | — |
| `--environment-id <id>` | Filter by environment ID | — |
| `--runtime-type <type>` | Filter by runtime type | — |
| `--statuses <values>` | comma-separated statuses | — |
| `--include-archived` | Include archived sessions | Off |
| `--order <order>` | asc or desc | desc |
| `--limit <number>` | page size, 1 to 100 | 100 |
| `--page <token>` | Next-page cursor | — |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions list
```

## harness-infra sessions update

Apply the supplied changes to the resource.

`agentkit harness-infra sessions update [session-id]`

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML patch | — |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions update "$SESSION_ID" --file patch.yaml
```

## harness-infra sessions archive

Archive the specified resource.

`agentkit harness-infra sessions archive [session-id]`

| Option | Description | Default |
| - | - | - |
| `-y, --yes` | Skip the confirmation prompt | Off |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions archive
```

## harness-infra sessions delete

Delete the specified resource.

`agentkit harness-infra sessions delete [session-id]`

| Option | Description | Default |
| - | - | - |
| `--workspace-id <id>` | Workspace selector | DEFAULT |
| `-y, --yes` | Skip the confirmation prompt | Off |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--json` | output JSON | Off |
| `--config <path>` | shared Harness Infra YAML configuration | `.agentkit/harness-infra/config.yaml` |

```bash theme={null}
agentkit harness-infra sessions delete
```

## harness-infra sessions resources

Inspect the resources assigned to the session.

`agentkit harness-infra sessions resources [session-id]`

| Option | Description | Default |
| - | - | - |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions resources
```

## harness-infra sessions connect

Connect to the session through the terminal or web viewer.

`agentkit harness-infra sessions connect [session-id]`

| Option | Description | Default |
| - | - | - |
| `--web` | open the local Web Viewer | Off |
| `--no-browser` | do not open the Web Viewer automatically | — |
| `--port <number>` | local Web Viewer port. 0 chooses a free port | — |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--json` | output JSON | Off |
| `--verbose` | expand tool input and result output in terminal mode | 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 sessions connect "$SESSION_ID" --web
```

## harness-infra sessions chat

Send one or more successive messages to the same session.

`agentkit harness-infra sessions chat [session-id]`

| Option | Description | Default |
| - | - | - |
| `-m, --message <text...>` | one or more sequential turns | — |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions chat "$SESSION_ID" --message "Hello"
```

## harness-infra sessions:events send

Send a user message or a supplied event to a session.

`agentkit harness-infra sessions:events send [session-id]`

| Option | Description | Default |
| - | - | - |
| `--file <path>` | JSON or YAML event or `{events: []}` | — |
| `--message <text>` | send one user.message event | — |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions:events send "$SESSION_ID" --message "Hello"
```

## harness-infra sessions:events list

List matching resources, one page at a time.

`agentkit harness-infra sessions:events list [session-id]`

| Option | Description | Default |
| - | - | - |
| `--after-sequence <number>` | Only events after this sequence | — |
| `--limit <number>` | page size, 1 to 1000 | 100 |
| `--order <order>` | asc or desc | asc |
| `--types <values>` | comma-separated event types | — |
| `--page <token>` | Next-page cursor | — |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions:events list
```

## harness-infra sessions:events stream

Follow a live SSE stream of session events.

`agentkit harness-infra sessions:events stream [session-id]`

| Option | Description | Default |
| - | - | - |
| `--after-sequence <number>` | Only events after this sequence | — |
| `--event-deltas <types>` | comma-separated agent.message,agent.thinking | — |
| `--no-reconnect` | Stop after disconnection | — |
| `--base-url <url>` | Endpoint BaseUrl (or HARNESS\_INFRA\_BASE\_URL) | — |
| `--api-key-env <name>` | environment variable containing the Environment Key | — |
| `--timeout <seconds>` | request or wait timeout | 900 |
| `--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 sessions:events stream "$SESSION_ID"
```


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