Skip to content

Add AG2 framework examples with native Bedrock support#698

Open
faridun-ag2 wants to merge 1 commit intoaws-samples:mainfrom
faridun-ag2:add-ag2-bedrock-examples
Open

Add AG2 framework examples with native Bedrock support#698
faridun-ag2 wants to merge 1 commit intoaws-samples:mainfrom
faridun-ag2:add-ag2-bedrock-examples

Conversation

@faridun-ag2
Copy link
Copy Markdown

@faridun-ag2 faridun-ag2 commented Mar 27, 2026

Summary

  • Add AG2 (formerly AutoGen) to agents-and-function-calling/open-source-agents/ with 3 Jupyter notebooks demonstrating native Amazon Bedrock integration
  • ag2-single-agent-bedrock.ipynb — basic conversational agent
  • ag2-tool-use-bedrock.ipynb — function calling with dual registration pattern (register_for_llm + register_for_execution)
  • ag2-multi-agent-bedrock.ipynb — GroupChat multi-agent orchestration with automatic speaker selection

Why AG2?

AG2 has native Bedrock support via LLMConfig(api_type="bedrock") — no LangChain wrapper or OpenAI API key required. It uses the standard AWS credential chain (IAM roles, env vars, ~/.aws/credentials) for authentication.

Feature Other Frameworks AG2
Bedrock access Requires ChatBedrock wrapper (LangChain) or boto3 directly Native LLMConfig(api_type="bedrock")
Authentication Manual boto3 session setup AWS credential chain (automatic)
Multi-agent Framework-specific patterns GroupChat with auto speaker selection
Package Various pip install ag2 (500K+ monthly downloads)

Test plan

  • All 3 notebooks are valid JSON
  • Code validated: imports, LLMConfig, agents, tool registration, GroupChat all work without errors
  • Notebooks run end-to-end with Bedrock model access enabled
  • pip install ag2[openai] installs successfully
  • Existing framework examples untouched
  • Parent README updated with AG2 entry
  • Markdown docs with HTML headers, YAML tags, and "Open in GitHub" CTA links

Add AG2 (formerly AutoGen) to the open-source agents section with 3 notebooks
demonstrating native Amazon Bedrock integration via LLMConfig(api_type="bedrock"):
- ag2-single-agent-bedrock: basic conversational agent
- ag2-tool-use-bedrock: function calling with dual registration pattern
- ag2-multi-agent-bedrock: GroupChat multi-agent orchestration

Includes corresponding markdown docs and updated parent README.
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@faridun-ag2
Copy link
Copy Markdown
Author

faridun-ag2 commented Mar 27, 2026

Hi @akinfaa! 👋 Hope you're doing well. Could you please take a look at this PR when you get a chance? It adds AG2 framework examples with native Bedrock support to the open-source agents section. Would really appreciate your review. Thanks!

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