Agent tools

todo_write

todo_write({ todos: [{ content, status }] })

The agent's plan. The whole list is sent each time, and a todo event carries it to your interface.

category: readfreefive steps or more
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

todosarrayrequired

Each item { content, status }.

statusstring

pending · in_progress · completed. Anything else becomes pending.

The whole list, every time

There is no « add one step » or « mark this done » — the agent sends the list as it now stands, and the todo event carries it. Treat it as a replacement.

When a plan is written at all

Five steps is the threshold

Below that the agent is told to just do the work: a two-line list costs a turn and helps no one. So a short task legitimately produces no plan.

One in progress

The agent keeps exactly one item in_progress and marks items completed as it goes — which gives an interface a reliable « current step ».

It outlives the run

The final list is on result.todos and on the done event, and it is kept in a session — so a plan made in plan mode is still there when you switch mode and continue.