GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv preprint

AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation

Microsoft's framework for building LLM apps as conversations between agents that write code, run it, ask humans and check each other, and what its own results say about when more agents help.

Breakdown by FDE Interviews · 16 min read · Updated

About the original · 2023
AUTHORS
Wu, Bansal, Zhang, Wu, et al.
FROM
Microsoft Research, Penn State, University of Washington, Xidian University
PUBLISHED
Aug 2023 · arXiv preprint
CITED BY
2,951Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 16% of this breakdown.

01

The paper in one minute

In 2023, most LLM applications were a single prompt or a fixed chain. Anything more ambitious, like a model that writes code, runs it, reads the error, fixes it and asks a person when stuck, had to be wired by hand for each task. Qingyun Wu, Chi Wang and colleagues at Microsoft Research, Penn State, the University of Washington and Xidian University built AutoGen, an open-source library that treats such applications as conversations between agents.

The first idea is the conversable agent. Every participant exposes the same interface: it can send a message, receive one and generate a reply. What sits behind the reply is configurable. An AssistantAgent answers with an LLM and, by default, writes Python to solve problems. A UserProxyAgent answers by executing the code it receives, by asking a human, or both. When an agent receives a message, it replies automatically unless a termination condition is met, so two agents can carry a task forward without a central controller.

The second idea is conversation programming. Building an application means deciding two things: what each agent computes when it replies, and the control flow, meaning who speaks next and when the conversation stops. Both can be set in code (registered reply functions, termination checks, reply limits) or in natural language (a system message telling the assistant to reply "TERMINATE" when done). A GroupChatManager extends this to many agents by picking the next speaker, collecting its reply and broadcasting it to the rest.

The paper then builds six applications: math problem solving, retrieval-augmented question answering and code generation, ALFWorld household tasks, a supply-chain coding assistant called OptiGuide, a dynamic group chat, and conversational chess. Each shows a gain or a new capability. Read closely, the biggest improvements came from giving one agent a specific job, such as a safety check or a commonsense rule, that a single agent had been doing badly or not at all.

THE IDEA, VISUALLY
CONVERSATION PROGRAMMING AssistantAgent LLM writes code UserProxyAgent runs code · asks human send auto-reply Each reply triggers the next. The chat stops when a message passes is_termination_msg or an agent hits its reply limit. ALFWORLD, THREE AGENTS Assistant plans next action Executor acts in the world Grounding agent adds a rule The rule goes to the executor at the start and whenever the assistant repeats one action three times: “take the object before you examine it”. Success rose from 54% to 69%. GROUP CHAT select next speaker collect its reply broadcast to everyone repeat until termination WHAT THE PAPER MEASURED (FIGURE 4) MATH, 120 level-5 problems, GPT-4 AutoGen 52.5% ChatGPT + Code Interpreter 48.33% GPT-4 alone 30% ALFWorld, 134 tasks, average of 3 runs AutoGen, 3 agents 69% AutoGen, 2 agents 54% ReAct (text-davinci-003) 54% OptiGuide, unsafe-code F1, 100 tasks GPT-4, multi-agent 96 GPT-4, single agent 88 GPT-3.5, multi-agent 83 GPT-3.5, single agent 48 Gains are percentage points. The ALFWorld rule was written after reading failed attempts; ReAct ran on a different model.
AutoGen builds applications from agents that reply to each other until a termination check fires. The clearest gains in its own results came from adding a specific capability, a grounding rule or a separate safety checker, rather than from adding agents as such.
Research notes: the problem, approach and results
69.48%

MATH whole test set with AutoGen's two built-in agents and GPT-4, against 55.18% for GPT-4 alone

+15 pts

ALFWorld average success after adding a grounding agent, 54% to 69% on 134 unseen tasks

430 → 100

lines of core workflow code for OptiGuide after reimplementing it on AutoGen

THE PROBLEM

Building an LLM application that writes code, runs it, retrieves documents, asks a human and recovers from errors meant hand-wiring every step. There was no common way to compose models, tools and people, or to reuse one setup in another task.

THE IDEA

Make every participant a conversable agent with the same send, receive and reply interface, backed by a model, a tool, a human or a mix. Program the application as a conversation: what each agent computes when it replies, and when the conversation moves on or stops.

THE RESULT

Six applications built on the same library, with gains on math, retrieval QA, ALFWorld and unsafe-code detection. Separating roles helped most where one model was asked to do two jobs at once, such as writing code and checking it.

02

Why it matters to an FDE

Customers ask for "multi-agent" systems because the term is popular. This paper is a good guide to when more agents help, because its own numbers are specific.

A second agent helps when it has a job the first was doing badly. OptiGuide's code writer and safety checker, run as two agents, caught unsafe code far better than one agent doing both, especially with the weaker model. The ALFWorld grounding agent added a rule the planner kept forgetting. A plain two-agent version of ReAct, by contrast, merely matched ReAct.

Termination is part of the design. Agents that reply to each other automatically will keep going. The paper's own pilot study found two-agent chats failing to terminate on up to 9 of 12 tasks. Every conversation needs a stop condition and a budget.

Start with a human in the loop. The authors' own guideline is to begin with human input always on, learn where the agents fail, and only then switch to autonomous mode.

Measure against a single, well-equipped agent. Several of AutoGen's comparisons pit it against systems with different models or no code execution. Your baseline should be one agent with the same tools and model.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 99 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The building blocks, results by application, and misreadings to avoid

    Free account
  2. 04How it works

    The reply loop, termination, group chat, and how each application wires its agents

    Premium
  3. 05The numbers that matter

    Each application's results, the ablations, and how much each one can carry

    Premium
  4. 06Try it yourself

    A miniature conversable-agent loop, with a reply limit and a grounding agent changing the outcome

    Premium
  5. 07Where it breaks

    The limits of the design and of the paper's evidence

    Premium
  6. 08Using it on a deployment

    How to apply conversation programming for a customer without the loop running away

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →