-
Notifications
You must be signed in to change notification settings - Fork 2.4k
To-Do Tool for Goose #3902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To-Do Tool for Goose #3902
Conversation
|
@tlongwell-block very nice - some ideas:
I like this version more than mine as it is in the right place |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to make this granular (and cap number of tasks) vs a markdown - keeps the system prompt much smaller (can look at the old linked PR for what those signatures would look like). Would also be good to see before/after benchmarks to make sure doesn't degrade things (or even a casual A/B on the same task) - but otherwise I think this is good but would love @katzdave and @DOsinga opinion, I think we need this, but needs to be nice and lean, just one tool with simple actions (maybe the markdown blob approach is good in that sense)
bonus: is there an obvious way to tack on the list to each latest message as it is sent (but not kept in the session)?
Yes, though I wonder if perhaps amending the prompt to simply say something like "keep the todo list brief" would be sufficient. Having LLMs using the tool will self-limit its size. I will definitely set some tunable upper limit, though.
We did discuss this a bit in a chat earlier. I had some concerns around how to manage avoiding polluting the sessions file and/or context. We discussed either adding dynamically editing sessions to keep the to-do from being a part of every turn, or to simply transparently tack on the todo before submitted the session context to the LLM provider. Neither seemed... great. |
I don't think so. The blob is just as effective at conveying the information as a structured list, perhaps even more so since individual LLMs can format it as they please. The lack of structure won't impact the LLM's ability to read the list. And it will definitely minimize the cognitive overhead required to use it. |
Add Character Limit to Todo List ToolSummaryImplements a configurable character-based size limit for the todo list tool to prevent unbounded growth and provide clear feedback to agents about usage. ChangesCore Implementation
Files Modified
TestingAdded tests for:
Benefits
ConfigurationSet the environment variable to customize the limit: export GOOSE_TODO_MAX_CHARS=100000 # Allow up to 100k characters
export GOOSE_TODO_MAX_CHARS=0 # Disable limit (unlimited)Default is 50,000 characters (~12,500 tokens). Error MessagesWhen limit is exceeded: On successful write: Migration
|
|
yeah I wouldn't worry about making a variable for the limit - as long as there is one - say 2000 chars (and it should throw back an error if it tries to update one that is larger telling it to be briefer) |
katzdave
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, really excited about this change!
* main: feat: add @-mention file reference expansion to .goosehints (#3873) feat(cli): Add --name/-n to session remove and --id/-i alias for session export (#3941) Docs: provider and model run options (#4013) To-Do Tools (#3902) ci: correctly match doc only changes (#4009) Remove PR trigger for Linux build workflow (#4008) docs: update release docs with an additional step needed + adjust list formatting (#4005) chore(release): release version 1.3.0 (#3921) docs: MCP-ui blog content (#3996) feat: Add `GOOSE_TERMINAL` env variable to spawned terminals (#3911) add missing dependencies for developer setup (#3930)
…ndow * 'main' of github.com:block/goose: sanitize message content on deserialization (#3966) Move summarize button inside of context view (#4015) blog: post on lead/worker model (#3994) Actually send cancellation to MCP servers (#3865) fix: enable 'goose://' handler for debian systems (#3952) fit: default ollama port (#4001) Remove cognitive complexity clippy lint (#4010) feat: add @-mention file reference expansion to .goosehints (#3873) feat(cli): Add --name/-n to session remove and --id/-i alias for session export (#3941) Docs: provider and model run options (#4013) To-Do Tools (#3902) ci: correctly match doc only changes (#4009) Remove PR trigger for Linux build workflow (#4008) docs: update release docs with an additional step needed + adjust list formatting (#4005)
* 'main' of github.com:block/goose: Move summarize button inside of context view (#4015) blog: post on lead/worker model (#3994) Actually send cancellation to MCP servers (#3865) fix: enable 'goose://' handler for debian systems (#3952) fit: default ollama port (#4001) Remove cognitive complexity clippy lint (#4010) feat: add @-mention file reference expansion to .goosehints (#3873) feat(cli): Add --name/-n to session remove and --id/-i alias for session export (#3941) Docs: provider and model run options (#4013) To-Do Tools (#3902) ci: correctly match doc only changes (#4009) Remove PR trigger for Linux build workflow (#4008)
Co-authored-by: David Katz <[email protected]> Signed-off-by: Jack Wright <[email protected]>
🎯 Add To-Do Tools for Task Management in Goose
Summary
Implements session-scoped todo list functionality to help agents track and manage complex multi-step tasks. This feature provides two simple platform tools (
todo__readandtodo__write) that allow agents to maintain a working memory throughout their session.Motivation
Agents often work on complex tasks that span multiple steps, files, or conversation turns. Without a way to track progress, agents may:
This PR addresses these issues by providing a simple, reliable task tracking mechanism.
Implementation Details
Core Changes
New module:
crates/goose/src/agents/todo_tools.rs(~140 lines)Arc<Mutex<String>>Integration: Minimal changes to
crates/goose/src/agents/agent.rs(~20 lines)System prompt: Added Task Management section to guide agent usage
Testing
crates/goose/tests/todo_tools_test.rs(11 tests)Design Decisions
Usage Example
Quality Checklist
cargo fmt./scripts/clippy-lint.sh)Impact
Files Changed
crates/goose/src/agents/agent.rs- Register todo toolscrates/goose/src/agents/todo_tools.rs- Core implementation (new)crates/goose/src/agents/mod.rs- Module exportcrates/goose/src/prompts/system.md- Task Management sectioncrates/goose/tests/todo_tools_test.rs- Test suite (new)This PR delivers a simple solution for task tracking that enhances agent capabilities without adding complexity or breaking existing functionality.