KEMBAR78
feat: support multiple workbenches in assistant agent by bassmang · Pull Request #6529 · microsoft/autogen · GitHub
Skip to content

Conversation

@bassmang
Copy link
Contributor

@bassmang bassmang commented May 14, 2025

resolves: #6456

@bassmang bassmang marked this pull request as draft May 14, 2025 20:50
@Alex-Wenner-FHR
Copy link

I pip installed this branch because this is a feature I am in need of, and did notice the param in the _call_llm is incorrect, expects workbenches but gets passed workbench and causes an error. @bassmang

@bassmang bassmang marked this pull request as ready for review May 22, 2025 13:55
@bassmang
Copy link
Contributor Author

I pip installed this branch because this is a feature I am in need of, and did notice the param in the _call_llm is incorrect, expects workbenches but gets passed workbench and causes an error. @bassmang

@Alex-Wenner-FHR fixed this issue
@jackgerrits I changed the naming of everything in assistant_agent to workbench. This change is still breaking though since it saves workbench as a list when serializing and deserializing

@codecov
Copy link

codecov bot commented May 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.54%. Comparing base (6cadc7d) to head (286f1f0).
Report is 1 commits behind head on main.

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     
Flag Coverage Δ
unittests 79.54% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@victordibia victordibia left a 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

@bassmang bassmang merged commit c683175 into main May 29, 2025
64 checks passed
@bassmang bassmang deleted the mcp_mult_workbenches branch May 29, 2025 14:36
@shabd01
Copy link

shabd01 commented Sep 9, 2025

Hi @bassmang, @ekzhu

Does this feature supports Cross-workbench session sharing?

For example Can a browser session created from Playwright workbench can be accessed by a StaticWorkbench?

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.

MCP Server is giving "The selected tool does not have a callable 'function'" when using via autogen

5 participants