AutoGen is an open-source framework from Microsoft for building applications with multiple AI agents. Instead of a single assistant doing everything, you create agents with different roles and let them talk to each other until they reach a result.
The project originated in Microsoft Research and is published in an open repository on GitHub. Because the framework evolves quickly, check the official documentation for the current version and API before you start.
How it works
The core idea is conversation between agents. Each agent has an instruction, a language model behind it, and, if needed, tools it can call, such as running code or querying an API.
The basic elements are:
- Agents: each with a role, such as programmer, reviewer, or researcher.
- Tools: functions the agent can use to act in the world.
- Team or group: defines who speaks at each moment and when the conversation ends.
- Human in the loop: you can step into the conversation to approve or correct.
The developer writes the agent configuration in code and starts the task. The framework handles message exchange and flow control.
Practical example
A small agency wants to generate weekly website performance reports. It assembles a team of three agents:
- a collector agent, which fetches the numbers;
- an analyst agent, which writes the summary;
- a reviewer agent, which checks for errors and requests adjustments.
The three exchange messages until the reviewer approves. The final result arrives ready for the client, and the person only reviews at the end.
To test, installation is usually done via pip, but the package name and examples change between versions. Follow the official guide:
pip install autogen-agentchatWhat it's for
AutoGen is used to prototype and build multi-agent systems: research automation, code generation and review, data analysis, and support flows with distinct steps.
If you want to understand the general concept behind it, see the terms multi-agent system and agent orchestration. In the daily work of programmers, tools like bridgecode help coordinate code agents in parallel without building a framework from scratch.
Difference between framework and ready-made product
A framework like AutoGen gives you pieces to assemble the system. This brings flexibility, but requires programming, testing, and maintenance. A ready-made product delivers the interface and the flow, with less fine-grained control.
The choice depends on your goal. If you need very specific behavior, the framework makes sense. If you just want agents working on your project, a ready-made product may be faster.
Regardless of the choice, define each agent's role clearly and a clear stopping criterion. Without that, conversations between agents can drag on, consume many tokens, and go nowhere.