camel icon indicating copy to clipboard operation
camel copied to clipboard

[Feature Request] Workforce Refactor: Customize default toolkits for the new works

Open echo-yiyiyi opened this issue 1 year ago • 3 comments

Required prerequisites

  • [x] I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
  • [ ] Consider asking first in a Discussion.

Motivation

_create_new_agent function in camel\societies\workforce\workforce.py must use these toolkits, we need to refactor it.

        # Default tools for a new agent
        function_list = [
            *SearchToolkit().get_tools(),
            *WeatherToolkit().get_tools(),
            *GoogleMapsToolkit().get_tools(),
        ]

Solution

No response

Alternatives

No response

Additional context

No response

echo-yiyiyi avatar Mar 02 '25 14:03 echo-yiyiyi

It is already achieved, so close the issue.

math_toolkit = MathToolkit().get_tools()

new_worker_agent_kwargs = {
    "model": model,
    "tools": math_toolkit,
}


workforce = Workforce(
...
    new_worker_agent_kwargs=new_worker_agent_kwargs,  
)

echo-yiyiyi avatar Mar 03 '25 16:03 echo-yiyiyi

Hi @yiyiyi0817 we can realize it by doing this. But it is not very straightforward. We should probably change the interface. Also we may need to only support tools that does not require API keys for the default tools of new agents

lightaime avatar Mar 03 '25 16:03 lightaime

Hi @yiyiyi0817 we can realize it by doing this. But it is not very straightforward. We should probably change the interface. Also we may need to only support tools that does not require API keys for the default tools of new agents

I see. Reopened the issue.

echo-yiyiyi avatar Mar 04 '25 08:03 echo-yiyiyi