-
Notifications
You must be signed in to change notification settings - Fork 7.8k
feat: support multiple workbenches in assistant agent #6529
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
Conversation
python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py
Outdated
Show resolved
Hide resolved
|
I pip installed this branch because this is a feature I am in need of, and did notice the param in the |
@Alex-Wenner-FHR fixed this issue |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6529 +/- ##
=======================================
Coverage 79.54% 79.54%
=======================================
Files 225 225
Lines 16662 16669 +7
=======================================
+ Hits 13254 13260 +6
- Misses 3408 3409 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Looks good. I tested with the following.
Thanks @bassmang
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import StdioServerParams, McpWorkbench
from autogen_agentchat.agents import AssistantAgent
from autogen_core import CancellationToken
from autogen_agentchat.ui import Console
# Setup server params for local filesystem access
fetch_mcp_server = StdioServerParams(command="uv", args=["tool","run","mcp-server-fetch"], read_timeout_seconds=100 )
git_mcp_server = StdioServerParams(command="uv", args=["tool","run","mcp-server-git"], read_timeout_seconds=100)
fetch_wb = McpWorkbench(server_params=fetch_mcp_server)
git_wb = McpWorkbench(server_params=git_mcp_server)
# Create an agent that can use the fetch tool.
model_client = OpenAIChatCompletionClient(model="gpt-4o")
agent = AssistantAgent(name="fetcher", model_client=model_client, workbench=[fetch_wb, git_wb], reflect_on_tool_use=True)
await Console(agent.run_stream(task="Find and summarize the latest article on https://www.pragmaticengineer.com/ and What is the git status of https://github.com/microsoft/autogen ", cancellation_token=CancellationToken()))Results look good
resolves: #6456