# 智能体协调

除了执行工作之外，代理还有用于 *组织* 工作的工具——规划多步骤任务、委派给专家、创建子代理，以及在遇到真正模糊不清之处时暂停并询问用户。

## 该系列中的工具

| 工具                                                | 它的作用                                                                 |
| ------------------------------------------------- | -------------------------------------------------------------------- |
| `todo_write`                                      | 在长任务中维护结构化的待办列表。随着工作推进将其标记为已完成。                                      |
| `spawn_subagent`                                  | 启动一个带有自己上下文窗口的新代理，用于处理一个自包含的子任务。                                     |
| `spawn_worker_thread`                             | 不需要阻塞主对话的后台工作。                                                       |
| `delegate`                                        | 将任务交给专家（例如，一个具有不同提示词/工具/权限的原型）。                                      |
| `archetype_delegation`                            | 路由到一个命名的原型——编码者、研究员、规划者等。                                            |
| `skill_delegation`                                | 移交给一个 [技能](/openhuman/zh/gong-neng/integrations.md#skills) 已安装在工作区中。 |
| `ask_clarification`                               | 暂停并向用户提出一个准确的问题，而不是猜测。                                               |
| `plan_exit`                                       | 退出规划阶段并开始执行。                                                         |
| `check_onboarding_status` / `complete_onboarding` | 根据用户是否已完成 onboarding 来限制行为。                                          |

`spawn_subagent` 以及原型委派调用都接受一个可选的 `model` 字段，用于一次性精确指定模型。如果省略，执行框架会在有配置级别的每个代理固定模型时使用它们，否则回退到正常的模型路由提示。

## 为什么这些是工具，而不是隐式行为

当代理试图把所有事情都塞进一个脑子里时，长任务就会分崩离析。通过待办事项和子代理拆分工作意味着：

* 每个子代理都会获得干净的上下文——更少的 token，更少的干扰。
* 主线程保留进展的高层视图。
* 某一分支中的失败不会污染其余部分。

请求澄清也是一种工具，且是有意如此：它让“我应该问用户”成为一个 *可见的* 决策，代理可以被引导朝这个方向，而不是一种涌现行为。

## 另见

* [Coder](/openhuman/zh/gong-neng/native-tools/coder.md) ——编码者原型子代理通常使用的内容。
* [Subconscious Loop](/openhuman/zh/gong-neng/subconscious.md) ——始终在线的后台代理线程。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tinyhumans.gitbook.io/openhuman/zh/gong-neng/native-tools/agent-coordination.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
