# 待待待待待待待待办

Canonical URL: https://developers.iagenify.com/zh/sdk/agent/events/todo/
Language: zh

`{ type: "todo", todos }`

计划改变了,计划一到就到 todo_write 运行, 与整个列表一起运行 - 绝不修改以应用 。

Status: the whole list · 3 statuses · one in_progress

## 字段 {#fields}

```javascript
{
  type: "todo",
  todos: [
    { content: "Read the four notes",      status: "completed" },
    { content: "List what is unfinished",  status: "in_progress" },
    { content: "Suggest an order",         status: "pending" }
  ]
}
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `content` | string |  | 一步,在探员自己的语言。 |
| `status` | string |  | `pending` · `in_progress` · `completed`。任何其他情况都变成 `pending`. |

## 替换, 永不合并 {#replace}

> **名单每次全部发送**
>
> 工具取整列, 事件则随附完整列表。 把它当作替代 : 试图调和您持有的列表, 会在代理器重新排序或修改字母时漂移 。

```javascript
let plan = [];

onEvent: (e) => {
  if (e.type === "todo") { plan = e.todos; render(plan); }
};
```

## 正在进行中 {#convention}

探员奉命留一件 `in_progress` 和标记项目 `completed` 。 接口可以依赖它来设置“ 当前步骤 ” 的线, 同时又可以容忍一个零时- 从完成一个到开始下一个。

## 当计划存在时 {#when}

要求该代理人为一项五级或五级以上的任务写一个, **否** 写一个下面的——一个两线名单需要一转,对谁都无帮助。 `todo` 完全没有

## 它能生存在跑步中 {#after}

最后名单在 `result.todos` 和《公约》 `done` 在一个会话中保留它,所以重新开放会回想计划。

> **子智能体事件也会传递到这里**
>
> 它们随身携带 palclId —— 启动它们的任务电话的识别符号 —— 以及代理、 其名称。 他们自己的代号与任务名称相加, 所以两个运行时不会相撞 。 在将事件作为主运行程序处理之前先测试 palId 。

- [todo_write](/zh/sdk/agent/tools/todo-write): 产生它的工具。
- [计划计划](/zh/sdk/agent/modes/plan): 输出为计划的模式 。

```python
{
    "type": "todo",
    "todos": [
        {"content": "Read the four notes",     "status": "completed"},
        {"content": "List what is unfinished", "status": "in_progress"},
        {"content": "Suggest an order",        "status": "pending"},
    ],
}
```

```python
plan = []

def on_event(event):
    global plan
    if event["type"] == "todo":
        plan = event["todos"]
        render(plan)
```
