write_todos() — langchain Function Reference
Architecture documentation for the write_todos() function in todo.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4db9c954_6050_9e2c_53b5_4429e85045e4["write_todos()"] 446b9f1c_796b_e509_22cc_36bc6d734792["todo.py"] 4db9c954_6050_9e2c_53b5_4429e85045e4 -->|defined in| 446b9f1c_796b_e509_22cc_36bc6d734792 d98ccf82_4d6c_11e1_1817_de4c6a3ada8b["__init__()"] d98ccf82_4d6c_11e1_1817_de4c6a3ada8b -->|calls| 4db9c954_6050_9e2c_53b5_4429e85045e4 style 4db9c954_6050_9e2c_53b5_4429e85045e4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/langchain/agents/middleware/todo.py lines 126–135
def write_todos(
todos: list[Todo], tool_call_id: Annotated[str, InjectedToolCallId]
) -> Command[Any]:
"""Create and manage a structured task list for your current work session."""
return Command(
update={
"todos": todos,
"messages": [ToolMessage(f"Updated todo list to {todos}", tool_call_id=tool_call_id)],
}
)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does write_todos() do?
write_todos() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/todo.py.
Where is write_todos() defined?
write_todos() is defined in libs/langchain_v1/langchain/agents/middleware/todo.py at line 126.
What calls write_todos()?
write_todos() is called by 1 function(s): __init__.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free