|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
7 |
| - "# Multi-Agent Design Patterns\n", |
8 |
| - "\n", |
9 |
| - "Agents can work together in a variety of ways to solve problems.\n", |
10 |
| - "Research works like [AutoGen](https://aka.ms/autogen-paper),\n", |
11 |
| - "[MetaGPT](https://arxiv.org/abs/2308.00352)\n", |
12 |
| - "and [ChatDev](https://arxiv.org/abs/2307.07924) have shown\n", |
13 |
| - "multi-agent systems out-performing single agent systems at complex tasks\n", |
14 |
| - "like software development.\n", |
15 |
| - "\n", |
16 |
| - "A multi-agent design pattern is a structure that emerges from message protocols:\n", |
17 |
| - "it describes how agents interact with each other to solve problems.\n", |
18 |
| - "For example, the [tool-equiped agent](./tools.ipynb#tool-equipped-agent) in\n", |
19 |
| - "the previous section employs a design pattern called ReAct,\n", |
20 |
| - "which involves an agent interacting with tools.\n", |
21 |
| - "\n", |
22 |
| - "You can implement any multi-agent design pattern using AGNext agents.\n", |
23 |
| - "In this section, we use the reflection pattern as an example." |
24 |
| - ] |
25 |
| - }, |
26 |
| - { |
27 |
| - "cell_type": "markdown", |
28 |
| - "metadata": {}, |
29 |
| - "source": [ |
30 |
| - "## Reflection\n", |
| 7 | + "# Reflection\n", |
31 | 8 | "\n",
|
32 | 9 | "Reflection is a design pattern where an LLM generation is followed by a reflection,\n",
|
33 | 10 | "which in itself is another LLM generation conditioned on the output of the first one.\n",
|
|
50 | 27 | "will generate a code snippet, and the reviewer agent will generate a critique\n",
|
51 | 28 | "of the code snippet.\n",
|
52 | 29 | "\n",
|
53 |
| - "### Message Protocol\n", |
| 30 | + "## Message Protocol\n", |
54 | 31 | "\n",
|
55 | 32 | "Before we define the agents, we need to first define the message protocol for the agents."
|
56 | 33 | ]
|
|
107 | 84 | "\n",
|
108 | 85 | "\n",
|
109 | 86 | "\n",
|
110 |
| - "### Agents\n", |
| 87 | + "## Agents\n", |
111 | 88 | "\n",
|
112 | 89 | "Now, let's define the agents for the reflection design pattern."
|
113 | 90 | ]
|
|
376 | 353 | "cell_type": "markdown",
|
377 | 354 | "metadata": {},
|
378 | 355 | "source": [
|
379 |
| - "### Logging\n", |
| 356 | + "## Logging\n", |
380 | 357 | "\n",
|
381 | 358 | "Turn on logging to see the messages exchanged between the agents."
|
382 | 359 | ]
|
|
397 | 374 | "cell_type": "markdown",
|
398 | 375 | "metadata": {},
|
399 | 376 | "source": [
|
400 |
| - "### Running the Design Pattern\n", |
| 377 | + "## Running the Design Pattern\n", |
401 | 378 | "\n",
|
402 | 379 | "Let's test the design pattern with a coding task."
|
403 | 380 | ]
|
|
0 commit comments