Skip to content

Add AG2 framework examples#46

Open
faridun-ag2 wants to merge 1 commit intoAzure-Samples:mainfrom
faridun-ag2:add-ag2-examples
Open

Add AG2 framework examples#46
faridun-ag2 wants to merge 1 commit intoAzure-Samples:mainfrom
faridun-ag2:add-ag2-examples

Conversation

@faridun-ag2
Copy link
Copy Markdown

Summary

  • Add AG2 (formerly AutoGen) examples alongside existing framework demos: ag2_basic.py, ag2_tool.py, ag2_tools.py, ag2_supervisor.py
  • Add ag2[openai] to requirements.txt
  • Add AG2 section and docs link to README.md

Why AG2?

AG2 is a community-maintained multi-agent framework with 500K+ monthly PyPI downloads. It supports native multi-provider configuration via LLMConfig — works with GitHub Models, Azure OpenAI, Ollama, and OpenAI.com using the same config pattern as other examples.

AG2 Highlights in These Examples

Pattern Other Frameworks AG2 Equivalent
Tool definition @tool decorator register_for_llm + register_for_execution
Multi-agent Supervisor wraps sub-agents as tools GroupChat with automatic speaker selection
Provider config Framework-specific client LLMConfig(api_type="openai", base_url=...)

Test Plan

  • ruff check examples/ag2_*.py passes
  • All 4 examples run with API_HOST=github
  • Existing examples unaffected
  • requirements.txt updated with ag2[openai]
  • README.md updated with AG2 in frameworks list

@faridun-ag2
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="AG2ai"

1 similar comment
@faridun-ag2
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="AG2ai"

@faridun-ag2
Copy link
Copy Markdown
Author

Hey @pamelafox 👋 We've added AG2 framework examples to the repo — basic agent, tool usage, multiple tools, and multi-agent GroupChat. Would love your feedback!

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