Skip to content

AssistantAgent to support Workbench#6393

Merged
ekzhu merged 2 commits intomainfrom
ekzhu-assistant-agent-workbench
Apr 24, 2025
Merged

AssistantAgent to support Workbench#6393
ekzhu merged 2 commits intomainfrom
ekzhu-assistant-agent-workbench

Conversation

@ekzhu
Copy link
Contributor

@ekzhu ekzhu commented Apr 24, 2025

Finishing up the work on workbench.

import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import StdioServerParams, McpWorkbench

async def main() -> None:
    params = StdioServerParams(
        command="uvx",
        args=["mcp-server-fetch"],
        read_timeout_seconds=60,
    )

    # You can also use `start()` and `stop()` to manage the session.
    async with McpWorkbench(server_params=params) as workbench:
        model_client = OpenAIChatCompletionClient(model="gpt-4.1-nano")
        assistant = AssistantAgent(
            name="Assistant",
            model_client=model_client,
            workbench=workbench,
            reflect_on_tool_use=True,
        )
        await Console(assistant.run_stream(task="Go to https://github.com/microsoft/autogen and tell me what you see."))
    
asyncio.run(main())

@codecov
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.38%. Comparing base (0c9fd64) to head (b2873e9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...t/src/autogen_agentchat/agents/_assistant_agent.py 94.44% 1 Missing ⚠️
...n-core/src/autogen_core/tools/_static_workbench.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6393      +/-   ##
==========================================
+ Coverage   78.36%   78.38%   +0.01%     
==========================================
  Files         221      221              
  Lines       16020    16024       +4     
==========================================
+ Hits        12554    12560       +6     
+ Misses       3466     3464       -2     
Flag Coverage Δ
unittests 78.38% <89.47%> (+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.

@ekzhu ekzhu merged commit bab0dfd into main Apr 24, 2025
61 checks passed
@ekzhu ekzhu deleted the ekzhu-assistant-agent-workbench branch April 24, 2025 23:19
peterj added a commit to kagent-dev/autogen that referenced this pull request Apr 26, 2025
…n0425

* upstream/main:
  Update website for v0.5.5 (microsoft#6401)
  Document custom message types in teams API docs (microsoft#6400)
  [doc] Clarify selector prompt for SelectorGroupChat (microsoft#6399)
  Add functional termination condition (microsoft#6398)
  Update: implement return_value_as_string for McpToolAdapter  (microsoft#6380)
  Update version to 0.5.5 (microsoft#6397)
  Add example using autogen-core and FastAPI for handoff multi-agent design pattern with streaming and UI (microsoft#6391)
  Update agent documentation  (microsoft#6394)
  AssistantAgent to support Workbench (microsoft#6393)
  TEST: skip when macos+uv and adding uv venv tests (microsoft#6387)
  Add guide for workbench and mcp & bug fixes for create_mcp_server_session (microsoft#6392)

Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
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.

1 participant