# save()

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/agents/subagents/save/
Language: zh

`api.agents.subagents.save({ name, description, content, tools?, model? }) → Promise<Subagent>`

创建或替换账户上的子试剂。它的说明是主要代理商在决定是否授权时读到的内容。

Status: always the account · tools and model optional · description decides

```javascript
await api.agents.subagents.save({
  name: "explore",
  description: "Dig through files and data to answer a question, and report the facts.",
  tools: ["read", "list", "glob", "grep", "search", "fetch", "query_storage", "account"],
  model: "gemini-3.5-flash",
  content: [
    "Find what was asked. Quote exactly, with paths.",
    "Do not change anything.",
    "End with the facts, not with advice.",
  ].join("\n"),
});
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `name` | string | 必填 | 小写字母、数字和破折号。 |
| `description` | string | 必填 | 单行, 系统提示 由它决定代理何时委托它 。 |
| `content` | string | 必填 | 其指示,最多10万个字符。 |
| `tools` | string[] |  | 选择选择权,缺席继承父母的遗产。 |
| `model` | string |  | 模式 缺席继承父母的遗产 |

## 写写好 {#writing}

- 给它最狭窄的工具组 能够完成这项工作——调查员不需要写作。
- 告诉它用路径和报价报告事实:父母看不到工具结果。
- 封锁时说该怎么做,因为它不能问任何人。
- 更便宜的模式往往是正确的:代表阅读很多,决定很少。

> **开始没有开始**
>
> 分代理人看不到对话的任何部分——只有任务电话的迅速性。 它应该假定任务电话应该包含目标、路径和确切的报告内容。

## 从来没有写到磁盘上 {#account}

与技能相同规则: 磁盘是只读源, 开发者的文件则保留在它们的 。

- [任务任务任务任务任务任务](/zh/sdk/agent/tools/task): 如何叫它。
- [remove()](/zh/sdk/ref/agents/subagents/remove): 带走一个

```python
api.agents.subagents.save(
    name="explore",
    description="Dig through files and data to answer a question, and report the facts.",
    tools=["read", "list", "glob", "grep", "search", "fetch", "query_storage", "account"],
    model="gemini-3.5-flash",
    content="\n".join([
        "Find what was asked. Quote exactly, with paths.",
        "Do not change anything.",
        "End with the facts, not with advice.",
    ]),
)
```
