Skip to content

Instantly share code, notes, and snippets.

@kennethleungty
Created December 16, 2025 16:28
Show Gist options
  • Select an option

  • Save kennethleungty/2f5a6798540e1a29347964b808ac89c3 to your computer and use it in GitHub Desktop.

Select an option

Save kennethleungty/2f5a6798540e1a29347964b808ac89c3 to your computer and use it in GitHub Desktop.
@tool(description=WRITE_TODOS_TOOL_DESCRIPTION)
def write_todos(todos: list[Todo], tool_call_id: Annotated[str, InjectedToolCallId]) -> Command:
"""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)],
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment