Auto-sync: 2026-04-27 12:02
This commit is contained in:
39
wiki/concepts/SubagentDelegation.md
Normal file
39
wiki/concepts/SubagentDelegation.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: "Subagent Delegation"
|
||||
type: concept
|
||||
tags: [hermes, ai-agent, delegation, api, subprocess]
|
||||
last_updated: 2026-04-27
|
||||
---
|
||||
|
||||
## Aliases
|
||||
- delegate_task
|
||||
- 子 agent 委托
|
||||
|
||||
## Definition
|
||||
Hermes Agent 的子 agent 委托机制,通过 `delegate_task` 工具启动子 AIAgent 实例,通过 API 调用 LLM。**关键限制**:子 agent 仍然是 Hermes 自身的 agent 实例,只能使用 Hermes 工具集,无法感知 Claude Code 的 SKILL.md 能力。
|
||||
|
||||
## How It Works
|
||||
`delegate_task` 工具虽有 `acp_command` 参数,但:
|
||||
- `acp_command` 仅控制子 AIAgent 的构造参数
|
||||
- 子 AIAgent 通过 API 调用 LLM,不是外部 Claude Code 进程
|
||||
- **只有当 provider 为 `copilot-acp` 时**,`acp` 参数才会真正建立外部 CLI 通道
|
||||
|
||||
## Comparison: delegate_task vs terminal 调用 Claude Code
|
||||
|
||||
| | delegate_task | terminal 调用 claude -p |
|
||||
|--|--------------|------------------------|
|
||||
| 本质 | Hermes 子 agent(API 调用) | 外部 Claude Code 进程 |
|
||||
| Skill 感知 | 无 | 能识别 SKILL.md |
|
||||
| 工具能力 | Hermes 工具集 | Claude Code 自身工具集 |
|
||||
| 适用场景 | 通用推理任务 | 需要 Claude Code 技能的特定任务 |
|
||||
|
||||
## When to Use Which
|
||||
- **使用 delegate_task**:通用推理、无需 Claude Code skill 的任务
|
||||
- **使用 terminal 调用 `claude -p`**:需要 Claude Code skill(如 fireworks-tech-graph、llm-wiki-sync 等)的任务
|
||||
|
||||
## Sources
|
||||
- [[Claude Code 调用方法总结]]
|
||||
|
||||
## Connections
|
||||
- [[SubagentDelegation]] ← 对比 ← [[Claude Code]]
|
||||
- [[SubagentDelegation]] ← 替代方案 ← [[Claude Code Print Mode]]
|
||||
Reference in New Issue
Block a user