PraisonAI supports three AutoGen-family frameworks: AutoGen v0.2, AutoGen v0.4, and AG2. Each provides multi-agent collaboration with different implementations and capabilities.Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Need a framework that isn’t listed here? See Framework Adapter Plugins to register your own via Python entry points.
Which AutoGen Option to Choose
PraisonAI supports three AutoGen-family backends with different capabilities:| Framework | Install | Best For |
|---|---|---|
framework: ag2 | pip install "praisonai[ag2]" | New projects, AWS Bedrock, latest features |
framework: autogen_v4 | pip install "praisonai[autogen-v4]" | AutoGen v0.4 stack (autogen-agentchat + autogen-ext) |
framework: autogen | pip install "praisonai[autogen]" | Legacy AutoGen v0.2 projects |
AutoGen v0.4
AutoGen v0.4 uses the newautogen-agentchat and autogen-ext packages with OpenAIChatCompletionClient and RoundRobinGroupChat.
How AutoGen v0.4 Works
AutoGen v0.4 Features
- Model Configuration: Reads
llm_config[0]formodel,api_key,base_url(defaults:gpt-4o-mini,OPENAI_API_KEY,https://api.openai.com/v1) - Agent Creation: One
AssistantAgentper YAML role withreflect_on_tool_use=True - Agent Name Sanitization: Non-alphanumeric characters become
_, leading digits getagent_prefix, Python keywords get trailing_ - Tool Registration: Tools must expose
.run()method, passed toAssistantAgent(tools=...) - Execution:
RoundRobinGroupChatwithTextMentionTermination("TERMINATE") | MaxMessageTermination(max_messages=20) - Turn Limit:
max_turns = len(agents) * 3(currently hardcoded)
AG2 (Full)
AG2 is the community fork of AutoGen with enhanced features and AWS Bedrock support.How AG2 Works
AG2 Features
- LLM Configuration: Resolution order: top-level
llm.*> first role’sllm.*>llm_config[0]> environment > defaults - AWS Bedrock:
api_type: bedrockskipsapi_key, uses AWS SDK credential chain - Tool Registration: Uses
assistant.register_for_llm()+user_proxy.register_for_execution() - Agent Names: Sanitized with
[^a-zA-Z0-9_\-]→_ - GroupChat: Standard
GroupChat(max_round=12)withGroupChatManager - Result Extraction: Prefers
chat_result.summary, falls back to scanning messages in reverse
YAML llm Block Precedence
For AG2, the llm: configuration can be placed at the top level or under the first role:
| Location | Priority | Example |
|---|---|---|
| Top-level | Highest | llm: { model: "gpt-4o", api_key: "..." } |
| First role | Medium | roles: { analyst: { llm: { ... } } } |
| Dispatcher | Lowest | llm_config[0] from command |
AWS Bedrock with AG2
With
api_type: bedrock, no api_key is required. AG2 uses standard AWS credentials from ~/.aws/credentials, environment variables, or IAM roles.AutoGen v0.2 (Legacy)
Original AutoGen v0.2 support for existing projects.AutoGen v0.2 Features
- Simple Architecture:
UserProxyAgent+AssistantAgentwithinitiate_chats - Configuration: Uses
config_listformat for LLM configuration - Code Execution: Built-in
code_execution_configwith working directory - Termination: Checks for “terminate” or “TERMINATE” in message content
- Tool Support: Limited compared to v0.4 and AG2
Troubleshooting
Installation Errors
- AutoGen v0.4:
pip install "praisonai[autogen-v4]"— requires bothautogen-agentchatandautogen-ext - AG2:
pip install "praisonai[ag2]"— requires AG2 distribution - AutoGen v0.2:
pip install "praisonai[autogen]"— requires legacyautogenpackage
Import Errors
- v0.4 missing
autogen_agentchat: Installautogen-agentchatpackage - v0.4 missing
autogen_ext: Installautogen-extpackage - AG2 not detected: Ensure both
ag2distribution andautogennamespace are available
Agent Name Issues
- AG2:
Research Analyst!→Research_Analyst_(sanitization is intentional) - v0.4: Names become valid Python identifiers (e.g.,
"123Agent"→"agent_123Agent")
Bedrock Configuration
- Missing AWS credentials:
api_type: bedrockrequires standard AWS credential setup - Wrong region: Ensure
aws_regionmatches your Bedrock model availability
Message Generation
- v0.4 “No messages generated”:
MaxMessageTermination(20)was hit; consider the hardcodedmax_turns = len(agents) * 3limitation
framework: autogen_v4raisesNotImplementedError("AutoGen v0.4 adapter is not yet fully implemented. Please use 'autogen' framework for AutoGen v0.2 support.")framework: ag2(the placeholderAG2Adapter, distinct from the workingag2backend) raisesNotImplementedError("AG2 adapter is not yet fully implemented. Please use 'autogen' framework for AutoGen/AG2 support.")
framework: autogen (v0.2) or the fully-registered framework: ag2 backend instead.
Plugin authors: Framework adapters now accept dispatcher kwargs (tools_dict, agent_callback, task_callback, cli_config). See Framework Adapter Plugins for custom adapter development.
If the framework is not installed, PraisonAI now fails fast at CLI entry with:
--framework is caught before any expensive setup runs.
Best Practices
Choose the right backend for your needs
Choose the right backend for your needs
Use AG2 for new projects with Bedrock needs, AutoGen v0.4 for existing v0.4 stacks, and AutoGen v0.2 only for legacy compatibility.
Plan for agent name sanitization
Plan for agent name sanitization
Both AG2 and v0.4 sanitize agent names differently. Test your role names to understand the final agent identifiers.
Configure LLM settings appropriately
Configure LLM settings appropriately
AG2 supports top-level
llm: blocks for shared configuration. AutoGen v0.4 uses llm_config[0] from the dispatcher.Use tools properly for each backend
Use tools properly for each backend
AutoGen v0.4 requires tools with
.run() methods. AG2 uses register_for_llm/register_for_execution pattern.Related
CrewAI
CrewAI framework integration
PraisonAI Agents
PraisonAI native agents framework

