Skip to content

feat: add agent tool support (todo_tool) - #1

Open
wgnrai wants to merge 2 commits into
Reaperrhs:mainfrom
wgnrai:main
Open

feat: add agent tool support (todo_tool)#1
wgnrai wants to merge 2 commits into
Reaperrhs:mainfrom
wgnrai:main

Conversation

@wgnrai

@wgnrai wgnrai commented May 26, 2026

Copy link
Copy Markdown

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) — TodoTool class with 9 actions:

    • create — Create tasks with title, description, status, priority, project, agent_profile, tags
    • list — List/filter tasks by project, agent, status, priority, tag, search
    • get — Get a single task by ID
    • update — Update any task field
    • delete — Delete a task (requires confirmed: true guardrail)
    • link_chat / unlink_chat — Link/unlink chat sections to tasks
    • stats — Get task statistics
    • projects — List all project names
    • Error handling on all actions, clean formatted text output
  • prompts/agent.system.tool.todo_tool.md (207 lines) — Agent-facing documentation:

    • All 9 actions with parameter tables
    • Valid status/priority values
    • Non-negotiable deletion policy requiring Principal authorization
    • JSON usage examples

Key Design Decisions

  1. Deletion Guardrail — Tool blocks deletions unless confirmed: true is passed. This prevents agents from accidentally deleting user tasks.
  2. kwargs action fallback — The framework passes colon-syntax actions via kwargs.get("action"), not self.method. The tool checks both for compatibility. This pattern matches core tools (scheduler.py, skills_tool.py).
  3. Purely additive — No changes to existing helpers, API, or WebUI code. All existing functionality preserved.

Testing

  • Swap tested against live Agent Zero instance
  • Subordinate agents successfully created and listed tasks via todo_tool:create and todo_tool:list
  • Deletion guardrail verified — blocks without confirmed: true

Compatibility

  • Agent Zero v0.8+
  • Python 3.11+
  • No new dependencies

wgnrai added 2 commits May 25, 2026 22:22
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant