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

AutoGen lets agents chat with each other to complete LLM application tasks

Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu, Beibin Li, Erkang Zhu and 8 more · arXiv · 2023-8-16

- **Problem** A single LLM agent struggles as tasks grow harder, and building multi-agent systems for each application means rebuilding the coordination logic every time. Developers need one shared framework that covers many domains and levels of complexity.
- **Method** AutoGen is an open-source framework where developers build agents from LLM, human and tool capabilities. Instead of hand-coding coordination, developers script agent conversations in natural language or code.
- **Results** The paper reports that a multi-agent design raised the F-1 score for identifying unsafe code by 8% with GPT-4 and by 35% with GPT-3.5-turbo, compared with a single-agent variant.

## Why coordinate several LLM agents

LLM systems are now expected to reason, call tools and adapt to new observations, and a single agent tends to struggle as the tasks grow harder. The authors look to several cooperating agents as a way to scale up what these systems can do, and they give three reasons this looks feasible: chat-optimized models can take feedback, one model can play several configured roles, and complex work divides into subtasks.

What is missing is a framework that covers many domains and levels of complexity without rebuilding the coordination logic for each application.

The authors frame this as two design questions: how to make individual agents capable, reusable and customizable, and how to offer one interface that covers single- or multi-turn dialogs, different human involvement levels and static or dynamic conversation. Developers also need to be able to program agent interactions in natural language or in code, so a framework that fixes only one of these styles would limit its reach.

## Conversable agents and their capabilities

In AutoGen each agent is a conversable entity with a role. It sends and receives messages, builds its internal context from the messages it has exchanged, and can be configured with a set of capabilities. Because each agent can receive, react to and respond to messages, several agents can hold multi-turn exchanges, and one of them can pause to ask a person for input at chosen rounds.

Capabilities come from three sources. LLM-backed behavior covers role play, using feedback and coding, and an enhanced inference layer adds result caching and error handling. Human-backed behavior lets a person join a conversation at configured rounds, and the person can skip providing input. Tool-backed behavior runs code or function calls.

The class ConversableAgent is the most general abstraction and can use LLMs, humans and tools by default. AssistantAgent and UserProxyAgent are two preconfigured subclasses. The first acts as an LLM-backed AI assistant, and the second acts as a human proxy that asks for input or executes code and function calls. In the Figure 1 example, the assistant produces a solution, the user proxy runs the code or asks a person, and the outcome returns to the assistant as feedback.

## Conversation programming

The authors call their programming model conversation programming. Building an application takes two steps: defining conversable agents with capabilities and roles, and specifying how those agents interact through conversation-centric computation and control. Both steps can be written with natural language or code, which lets the same framework cover many conversation patterns and agent behaviors.

A reply function can be registered for a pair of agents. When one agent sends a message, the registered function decides the reply, for example by asking a human first and then executing any code found in the message. If no reply function is registered, a default list of reply functions is used.

Each agent exposes the same small set of operations, send, receive and generate\_reply, so the interface stays uniform across agent types.

## Retrieval-Augmented Chat and interactive retrieval

Retrieval-Augmented Chat uses a user proxy and an assistant. The user proxy processes documents, splits them into chunks, computes embeddings and stores them in a vector database. For each question, the user proxy sends the most similar chunks to the assistant, which produces code or text from them.

If the assistant cannot give a satisfactory answer, it replies with an update-context signal. The proxy then supplies the next most similar chunks, and the cycle can repeat until no documents remain. The conversation ends earlier when a response contains no code and no update request.

The question-answering evaluation uses 5,332 non-redundant context documents and 6,775 queries from the Natural Questions dataset. To isolate the feature, the authors compare the update-context reply with an ablation in which the assistant says it does not know, and they compare against DPR following an existing evaluation practice.

Without interactive retrieval, the F1 score on the first 500 questions is 23.40% and recall is 62.60%. The authors state that this variant outperforms DPR and attribute the difference to the retriever, which here is a straightforward vector search using the all-MiniLM-L6-v2 model for embeddings. About 19.4% of questions trigger an update-context operation, which adds LLM calls.

In the code scenario the question asks how to use FLAML for classification with Spark-based parallel training. The authors note that the Spark-related APIs were added after the training data of GPT-4, so GPT-4 alone invented a non-existent parameter. With the latest reference documents supplied as context, it produced correct code.

## ALFWorld with a grounding agent

ALFWorld is a synthetic, text-based household environment. A typical task can need more than 40 steps, so the agent must break the goal into subtasks and explore the environment. The two-agent system pairs an assistant, which proposes plans and action decisions, with an executor, which carries out actions in the environment and returns feedback.

The output must match a strict format, so the executor compares the assistant's output against all valid action options using BLEU similarity and takes the closest option.

The authors observe that both ReAct and the two-agent system sometimes ignore basic commonsense about the physical world, which can trap the system in a loop of repeated errors. A grounding agent supplies commonsense statements, such as the need to take an object before examining it, once the system shows early signs of recurring errors.

On 134 unseen tasks with GPT-3.5-turbo, the three-agent variant gains 15% on average over the two-agent variant. The authors report that the grounding agent mainly stops the system from persisting with a flawed plan.

The two-agent system is reported to reach performance similar to ReAct, and the ReAct runs use the official code with default settings.

## Multi-agent safeguard in OptiGuide

OptiGuide answers user questions about optimization solutions by writing code. In the AutoGen version a Commander receives the question, a Writer drafts the code, and a Safeguard checks it. Once the Safeguard clears the code, the Commander runs it with an external tool and asks the Writer to interpret the output. If the Safeguard raises a red flag, the Commander sends debugging information back to the Writer, and the loop repeats until the question is answered or times out.

The core workflow code shrank from over 430 lines to 100 lines. Compared with ChatGPT plus Code Interpreter, the authors estimate that AutoGen-based OptiGuide saves around 3x of user time and reduces user interactions by 3 - 5 times on average.

To test the value of the multi-agent split, the authors build a single-agent variant in which one agent both writes and checks the code. Both variants are run on 100 coding tasks with equal numbers of safe and unsafe tasks, and the measure is F-1 score for identifying unsafe code.

The multi-agent design raises the F-1 score by 8% with GPT-4 and by 35% with GPT-3.5-turbo. This ablation covers one task set and two model backends, so the gain is measured only for this safeguard task.

## Limitations

The authors describe the work as still in its early experimental stages. They note that more agents can tackle harder problems but may also introduce new safety challenges, which they leave for further study.

The quantitative evaluations cover MATH, Natural Questions, ALFWorld and a single OptiGuide safeguard task set of 100 coding tasks. The ReAct footnote states that its official code uses text-davinci-003 and does not support GPT-3.5-turbo or GPT-4, so the ReAct backend is not the same model as the AutoGen runs. The Auto-GPT comparison is qualitative, and the authors report difficulty with the MiniWob++ benchmark rather than a measured score.

The ethics statement lists privacy, bias, accountability, trust and unintended consequences as considerations for developers. The paper reports no experiment on these concerns.

## Paper info

- **Authors**: Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu, Beibin Li, Erkang Zhu, Li Jiang, Xiaoyun Zhang, Shaokun Zhang, Jiale Liu, Ahmed Hassan Awadallah, Ryen W White, Doug Burger, Chi Wang
- **Venue**: arXiv · Preprint
- **First published**: 2023-8-16
- **Added**: 2026-11-12
- **Updated**: 2023-10-3
- **Version**: v2
- **arXiv**: 2308.08155
- **Category**: cs.AI · cs.CL
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2308.08155v2) · [PDF ↗](https://arxiv.org/pdf/2308.08155v2)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu, Beibin Li, Erkang Zhu, Li Jiang, Xiaoyun Zhang, Shaokun Zhang, Jiale Liu, Ahmed Hassan Awadallah, Ryen W White, Doug Burger, Chi Wang (2023). AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation. arXiv:2308.08155v2. https://arxiv.org/abs/2308.08155v2

**BibTeX**

```
@misc{wu2023autogen,
  title = {{AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation}},
  author = {Qingyun Wu and Gagan Bansal and Jieyu Zhang and Yiran Wu and Beibin Li and Erkang Zhu and Li Jiang and Xiaoyun Zhang and Shaokun Zhang and Jiale Liu and Ahmed Hassan Awadallah and Ryen W White and Doug Burger and Chi Wang},
  year = {2023},
  eprint = {2308.08155},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.08155v2}
}
```

## Other paper commentary

- [Deep Multi-agent Reinforcement Learning for Highway On-Ramp Merging in Mixed Traffic](https://refivu.com/en/papers/5a4426df-329c-4335-a2f9-61fd8bab85a2-deep-multi-agent-reinforcement-learning-for-highway-on.md)
- [Reflexion: Language Agents with Verbal Reinforcement Learning](https://refivu.com/en/papers/a572f458-b121-4d38-bfc9-7a77309a3aba-reflexion-language-agents-with-verbal-reinforcement-learning.md)
- [A Generalist Agent](https://refivu.com/en/papers/890475cb-e797-43df-8de3-0d0eb9ed882e-a-generalist-agent.md)
- [Implicit Intelligence - Evaluating Agents on What Users Don’t Say](https://refivu.com/en/papers/46a3027e-e7cd-4c3e-be85-2fe588fd1675-implicit-intelligence-evaluating-agents-on-what-users-don.md)
- [Escaping Whack-a-Mole: Optimizing Documentation as Repo-Specific Playbooks for Coding Agents](https://refivu.com/en/papers/52e2d558-711f-4753-af6e-c88268527a9b-escaping-whack-a-mole-optimizing-documentation-as-repo.md)
- [VeriLadder: A Multi-Agent Specification Refinement System for Tool-Verified Verilog Datasets](https://refivu.com/en/papers/f3a3ce4f-fd41-462e-8bb7-f3e5263ba827-veriladder-a-multi-agent-specification-refinement-system-for.md)
- [Swin Transformer V2: Scaling Up Capacity and Resolution](https://refivu.com/en/papers/376ea342-9ea9-46f8-8c71-84f23e529d90-swin-transformer-v2-scaling-up-capacity-and-resolution.md)
- [Deeper Insights into Graph Convolutional Networks for Semi-Supervised Learning](https://refivu.com/en/papers/a2134edc-a5ef-48b2-9ec4-982cfed2a085-deeper-insights-into-graph-convolutional-networks-for-semi.md)
- [Pointer Sentinel Mixture Models](https://refivu.com/en/papers/8f7d0844-f517-4c18-ba24-8cd7dc616a74-pointer-sentinel-mixture-models.md)
- [Conditional Image Synthesis With Auxiliary Classifier GANs](https://refivu.com/en/papers/cbb27823-75f1-4fb6-b4c8-dcc645b1f162-conditional-image-synthesis-with-auxiliary-classifier-gans.md)
- [RepVGG: Making VGG-style ConvNets Great Again](https://refivu.com/en/papers/b7578ec8-e378-4286-b3a9-984d13d073c3-repvgg-making-vgg-style-convnets-great-again.md)
- [Estimating Continuous Distributions in Bayesian Classifiers](https://refivu.com/en/papers/318decb8-43d0-4596-b25f-944ca636af13-estimating-continuous-distributions-in-bayesian-classifiers.md)

## Terms in this paper

- [BLEU](https://refivu.com/en/terms/42cd9b97719e-bleu)
- [recall](https://refivu.com/en/terms/3774987267f3-recall)
- [MATH](https://refivu.com/en/terms/42d0fca44930-math)
- [Natural Questions](https://refivu.com/en/terms/2053f89c9387-natural-questions)
- [DPR](https://refivu.com/en/terms/f295583cf0b4-dpr)
- [FLAML](https://refivu.com/en/terms/cdc41e6f8298-flaml)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/d3d2ade6-3bed-4a94-9439-088b61554b00-autogen-enabling-next-gen-llm-applications-via-multi)
