---
title: "autogen"
type: "tool"
slug: "microsoft-autogen"
canonical_url: "https://www.graphcanon.com/tools/microsoft-autogen"
github_url: "https://github.com/microsoft/autogen"
homepage_url: "https://microsoft.github.io/autogen/"
stars: 59553
forks: 8965
primary_language: "Python"
license: "CC-BY-4.0"
categories: ["ai-frameworks", "agent-platforms"]
tags: ["multi-agent", "agents", "llm", "python", "agentic-ai", "openai"]
updated_at: "2026-07-07T15:07:56.584963+00:00"
---

# autogen

> Multi-agent AI framework for autonomous or collaborative applications

AutoGen is a Python framework for creating complex AI agent systems that can interact autonomously or with human guidance. It enables developers to build sophisticated multi-agent workflows and AI applications using large language models.

## Facts

- Repository: https://github.com/microsoft/autogen
- Homepage: https://microsoft.github.io/autogen/
- Stars: 59,553 · Forks: 8,965 · Open issues: 927 · Watchers: 527
- Primary language: Python
- License: CC-BY-4.0
- Last pushed: 2026-04-15T11:59:09+00:00

## Categories

- [AI Frameworks](/categories/ai-frameworks.md)
- [Agent Platforms](/categories/agent-platforms.md)

## Tags

multi-agent, agents, llm, python, agentic-ai, openai

## README (excerpt)

```text
<a name="readme-top"></a>

<div align="center">
<img src="https://microsoft.github.io/autogen/0.2/img/ag.svg" alt="AutoGen Logo" width="100">







</div>

# AutoGen 

**AutoGen** is a framework for creating multi-agent AI applications that can act autonomously or work alongside humans.

> [!CAUTION]
> **⚠️ Maintenance Mode**
>
> AutoGen is now in maintenance mode. It will not receive new features or enhancements and is community managed going forward.
>
> New users should start with [Microsoft Agent Framework](https://github.com/microsoft/agent-framework). Existing users are encouraged to migrate using the [AutoGen → Microsoft Agent Framework migration guide](https://learn.microsoft.com/en-us/agent-framework/migration-guide/from-autogen/).
>
> Microsoft Agent Framework (MAF) is the enterprise‑ready successor to AutoGen. Microsoft Agent FrameworkAF in now available as a production-ready release: stable APIs, and a commitment to long-term support. Whether you're building a single assistant or orchestrating a fleet of specialized agents, Microsoft Agent Framework 1.0 gives you enterprise-grade multi-agent orchestration, multi-provider model support, and cross-runtime interoperability via A2A and MCP.

## Installation

AutoGen requires **Python 3.10 or later**.

```bash
# Install AgentChat and OpenAI client from Extensions
pip install -U "autogen-agentchat" "autogen-ext[openai]"
```

The current stable version can be found in the [releases](https://github.com/microsoft/autogen/releases). If you are upgrading from AutoGen v0.2, please refer to the [Migration Guide](https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/migration-guide.html) for detailed instructions on how to update your code and configurations.

```bash
# Install AutoGen Studio for no-code GUI
pip install -U "autogenstudio"
```

## Quickstart

The following samples call OpenAI API, so you first need to create an account and export your key as `export OPENAI_API_KEY="sk-..."`.

### Hello World

Create an assistant agent using OpenAI's GPT-4o model. See [other supported models](https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/models.html).

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

async def main() -> None:
    model_client = OpenAIChatCompletionClient(model="gpt-4.1")
    agent = AssistantAgent("assistant", model_client=model_client)
    print(await agent.run(task="Say 'Hello World!'"))
    await model_client.close()

asyncio.run(main())
```

### MCP Server

Create a web browsing assistant agent that uses the Playwright MCP server.

```python
# First run `npm install -g @playwright/mcp@latest` to install the MCP server.
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StdioServerParams


async def main() -> None:
    model_client = OpenAIChatCompletionClient(model="gpt-4.1")
    server_params = StdioServerParams(
        command="npx",
        args=[
            "@playwright/mcp@latest",
            "--headless",
        ],
    )
    async with McpWorkbench(server_params) as mcp:
        agent = AssistantAgent(
            "web_browsing_assistant",
            model_client=model_client,
            workbench=mcp, # For multiple MCP servers, put them in a list.
            model_client_stream=True,
            max_tool_iterations=10,
        )
        await Console(agent.run_stream(task="Find out how many contributors for the microsoft/autogen repository"))


asyncio.run(main())
```

> **Warning**: Only connect to trusted MCP servers as they may execute commands
> in your local environment or expose sensitive information.

### Multi-Agent Orchestration

You can use `AgentTool` to create a basic multi-agent orchestration setup.

```python
impo
```

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/microsoft-autogen`](/api/graphcanon/tools/microsoft-autogen)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
