feat(ag2): upgrade to v0.11.4 and rewrite all examples with 7 new additions#26
Open
martimfasantos wants to merge 1 commit intomainfrom
Open
feat(ag2): upgrade to v0.11.4 and rewrite all examples with 7 new additions#26martimfasantos wants to merge 1 commit intomainfrom
martimfasantos wants to merge 1 commit intomainfrom
Conversation
…itions - Upgrade AG2 from 0.9.1.post0 to 0.11.4 with new API patterns (LLMConfig dict, run()/process()) - Rewrite 5 existing examples (simple agent, tools, structured outputs, human-in-the-loop, multi-agent) - Add 7 new examples: sequential chat, nested chat, code execution, guardrails (Maris), MCP tools, observability, A2A protocol - Clean pyproject.toml to ag2[openai,mcp,a2a] with direct deps only - Add OUTPUTS.md with captured outputs from all 12 examples - Update root README.md version to 0.11.4
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
OUTPUTS.mdwith captured output for all 12 examplesExamples
00_simple_agent.pyConversableAgent,run()/process(),LLMConfig01_agent_with_tools.pyfunctions=parameter, tool registration, multi-tool agents02_structured_outputs.pyresponse_format, schema-conforming JSON responses03_human_in_the_loop.pyregister_reply(), conversation flow04_multi_agent.pyAutoPattern,initiate_group_chat(), multi-agent collaboration05_sequential_chat.pyinitiate_chats()pipeline, carryover summaries, specialist agents06_nested_chat.pyregister_nested_chats(), encapsulated workflows, inner delegation07_code_execution.pyLocalCommandLineCodeExecutor, code writer/executor agent pattern08_guardrails.py09_mcp_tools.pycreate_toolkit(),stdio_client, FastMCP server integration10_observability.pyruntime_loggingto SQLite, event capture, post-hoc analysis11_a2a.pyA2aAgentServer,A2aRemoteAgent, distributed agents over HTTPKey API changes (0.9.x → 0.11.4)
LLMConfignow takes a positional dict:LLMConfig({"model": name})instead of keyword argsagent.run()/result.process()pattern replaces directinitiate_chat()for simple casesfunctions=parameter onConversableAgentfor inline tool registrationAutoPattern+initiate_group_chat()(oldGroupChat/GroupChatManagerstill supported)apply_safeguard_policy()with regex-based inter-agent safeguardsA2aAgentServerandA2aRemoteAgenta_initiate_chat()to avoid blocking the stdio transport event loopConfiguration
gpt-4o-mini) viasettings.pyag2[openai,mcp,a2a]>=0.11.4,mcp>=1.9.2,pydantic-settings,uvicornuvpackage managerTesting
All 12 examples ran successfully with exit code 0 and produced feature-showcasing output (see
OUTPUTS.mdfor full details).