@botbotgo/agent-harness 0.0.134 → 0.0.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +110 -49
  2. package/README.zh.md +102 -49
  3. package/dist/config/agents/direct.yaml +70 -71
  4. package/dist/config/agents/orchestra.yaml +90 -91
  5. package/dist/contracts/workspace.d.ts +12 -2
  6. package/dist/extensions.js +13 -1
  7. package/dist/init-project.js +19 -21
  8. package/dist/package-version.d.ts +1 -1
  9. package/dist/package-version.js +1 -1
  10. package/dist/resource/mcp-tool-support.d.ts +4 -0
  11. package/dist/resource/mcp-tool-support.js +112 -35
  12. package/dist/resource/resource-impl.js +199 -7
  13. package/dist/runtime/adapter/runtime-shell.d.ts +3 -1
  14. package/dist/runtime/adapter/runtime-shell.js +2 -1
  15. package/dist/runtime/adapter/tool/tool-arguments.js +1 -0
  16. package/dist/runtime/adapter/tool/tool-hitl.js +3 -0
  17. package/dist/runtime/agent-runtime-adapter.d.ts +6 -0
  18. package/dist/runtime/agent-runtime-adapter.js +32 -2
  19. package/dist/runtime/harness.js +2 -0
  20. package/dist/tool-modules.d.ts +5 -0
  21. package/dist/tool-modules.js +10 -0
  22. package/dist/workspace/agent-binding-compiler.d.ts +2 -2
  23. package/dist/workspace/agent-binding-compiler.js +78 -6
  24. package/dist/workspace/compile.js +150 -6
  25. package/dist/workspace/object-loader.js +148 -53
  26. package/dist/workspace/resource-compilers.js +6 -0
  27. package/dist/workspace/support/source-collectors.js +1 -1
  28. package/dist/workspace/support/workspace-ref-utils.d.ts +1 -0
  29. package/dist/workspace/support/workspace-ref-utils.js +9 -0
  30. package/dist/workspace/tool-hydration.js +87 -13
  31. package/dist/workspace/yaml-object-reader.js +40 -13
  32. package/package.json +1 -1
package/README.md CHANGED
@@ -17,6 +17,10 @@
17
17
  <strong>The application runtime for multi-agent products with approvals, recovery, and operator control built in.</strong>
18
18
  </p>
19
19
 
20
+ <p align="center">
21
+ <strong>Turn one agent workspace into one operable product runtime.</strong>
22
+ </p>
23
+
20
24
  <p align="center">
21
25
  <a href="https://botbotgo.github.io/agent-harness/">Product website</a>
22
26
  (static page in <code>docs/</code>, publish with GitHub Pages; EN / 中文 toggle)
@@ -31,6 +35,17 @@
31
35
 
32
36
  ## What Problem We Solve
33
37
 
38
+ In one line: `agent-harness` takes the runtime work that appears after the demo and makes it part of the product runtime from day one.
39
+
40
+ If your team already has agents, prompts, tools, and workflows, the missing layer is usually not more execution. It is the runtime that makes those pieces operable as software.
41
+
42
+ What you get on day one:
43
+
44
+ - a runtime that keeps `runs`, `threads`, `approvals`, and `events` as inspectable product records
45
+ - a recovery path that survives interruption, restart, and operator decisions
46
+ - one workspace-shaped assembly model instead of app-specific runtime glue
47
+ - one stable runtime contract even when execution backends change underneath
48
+
34
49
  AI makes it much easier to generate agent logic, tool calls, and workflow code. The hard part moves to operations.
35
50
 
36
51
  Once the demo works, the real software problem changes shape:
@@ -50,6 +65,12 @@ Teams still need answers to the runtime questions that appear after that shift:
50
65
 
51
66
  `agent-harness` solves that layer. It keeps agent execution upstream while making the application runtime operable, recoverable, and governable.
52
67
 
68
+ That means the product story becomes easier to explain:
69
+
70
+ - you bring the workspace, agents, tools, and prompts
71
+ - `agent-harness` brings persisted `runs`, `threads`, `approvals`, `events`, recovery, and operator visibility
72
+ - your application gets one stable runtime contract instead of backend-specific runtime plumbing
73
+
53
74
  Concretely, that means:
54
75
 
55
76
  - a product-facing approval and operator surface instead of backend-specific middleware state
@@ -152,6 +173,21 @@ Real products need a runtime that can answer harder questions:
152
173
  - It lets YAML own assembly and operating policy while code keeps a tiny surface
153
174
  - It goes deep on runtime concerns that upstream libraries do not fully productize
154
175
 
176
+ ## When To Use It
177
+
178
+ Use `agent-harness` when:
179
+
180
+ - you already know your product needs agents, tools, prompts, or MCP access, but the missing layer is runtime operations
181
+ - you need approvals, restart recovery, queueing, or inspectable run records as part of the shipped product
182
+ - you want one workspace-shaped assembly model instead of hand-written runtime bootstrapping in every app
183
+ - you want to keep backend execution semantics upstream while holding the product contract stable
184
+
185
+ Do not reach for it when:
186
+
187
+ - you only need a single short-lived agent call with no approvals, no persistence, and no operational control surface
188
+ - you are looking for a workflow builder or low-code automation canvas
189
+ - you want to replace LangChain v1 or DeepAgents execution semantics rather than operate around them
190
+
155
191
  ## Quick Start
156
192
 
157
193
  Install:
@@ -205,6 +241,17 @@ try {
205
241
  }
206
242
  ```
207
243
 
244
+ Three-minute mental model:
245
+
246
+ 1. Point `createAgentHarness(...)` at a workspace root.
247
+ 2. Call `run(runtime, { ... })` to execute one request.
248
+ 3. Inspect persisted runtime records instead of treating the final answer as the only product artifact.
249
+
250
+ This is the shortest product pitch:
251
+
252
+ - your team builds the agent app
253
+ - `agent-harness` makes that app operable
254
+
208
255
  If you want the shortest possible mental model:
209
256
 
210
257
  - one workspace becomes one runtime
@@ -376,13 +423,12 @@ kind: Agent
376
423
  metadata:
377
424
  name: orchestra
378
425
  spec:
379
- execution:
380
- backend: deepagent
381
- modelRef: model/default
382
- mcpServers:
383
- - name: browser
384
- command: node
385
- args: ["./mcp-browser-server.mjs"]
426
+ backend: deepagent
427
+ modelRef: model/default
428
+ mcpServers:
429
+ - name: browser
430
+ command: node
431
+ args: ["./mcp-browser-server.mjs"]
386
432
  ```
387
433
 
388
434
  Expose harness tools as an MCP server:
@@ -429,6 +475,14 @@ Core workspace files:
429
475
  Workspace-local tool modules in `resources/tools/` should be exported with `tool({...})`.
430
476
  Any other local module shape is not supported, and unsupported shapes are rejected at load time.
431
477
 
478
+ Default wiring guidance:
479
+
480
+ - let workspace startup scan local and attached `resources` packages into one registry
481
+ - let agents whitelist tools and skills by name
482
+ - keep `config/catalogs/tools.yaml` for reusable shared tools
483
+ - keep `config/catalogs/mcp.yaml` for shared MCP server definitions
484
+ - let agents select MCP tools and apply per-usage MCP overrides where needed
485
+
432
486
  There are three main configuration layers:
433
487
 
434
488
  - runtime policy in `config/runtime/workspace.yaml`
@@ -581,10 +635,14 @@ Use this file for reusable tool objects.
581
635
 
582
636
  Built-in tool families include function tools, backend tools, MCP tools, bundles, and provider-native tools. Provider-native tools are declared in YAML and resolved directly to upstream factories.
583
637
 
638
+ Keep `config/catalogs/tools.yaml` for reusable shared tool objects rather than making it the default path for every local tool. Workspace-owned function tools should normally be discovered from `resources/tools/` and then whitelisted by name in each agent.
639
+
584
640
  ### `config/catalogs/mcp.yaml`
585
641
 
586
642
  Use this file for named MCP server presets.
587
643
 
644
+ MCP servers are usually heavier shared resources than local function tools. Keep shared MCP connection details here, then let each agent choose the remote tools it wants and apply per-usage overrides at the agent usage point.
645
+
588
646
  Example:
589
647
 
590
648
  ```yaml
@@ -602,12 +660,12 @@ spec:
602
660
 
603
661
  ### `config/agents/*.yaml`
604
662
 
605
- Agents always use `kind: Agent` plus `spec.execution.backend`.
663
+ Agents always use `kind: Agent` plus `spec.backend`.
606
664
 
607
- Use two nested sections:
665
+ Use two sections:
608
666
 
609
667
  - `spec.runtime` for harness-owned runtime placement such as `spec.runtime.runRoot`
610
- - `spec.execution` for upstream execution semantics and adapter-facing config
668
+ - top-level `spec` fields for upstream execution semantics and adapter-facing config
611
669
 
612
670
  Example direct host:
613
671
 
@@ -619,26 +677,28 @@ metadata:
619
677
  spec:
620
678
  runtime:
621
679
  runRoot: ./.agent
622
- execution:
623
- backend: langchain-v1
624
- modelRef: model/default
625
- tools: []
626
- skills: []
627
- memory: []
628
- subagents: []
629
- mcpServers: []
630
- config:
631
- checkpointer:
632
- ref: checkpointer/default
633
- store:
634
- ref: store/default
635
- interruptOn: {}
636
- filesystem:
637
- rootDir: .
638
- virtualMode: true
639
- maxFileSizeMb: 10
640
- middleware: []
641
- systemPrompt: Answer simple requests directly.
680
+ backend: langchain-v1
681
+ modelRef: model/default
682
+ tools:
683
+ - write_file:
684
+ subprocess: true
685
+ skills:
686
+ - code-review
687
+ memory: []
688
+ subagents: []
689
+ mcpServers: []
690
+ config:
691
+ checkpointer:
692
+ ref: checkpointer/default
693
+ store:
694
+ ref: store/default
695
+ interruptOn: {}
696
+ filesystem:
697
+ rootDir: .
698
+ virtualMode: true
699
+ maxFileSizeMb: 10
700
+ middleware: []
701
+ systemPrompt: Answer simple requests directly.
642
702
  ```
643
703
 
644
704
  Example orchestra host:
@@ -651,27 +711,28 @@ metadata:
651
711
  spec:
652
712
  runtime:
653
713
  runRoot: ./.agent
654
- execution:
655
- backend: deepagent
656
- modelRef: model/default
657
- memory:
658
- - path: config/agent-context.md
659
- tools: []
660
- skills: []
661
- subagents: []
662
- mcpServers: []
663
- config:
664
- store:
665
- ref: store/default
666
- checkpointer:
667
- ref: checkpointer/default
668
- backend:
669
- ref: backend/default
670
- interruptOn: {}
671
- middleware: []
714
+ backend: deepagent
715
+ modelRef: model/default
716
+ memory:
717
+ - path: config/agent-context.md
718
+ tools:
719
+ - stock_snapshot
720
+ skills:
721
+ - stock-research
722
+ subagents: []
723
+ mcpServers: []
724
+ config:
725
+ store:
726
+ ref: store/default
727
+ checkpointer:
728
+ ref: checkpointer/default
729
+ backend:
730
+ ref: backend/default
731
+ interruptOn: {}
732
+ middleware: []
672
733
  ```
673
734
 
674
- For backend-specific options, prefer the upstream concept directly inside `spec.execution.config`. Upstream feature coverage is tracked in [docs/upstream-feature-matrix.md](docs/upstream-feature-matrix.md).
735
+ For backend-specific options, prefer the upstream concept directly inside `spec.config`. Upstream feature coverage is tracked in [docs/upstream-feature-matrix.md](docs/upstream-feature-matrix.md).
675
736
 
676
737
  ## Design Notes
677
738
 
package/README.zh.md CHANGED
@@ -17,6 +17,10 @@
17
17
  <strong>面向多 agent 产品的应用运行时:内建审批、恢复与运维控制,而不只是执行。</strong>
18
18
  </p>
19
19
 
20
+ <p align="center">
21
+ <strong>把一个 agent 工作区直接变成一套可运行的产品级 runtime。</strong>
22
+ </p>
23
+
20
24
  <p align="center">
21
25
  <a href="https://botbotgo.github.io/agent-harness/">产品网站</a>
22
26
  (<code>docs/</code> 中的静态页,通过 GitHub Pages 发布;支持中英文切换)
@@ -31,6 +35,17 @@
31
35
 
32
36
  ## 我们解决什么问题
33
37
 
38
+ 一句话概括:`agent-harness` 把 demo 之后才暴露出来的运行时问题,提前收进产品 runtime 本身。
39
+
40
+ 如果团队已经有 agents、prompts、tools 和 workflows,真正缺的通常不是再来一层执行,而是把这些东西变成“可运维的软件”的运行时层。
41
+
42
+ 第一天就能直接拿到的东西:
43
+
44
+ - 把 `runs`、`threads`、`approvals`、`events` 作为可查询产品记录保存下来的 runtime
45
+ - 能跨中断、重启和人工决策继续推进的恢复路径
46
+ - 一个工作区形态的装配模型,而不是每个应用各写一套运行时胶水
47
+ - 即使底层 execution backend 变化,也尽量保持稳定的 runtime 契约
48
+
34
49
  AI 让 agent 逻辑、工具调用和工作流代码更容易生成,真正变难的是运行时运维。
35
50
 
36
51
  当 demo 跑起来之后,真正的软件问题会换一种形状出现:
@@ -50,6 +65,12 @@ AI 让 agent 逻辑、工具调用和工作流代码更容易生成,真正变
50
65
 
51
66
  `agent-harness` 解决的就是这一层。它把 agent 执行留在上游,同时把应用运行时做成可运维、可恢复、可治理的系统。
52
67
 
68
+ 换成更直接的产品语言,就是:
69
+
70
+ - 你负责工作区、agents、tools 和 prompts
71
+ - `agent-harness` 负责持久化 `runs`、`threads`、`approvals`、`events`、恢复能力与运维可见性
72
+ - 你的应用拿到的是一个稳定的 runtime 契约,而不是一堆 backend 专属的运行时胶水代码
73
+
53
74
  具体来说,就是把这些能力沉到运行时里:
54
75
 
55
76
  - 面向产品的审批与运维控制面,而不是 backend 专属的中间件状态
@@ -152,6 +173,21 @@ AI 让 agent 逻辑、工具调用和工作流代码更容易生成,真正变
152
173
  - 复杂装配与运行策略交给 YAML,代码面保持极小
153
174
  - 在上游库未充分产品化的运行时问题上做深做透
154
175
 
176
+ ## 什么时候该用
177
+
178
+ 下面这些场景适合用 `agent-harness`:
179
+
180
+ - 你已经确定产品需要 agents、tools、prompts 或 MCP,但真正缺的是运行时运维层
181
+ - 你需要把审批、重启恢复、排队调度或可查询运行记录一起作为产品能力交付出去
182
+ - 你希望用一个 workspace 形态的装配模型取代每个应用各写一套启动和运行时胶水
183
+ - 你想把 backend 的执行语义留在上游,同时把产品契约稳定下来
184
+
185
+ 下面这些场景就不应该优先用它:
186
+
187
+ - 你只需要一次短生命周期的 agent 调用,不需要审批、持久化或运维控制面
188
+ - 你要的是工作流搭建器或低代码自动化画布
189
+ - 你想替代 LangChain v1 或 DeepAgents 的执行语义,而不是围绕它们做运行时
190
+
155
191
  ## 快速开始
156
192
 
157
193
  安装:
@@ -205,6 +241,17 @@ try {
205
241
  }
206
242
  ```
207
243
 
244
+ 三分钟心智模型:
245
+
246
+ 1. 用 `createAgentHarness(...)` 指向一个 workspace root。
247
+ 2. 用 `run(runtime, { ... })` 执行一次请求。
248
+ 3. 把持久化的运行时记录当成产品资产,而不是只盯着最终回答。
249
+
250
+ 如果再压缩成最短产品表述,就是:
251
+
252
+ - 你的团队负责构建 agent app
253
+ - `agent-harness` 负责让这个 app 可运维
254
+
208
255
  最短心智模型:
209
256
 
210
257
  - 一个工作区对应一个运行时
@@ -376,13 +423,12 @@ kind: Agent
376
423
  metadata:
377
424
  name: orchestra
378
425
  spec:
379
- execution:
380
- backend: deepagent
381
- modelRef: model/default
382
- mcpServers:
383
- - name: browser
384
- command: node
385
- args: ["./mcp-browser-server.mjs"]
426
+ backend: deepagent
427
+ modelRef: model/default
428
+ mcpServers:
429
+ - name: browser
430
+ command: node
431
+ args: ["./mcp-browser-server.mjs"]
386
432
  ```
387
433
 
388
434
  将 harness 工具作为 MCP 服务对外暴露:
@@ -431,6 +477,8 @@ await stop(runtime);
431
477
 
432
478
  主要有三层配置:
433
479
 
480
+ - 先由 workspace 启动时扫描本地和附加的 `resources` 包,建立统一 registry
481
+ - agent 再按名字白名单选择 tools 与 skills
434
482
  - `config/runtime/workspace.yaml` 中的运行时策略
435
483
  - `config/catalogs/*.yaml` 中的可复用对象目录
436
484
  - `config/agents/*.yaml` 中的 agent 装配
@@ -578,6 +626,8 @@ spec:
578
626
 
579
627
  内置工具族包括函数工具、后端工具、MCP 工具、bundle 与原生 provider 工具。原生 provider 工具在 YAML 中声明并直接解析到上游工厂。
580
628
 
629
+ `config/catalogs/tools.yaml` 更适合放可复用共享工具对象,而不应成为每个本地工具的默认入口。工作区自有函数工具通常应从 `resources/tools/` 发现,再由各 agent 按名字白名单启用。
630
+
581
631
  ### `config/catalogs/mcp.yaml`
582
632
 
583
633
  命名 MCP 服务预设。
@@ -599,12 +649,12 @@ spec:
599
649
 
600
650
  ### `config/agents/*.yaml`
601
651
 
602
- Agent 始终使用 `kind: Agent` 以及 `spec.execution.backend`。
652
+ Agent 始终使用 `kind: Agent` 以及 `spec.backend`。
603
653
 
604
- 两个嵌套区块:
654
+ 两个区块:
605
655
 
606
656
  - `spec.runtime`:harness 侧运行时放置,例如 `spec.runtime.runRoot`
607
- - `spec.execution`:上游执行语义与面向适配器的配置
657
+ - `spec` 顶层字段:上游执行语义与面向适配器的配置
608
658
 
609
659
  direct 主机示例:
610
660
 
@@ -616,26 +666,28 @@ metadata:
616
666
  spec:
617
667
  runtime:
618
668
  runRoot: ./.agent
619
- execution:
620
- backend: langchain-v1
621
- modelRef: model/default
622
- tools: []
623
- skills: []
624
- memory: []
625
- subagents: []
626
- mcpServers: []
627
- config:
628
- checkpointer:
629
- ref: checkpointer/default
630
- store:
631
- ref: store/default
632
- interruptOn: {}
633
- filesystem:
634
- rootDir: .
635
- virtualMode: true
636
- maxFileSizeMb: 10
637
- middleware: []
638
- systemPrompt: Answer simple requests directly.
669
+ backend: langchain-v1
670
+ modelRef: model/default
671
+ tools:
672
+ - write_file:
673
+ subprocess: true
674
+ skills:
675
+ - code-review
676
+ memory: []
677
+ subagents: []
678
+ mcpServers: []
679
+ config:
680
+ checkpointer:
681
+ ref: checkpointer/default
682
+ store:
683
+ ref: store/default
684
+ interruptOn: {}
685
+ filesystem:
686
+ rootDir: .
687
+ virtualMode: true
688
+ maxFileSizeMb: 10
689
+ middleware: []
690
+ systemPrompt: Answer simple requests directly.
639
691
  ```
640
692
 
641
693
  orchestra 主机示例:
@@ -648,27 +700,28 @@ metadata:
648
700
  spec:
649
701
  runtime:
650
702
  runRoot: ./.agent
651
- execution:
652
- backend: deepagent
653
- modelRef: model/default
654
- memory:
655
- - path: config/agent-context.md
656
- tools: []
657
- skills: []
658
- subagents: []
659
- mcpServers: []
660
- config:
661
- store:
662
- ref: store/default
663
- checkpointer:
664
- ref: checkpointer/default
665
- backend:
666
- ref: backend/default
667
- interruptOn: {}
668
- middleware: []
703
+ backend: deepagent
704
+ modelRef: model/default
705
+ memory:
706
+ - path: config/agent-context.md
707
+ tools:
708
+ - stock_snapshot
709
+ skills:
710
+ - stock-research
711
+ subagents: []
712
+ mcpServers: []
713
+ config:
714
+ store:
715
+ ref: store/default
716
+ checkpointer:
717
+ ref: checkpointer/default
718
+ backend:
719
+ ref: backend/default
720
+ interruptOn: {}
721
+ middleware: []
669
722
  ```
670
723
 
671
- 后端相关选项优先直接写在 `spec.execution.config` 中沿用上游概念。上游能力覆盖见 [docs/upstream-feature-matrix.md](docs/upstream-feature-matrix.md)。
724
+ 后端相关选项优先直接写在 `spec.config` 中沿用上游概念。上游能力覆盖见 [docs/upstream-feature-matrix.md](docs/upstream-feature-matrix.md)。
672
725
 
673
726
  ## 设计说明
674
727
 
@@ -1,7 +1,7 @@
1
1
  # agent-harness feature: schema version for this declarative config object.
2
2
  apiVersion: agent-harness/v1alpha1
3
3
  # agent-harness feature: object type discriminator.
4
- # Prefer the generic `Agent` form and select the concrete execution backend under `spec.execution`.
4
+ # Prefer the generic `Agent` form and place execution fields directly under `spec`.
5
5
  kind: Agent
6
6
  metadata:
7
7
  # agent-harness feature: stable object id used for refs and host-agent selection.
@@ -19,74 +19,73 @@ spec:
19
19
  # =====================
20
20
  # Runtime Agent Features
21
21
  # =====================
22
- execution:
23
- # Current backend adapter for this host profile.
24
- backend: langchain-v1
25
- # Upstream execution feature: model ref for the underlying LLM used by the direct-response agent.
26
- # This should point at a cheap, fast, general-purpose chat model, because `direct` is intended
27
- # to be the low-latency path for simple requests.
28
- modelRef: model/default
29
- # Upstream execution feature: direct host starts with no attached explicit tools by default.
30
- tools: []
31
- # Upstream execution feature: direct host starts with no attached local skill packages by default.
32
- skills: []
33
- # Upstream execution feature: direct host does not bootstrap project memory by default.
34
- memory: []
35
- # Upstream execution feature: direct host does not predeclare subagents by default.
36
- subagents: []
37
- # Upstream execution feature: direct host does not attach MCP servers by default.
38
- mcpServers: []
39
- # Runtime execution feature: checkpointer config passed into the selected backend adapter.
40
- # Even the lightweight direct path can benefit from resumable state during interactive use.
41
- # Available `kind` options in this harness: `FileCheckpointer`, `MemorySaver`, `SqliteSaver`.
42
- # `path` is only used by `FileCheckpointer` and `SqliteSaver`; omit it for `MemorySaver`.
43
- checkpointer:
44
- ref: checkpointer/sqlite
45
- # Upstream execution feature: LangGraph store available to middleware and runtime context hooks.
46
- # The default direct host keeps this enabled so middleware can use the same durable store surface as other hosts.
47
- store:
48
- ref: store/default
49
- # Upstream execution feature: no declarative HITL tool routing by default.
50
- interruptOn: {}
51
- # Upstream execution feature: filesystem middleware settings for LangChain v1 agents.
52
- # This only becomes active when `middleware` includes `{ kind: filesystem }`, or when
53
- # automatic upstream middleware such as skills or memory need a filesystem backend.
54
- # Keep the default root inside the workspace so file-aware middleware stays bounded.
55
- filesystem:
56
- rootDir: .
57
- virtualMode: true
58
- maxFileSizeMb: 10
59
- # Upstream execution feature: no extra declarative middleware beyond the runtime's automatic injections.
60
- # Common upstream middleware kinds that this harness can compile directly from YAML:
61
- # - `filesystem`
62
- # - `patchToolCalls`
63
- # - `summarization`
64
- # - `dynamicSystemPrompt`
65
- # - `humanInTheLoop`
66
- # - `todoList`
67
- # - `pii`, `piiRedaction`
68
- #
69
- # Keep the default empty so the lightweight direct host stays minimal.
70
- middleware: []
71
- # Upstream execution feature: system prompt for the lightweight direct-response host.
72
- # This prompt should keep the agent focused on:
73
- # - answering simple requests in one turn
74
- # - staying lightweight instead of planning or orchestrating
75
- # - avoiding delegation-heavy decomposition unless the caller explicitly switches agents
76
- #
77
- # The direct host is intentionally narrower than the orchestra host:
78
- # - `direct` is optimized for latency and straightforward completion
79
- # - `orchestra` is optimized for multi-step work, tools, and delegation
80
- #
81
- # Keep this prompt biased toward concise, self-contained answers. If richer routing policy is
82
- # needed for choosing between host agents, configure that separately via `Runtime.spec.routing`
83
- # rather than overloading the direct host prompt with classifier behavior.
84
- systemPrompt: |-
85
- You are the direct agent.
22
+ # Current backend adapter for this host profile.
23
+ backend: langchain-v1
24
+ # Upstream execution feature: model ref for the underlying LLM used by the direct-response agent.
25
+ # This should point at a cheap, fast, general-purpose chat model, because `direct` is intended
26
+ # to be the low-latency path for simple requests.
27
+ modelRef: model/default
28
+ # Upstream execution feature: direct host starts with no attached explicit tools by default.
29
+ tools: []
30
+ # Upstream execution feature: direct host starts with no attached local skill packages by default.
31
+ skills: []
32
+ # Upstream execution feature: direct host does not bootstrap project memory by default.
33
+ memory: []
34
+ # Upstream execution feature: direct host does not predeclare subagents by default.
35
+ subagents: []
36
+ # Upstream execution feature: direct host does not attach MCP servers by default.
37
+ mcpServers: []
38
+ # Runtime execution feature: checkpointer config passed into the selected backend adapter.
39
+ # Even the lightweight direct path can benefit from resumable state during interactive use.
40
+ # Available `kind` options in this harness: `FileCheckpointer`, `MemorySaver`, `SqliteSaver`.
41
+ # `path` is only used by `FileCheckpointer` and `SqliteSaver`; omit it for `MemorySaver`.
42
+ checkpointer:
43
+ ref: checkpointer/sqlite
44
+ # Upstream execution feature: LangGraph store available to middleware and runtime context hooks.
45
+ # The default direct host keeps this enabled so middleware can use the same durable store surface as other hosts.
46
+ store:
47
+ ref: store/default
48
+ # Upstream execution feature: no declarative HITL tool routing by default.
49
+ interruptOn: {}
50
+ # Upstream execution feature: filesystem middleware settings for LangChain v1 agents.
51
+ # This only becomes active when `middleware` includes `{ kind: filesystem }`, or when
52
+ # automatic upstream middleware such as skills or memory need a filesystem backend.
53
+ # Keep the default root inside the workspace so file-aware middleware stays bounded.
54
+ filesystem:
55
+ rootDir: .
56
+ virtualMode: true
57
+ maxFileSizeMb: 10
58
+ # Upstream execution feature: no extra declarative middleware beyond the runtime's automatic injections.
59
+ # Common upstream middleware kinds that this harness can compile directly from YAML:
60
+ # - `filesystem`
61
+ # - `patchToolCalls`
62
+ # - `summarization`
63
+ # - `dynamicSystemPrompt`
64
+ # - `humanInTheLoop`
65
+ # - `todoList`
66
+ # - `pii`, `piiRedaction`
67
+ #
68
+ # Keep the default empty so the lightweight direct host stays minimal.
69
+ middleware: []
70
+ # Upstream execution feature: system prompt for the lightweight direct-response host.
71
+ # This prompt should keep the agent focused on:
72
+ # - answering simple requests in one turn
73
+ # - staying lightweight instead of planning or orchestrating
74
+ # - avoiding delegation-heavy decomposition unless the caller explicitly switches agents
75
+ #
76
+ # The direct host is intentionally narrower than the orchestra host:
77
+ # - `direct` is optimized for latency and straightforward completion
78
+ # - `orchestra` is optimized for multi-step work, tools, and delegation
79
+ #
80
+ # Keep this prompt biased toward concise, self-contained answers. If richer routing policy is
81
+ # needed for choosing between host agents, configure that separately via `Runtime.spec.routing`
82
+ # rather than overloading the direct host prompt with classifier behavior.
83
+ systemPrompt: |-
84
+ You are the direct agent.
86
85
 
87
- This is a manual low-latency host.
88
- Answer simple requests directly.
89
- Keep the path lightweight.
90
- Do not delegate.
91
- Do not perform broad multi-step execution.
92
- Do not behave like the default execution host.
86
+ This is a manual low-latency host.
87
+ Answer simple requests directly.
88
+ Keep the path lightweight.
89
+ Do not delegate.
90
+ Do not perform broad multi-step execution.
91
+ Do not behave like the default execution host.