Add AG2 (formerly AutoGen) multi-agent examples#15
Add AG2 (formerly AutoGen) multi-agent examples#15VasiliyRad wants to merge 4 commits intofetchai:mainfrom
Conversation
… examples Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@rajashekarcs2023 and @gautammanak1, could you please review this PR? It adds AG2 (formerly AutoGen) multi-agent examples — AG2 is the community-maintained successor to Microsoft's pyautogen. |
Issues FoundHey @VasiliyRad Thank you for the PR! I've reviewed the PR and found several compatibility issues with the current AG2 API. Please fix these errors before merging: 1. ❌
|
|
Comment 1 — LLMConfig: LLMConfig is not deprecated — it's the recommended pattern in AG2 0.11+. What was removed in 0.11.0 were legacy helpers (config_list= kwarg, context manager, class properties), not the class itself. Our positional-dict usage is correct per current docs. Added a test to cover this. Comment 2 — SingleA2AAdapter: Fixed — replaced agentverse_url/mailbox_api_key with a2a_port/mailbox/seed. Added test that constructs the adapter with these params. Comment 3 — DuckDuckGoSearchTool: Fixed — removed num_results=5 from constructor. Added test. Comment 4 — Payment Protocol Enhancement: Done — refactored payment-approval to use SingleA2AAdapter with payment protocol support. Same architecture as research-synthesis-team. Also added Python 3.13 requirement (uagents/Pydantic v1 incompatible with 3.14+). |
Adds two standalone AG2 v0.11+ examples to
ag2-agents/:research-synthesis-team/— GroupChat with 4 specialists wrapped as an A2A executor (Pattern B), exposed to Agentverse. Replaces the outdated pyautogen<0.3 approach.payment-approval/— Two-agent workflow (researcher + executor) withhuman_input_mode="ALWAYS"as an explicit approval gate before Skyfire payment. First example in the repo with human-in-the-loop before a financial action.Why: The existing
autogen-agents/example usespyautogen<0.3— a frozen package from 2023 that is incompatible with the current uAgents/A2A SDK and no longer receives updates. AG2 (formerly AutoGen) is its community-maintained successor and the correct integration target for new work. The research-synthesis-team example follows the same A2A Pattern B already established by LangGraph and ADK examples in this repo, so the wiring is familiar to maintainers. The payment-approval example demonstrates human-in-the-loop before financial execution — thehuman_input_mode="ALWAYS"pattern is native to AG2 and directly relevant to the payment-protocol examples already present.Files added:
ag2-agents/(2 subdirectories, ~12 files)Note: The legacy
autogen-agents/directory is not removed (different pyautogen<0.3 dependency, not compatible with ag2>=0.11.0 in the same venv).