LangEx.Middleware.TodoList (LangEx v0.11.3)

Copy Markdown View Source

Middleware that gives the agent an explicit planning tool.

Contributes a write_todos tool plus a :todos state key. The agent records and revises a task list as it works, which keeps a long multi-step loop anchored to a plan instead of drifting — one of the cheapest quality gains for multi-step agents. The current plan lives in graph state (and therefore in checkpoints), so it survives pauses and resumes.

Encourage use from the agent's system prompt (e.g. "Before acting, write a todo list and keep it updated.").

Options

  • :description - override the tool description shown to the model

Summary

Functions

Builds a todo-list planning middleware. See the module doc for options.

Functions

new(opts \\ [])

@spec new(keyword()) :: LangEx.Middleware.t()

Builds a todo-list planning middleware. See the module doc for options.