====== AutoGen ====== **AutoGen** is an open-source multi-agent framework originally developed by Microsoft Research for building applications where multiple AI agents converse, collaborate, and execute code together. In 2025, AutoGen underwent a significant evolution — rebranding as the **Microsoft Agent Framework** (also known as **AG2**) — with version 0.4 introducing asynchronous messaging, modular extensibility, and distributed scalability. The framework has over 20,000 active builders and remains one of the most widely used platforms for multi-agent AI development. ===== History and Rebrand ===== AutoGen was initially released by Microsoft Research as a framework for multi-agent conversations. The original design featured two layers: a low-level ''autogen-core'' with ''RoutedAgent'' and message handlers, and a high-level ''Team'' API with patterns like ''RoundRobinGroupChat''. Community feedback indicated that the low-level API was overly complex while the high-level API was too restrictive. In January 2025, AutoGen v0.4 was released, and the project was rebranded to **AG2** and later integrated into the **Microsoft Agent Framework**. This migration unified the architecture around Workflow and Magentic builders, simplifying development while retaining power. ===== Key Features ===== **Multi-Agent Conversations**: Support for two-agent chats, group chats with dynamic speaker selection, sequential and nested conversations, and sophisticated message routing. **Code Execution**: Integrated code execution capabilities through the extensions API, allowing agents to write, run, and debug code autonomously. **Group Chat**: Dynamic coordination with group chat managers, termination conditions, and support for specialized roles (critic, executor, planner). **Human-in-the-Loop**: Built-in support for stall handling, plan review, and approval requests, enabling human oversight at critical decision points. **Observability**: OpenTelemetry integration for tracing, metrics, and debugging across agent workflows. **AutoGen Studio / AG2 Studio**: A UI-based interface for visually building and testing multi-agent workflows without extensive code. ===== Architecture ===== The Microsoft Agent Framework uses a layered architecture: * **Core API** — Event-driven message passing with ''RoutedAgent'', supporting both local and distributed runtimes * **AgentChat API** — High-level multi-agent patterns built on Core (teams, chats, group coordination) * **Extensions API** — LLM clients (OpenAI, Azure), code execution, and community tools * **Workflow Builders** — ''MagenticBuilder'' for orchestrated multi-agent teams and ''WorkflowBuilder'' for edge-based execution graphs ===== Code Example ===== from autogen import AssistantAgent, UserProxyAgent config_list = [{"model": "gpt-4o", "api_key": "your-key"}] assistant = AssistantAgent( name="assistant", llm_config={"config_list": config_list} ) user_proxy = UserProxyAgent( name="user_proxy", human_input_mode="TERMINATE", code_execution_config={"work_dir": "coding", "use_docker": False} ) user_proxy.initiate_chat( assistant, message="Write a Python function to calculate fibonacci numbers and test it." ) ===== Integration with Semantic Kernel ===== The Microsoft Agent Framework converges with [[semantic_kernel]] through three integration paths: AutoGen agents can leverage Semantic Kernel capabilities, AutoGen agents can be hosted within the SK ecosystem, and harmonized runtimes enable multi-agent interoperability. This unified approach supports deployment through Azure AI Foundry Agent Service. ===== References ===== * [[https://github.com/microsoft/autogen|AutoGen GitHub Repository]] * [[https://microsoft.github.io/autogen/stable/index.html|AutoGen Documentation]] * [[https://ag2.ai|AG2 Official Website]] * [[https://www.microsoft.com/en-us/research/project/autogen/|Microsoft Research — AutoGen Project]] * [[https://learn.microsoft.com/en-us/agent-framework/migration-guide/from-autogen/|Migration Guide: AutoGen to Agent Framework]] ===== See Also ===== * [[semantic_kernel]] — Microsoft Semantic Kernel for enterprise AI orchestration * [[crewai]] — CrewAI role-based multi-agent framework * [[langgraph]] — LangGraph stateful agent graphs * [[multi_agent_systems]] — Overview of multi-agent architectures