Sagents.Middleware.TodoList (Sagents v0.8.0-rc.4)
Copy MarkdownMiddleware 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 tasksConfiguration
:display_text- Label shown in UI when thewrite_todostool 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"}]
)