Microsoft Research

AutoGen

Conversational multi-agent programming.

AutoGen frames agent systems as conversations between specialized agents — user proxies, assistants, and tool executors. The v0.4 redesign introduces a layered, async architecture suitable for production.

Install

bash
pip install -U autogen-agentchat autogen-ext[openai]

Quickstart

A minimal example to verify your setup.

python
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient

async def main():
    model = OpenAIChatCompletionClient(model="gpt-4o-mini")
    agent = AssistantAgent("assistant", model_client=model)
    result = await agent.run(task="Write a haiku about agents.")
    print(result.messages[-1].content)

asyncio.run(main())

Core concepts

Conversable agents

Agents exchange messages following configurable termination and selection rules.

Group chat

RoundRobin, Selector, and Swarm patterns coordinate teams of agents on shared tasks.

Code execution

Built-in sandboxes (Docker, Jupyter) let agents safely run generated code.

Layered runtime

Core, AgentChat, and Extensions layers separate transport, behavior, and integrations.

Common use cases

  • Research assistants that write and run code
  • Autonomous data analysis
  • Multi-agent debate and review
  • Tool-using copilots

Resources