Skip to main content

Module todos

Module todos 

Source
Expand description

Todos: a structured task list the agent maintains for multi-step work.

A single todo_write tool writes the current list to the agent’s app state; an internal ContextInjector re-renders that list at intervals, so the agent keeps its plan in view without restating it. Each rendered list is an injected block, and only the latest user message’s injected blocks are sent, so the model sees one current copy.

The reminder is paced in model calls, not user turns, so a long single invocation gets it mid-loop. The model last saw the list on the call after a todo_write or in a reminder; the next reminder waits reminder_interval model calls after that, since repeating a list the model has just read only costs tokens.

use strands::Agent;
use strands::testing::MockModel;
use strands::vended_plugins::todos::Todos;

let agent = Agent::builder()
    .model(MockModel::new())
    .plugins([Todos::default()])
    .printer(false)
    .build()?;

Structs§

TodoItem
One entry of the todo list, stored in app state in this JSON shape. Unknown keys are dropped on input.
Todos
Gives the agent a todo_write tool and keeps the current list in view (Todos).
TodosConfig
Configuration for the Todos plugin (TodosConfig).
TodosConfigBuilder
Use builder syntax to set the inputs and finish with build().

Enums§

TodoStatus
Where a todo stands.