Liking cljdoc? Tell your friends :D
Clojure only.

im.ttalk.agent.subagent.tools

子代理异步工具组(designs/runtime-borrow.md §14;借 Keelson Subagent/SubagentTools.cs)。

delegate/management-tools 有 spawn/list/result/kill/restart,但缺三样: wait(阻塞等一组子 agent,带超时——不然模型只能空转轮询 subagent_result)、 send(给已完成的子 agent 续一句话,带着它自己的历史接着干)、上限 (同时运行的数量、嵌套深度——不然一个模型能把 fan-out 套成指数)。

五个内联工具:spawn_agent / send_agent / wait_agent / list_agents / interrupt_agent,基于 subagent/manager。

  • 深度经子 agent 的 :tool-context 种子 :subagent/depth 显式传递(设计原则 §3: 跨 ChatClient 边界只走显式通道);
  • send = 同一 conversation-id + 同一 memory store 再起一次运行,历史自然续上;
  • 对模型暴露的 id 稳定不变(send 之后内部 spawn id 换了,表里记着映射)。
子代理异步工具组(designs/runtime-borrow.md §14;借 Keelson `Subagent/SubagentTools.cs`)。

`delegate/management-tools` 有 spawn/list/result/kill/restart,但缺三样:
**wait**(阻塞等一组子 agent,带超时——不然模型只能空转轮询 `subagent_result`)、
**send**(给已完成的子 agent 续一句话,带着它自己的历史接着干)、**上限**
(同时运行的数量、嵌套深度——不然一个模型能把 fan-out 套成指数)。

五个内联工具:`spawn_agent` / `send_agent` / `wait_agent` / `list_agents` /
`interrupt_agent`,基于 `subagent/manager`。

- 深度经子 agent 的 `:tool-context` 种子 `:subagent/depth` **显式**传递(设计原则 §3:
  跨 ChatClient 边界只走显式通道);
- send = 同一 conversation-id + 同一 memory store 再起一次运行,历史自然续上;
- 对模型暴露的 id 稳定不变(send 之后内部 spawn id 换了,表里记着映射)。
raw docstring

subagent-toolsclj

(subagent-tools
  {:keys [subagent-fn result-fn max-agents max-depth wait-timeout-ms observer
          subagent-name]
   :or {result-fn :text max-agents 4 max-depth 2 wait-timeout-ms 60000}})

返回五个内联工具 map。

config:

  • :subagent-fn (fn [args ctx] -> subagent-config)(必需,同 delegate-tool)
  • :result-fn (fn [chat-result] -> 字符串),缺省 :text
  • :max-agents 同一会话同时 running 的上限(缺省 4)
  • :max-depth 嵌套深度上限(缺省 2;顶层 agent 深度 0)
  • :wait-timeout-ms wait_agent 缺省等待上限(缺省 60000)
  • :observer / :subagent-name 同 delegate-tool
返回五个内联工具 map。

config:
- :subagent-fn   (fn [args ctx] -> subagent-config)(必需,同 delegate-tool)
- :result-fn     (fn [chat-result] -> 字符串),缺省 :text
- :max-agents    同一会话同时 running 的上限(缺省 4)
- :max-depth     嵌套深度上限(缺省 2;顶层 agent 深度 0)
- :wait-timeout-ms wait_agent 缺省等待上限(缺省 60000)
- :observer / :subagent-name  同 delegate-tool
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close