feat: add AG2 multi-agent framework as native agent client#219
Open
faridun-ag2 wants to merge 1 commit intoTHUDM:mainfrom
Open
feat: add AG2 multi-agent framework as native agent client#219faridun-ag2 wants to merge 1 commit intoTHUDM:mainfrom
faridun-ag2 wants to merge 1 commit intoTHUDM:mainfrom
Conversation
AG2 (formerly AutoGen) is an open-source multi-agent framework with 500K+ monthly PyPI downloads. This adds two AgentClient implementations: - AG2Agent: single AssistantAgent + UserProxyAgent pair - AG2GroupChatAgent: multi-agent GroupChat with Planner + Executor AG2 requires Python >=3.10 and pydantic >=2.6.1, which conflicts with AgentBench's core deps (Python 3.9, pydantic v1). A separate requirements-ag2.txt is provided for an isolated venv setup. Includes 23 tests (unit, integration, e2e with fake task server).
Author
|
Hi @Xiao9905 @Longin-Yu! Would love your review on this PR. It adds AG2 (formerly AutoGen) as a native agent client — the first multi-agent framework integration in AgentBench. Key design decisions:
Happy to adjust anything based on your feedback. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds AG2 (formerly AutoGen) as a native agent client for AgentBench evaluation. AG2 is an open-source multi-agent framework with 500K+ monthly PyPI downloads, 4,300+ GitHub stars, and 400+ contributors.
Dependency strategy
AG2 v0.11.4+ requires Python >=3.10 and pydantic >=2.6.1, which conflicts with AgentBench's core dependencies (Python 3.9, pydantic ~=1.10). Rather than modifying existing requirements, a separate
requirements-ag2.txtis provided for an isolated venv:python3.10 -m venv .venv-ag2 source .venv-ag2/bin/activate pip install -r requirements-ag2.txtThe AG2 import in
__init__.pyis wrapped intry/except ImportErrorso the base AgentBench installation is unaffected.New files
src/client/agents/ag2_agent.py— AG2Agent and AG2GroupChatAgent implementationssrc/client/agents/test_ag2_agent.py— 23 tests (unit, integration, e2e with fake task server)configs/agents/ag2-single.yaml— Config for single-agent evaluationconfigs/agents/ag2-groupchat.yaml— Config for multi-agent evaluationconfigs/agents/ag2-gpt4.yaml— Config for GPT-4 leaderboard runsconfigs/agents/ag2_agents.yaml— Aggregated config foragent_test.pyrequirements-ag2.txt— Isolated dependencies for AG2 environmentModified files
src/client/agents/__init__.py— Optional AG2 agent registrationTest plan
pytest src/client/agents/test_ag2_agent.py -v)python -m src.client.agent_test --config configs/agents/ag2_agents.yaml --agent ag2-single