Skip to content

A programming framework for agentic AI

Fix MCP example in readme (#6919)

Eric Zhue0d6cc80a93d
diff --git a/README.md b/README.md
index 2824058aa..d8d0f0e9e 100644
--- a/README.md
+++ b/README.md
@@ -59,8 +59,6 @@ Create a web browsing assistant agent that uses the Playwright MCP server.
# First run `npm install -g @playwright/mcp@latest` to install the MCP server.
import asyncio
from autogen_agentchat.agents import AssistantAgent
-from autogen_agentchat.teams import RoundRobinGroupChat
-from autogen_agentchat.conditions import TextMessageTermination
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StdioServerParams
@@ -83,11 +81,7 @@ async def main() -> None:
model_client_stream=True,
max_tool_iterations=10,
)
- team = RoundRobinGroupChat(
- [agent],
- termination_condition=TextMessageTermination(source="web_browsing_assistant"),
- )
- await Console(team.run_stream(task="Find out how many contributors for the microsoft/autogen repository"))
+ await Console(agent.run_stream(task="Find out how many contributors for the microsoft/autogen repository"))
asyncio.run(main())