Kavvo Agents

Microsoft AutoGen

November 29, 2026 · 5 min read · By the Kavvo Agents team

What it is

AutoGen is an open-source framework from Microsoft for building multi-agent systems. Its core idea is simple: instead of one agent doing everything, you define several agents with different roles, and they solve a task by talking to each other in an automated chat. The framework handles the orchestration, so building a complex multi-agent system comes down to defining the agents and defining how they should reply to each other.

In AutoGen, an agent is an entity that can send messages, receive messages, and generate a reply using models, tools, human input, or a mixture of these. Agents are conversable, which means any agent can send and receive messages from other agents. They are also customisable: you can switch components on or off, such as the language model, a code executor, a function and tool executor, and a human-in-the-loop step.

AutoGen is developed by researchers and engineers at Microsoft, and it incorporates research in multi-agent systems. It has been used in real-world applications, and the project is open source.

Who made it

AutoGen is made by Microsoft, originally from Microsoft Research. The project is open source on GitHub under the microsoft organisation, and the documentation is at microsoft.github.io/autogen.

What it does

AutoGen is used for tasks that benefit from more than one perspective or skill: code generation and debugging, data analysis, research, planning, and content creation. A common pattern is an assistant agent that writes code and a user-proxy agent that runs the code and reports errors back, so the assistant can fix its own work. Another is a group chat, where several agents — a product manager, a coder, and a reviewer, for example — discuss a task, and a manager agent picks who speaks next.

AutoGen’s current version is 0.2 in the docs linked here, with a newer 0.4 line also published by the project. The concepts — conversable agents, roles, and automated chat — are the same, but class names and install commands differ between versions, so check which version the docs page you are reading covers.

How it works

You start by creating agents. The generic class is ConversableAgent, which can converse with other agents through message exchange. Two common subclasses are AssistantAgent, which acts as an AI assistant using a language model by default and does not need human input or code execution, and UserProxyAgent, which acts as a proxy for a human: it asks for human input at each turn by default, and it can also execute code and call functions or tools. The UserProxyAgent runs code automatically when it sees an executable code block in a message and no human input is given.

Once the agents are built, you start a conversation with initiate_chat. The first agent sends a message with the task, the other agent replies, and the auto-reply capability keeps the conversation going while still allowing human intervention. You can extend an agent by registering reply functions with register_reply(). For group chats, you create a GroupChat with a list of agents and a maximum number of rounds, and a GroupChatManager picks the next speaker and broadcasts each message to the group.

Each agent’s behaviour is shaped by its system message, which sets its role, and by its llm_config, which lists the language models it can use.

How to start

  1. Install AutoGen. The 0.2 tutorial installs it with pip install autogen-agentchat~=0.2. For the newer line, check the current docs at microsoft.github.io/autogen for the install command for your version.
  2. Set your model API key as an environment variable, for example OPENAI_API_KEY, and create a configuration list for the models you want to use.
  3. Create two agents: an AssistantAgent named assistant and a UserProxyAgent named user_proxy. Give the assistant a system message that describes its role.
  4. Start a chat with user_proxy.initiate_chat(assistant, message="Your task here") and watch the agents talk. Keep the first task small and the number of turns low.
  5. Add a code executor, such as a Docker-based executor, so the UserProxyAgent can run code the assistant writes and report the result back.
  6. When two agents work, try a group chat: add a third agent with a different role, create a GroupChat, and let the GroupChatManager run it.

Read the Introduction tutorial in the official docs first, then the multi-agent conversation guide.

Who it is for

AutoGen is for developers and researchers who want to experiment with multi-agent collaboration and who are comfortable writing Python. It suits teams building coding assistants, research systems, and workflows where a task improves when different agents check, challenge, or extend each other’s work. It is a research-led framework, so it is a good fit if you want flexibility and are willing to read the docs and examples, rather than a finished no-code product.

Watch out for

Code execution is powerful and risky: an agent that writes and runs code should run in a sandbox, such as Docker, not on your main machine with access to your files. Human-in-the-loop is there for a reason — use the UserProxyAgent to approve actions that change data, send messages, or spend money. Finally, the quality of the result depends heavily on the system messages you write for each agent, so keep roles clear and distinct.

Source