AG2 1.0 Replaces the LLM Manager with Network Channels and Adds an 8-Call Tool Limit
In the old AutoGen, an LLM "manager" picked the order of turns, and it often looped or lost context. AG2 1.0 replaces it with Network: a writer publishes a Draft, a critic subscribes to Draft like a message queue, and the order is defined in code. The max_tool_iterations=8 parameter stops an agent from calling tools endlessly and burning tokens. This lets you build a multi-agent scenario as a predictable pipeline.
AI-processed from Habr AI; edited by Hamidun News
Imagine you are building a service that writes articles: one agent drafts, a second critiques the draft, and a third edits the final text. In the old AutoGen, a separate model, an LLM-based "manager", chose the order of turns between them. It often looped or lost context, and the developer could not predict who would speak next. In AG2 version 1.0, that manager is replaced by Network: a hub with typed channels where code defines the order. Another parameter, max_tool_iterations (for example, 8), limits the number of tool calls so an agent does not burn tokens in an endless loop. Below, we look at where AG2 came from and which parts of it are worth putting to work.
Where AG2 came from and why there are two forks
In 2023, Microsoft Research published the paper "AutoGen: Enabling Next-Gen LLM Applications" and released a library of the same name. The idea took off thanks to ConversableAgent: agents talk to each other through initiate_chat. The framework became the de facto standard for multi-agent experiments, and version 0.2 still turns up in tutorials and in other people's legacy projects.
Then Microsoft decided to rewrite everything from scratch. AutoGen 0.4 got an event-driven architecture, typing and an actor layer, but API compatibility broke almost entirely. Over disagreements about the project's direction, Chi Wang and part of the team left in November 2024 and created a fork under the ag2ai organization. It is called "AG2 (formerly AutoGen)" and presents itself as a direct continuation. Microsoft developed its own line and then folded those efforts into Microsoft Agent Framework. The practical takeaway: before copying code from a tutorial, check which branch it was written for.
What changed in version 1.0
With the release of version 1.0 in 2026, AG2 stopped being a simple wrapper around language model APIs. The core is now async-first: the agent loop, tool calls and model requests do not block the thread, and streaming is on by default. The core is small and predictable, and everything else plugs in as needed: subagents, persistent memory, telemetry, and MCP and A2A integrations. The AG-UI protocol is supported for frontends.
The API is built on Agent, the ask method and the Reply object. Reply holds the response text, the list of tools called and token usage. A tool is an ordinary Python function with a docstring and type annotations, marked with the @tool decorator. The library then handles the routine itself: it parses arguments, runs the function, returns the result to the model and repeats the loop until the task is solved. If a function raises an exception, the model receives the error text and, as a rule, corrects the arguments. The author of the review still advises validating data yourself and returning clear messages.
The biggest change concerns orchestration. Network replaces GroupChat with its LLM manager in AG2 v1.x. Each agent declares which messages it publishes (publishes) and which it subscribes to (subscribes). For example, the writer publishes Draft, the critic subscribes to Draft, and the editor subscribes to Review, that is, the critic's verdict with an approved flag and a list of comments. This works like a message broker rather than a shared chat.
Control and safety
For risky actions, there is human-in-the-loop. If an agent calls context.input(), execution freezes until a human replies, confirms the action or supplies the missing data. For example, before sending an invoice for a given amount, you can ask "Send the invoice? [yes/no]" and cancel the operation. Ready-made hooks exist for the CLI, a web interface and message queues.
If a tool runs code, it is best to execute it in a sandbox. For this, AG2 offers SandboxCodeTool and SandboxShellTool with E2B and boxd backends: the agent writes and runs code inside an isolated microVM. Through middleware, much as in web frameworks, you can attach logging of every tool call to the pipeline. There are also structured outputs: the agent returns its answer according to a Pydantic schema, for example a plan with steps and estimate_hours fields.
Getting started is easy: you need Python 3.11 or newer, a virtual environment, and the commands uv init and uv add ag2. You can use local models (ollama, vLLM), free and private, but you will need a GPU. Alternatively, connect through a cloud gateway with an OpenAI-compatible endpoint: only base_url and the token change.
The piece remains a review with code examples, not a benchmark. It contains no comparisons with other frameworks on speed, price or quality. If you need a multi-agent system without an unpredictable LLM "manager", try AG2 on a three-agent scenario. Define typed messages and the max_tool_iterations limit from the start.
- Nov 19, 202621 Free Open-Source Tools That Make Up an AI Agent Stack
- Nov 18, 2026New Jev model answers in 150 ms versus 1.89 s for GPT-6 Astra
- Nov 18, 2026Willison Releases Three External Sandboxes So Agent-Run Code Stays Off Your Laptop
- Nov 18, 2026Nvidia's data-center revenue jumps 110% to $107.6 billion: the AI pause didn't hurt
Key Questions Answered
Where AG2 came from and why there are two forks?
In 2023, Microsoft Research published the paper "AutoGen: Enabling Next-Gen LLM Applications" and released a library of the same name. The idea took off thanks to ConversableAgent: agents talk to each other through initiate_chat. The framework became the de facto standard for multi-agent experiments, and version 0.2 still turns up in tutorials and in other people's legacy projects. Then Microsoft decided to rewrite everything from scratch.
What changed in version 1.0?
With the release of version 1.0 in 2026, AG2 stopped being a simple wrapper around language model APIs. The core is now async-first: the agent loop, tool calls and model requests do not block the thread, and streaming is on by default. The core is small and predictable, and everything else plugs in as needed: subagents, persistent memory, telemetry, and MCP and A2A integrations. The AG-UI protocol is supported for frontends. The API is built on Agent, the ask method and the Reply object.
What are the key details on Control and safety?
For risky actions, there is human-in-the-loop. If an agent calls context.input(), execution freezes until a human replies, confirms the action or supplies the missing data. For example, before sending an invoice for a given amount, you can ask "Send the invoice? [yes/no]" and cancel the operation. Ready-made hooks exist for the CLI, a web interface and message queues. If a tool runs code, it is best to execute it in a sandbox.
Build & Ship Production AI Agents Without Boilerplate Code
Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.