New Tool Radar

AI Agents & Automation

How to Run an AG2 Research Group Chat With a Critic Agent That Reviews the Summary

Run an AG2 research group chat with a planner, engineer, executor, scientist and critic so the summary is reviewed before it is delivered.

Schematic diagram with three steps: Add the five agents, Run the research, then Read the critic review.

The AG2 research example builds a group chat of six agents: a user proxy, an engineer, a scientist, a planner, an executor and a critic. The critic is the quality gate: it reads the scientist summary and points out what is missing before the result goes to the user.

Before you start

You need Python with pyautogen installed and an API key. Pick one research question with a checkable answer, for example papers on one topic from one source, so you can tell a good summary from a bad one.

Create the six agents with distinct jobs

Create the planner to make the plan, the engineer to write the fetch code, the executor UserProxyAgent to run it, the scientist to read the papers and write the summary, and the critic to review the summary. Set the group chat maximum round to 50, as the AG2 example does, so a long research run is not cut off early.

Run the research and read the critic review

Start the chat with the research question and let the group run. Read the critic review before the final summary: if the critic flags a gap, the scientist should revise the summary. For comparison, the AG2 example also runs the same chat without the critic, which shows what the review adds.

Worked example: Six agents for a fictional research desk

Maple Research is a fictional research desk. Its group chat researches recent papers on one topic. The table shows the six agents.

Agent Job
user_proxy Starts the chat and talks to the human
planner Makes and revises the plan
engineer Writes the code to fetch papers
executor Runs the code
scientist Reads the papers and writes the summary
critic Reviews the summary and flags gaps

Expected result (UNTESTED): the run ends with a summary the critic reviewed, and the review names at least one gap the scientist fixed. We checked the AG2 research group chat example, which describes the six agents and the critic comparison, but we did not run the chat on this machine.

Limits

Six agents cost six times the calls of a single agent, and a critic that always approves adds cost without value. Use the critic only when the summary will be shared outside the team. For a quick internal check, a smaller group is enough.

Sources

See all