Sagents.Middleware.TodoList (Sagents v0.8.0-rc.4)

Copy Markdown

Middleware that adds TODO list management capabilities to agents.

Provides the write_todos tool for creating, updating, and managing TODO items during complex multi-step tasks.

Usage

{:ok, agent} = Agent.new(
  model: model,
  middleware: [TodoList]
)

# Agent can now use write_todos tool to manage tasks

Configuration

  • :display_text - Label shown in UI when the write_todos tool runs. Defaults to "Updating task list". Useful when the todo list is used internally by the agent (e.g. self-organization during an onboarding flow) and the default label would leak implementation detail to users.

Usage

# default label
{:ok, agent} = Agent.new(middleware: [TodoList])

# custom label for a user-facing flow where todos are internal
{:ok, agent} = Agent.new(
  middleware: [{TodoList, display_text: "Updating my notes"}]
)