Velamuvi AIAcademy
AutoGen

Lesson 6 of 6 · AutoGen

AutoGen Status, Limitations and Migration to Microsoft Agent Framework

AutoGen's history and archived status, its limits, how it differs from Microsoft Agent Framework, and a step-by-step migration of a real AutoGen team.

  • 20 min read
  • Intermediate
  • Reviewed
In this lesson you will learn
  • Describe AutoGen's history and what its archived status means in practice
  • List AutoGen's limitations for new and production work
  • Compare AutoGen with Microsoft Agent Framework: architecture, APIs and features
  • Plan a migration: inventory, tests, renames and redesigns
  • Migrate an AutoGen agent and the course project's coding team to Agent Framework
  • Decide when to keep an existing AutoGen system and when to move

How AutoGen got here

This course has taught AutoGen 0.7, the last version. To decide what to do with AutoGen code, it helps to know how the project developed:

WhenWhat happened
2023AutoGen starts at Microsoft Research. The paper on multi-agent conversation appears in August, and the 0.2 API (ConversableAgent, UserProxyAgent, GroupChatManager) becomes widely used.
Late 2024Some of the original authors continue the 0.2 line as a separate community project, AG2.
January 2025AutoGen 0.4: a full redesign around asynchronous, event-driven messages, split into autogen-core, autogen-agentchat and autogen-ext.
2025Versions 0.5 (April), 0.6 (June) and 0.7 (July). The last release, 0.7.5, comes out on 30 September 2025.
1 October 2025The first preview of Microsoft Agent Framework, built by the AutoGen and Semantic Kernel teams as the successor to both.
2 April 2026Agent Framework 1.0 for Python (the agent-framework package).
TodayThe AutoGen repository is archived: read-only, with no more releases.

In this lesson, legacy means AutoGen 0.7 and new means Microsoft Agent Framework 1.x. Every code example is labelled with which one it uses.

Status: what “archived” means for you

The repository's notice says Microsoft is not providing bug fixes, security fixes, new features or support for AutoGen. It warns that unfixed vulnerabilities may remain, advises against production use, and says new users should start with Microsoft Agent Framework, which it calls AutoGen's enterprise-ready successor, with stable APIs and long-term support from version 1.0. Existing users are pointed to the official migration guide.

What that means day to day:

  • pip install autogen-agentchat still works. The packages stay on PyPI at 0.7.5, and existing systems keep running.
  • Nothing gets fixed. A security problem found in AutoGen tomorrow stays unfixed. You can update its dependencies yourself, but only within the versions it accepts.
  • The world moves on without it. New model features, provider APIs and Python versions arrive, and AutoGen isn't updated or tested for them.
  • No one answers questions. Issues and pull requests are closed, so you rely on your own tests and the existing documentation.

Limitations to know

Beyond the status, AutoGen 0.7 has practical limits that show up in real projects:

  • New model names need extra work. OpenAIChatCompletionClient only knows the models that existed when 0.7.5 shipped. For a newer name it raises ValueError: model_info is required when model name is not a valid OpenAI model, and you must describe the model's capabilities yourself.
  • No client for OpenAI's Responses API, which Agent Framework uses by default (OpenAIChatClient).
  • Single-turn tool use by default. AssistantAgent makes one round of tool calls and stops (max_tool_iterations=1), so multi-step tool work needs extra settings.
  • No workflow checkpoints. You can save and load agent and team state, but there's nothing like Agent Framework's workflow checkpoints, which save progress inside a long run so it can resume after a crash.
  • Experimental pieces stay experimental. The distributed runtime (GrpcWorkerAgentRuntime) was still experimental at the last release and won't develop further.

Why Microsoft Agent Framework

Microsoft's overview describes Agent Framework as the direct successor to AutoGen and Semantic Kernel, created by the same teams. It combines:

  • From AutoGen: simple abstractions for single-agent and multi-agent patterns.
  • From Semantic Kernel: enterprise features such as session-based state, type safety, middleware (Semantic Kernel's filters), telemetry, and broad model and embedding support.
  • New: graph-based workflows that give you explicit control over which step runs next, with checkpoints for long-running and human-in-the-loop work.

It's available for Python and .NET (with Go in preview), it's maintained, and from version 1.0 its main APIs are stable. The Microsoft Agent Framework course teaches it in full.

AutoGen vs Microsoft Agent Framework

AutoGen 0.7 (legacy)Agent Framework 1.x (new)
StatusArchived, no fixesMaintained, stable 1.x APIs
AgentAssistantAgent(name, model_client=, system_message=)Agent(client=, name=, instructions=)
Runningawait agent.run(task=...) returns a TaskResult with .messagesawait agent.run(...) returns an AgentResponse with .text and .messages
Streamingrun_stream(), often shown with Consolerun(..., stream=True)
Tool loopOne round of tool calls by defaultKeeps calling tools until it has an answer
ToolsPlain functions or FunctionToolPlain functions or @tool, plus hosted tools from the provider
Conversation memoryKept inside the agentKept in an AgentSession you pass to each run
TeamsRoundRobinGroupChat, SelectorGroupChat, Swarm, MagenticOneGroupChat, GraphFlowSequentialBuilder, ConcurrentBuilder, GroupChatBuilder, HandoffBuilder, MagenticBuilder, WorkflowBuilder
Ending a teamTermination condition objects, combined with “or” and “and” operatorsA termination_condition function and max_rounds
People in the loopUserProxyAgent with input_funcTool approval, and request_info in workflows
Running codeCodeExecutorAgent with local or Docker executorsHosted code interpreters; shell tools in a preview package
CheckpointsSave and load stateWorkflow checkpoints, for example FileCheckpointStorage
ObservabilityOpenTelemetry through the runtimeconfigure_otel_providers() and middleware
DistributionExperimental gRPC runtimeOne process; distributed running is planned
Local UI for trying agentsAutoGen StudioDevUI

Architecture and API differences

The table hides one big change in how a system is put together.

AutoGen is event-driven. Underneath autogen-agentchat, agents are message handlers in a runtime (autogen-core). A team broadcasts each new message to its members and a manager picks the next speaker, until a termination condition fires. The flow emerges from the conversation.

Agent Framework separates agents from control flow. An Agent is a model plus instructions, tools and middleware, and it doesn't own its memory: you create a session and pass it in. Multi-agent control lives in workflows, typed graphs of executors connected by edges, and the ready-made orchestrations (sequential, concurrent, group chat, handoff, Magentic) are prebuilt workflows. The flow is something you declare, so it can be checkpointed, paused for a person and visualised.

Three API differences cause most migration bugs:

  1. Memory moved out of the agent. An AutoGen agent remembers between run() calls. An Agent Framework agent starts fresh on every call unless you pass the same session=.
  2. The tool loop is longer. AutoGen's AssistantAgent stops after one round of tool calls; Agent keeps going. Behaviour usually improves, but the number of model calls can change, so re-check costs and limits.
  3. Termination is a function. TextMentionTermination("APPROVE", sources=["reviewer"]) | MaxMessageTermination(12) becomes a function that inspects the conversation, plus max_rounds.

Migration fundamentals

A safe migration is a series of small steps, each checked by tests:

  1. Inventory. List every AutoGen class the project uses and sort them into simple renames and parts that need a redesign.
  2. Pin and record. Pin the exact AutoGen versions (autogen-agentchat==0.7.5), then write tests that record what the system does today. AutoGen's ReplayChatCompletionClient replays scripted model replies, so the tests are free and repeatable; this course's AutoGen code was checked that way.
  3. Clients and tools first. Swap the model client, and keep your tool functions: plain functions work in both frameworks. Add @tool where you need names, descriptions or approvals.
  4. Single agents next. Rename the class and arguments, create a session where the old agent relied on its own memory, and drop reflect_on_tool_use.
  5. Teams last. Choose the orchestration that matches each team, turn termination objects into functions, and redesign the parts with no direct equivalent: code execution and people in the loop.
  6. Compare, then switch. Run the old and new versions on the same test cases, compare the results, switch over one part at a time, and remove AutoGen when nothing imports it.

Step 1 is easy to automate. This program reads the imports of the course project's coding team and prints the plan, hardest parts first:

Try it yourselfPython
import re

# Step 1 of a migration: list every AutoGen name the project uses and what replaces it.
MIGRATION = {
    "AssistantAgent": ("Agent", "rename"),
    "OpenAIChatCompletionClient": ("OpenAIChatCompletionClient or OpenAIChatClient", "rename"),
    "AnthropicChatCompletionClient": ("AnthropicClient (preview package)", "rename"),
    "RoundRobinGroupChat": ("SequentialBuilder, or GroupChatBuilder", "rename"),
    "SelectorGroupChat": ("GroupChatBuilder", "rename"),
    "Swarm": ("HandoffBuilder", "rename"),
    "MagenticOneGroupChat": ("MagenticBuilder", "rename"),
    "GraphFlow": ("WorkflowBuilder", "rename"),
    "TextMentionTermination": ("a termination_condition function", "rename"),
    "MaxMessageTermination": ("max_rounds", "rename"),
    "UserProxyAgent": ("tool approval, or request_info in a workflow", "redesign"),
    "CodeExecutorAgent": ("your own agent that runs code with a shell tool", "redesign"),
    "ApprovalRequest": ("your own check before code runs", "redesign"),
    "ApprovalResponse": ("your own check before code runs", "redesign"),
    "LocalCommandLineCodeExecutor": ("LocalShellTool (preview package)", "redesign"),
    "DockerCommandLineCodeExecutor": ("DockerShellTool (preview package)", "redesign"),
}

# The imports of the coding team from the project lesson
project_code = """
from autogen_agentchat.agents import ApprovalRequest, ApprovalResponse, AssistantAgent, CodeExecutorAgent
from autogen_agentchat.conditions import MaxMessageTermination, TextMentionTermination
from autogen_agentchat.teams import SelectorGroupChat
from autogen_ext.code_executors.local import LocalCommandLineCodeExecutor
from autogen_ext.models.anthropic import AnthropicChatCompletionClient
"""

used = sorted(set(re.findall(r"\b[A-Z]\w+", project_code)) & MIGRATION.keys())
used.sort(key=lambda name: MIGRATION[name][1] != "redesign")      # the hard parts first
for name in used:
    replacement, kind = MIGRATION[name]
    print(f"{kind:<9} {name:<30} -> {replacement}")

redesigns = sum(MIGRATION[name][1] == "redesign" for name in used)
print(f"\n{len(used)} AutoGen names: {len(used) - redesigns} renames, {redesigns} need a redesign")

The output lists nine AutoGen names: five renames, and four that need a redesign, all of them about running code. That matches the official guide, which has no direct equivalent for AutoGen's code executors.

Code example: one agent with a tool

The cycling assistant from Conversable Agents, before and after.

Legacy (AutoGen 0.7):

assistant = AssistantAgent(
    "cycling_assistant",
    model_client=AnthropicChatCompletionClient(model="MODEL_NAME"),
    tools=[get_weather],
    reflect_on_tool_use=True,
    system_message="You help people plan bike rides. Check the weather before advising.",
)
result = await assistant.run(task="Is this morning good for a ride in Porto?")
result = await assistant.run(task="And in the afternoon?")     # the agent remembers by itself
print(result.messages[-1].content)

New (Agent Framework 1.x):

import asyncio

from agent_framework import Agent, tool
from agent_framework.openai import OpenAIChatClient


@tool
def get_weather(city: str) -> str:
    """Get today's weather for a city."""
    return {"porto": "17°C, light rain until 2pm", "lisbon": "24°C, sunny"}.get(city.lower(), "no data")


async def main():
    assistant = Agent(
        client=OpenAIChatClient(model="MODEL_NAME"),
        name="cycling_assistant",
        instructions="You help people plan bike rides. Check the weather before advising.",
        tools=[get_weather],                 # no reflect_on_tool_use: Agent always answers after a tool
    )
    session = assistant.create_session()     # the conversation lives in a session, not in the agent
    response = await assistant.run("Is this morning good for a ride in Porto?", session=session)
    for message in response.messages:
        for c in message.contents:
            if c.type == "function_call":
                print(f"tool call:   {c.name}({c.arguments})")
            elif c.type == "function_result":
                print(f"tool result: {c.result}")
            elif c.type == "text":
                print(f"answer:      {c.text}")

    response = await assistant.run("And in the afternoon?", session=session)   # same session
    print(response.text)


asyncio.run(main())
Output
tool call:   get_weather({"city": "Porto"})
tool result: 17°C, light rain until 2pm
answer:      Not ideal: Porto has light rain until 2pm. If you can, wait until the afternoon.
Yes, the afternoon looks good: the rain should stop at 2pm, and it's 17°C.

What changed, line by line:

  • AssistantAgent became Agent; model_client= became client= and system_message= became instructions=.
  • get_weather is unchanged apart from @tool, which is optional for a plain function but lets you add a name, description or approval rule.
  • reflect_on_tool_use=True is gone: Agent always answers in words after a tool call.
  • The follow-up only works because both runs use the same session. Without session=, the second question would start a new conversation.
  • The reply is response.text, and the tool call and its result are contents inside response.messages, where AutoGen had separate event messages.

The example uses OpenAIChatClient, which is in the stable package. To keep using Claude, AnthropicClient from the preview agent-framework-anthropic package fills the same slot.

When to keep existing AutoGen

Migration costs time, so keeping a working AutoGen system for a while can be reasonable when:

  • The risk is low: an internal tool, no untrusted input, no internet exposure, no money or personal data involved.
  • Its life is short: the system will be retired or replaced soon anyway.
  • It depends on something without a stable replacement yet, such as the distributed runtime, and you've planned for that gap.

If you keep it, keep it safely: pin exact versions, run model-written code only in containers, give the system no secrets it doesn't need, scan its dependencies for known vulnerabilities, keep the recording tests from step 2, and set a date to migrate.

When to choose Agent Framework

  • Every new project. Starting on an archived framework only creates a future migration.
  • Anything in production that faces customers, handles personal or financial data, or reads untrusted input, because it needs security fixes.
  • Systems that need what AutoGen lacks: workflow checkpoints, human approval inside a workflow, middleware, current model APIs, .NET support, or hosting through A2A and AG-UI.
  • Long-lived systems, which benefit from stable 1.x APIs and ongoing support.

A practical migration: the coding team

The course project built a coding team in AutoGen: a coder, a CodeExecutorAgent with an approval check, and a reviewer in a SelectorGroupChat with a fixed speaking order. Here's how each piece maps:

AutoGen (legacy)Agent Framework (new)Kind of change
AssistantAgent coder and reviewerAgent coder and reviewerRename
SelectorGroupChat(..., selector_func=next_speaker)GroupChatBuilder(..., selection_func=next_speaker)Rename; the function now gets a GroupChatState
TextMentionTermination("APPROVE", sources=["reviewer"])termination_condition=reviewer_approvedObject becomes a function
MaxMessageTermination(12)max_rounds=12Rename
CodeExecutorAgent with approval_funcA small custom agent, TestRunner, that runs code with a shell tool after the same checkRedesign
LocalCommandLineCodeExecutorLocalShellTool (preview), or DockerShellTool in productionRedesign

New (Agent Framework 1.x):

import asyncio
import re
import sys
import tempfile
from pathlib import Path

from agent_framework import (Agent, AgentResponse, AgentResponseUpdate, BaseAgent, Content, Message,
                             ResponseStream, normalize_messages)
from agent_framework.openai import OpenAIChatClient
from agent_framework.orchestrations import GroupChatBuilder, GroupChatState
from agent_framework.tools import LocalShellTool

TASK = """Write a Python function delivery_fee(city, weight_kg) for Velamuvi Bikes:
- delivery to Lisbon or Porto is free; anywhere else costs 25 EUR
- add 2 EUR for every kg above 20 kg
- bikes over 35 kg can't be delivered: raise ValueError
Include tests in the same code block and print "All tests passed" if they pass."""


def approve(code: str) -> tuple[bool, str]:            # was approval_func(ApprovalRequest) -> ApprovalResponse
    banned = [w for w in ("import os", "subprocess", "open(", "requests", "socket") if w in code]
    return (not banned, f"Blocked: {banned}" if banned else "Pure Python only")


class TestRunner(BaseAgent):
    """Does CodeExecutorAgent's job: runs the latest python code block, after the approval check."""

    def __init__(self, workdir: str, **kwargs):
        super().__init__(**kwargs)
        self.workdir = Path(workdir)
        self.shell = LocalShellTool(mode="stateless", workdir=workdir, timeout=30)   # DockerShellTool in production

    async def _reply(self, messages) -> str:
        texts = [m.text for m in normalize_messages(messages)]
        blocks = [b for t in texts for b in re.findall(r"```python\n(.*?)```", t, re.S)]
        if not blocks:
            return "No Python code block found."
        approved, reason = approve(blocks[-1])
        if not approved:
            return f"Code not run. {reason}"
        (self.workdir / "snippet.py").write_text(blocks[-1])
        result = await self.shell.run(f'"{sys.executable}" snippet.py')
        return (result.stdout + result.stderr).strip() or f"exit code {result.exit_code}"

    def run(self, messages=None, *, stream=False, session=None, **kwargs):
        if stream:
            async def updates():
                text = await self._reply(messages)
                yield AgentResponseUpdate(role="assistant", contents=[Content.from_text(text)], author_name=self.name)
            return ResponseStream(updates(), finalizer=AgentResponse.from_updates)

        async def complete():
            return AgentResponse(messages=[Message("assistant", [await self._reply(messages)], author_name=self.name)])
        return complete()


def next_speaker(state: GroupChatState) -> str:        # was selector_func: a fixed order
    return ["coder", "executor", "reviewer"][state.current_round % 3]


def reviewer_approved(conversation: list[Message]) -> bool:   # was TextMentionTermination(sources=["reviewer"])
    return any(m.author_name == "reviewer" and "APPROVE" in m.text for m in conversation)


async def main():
    client = OpenAIChatClient(model="MODEL_NAME")
    coder = Agent(client=client, name="coder", description="Writes Python code with tests",
        instructions="You write clean Python with tests, in one Markdown code block marked as python. "
                     "Fix the code when the reviewer or the test output shows a problem.")
    reviewer = Agent(client=client, name="reviewer", description="Checks code and test output against the task",
        instructions="Check the latest code and its test output against the task. If every requirement "
                     "is met and the tests pass, reply APPROVE. Otherwise say exactly what to fix.")
    with tempfile.TemporaryDirectory() as folder:
        executor = TestRunner(folder, name="executor", description="Runs the latest Python code block")
        workflow = GroupChatBuilder(
            participants=[coder, executor, reviewer],
            selection_func=next_speaker,
            termination_condition=reviewer_approved,
            max_rounds=12,                                # was MaxMessageTermination(12)
            intermediate_output_from="all",
        ).build()
        result = await workflow.run(TASK)
        for reply in result.get_intermediate_outputs():
            print(f"--- {reply.messages[-1].author_name} ---\n{reply.text.strip()}")


asyncio.run(main())
Output
--- coder ---
```python
def delivery_fee(city, weight_kg):
    base = 0 if city.lower() in {"lisbon", "porto"} else 25
    return base + max(0, weight_kg - 20) * 2

assert delivery_fee("Lisbon", 18) == 0
assert delivery_fee("Faro", 24) == 33
try:
    delivery_fee("Porto", 40)
    print("TEST FAILED: a 40 kg bike should be refused")
except ValueError:
    print("All tests passed")
```
--- executor ---
TEST FAILED: a 40 kg bike should be refused
--- reviewer ---
The 35 kg limit is missing: delivery_fee must raise ValueError for bikes over 35 kg, as the failed test shows.
--- coder ---
```python
def delivery_fee(city, weight_kg):
    if weight_kg > 35:
        raise ValueError("Bikes over 35 kg can't be delivered")
    base = 0 if city.lower() in {"lisbon", "porto"} else 25
    return base + max(0, weight_kg - 20) * 2

assert delivery_fee("Lisbon", 18) == 0
assert delivery_fee("Faro", 24) == 33
try:
    delivery_fee("Porto", 40)
    print("TEST FAILED: a 40 kg bike should be refused")
except ValueError:
    print("All tests passed")
```
--- executor ---
All tests passed
--- reviewer ---
All three requirements are met and the tests pass. APPROVE

The conversation is the same as the AutoGen version's: the first draft misses the weight limit, the test run shows it, the reviewer names the fix, and the second draft passes. How the new version works:

  1. The agents barely change. The coder's and reviewer's instructions are copied over unchanged. Each gets a description, which group chat managers use to describe participants.
  2. TestRunner replaces CodeExecutorAgent. It subclasses BaseAgent, finds the latest Python code block in the conversation, applies the same approve check (now a plain function returning a pair), and runs the code with LocalShellTool in a temporary folder with a 30-second timeout. For real use, swap in DockerShellTool, which has the same run() method and runs each command in a locked-down container.
  3. The speaking order is a function of the round. GroupChatState.current_round counts from 0, so coder, executor, reviewer repeats.
  4. Only the reviewer can end the chat, because reviewer_approved checks the author as well as the text, and max_rounds=12 is the safety net.
  5. intermediate_output_from="all" makes every participant's reply available through get_intermediate_outputs(), which plays the part of AutoGen's result.messages.

Before switching over, run both versions against the same specification and scripted model replies, and check that they produce the same messages. That's step 6 in action.

Common mistakes

Practice exercise

Turn an AutoGen termination condition into the function Agent Framework's GroupChatBuilder expects: only the reviewer's APPROVE may end the chat.

Your solutionPython
def reviewer_approved(conversation):
    # conversation is a list of (author, text) pairs.
    # Return True only if a message from "reviewer" contains "APPROVE",
    # like AutoGen's TextMentionTermination("APPROVE", sources=["reviewer"]).
    return False

print(reviewer_approved([("user", "Write delivery_fee"), ("coder", "Done, I APPROVE my own code")]))
print(reviewer_approved([("coder", "Here is version 2"), ("reviewer", "Tests pass. APPROVE")]))
print(reviewer_approved([("reviewer", "Add the 35 kg limit")]))
Knowledge check

An AutoGen team uses SelectorGroupChat with a selector_func that fixes the speaking order, and loops until the reviewer approves. What's the closest Agent Framework replacement?

Summary

  • AutoGen grew from a 2023 research project into the 0.4 redesign; its last release is 0.7.5, and the repository is now archived, with no bug or security fixes.
  • Its limits: no fixes, new model names need model_info, no Responses API client, single-turn tool use by default, no workflow checkpoints.
  • Microsoft Agent Framework is the successor: AutoGen's agent abstractions, Semantic Kernel's enterprise features and graph-based workflows, with stable 1.x APIs.
  • Biggest differences: memory lives in a session, the tool loop continues until an answer, teams become orchestrations or workflows, termination becomes a function.
  • Migrate in steps: inventory, pin and record tests, clients and tools, single agents, teams, then compare and switch.
  • Code execution and people in the loop need a redesign; preview packages (shell tools, some clients) need pinning.
  • Keep AutoGen only for low-risk, short-lived systems, kept safely; choose Agent Framework for everything new.

Official sources: the AutoGen repository notice, the migration guide, the Agent Framework overview and the AutoGen release history.

Course complete

You can now explain AutoGen's conversation-driven design and its current status, build conversable agents with tools and human participants, run group chats with round-robin, selector and swarm speaker rules and safe termination, execute model-written code in containers with approval checks, combine them into a coding team that writes, tests and reviews its own work, and migrate that team to Microsoft Agent Framework.

Finished reading? Tick it off to track your progress.