feat: add agent tool support (todo_tool) - #1
Open
wgnrai wants to merge 2 commits into
Open
Conversation
- tools/todo_tool.py: Tool subclass wrapping all helper functions - 9 actions: create, list, get, update, delete, link_chat, unlink_chat, stats, projects - Deletion guardrail: requires confirmed=true (Principal authorization) - Clean formatted text responses - prompts/agent.system.tool.todo_tool.md: Agent-facing documentation - All actions with parameter tables - Valid status/priority values - NON-NEGOTIABLE deletion policy - JSON usage examples No existing files modified. Purely additive.
The framework's normalize_tool_request() splits todo_tool:create into
tool_name='todo_tool' + tool_args['action']='create', but agent.py sets
method=None and never populates it from the parsed action.
Fix: check kwargs.get('action') when self.method is empty.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds native agent tool support to the Todo List plugin, enabling Agent Zero subordinate agents (developer, researcher, hacker, etc.) to create, view, update, delete, and manage tasks programmatically.
Changes
New Files
tools/todo_tool.py(275 lines) —TodoToolclass with 9 actions:create— Create tasks with title, description, status, priority, project, agent_profile, tagslist— List/filter tasks by project, agent, status, priority, tag, searchget— Get a single task by IDupdate— Update any task fielddelete— Delete a task (requiresconfirmed: trueguardrail)link_chat/unlink_chat— Link/unlink chat sections to tasksstats— Get task statisticsprojects— List all project namesprompts/agent.system.tool.todo_tool.md(207 lines) — Agent-facing documentation:Key Design Decisions
confirmed: trueis passed. This prevents agents from accidentally deleting user tasks.kwargs.get("action"), notself.method. The tool checks both for compatibility. This pattern matches core tools (scheduler.py,skills_tool.py).Testing
todo_tool:createandtodo_tool:listconfirmed: trueCompatibility