Skip to content

feat: support multiple workbenches in assistant agent - #6529

Merged
Griffin Bassman (bassmang) merged 14 commits into
mainfrom
mcp_mult_workbenches
May 29, 2025
Merged

feat: support multiple workbenches in assistant agent#6529
Griffin Bassman (bassmang) merged 14 commits into
mainfrom
mcp_mult_workbenches

Conversation

@bassmang

@bassmang Griffin Bassman (bassmang) commented May 14, 2025

Copy link
Copy Markdown
Contributor

resolves: #6456

@bassmang
Griffin Bassman (bassmang) marked this pull request as draft May 14, 2025 20:50
@Alex-Wenner-FHR

Copy link
Copy Markdown

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. Griffin Bassman (@bassmang)

@bassmang
Griffin Bassman (bassmang) marked this pull request as ready for review May 22, 2025 13:55
@bassmang

Copy link
Copy Markdown
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. Griffin Bassman (@bassmang)

Alex-Wenner-FHR (@Alex-Wenner-FHR) fixed this issue
Jack Gerrits (@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

codecov Bot commented May 22, 2025

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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 Griffin Bassman (@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

@shabd01

shabd01 commented Sep 9, 2025

Copy link
Copy Markdown

Hi Griffin Bassman (@bassmang), Eric Zhu (@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