$ show microsoft/autogen
AutoGen is a multi-agent AI framework originally from Microsoft Research, now in maintenance mode and succeeded by Microsoft Agent Framework. The codebase is a large monorepo containing Python packages (autogen-core, autogen-agentchat, autogen-ext, autogen-studio, agbench) and a .NET implementation (Microsoft.AutoGen.*), with Python as the primary language. The architecture is layered: Core provides event-driven agent runtime, message passing, and distributed infrastructure via gRPC; AgentChat offers higher-level multi-agent teams and patterns; Extensions integrate external services (OpenAI, Azure, MCP, GraphRAG, etc.); Studio is a FastAPI web UI with a Gatsby frontend for no-code agent prototyping. Key entry points include AssistantAgent, group chat managers, and various team orchestrators. The system relies heavily on LLM clients, Pydantic models, gRPC for distributed runtimes, and OpenTelemetry for tracing. Despite the maintenance mode status, the code shows solid engineering with clear separation of concerns, extensive test suites, and well-structured packages. However, the ecosystem is in transition, with active development shifted to the successor framework.
The LLM identified 12 files worth highlighting for reuse:
Defines the BaseAgent class and core agent abstractions for the event-driven runtime. Provides message handling, publishing, and subscription patterns that underpin all agent implementations. Reusable as a foundation for any event-driven agent system.
Implements RoutedAgent with declarative message handler routing via type subscriptions. Agents register handlers for specific message types, enabling clean separation of concerns. The pattern is highly reusable for any message-routing system.
SelectorGroupChat implements a group chat where an LLM-based selector chooses the next speaker. Demonstrates a sophisticated multi-agent coordination pattern with handoff support, reusable for any dynamic team orchestration.
Swarm group chat implements agent-to-agent handoffs where agents can transfer control to each other. The handoff pattern is cleanly implemented and reusable for building complex multi-agent workflows with dynamic routing.
DiGraphGroupChat uses a directed graph to define agent interaction flows, allowing complex non-sequential workflows. The graph-based approach is highly reusable for any workflow-based multi-agent system.
McpWorkbench provides a unified interface for MCP (Model Context Protocol) servers, enabling dynamic tool discovery and invocation. The abstraction is clean and reusable for any system needing to integrate MCP tools.
McpSessionHost handles server-to-host requests for sampling, elicitation, and roots in MCP protocol. Implements a clean host-side component that can be reused in any MCP-compatible agent system.
GrpcWorkerAgentRuntime provides a distributed agent runtime using gRPC for cross-process communication. Enables scaling agents across machines. The pattern is reusable for any distributed actor system.
OpenAIChatCompletionClient implements the model client interface with streaming support, retry logic, and proper error handling. A well-structured, reusable LLM client implementation.
MemoryController implements task-centric memory with vector storage, retrieval, and learning from experience. The architecture is innovative and reusable for any agent memory system needing fast learning capabilities.
AutoGen Studio's FastAPI application with WebSocket support, authentication, and session management. Provides a complete web-based playground for prototyping agents. The architecture is reusable for building agent management UIs.
AgBench's run command implements agent benchmarking with Docker isolation, repeatable runs, and log capture. The pattern is reusable for any agent evaluation framework needing controlled execution environments.