SuperAPI AI 工具集

Deep Agents Orchestration

智能体与模型

查看项目

更新于 10-15 22:39

技能介绍

用途:该技能用于在 Deep Agents 中实现子智能体委派、任务规划与人工审批(HITL)三类编排能力。SubAgentMiddleware、TodoListMiddleware、HumanInTheLoopMiddleware 均自动包含在 create_deep_agent() 中。

主要能力:子智能体通过 task 工具委派工作,适合需要专用工具、隔离复杂任务或保持主智能体上下文干净时使用;默认提供 general-purpose 子智能体,与主智能体工具配置相同。TodoList 通过 write_todos 规划与跟踪任务,每项含 content 与 status(pending、in_progress、completed),适合多步骤或长时任务。HITL 通过 interrupt_on 指定需审批的工具,如 write_file、execute_sql,可配置 allowed_decisions。

使用方式:用 create_deep_agent(subagents=[...]) 定义子智能体名称、描述、系统提示与工具;用 interrupt_on 与 checkpointer=MemorySaver() 启用中断;调用时传入 config 中的 thread_id 以持久化状态,审批后用 Command(resume=...) 恢复。

限制:子智能体无状态,需在单次调用中给出完整指令;自定义子智能体不继承主智能体技能,需显式提供;TodoList 与中断恢复都依赖 thread_id;使用 interrupt_on 时必须提供 checkpointer。工具名与 HITL 协议不可配置。