-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix co-worker task delegation failure #976
base: main
Are you sure you want to change the base?
Conversation
The `name` parameter had to be added to fix the following error: ``` I encountered an error while trying to use the tool. This was the error: 1 validation error for Task name Field required [type=missing, input_value={'description': 'conduct ...or the context shared.'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.7/v/missing. Tool Delegate work to coworker accepts these inputs: Delegate a specific task to one of the following coworkers: web researcher The input to this tool should be the coworker, the task you want them to do, and ALL necessary context to execute the task, they know nothing about the task, so share absolute everything you know, don't reference things but instead explain them. ```
Oh interesting, I was not aware of this, so this is to make sure the agent being delegated can use the tasks tools? |
The problem I was trying to fix is of AgentTools ( Line 733 in 2fe79e6
... causing delegation to not work. |
After going through the docs and code again, I realized that delegation is meant for only hierarchical processes and I was trying delegation with a sequential process. That's why it didn't work. Feel free to close this PR if it's not a use-case you want to or makes sense to support. |
Oh it was supposed to work on sequential as well, I'll run some tests locally |
Just ran into this exact issue, the docs say that delegation should work for Sequential but I was never seeing coworkers being used. Looking at the proposed change, I think it might read better if _prepare_agent_tools was removed which adds the delegation tasks to the task's tool list (which is a bit weird given allow_delegation is a property of an Agent not a task). |
No description provided.