Skip to content

Commit b488b75

Browse files
zyn080302yanan.zhangyn
andauthored
feat(harness): add VeADK harness extension (#625)
Co-authored-by: yanan.zhangyn <yanan.zhangyn@bytedance.com>
1 parent d7a8d14 commit b488b75

78 files changed

Lines changed: 8131 additions & 26 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/content/docs/cli/agentkit-cli.en.mdx‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,35 @@ veadk agentkit init
3838
veadk agentkit launch
3939
```
4040

41+
## Invoke HarnessApp Runtime
42+
43+
`veadk agentkit invoke` can call a HarnessApp Runtime directly and enable Harness Extension for a single request. Common flags:
44+
45+
| Flag | Description |
46+
| :-- | :-- |
47+
| `--harness` | Agent name inside HarnessApp. |
48+
| `--endpoint` | Runtime endpoint. |
49+
| `--apikey` | Runtime API key. |
50+
| `--model-id` | One-shot model override. |
51+
| `--tools` | One-shot tool override, comma-separated. |
52+
| `--skills` | One-shot skill override, comma-separated. |
53+
| `--enable-harness-enhance` | Enable Harness Extension for this request. |
54+
| `--harness-components` | Enabled Harness components for this request, comma-separated. |
55+
| `--harness-profile` | Optional runtime profile. |
56+
| `--harness-compression-provider` | Optional compaction provider, default `builtin`. |
57+
58+
```bash
59+
veadk agentkit invoke \
60+
--harness research-agent \
61+
--endpoint "$HARNESS_URL" \
62+
--apikey "$HARNESS_KEY" \
63+
--model-id "your-model-id" \
64+
--tools web_search,run_code \
65+
--enable-harness-enhance \
66+
--harness-components "invocation_context,compactor,response_verification" \
67+
"Summarize the tool results with evidence."
68+
```
69+
4170
## Further reference
4271

4372
For the full parameter details of each subcommand, see the [AgentKit CLI](https://volcengine.github.io/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html).

‎docs/content/docs/cli/agentkit-cli.mdx‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,35 @@ veadk agentkit init
3838
veadk agentkit launch
3939
```
4040

41+
## 调用 HarnessApp Runtime
42+
43+
`veadk agentkit invoke` 可以直接调用 HarnessApp Runtime,并通过请求参数临时开启 Harness Extension。常用参数如下:
44+
45+
| 参数 | 说明 |
46+
| :-- | :-- |
47+
| `--harness` | HarnessApp 中的智能体名称。 |
48+
| `--endpoint` | Runtime endpoint。 |
49+
| `--apikey` | Runtime API Key。 |
50+
| `--model-id` | 单次调用覆盖模型名称。 |
51+
| `--tools` | 单次调用覆盖工具列表,逗号分隔。 |
52+
| `--skills` | 单次调用覆盖技能列表,逗号分隔。 |
53+
| `--enable-harness-enhance` | 本次调用启用 Harness Extension。 |
54+
| `--harness-components` | 本次调用启用的 Harness 组件,逗号分隔。 |
55+
| `--harness-profile` | 可选运行 profile。 |
56+
| `--harness-compression-provider` | 可选压缩 provider,默认 `builtin`。 |
57+
58+
```bash
59+
veadk agentkit invoke \
60+
--harness research-agent \
61+
--endpoint "$HARNESS_URL" \
62+
--apikey "$HARNESS_KEY" \
63+
--model-id "your-model-id" \
64+
--tools web_search,run_code \
65+
--enable-harness-enhance \
66+
--harness-components "invocation_context,compactor,response_verification" \
67+
"Summarize the tool results with evidence."
68+
```
69+
4170
## 更多参考
4271

4372
各子命令的完整参数说明请参阅 [AgentKit 命令行工具](https://volcengine.github.io/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html)。

‎docs/content/docs/references/configuration/environment-variables.en.mdx‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,23 @@ Prefix `TOOL_`, configured only when the corresponding tool is used.
6262
| VOD | `TOOL_VOD_GROUPS` | Video editing capability groups |
6363
| | `TOOL_VOD_TIMEOUT` | Connection timeout |
6464

65+
## Harness Extension
66+
67+
Prefix `HARNESS_`, used to attach optional Harness plugins to HarnessApp Runtime or `Runner`. The Harness Extension is bundled with VeADK; install the `veadk-python[harness]` extra only when you want the optional `headroom` compaction provider.
68+
69+
| Variable | Meaning |
70+
| :- | :- |
71+
| `HARNESS_ENHANCE_ENABLED` | Enable Harness plugins; accepts `true` / `false`. |
72+
| `HARNESS_ENHANCE_COMPONENTS` | Enabled components, comma-separated; common value: `invocation_context,compactor,response_verification`. |
73+
| `HARNESS_PROFILE` | Plugin runtime profile for policy selection; default `default`. |
74+
| `HARNESS_COMPRESSION_PROVIDER` | Tool-result compaction provider, default `builtin`; optional `headroom`. |
75+
| `HARNESS_MAX_CONTEXT_CHARS` | Context compaction threshold, default `24000`. |
76+
| `HARNESS_MAX_TOOL_RESULT_CHARS` | Single tool-result compaction threshold, default `4000`. |
77+
| `HARNESS_VERIFIER_MODE` | Final-response verification mode, `observe` or `block`; default `observe`. |
78+
| `HARNESS_STORE_PATH` | Optional JSONL event store path; in-memory store is used when unset. |
79+
80+
The `harness_enhance` block maps to these environment variables when deploying a HarnessApp Runtime. Prefer `harness.yaml` or `veadk agentkit invoke` flags for normal developer workflows; use environment variables for platform integration and container runtimes.
81+
6582
## Databases
6683

6784
Prefix `DATABASE_`, grouped by storage type. Memory and the knowledge base read the matching config based on the selected backend.

‎docs/content/docs/references/configuration/environment-variables.mdx‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,23 @@ volcengine:
6262
| VOD | `TOOL_VOD_GROUPS` | 视频编辑能力组 |
6363
| | `TOOL_VOD_TIMEOUT` | 连接超时时长 |
6464

65+
## Harness Extension
66+
67+
统一前缀 `HARNESS_`,用于给 HarnessApp Runtime 或 `Runner` 挂载可选的 Harness 插件能力。Harness Extension 随 VeADK 安装;只有当选择 `headroom` 压缩 provider 时,才需要安装 `veadk-python[harness]` 额外依赖。
68+
69+
| 环境变量 | 释义 |
70+
| :- | :- |
71+
| `HARNESS_ENHANCE_ENABLED` | 是否启用 Harness 插件,支持 `true` / `false`。 |
72+
| `HARNESS_ENHANCE_COMPONENTS` | 启用的组件,逗号分隔;常用值为 `invocation_context,compactor,response_verification`。 |
73+
| `HARNESS_PROFILE` | 插件运行 profile,用于区分运行策略;默认 `default`。 |
74+
| `HARNESS_COMPRESSION_PROVIDER` | 工具结果压缩 provider,默认 `builtin`;可选 `headroom`。 |
75+
| `HARNESS_MAX_CONTEXT_CHARS` | 上下文压缩阈值,默认 `24000`。 |
76+
| `HARNESS_MAX_TOOL_RESULT_CHARS` | 单个工具结果压缩阈值,默认 `4000`。 |
77+
| `HARNESS_VERIFIER_MODE` | 最终回答校验模式,`observe` 或 `block`,默认 `observe`。 |
78+
| `HARNESS_STORE_PATH` | 可选 JSONL 事件存储路径;不设置时使用内存存储。 |
79+
80+
`harness_enhance` 配置块会在 HarnessApp Runtime 部署时映射为这些环境变量。推荐开发者优先通过 `harness.yaml` 或 `veadk agentkit invoke` 参数启用,环境变量适合平台集成和镜像运行时。
81+
6582
## 数据库
6683

6784
统一前缀 `DATABASE_`,按存储类型分组。记忆与知识库按所选后端读取对应配置。

0 commit comments

Comments
 (0)