Skip to content

AutoGen: Multi-Agent Conversation as a Programming Model

optionalextendedfundamentalpaperrubric 8/122023 · arXiv · ~25 min

Qingyun Wu, Gagan Bansal, Jieyu Zhang, …, Chi Wang

Status

TL;DR. AutoGen is an open-source framework (repository under microsoft/autogen), described in a 2023 paper, for building LLM applications as conversations between agents. Every participant is a conversable agent that can send and receive messages and reply automatically. An agent can be backed by an LLM, by code execution and tools, by a human, or by a mix. The paper calls the resulting style conversation programming: you design who talks to whom and how each reply is computed, and the application’s control flow follows from the conversation.

Version note. This page describes the 2023 paper and its v0.1-era API (ConversableAgent, AssistantAgent, UserProxyAgent, GroupChatManager). The AutoGen project has changed a lot since then, and I did not verify its current API or its relation to later projects. Check the repository before using any class names below.

Conversable agents. ConversableAgent is the base class. It has send, receive and generate_reply. Two built-in subclasses cover the common case: AssistantAgent, which writes plans and code with an LLM, and UserProxyAgent, which executes code from the conversation and can ask a human for input (human_input_mode).

Auto-reply as control flow. When an agent receives a message, it calls generate_reply and sends the result back unless a termination condition holds. So once the first message is sent, the conversation runs by itself. The paper calls this conversation-driven control flow. A typical loop is: the assistant writes code, the user proxy runs it and returns the output or error, and the assistant fixes the code or replies TERMINATE.

Mixing code and natural language. Control can be written in Python (custom reply functions, termination checks, nested conversations) or in prompts (for example, the built-in assistant prompt tells the model to reply TERMINATE when done). GroupChatManager runs dynamic multi-agent chats in three repeated steps: select the next speaker with an LLM, collect that speaker’s reply, and broadcast it to all agents.

The paper reports six applications (A1 to A6), mostly as demos and small studies by the authors, not as controlled benchmarks. A1 math: on the full MATH test set, the two-agent system scores 69.48% against 55.18% for vanilla GPT-4. A2 retrieval-augmented chat: on Natural Questions, an interactive “Update Context” step, triggered by about 19.4% of questions, lets the assistant ask for more retrieved chunks. A3 ALFWorld: adding a grounding agent with commonsense hints gives about a 15% average gain on 134 unseen tasks. A4 OptiGuide: core workflow code shrinks from over 430 to 100 lines, users save about 3× time, and a separate safeguard agent improves unsafe-code F1 by 8% (GPT-4) and 35% (GPT-3.5-turbo) on 100 tasks. A5 is a 12-task pilot of group-chat speaker selection, and A6 is conversational chess with a board agent that checks legal moves.

  • Why such systems fail: MAST analyses traces from multi-agent frameworks (including AutoGen-family systems) and finds that most failures come from system design and weak verification.
  • Role-playing predecessor: CAMEL uses two LLM agents with fixed user and assistant roles.
  • Code as the action: CodeAct makes executable Python the agent’s action space, the same execute-and-observe loop as the user proxy.
  • Different routing problem: DeepSeek super-agent routes many independent tasks to separate sessions, instead of routing turns inside one task.
  • Thought–action loops: ReAct, used in the ALFWorld application.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Mechanism

    In AutoGen an AssistantAgent (backed by an LLM) and a UserProxyAgent (which runs code and can ask a human) talk to each other with automatic replies. Walk through how a math problem is solved by this pair, and explain what decides when the conversation stops.

    What a strong answer covers
    • The user proxy sends the problem; the assistant replies with reasoning and a Python code block.
    • On receiving a message, each agent calls generate_reply automatically and sends the reply back unless a termination condition holds.
    • The user proxy executes the code and returns the output or error as its reply, so errors feed back into the next assistant turn.
    • The conversation ends on a termination condition, such as the assistant writing TERMINATE, a maximum number of auto-replies, or a human choosing to stop.
    • The human_input_mode setting controls whether a person is asked before each user-proxy reply, which is how human feedback enters the same loop.
  2. Derive / compute

    On the MATH test set, the paper reports 69.48% accuracy for the AutoGen two-agent system and 55.18% for vanilla GPT-4. Assuming the standard 5,000-problem test set, compute the absolute and relative gains and the extra problems solved, and say which component most plausibly explains the gain.

    What a strong answer covers
    • Absolute gain: 69.48 − 55.18 = 14.30 points.
    • Relative gain: 14.30 / 55.18 ≈ 26%.
    • Extra problems solved: 0.143 × 5,000 ≈ 715.
    • Both systems use GPT-4, so the gain most plausibly comes from executing code and feeding results back, not from having two agents as such.
    • A fair attribution would need a single agent with the same code-execution tool as a baseline.
  3. Critique

    The paper argues that multi-agent design helps, citing an OptiGuide ablation where splitting code writing and safety checking into separate agents improves unsafe-code F1 by 8% with GPT-4 and 35% with GPT-3.5-turbo. Critique what this evidence does and does not show about multi-agent systems in general.

    What a strong answer covers
    • It shows that separating a checker role from a writer role helped on one 100-task dataset with balanced safe and unsafe tasks.
    • The checker is a separate LLM call with its own focused prompt, so the gain may come from a dedicated verification step rather than from agents talking to each other.
    • The test set is small and built by the authors, with no confidence intervals, so the size of the gain is uncertain.
    • MAST later finds that many multi-agent failures come from system design and weak verification, so splitting roles does not guarantee better results.
    • Productivity claims, such as code shrinking from over 430 to 100 lines, measure developer effort, not task accuracy.

Done with this page?

Status