Releases: microsoft/autogen
Release list
python-v0.5.6
What's New
GraphFlow: customized workflows using directed graph
Should I say finally? Yes, finally, we have workflows in AutoGen. GraphFlow is a new team class as part of the AgentChat API. One way to think of GraphFlow is that it is a version of SelectorGroupChat but with a directed graph as the selector_func. However, it is actually more powerful, because the abstraction also supports concurrent agents.
Note: GraphFlow is still an experimental API. Watch out for changes in the future releases.
For more details, see our newly added user guide on GraphFlow.
If you are in a hurry, here is an example of creating a fan-out-fan-in workflow:
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import DiGraphBuilder, GraphFlow
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
# Create an OpenAI model client
client = OpenAIChatCompletionClient(model="gpt-4.1-nano")
# Create the writer agent
writer = AssistantAgent(
"writer",
model_client=client,
system_message="Draft a short paragraph on climate change.",
)
# Create two editor agents
editor1 = AssistantAgent(
"editor1", model_client=client, system_message="Edit the paragraph for grammar."
)
editor2 = AssistantAgent(
"editor2", model_client=client, system_message="Edit the paragraph for style."
)
# Create the final reviewer agent
final_reviewer = AssistantAgent(
"final_reviewer",
model_client=client,
system_message="Consolidate the grammar and style edits into a final version.",
)
# Build the workflow graph
builder = DiGraphBuilder()
builder.add_node(writer).add_node(editor1).add_node(editor2).add_node(
final_reviewer
)
# Fan-out from writer to editor1 and editor2
builder.add_edge(writer, editor1)
builder.add_edge(writer, editor2)
# Fan-in both editors into final reviewer
builder.add_edge(editor1, final_reviewer)
builder.add_edge(editor2, final_reviewer)
# Build and validate the graph
graph = builder.build()
# Create the flow
flow = GraphFlow(
participants=builder.get_participants(),
graph=graph,
)
# Run the workflow
await Console(flow.run_stream(task="Write a short biography of Steve Jobs."))
asyncio.run(main())Major thanks to abhinav-aegis for the initial design and implementation of this amazing feature!
- Added Graph Based Execution functionality to Autogen by abhinav-aegis in #6333
- Aegis graph docs by abhinav-aegis in #6417
Azure AI Agent Improvement
- Add support for Bing grounding citation URLs by Abdo Talema (@abdomohamed) in #6370
New Sample
- A multi-agent PostgreSQL data management example by Mehrsa Golestaneh (@mehrsa) in #6443
Bug Fixes:
- [FIX] DockerCommandLineCodeExecutor multi event loop aware by SongChiyoung (@SongChiYoung) in #6402
- FIX: GraphFlow serialize/deserialize and adding test by SongChiyoung (@SongChiYoung) in #6434
- FIX:
MultiModalMessagein gemini with openai sdk error occured by SongChiyoung (@SongChiYoung) in #6440 - FIX/McpWorkbench_errors_properties_and_grace_shutdown by SongChiyoung (@SongChiYoung) in #6444
- FIX: resolving_workbench_and_tools_conflict_at_desirialize_assistant_agent by SongChiyoung (@SongChiYoung) in #6407
Dev Improvement
- Speed up Docker executor unit tests: 161.66s -> 108.07 by SongChiyoung (@SongChiYoung) in #6429
Other Python Related Changes
- Update website for v0.5.5 by Eric Zhu (@ekzhu) in #6401
- Add more mcp workbench examples to MCP API doc by Eric Zhu (@ekzhu) in #6403
- Adding bedrock chat completion for anthropic models by Harini N (@HariniNarasimhan) in #6170
- Add missing dependency to tracing docs by Victor Dibia (@victordibia) in #6421
- docs: Clarify missing dependencies in documentation (fix #6076) by Mars Wang (@marswangyang) in #6406
- Bing grounding citations by Abdo Talema (@abdomohamed) in #6370
- Fix: Icons are not aligned vertically. by long (@xionnon) in #6369
- Fix: Reduce multiple H1s to H2s in Distributed Agent Runtime page by LuluZhuu in #6412
- update autogen version 0.5.6 by Eric Zhu (@ekzhu) in #6433
- fix: ensure streaming chunks are immediately flushed to console by Zhenyu (@Dormiveglia-elf) in #6424
New Contributors
- Harini N (@HariniNarasimhan) made their first contribution in #6170
- Mars Wang (@marswangyang) made their first contribution in #6406
- long (@xionnon) made their first contribution in #6369
- LuluZhuu made their first contribution in #6412
- Mehrsa Golestaneh (@mehrsa) made their first contribution in #6443
- Zhenyu (@Dormiveglia-elf) made their first contribution in #6424
Full Changelog: python-v0.5.5...python-v0.5.6
python-v0.5.5
What's New
Introduce Workbench
A workbench is a collection of tools that share state and resource. For example, you can now use MCP server through McpWorkbench rather than using tool adapters. This makes it possible to use MCP servers that requires a shared session among the tools (e.g., login session).
Here is an example of using AssistantAgent with GitHub MCP Server.
import asyncio
import os
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StdioServerParams
async def main() -> None:
model_client = OpenAIChatCompletionClient(model="gpt-4.1-nano")
server_params = StdioServerParams(
command="docker",
args=[
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server",
],
env={
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
}
)
async with McpWorkbench(server_params) as mcp:
agent = AssistantAgent(
"github_assistant",
model_client=model_client,
workbench=mcp,
reflect_on_tool_use=True,
model_client_stream=True,
)
await Console(agent.run_stream(task="Is there a repository named Autogen"))
asyncio.run(main())Here is another example showing a web browsing agent using Playwright MCP Server, AssistantAgent and RoundRobinGroupChat.
# First run `npm install -g @playwright/mcp@latest` to install the MCP server.
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.conditions import TextMessageTermination
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StdioServerParams
async def main() -> None:
model_client = OpenAIChatCompletionClient(model="gpt-4.1-nano")
server_params = StdioServerParams(
command="npx",
args=[
"@playwright/mcp@latest",
"--headless",
],
)
async with McpWorkbench(server_params) as mcp:
agent = AssistantAgent(
"web_browsing_assistant",
model_client=model_client,
workbench=mcp,
model_client_stream=True,
)
team = RoundRobinGroupChat(
[agent],
termination_condition=TextMessageTermination(source="web_browsing_assistant"),
)
await Console(team.run_stream(task="Find out how many contributors for the microsoft/autogen repository"))
asyncio.run(main())Read more:
- MCP Workbench API Doc
- Creating a web browsing agent using workbench, in AutoGen Core User Guide
- Introduce workbench by Eric Zhu (@ekzhu) in #6340
New Sample: AutoGen and FastAPI with Streaming
- Add example using autogen-core and FastAPI for handoff multi-agent design pattern with streaming and UI by Amith Ajith (@amith-ajith) in #6391
New Termination Condition: FunctionalTermination
- Support using a function expression to create a termination condition for teams. by Eric Zhu (@ekzhu) in #6398
Other Python Related Changes
- update website version by Eric Zhu (@ekzhu) in #6364
- TEST/change gpt4, gpt4o serise to gpt4.1nano by SongChiyoung (@SongChiYoung) in #6375
- Remove
namefield from OpenAI Assistant Message by Eric Zhu (@ekzhu) in #6388 - Add guide for workbench and mcp & bug fixes for create_mcp_server_session by Eric Zhu (@ekzhu) in #6392
- TEST: skip when macos+uv and adding uv venv tests by SongChiyoung (@SongChiYoung) in #6387
- AssistantAgent to support Workbench by Eric Zhu (@ekzhu) in #6393
- Update agent documentation by Eric Zhu (@ekzhu) in #6394
- Update version to 0.5.5 by Eric Zhu (@ekzhu) in #6397
- Update: implement return_value_as_string for McpToolAdapter by Dang (Daniel) Pham Minh (@perfogic) in #6380
- [doc] Clarify selector prompt for SelectorGroupChat by Eric Zhu (@ekzhu) in #6399
- Document custom message types in teams API docs by Eric Zhu (@ekzhu) in #6400
New Contributors
- Amith Ajith (@amith-ajith) made their first contribution in #6391
Full Changelog: python-v0.5.4...python-v0.5.5
python-v0.5.4
What's New
Agent and Team as Tools
You can use AgentTool and TeamTool to wrap agent and team into tools to be used by other agents.
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.tools import AgentTool
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
model_client = OpenAIChatCompletionClient(model="gpt-4")
writer = AssistantAgent(
name="writer",
description="A writer agent for generating text.",
model_client=model_client,
system_message="Write well.",
)
writer_tool = AgentTool(agent=writer)
assistant = AssistantAgent(
name="assistant",
model_client=model_client,
tools=[writer_tool],
system_message="You are a helpful assistant.",
)
await Console(assistant.run_stream(task="Write a poem about the sea."))
asyncio.run(main())See AgentChat Tools API for more information.
- [AgentChat] Nested Agents by Eitan Yarmush (@EItanya) in #5924
Azure AI Agent
Introducing adapter for Azure AI Agent, with support for file search, code interpreter, and more. See our Azure AI Agent Extension API.
- Add azure ai agent by Abdo Talema (@abdomohamed) in #6191
Docker Jupyter Code Executor
Thinking about sandboxing your local Jupyter execution environment? We just added a new code executor to our family of code executors. See Docker Jupyter Code Executor Extension API.
- Make Docker Jupyter support to the Version 0.4 as Version 0.2 by masquerlin (@masquerlin) in #6231
Canvas Memory
Shared "whiteboard" memory can be useful for agents to collaborate on a common artifact such code, document, or illustration. Canvas Memory is an experimental extension for sharing memory and exposing tools for agents to operate on the shared memory.
- Agentchat canvas by Leonardo Pinheiro (@lspinheiro) in #6215
New Community Extensions
Updated links to new community extensions. Notably, autogen-contextplus provides advanced model context implementations with ability to automatically summarize, truncate the model context used by agents.
- Add extentions:
autogen-oaiapiandautogen-contextplusby SongChiyoung (@SongChiYoung) in #6338
SelectorGroupChat Update
SelectorGroupChat now works with models that only support streaming mode (e.g., QwQ). It can also optionally emit the inner reasoning of the model used in the selector. Set emit_team_events=True and model_client_streaming=True when creating SelectorGroupChat.
- FEAT: SelectorGroupChat could using stream inner select_prompt by SongChiyoung (@SongChiYoung) in #6286
CodeExecutorAgent Update
CodeExecutorAgent just got another refresh: it now supports max_retries_on_error parameter. You can specify how many times it can retry and self-debug in case there is error in the code execution.
- Add self-debugging loop to
CodeExecutionAgentby Abhijeetsingh Meena (@Ethan0456) in #6306
ModelInfo Update
- Adding
multiple_system_messageon model_info by SongChiyoung (@SongChiYoung) in #6327
New Sample: AutoGen Core + FastAPI with Streaming
AGBench Update
- Add scenario for parallel agents by Enhao Zhang (@ZHANG-EH) in #6311
Bug Fixes
- Bugfix: Azure AI Search Tool - fix query type by Jay Prakash Thakur (@jay-thakur) in #6331
- fix: ensure serialized messages are passed to LLMStreamStartEvent by Peter Jausovec (@peterj) in #6344
- fix: ollama fails when tools use optional args by Peter Jausovec (@peterj) in #6343
- Avoid re-registering a message type already registered by Jorge Villacorta (@jorge-wonolo) in #6354
- Fix: deserialize model_context in AssistantAgent and SocietyOfMindAgent and CodeExecutorAgent by SongChiyoung (@SongChiYoung) in #6337
What's Changed
- Update website 0.5.3 by Eric Zhu (@ekzhu) in #6320
- Update version 0.5.4 by Eric Zhu (@ekzhu) in #6334
- Generalize Continuous SystemMessage merging via model_info[βmultiple_system_messagesβ] instead of
startswith("gemini-")by SongChiyoung (@SongChiYoung) in #6345 - Add experimental notice to canvas by Eric Zhu (@ekzhu) in #6349
- Added support for exposing GPUs to docker code executor by Henry E. Miller (@millerh1) in #6339
New Contributors
- Enhao Zhang (@ZHANG-EH) made their first contribution in #6311
- ToryPan made their first contribution in #6335
- Henry E. Miller (@millerh1) made their first contribution in #6339
- Jorge Villacorta (@jorge-wonolo) made their first contribution in #6354
- Abdo Talema (@abdomohamed) made their first contribution in #6191
Full Changelog: python-v0.5.3...python-v0.5.4
python-v0.5.3
What's New
CodeExecutorAgent Update
Now the CodeExecutorAgent can generate and execute code in the same invocation. See API doc for examples.
- Add code generation support to
CodeExecutorAgentby Abhijeetsingh Meena (@Ethan0456) in #6098
AssistantAgent Improvement
Now AssistantAgent can be serialized when output_content_type is set, thanks abhinav-aegis's new built-in utility module autogen_core.utils for working with JSON schema.
- Aegis structure message by abhinav-aegis in #6289
Team Improvement
Added an optional parameter emit_team_events to configure whether team events like SelectorSpeakerEvent are emitted through run_stream.
- [FEATURE] Option to emit group chat manager messages in AgentChat by SongChiyoung (@SongChiYoung) in #6303
MCP Improvement
Now mcp_server_tools factory can reuse a shared session. See example of AssistantAgent using Playwright MCP server in the API Doc.
- Make shared session possible for MCP tool by Eric Zhu (@ekzhu) in #6312
Console Improvement
- Print message types in Console by Eric Zhu (@ekzhu) in #6318
Bug Fixes
- Fix: Azure AI Search Tool Client Lifetime Management by Jay Prakash Thakur (@jay-thakur) in #6316
- Make sure thought content is included in handoff context by Eric Zhu (@ekzhu) in #6319
Python Related Changes
- Update website for 0.5.2 by Eric Zhu (@ekzhu) in #6299
- Bump up json-schema-to-pydantic from v0.2.3 to v0.2.4 by Sungjun.Kim (@withsmilo) in #6300
- minor grammatical fix in docs by Yash Malik (@codeblech) in #6263
- Pin opentelemetry-proto version by cheng-tan in #6305
- Update version to 0.5.3 by Eric Zhu (@ekzhu) in #6310
- Add GPT4.1, o4-mini and o3 by Eric Zhu (@ekzhu) in #6314
New Contributors
- Yash Malik (@codeblech) made their first contribution in #6263
- amoghmc made their first contribution in #6283
- abhinav-aegis made their first contribution in #6289
Full Changelog: python-v0.5.2...python-v0.5.3
python-v0.5.2
Python Related Changes
- Update website verison by Eric Zhu (@ekzhu) in #6196
- Clean examples. by ζΉι²ε η (@zhanluxianshen) in #6203
- Improve SocietyOfMindAgent message handling by SongChiyoung (@SongChiYoung) in #6142
- redundancy code clean for agentchat by ζΉι²ε η (@zhanluxianshen) in #6190
- added: gemini 2.5 pro preview by Ardent Illumina (@ardentillumina) in #6226
- chore: Add powershell path check for code executor by Leonardo Pinheiro (@lspinheiro) in #6212
- Fix/transformer aware any modelfamily by SongChiyoung (@SongChiYoung) in #6213
- clean codes notes for autogen-core. by ζΉι²ε η (@zhanluxianshen) in #6218
- Docker Code Exec delete temp files by Hussein Mozannar (@husseinmozannar) in #6211
- Fix terminations conditions. by ζΉι²ε η (@zhanluxianshen) in #6229
- Update json_schema_to_pydantic version and make relaxed requirement on arry item. by Eric Zhu (@ekzhu) in #6209
- Fix sha256_hash docstring by Michael Scovetta (@scovetta) in #6236
- fix: typo in usage.md by Artur (@apokusin) in #6245
- Expose more Task-Centric Memory parameters by Ricky Loynd (@rickyloynd-microsoft) in #6246
- Bugfix/azure ai search embedding by Jay Prakash Thakur (@jay-thakur) in #6248
- Add note on ModelInfo for Gemini Models by Victor Dibia (@victordibia) in #6259
- [Bugfix] Fix for Issue #6241 - ChromaDB removed IncludeEnum by Macon Pegram (@mpegram3rd) in #6260
- Fix ValueError: Dataclass has a union type error by Shyam Sathish (@ShyamSathish005) in #6266
- Fix publish_message-method() notes by ζΉι²ε η (@zhanluxianshen) in #6250
- Expose TCM TypedDict classes for apps to use by Ricky Loynd (@rickyloynd-microsoft) in #6269
- Update discover.md with adding email agent package by masquerlin (@masquerlin) in #6274
- Update multi-agent-debate.ipynb by larry (@larrytin) in #6288
- update version 0.5.2 by Eric Zhu (@ekzhu) in #6296
New Contributors
- Ardent Illumina (@ardentillumina) made their first contribution in #6226
- Michael Scovetta (@scovetta) made their first contribution in #6236
- Artur (@apokusin) made their first contribution in #6245
- Macon Pegram (@mpegram3rd) made their first contribution in #6260
- Shyam Sathish (@ShyamSathish005) made their first contribution in #6266
- masquerlin (@masquerlin) made their first contribution in #6274
- larry (@larrytin) made their first contribution in #6288
Full Changelog: python-v0.5.1...python-v0.5.2
python-v0.5.1
What's New
AgentChat Message Types (Type Hint Changes)
Important
TL;DR: If you are not using custom agents or custom termination conditions, you don't need to change anything.
Otherwise, update AgentEvent to BaseAgentEvent and ChatMessage to BaseChatMessage in your type hints.
This is a breaking change on type hinting only, not on usage.
We updated the message types in AgentChat in this new release.
The purpose of this change is to support custom message types defined by applications.
Previously, message types are fixed and we use the union types ChatMessage and AgentEvent to refer to all the concrete built-in message types.
Now, in the main branch, the message types are organized into hierarchy: existing built-in concrete message types are subclassing either BaseChatMessage and BaseAgentEvent, depending it was part of the ChatMessage or AgentEvent union. We refactored all message handlers on_messages, on_messages_stream, run, run_stream and TerminationCondition to use the base classes in their type hints.
If you are subclassing BaseChatAgent to create your custom agents, or subclassing TerminationCondition to create your custom termination conditions, then you need to rebase the method signatures to use BaseChatMessage and BaseAgentEvent.
If you are using the union types in your existing data structures for serialization and deserialization, then you can keep using those union types to ensure the messages are being handled as concrete types. However, this will not work with custom message types.
Otherwise, your code should just work, as the refactor only makes type hint changes.
This change allows us to support custom message types. For example, we introduced a new message type StructureMessage[T] generic, that can be used to create new message types with a BaseModel content. On-going work is to get AssistantAgent to respond with StructuredMessage[T] where T is the structured output type for the model.
See the API doc on AgentChat message types: https://microsoft.github.io/autogen/stable/reference/python/autogen_agentchat.messages.html
- Use class hierarchy to organize AgentChat message types and introduce StructuredMessage type by Eric Zhu (@ekzhu) in #5998
- Rename to use BaseChatMessage and BaseAgentEvent. Bring back union types. by Eric Zhu (@ekzhu) in #6144
Structured Output
We enhanced support for structured output in model clients and agents.
For model clients, use json_output parameter to specify the structured output type
as a Pydantic model. The model client will then return a JSON string
that can be deserialized into the specified Pydantic model.
import asyncio
from typing import Literal
from autogen_core import CancellationToken
from autogen_ext.models.openai import OpenAIChatCompletionClient
from pydantic import BaseModel
# Define the structured output format.
class AgentResponse(BaseModel):
thoughts: str
response: Literal["happy", "sad", "neutral"]
model_client = OpenAIChatCompletionClient(model="gpt-4o-mini")
# Generate a response using the tool.
response = await model_client.create(
messages=[
SystemMessage(content="Analyze input text sentiment using the tool provided."),
UserMessage(content="I am happy.", source="user"),
],
json_ouput=AgentResponse,
)
print(response.content)
# Should be a structured output.
# {"thoughts": "The user is happy.", "response": "happy"}For AssistantAgent, you can set output_content_type to the structured output type. The agent will automatically reflect on the tool call result and generate a StructuredMessage with the output content type.
import asyncio
from typing import Literal
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.messages import TextMessage
from autogen_agentchat.ui import Console
from autogen_core import CancellationToken
from autogen_core.tools import FunctionTool
from autogen_ext.models.openai import OpenAIChatCompletionClient
from pydantic import BaseModel
# Define the structured output format.
class AgentResponse(BaseModel):
thoughts: str
response: Literal["happy", "sad", "neutral"]
# Define the function to be called as a tool.
def sentiment_analysis(text: str) -> str:
"""Given a text, return the sentiment."""
return "happy" if "happy" in text else "sad" if "sad" in text else "neutral"
# Create a FunctionTool instance with `strict=True`,
# which is required for structured output mode.
tool = FunctionTool(sentiment_analysis, description="Sentiment Analysis", strict=True)
# Create an OpenAIChatCompletionClient instance that supports structured output.
model_client = OpenAIChatCompletionClient(
model="gpt-4o-mini",
)
# Create an AssistantAgent instance that uses the tool and model client.
agent = AssistantAgent(
name="assistant",
model_client=model_client,
tools=[tool],
system_message="Use the tool to analyze sentiment.",
output_content_type=AgentResponse,
)
stream = agent.on_messages_stream([TextMessage(content="I am happy today!", source="user")], CancellationToken())
await Console(stream)---------- assistant ----------
[FunctionCall(id='call_tIZjAVyKEDuijbBwLY6RHV2p', arguments='{"text":"I am happy today!"}', name='sentiment_analysis')]
---------- assistant ----------
[FunctionExecutionResult(content='happy', call_id='call_tIZjAVyKEDuijbBwLY6RHV2p', is_error=False)]
---------- assistant ----------
{"thoughts":"The user expresses a clear positive emotion by stating they are happy today, suggesting an upbeat mood.","response":"happy"}
You can also pass a StructuredMessage to the run and run_stream methods of agents and teams as task messages. Agents will automatically deserialize the message to string and place them in their model context. StructuredMessage generated by an agent will also be passed to other agents in the team, and emitted as messages in the output stream.
- Add structured output to model clients by Eric Zhu (@ekzhu) in #5936
- Support json schema for response format type in OpenAIChatCompletionClient by Eric Zhu (@ekzhu) in #5988
- Add output_format to AssistantAgent for structured output by Eric Zhu (@ekzhu) in #6071
Azure AI Search Tool
Added a new tool for agents to perform search using Azure AI Search.
See the documentation for more details.
- Add Azure AI Search tool implementation by Jay Prakash Thakur (@jay-thakur) in #5844
SelectorGroupChat Improvements
- Implement 'candidate_func' parameter to filter down the pool of candidates for selection by Abhijeetsingh Meena (@Ethan0456) in #5954
- Add async support for
selector_funcandcandidate_funcinSelectorGroupChatby Abhijeetsingh Meena (@Ethan0456) in #6068
Code Executors Improvements
- Add cancellation support to docker executor by Eric Zhu (@ekzhu) in #6027
- Move start() and stop() as interface methods for CodeExecutor by Eric Zhu (@ekzhu) in #6040
- Changed Code Executors default directory to temporary directory by Federico Villa (@federicovilla55) in #6143
Model Client Improvements
- Improve documentation around model client and tool and how it works under the hood by Eric Zhu (@ekzhu) in #6050
- Add support for thought field in AzureAIChatCompletionClient by Jay Prakash Thakur (@jay-thakur) in #6062
- Add a thought process analysis, and add a reasoning field in the ModelClientStreamingChunkEvent to distinguish the thought tokens. by y26s4824k264 in #5989
- Add thought field support and fix LLM control parameters for OllamaChatCompletionClient by Jay Prakash Thakur (@jay-thakur) in #6126
- Modular Transformer Pipeline and Fix Gemini/Anthropic Empty Content Handling by SongChiyoung (@SongChiYoung) in #6063
- Doc/moudulor transform oai by SongChiyoung (@SongChiYoung) in #6149
- Model family resolution to support non-prefixed names like Mistral by SongChiyoung (@SongChiYoung) in #6158
TokenLimitedChatCompletionContext
Introduce TokenLimitedChatCompletionContext to limit the number of tokens in the context
sent to the model.
This is useful for long-running agents that need to keep a long history of messages in the context.
- [feat] token-limited message context by Griffin Bassman (@bassmang) in #6087
- Fix token limited model context by Eric Zhu (@ekzhu) in #6137
Bug Fixes
- Fix logging error with ollama client by Eric Zhu (@ekzhu) in #5917
- Fix: make sure system message is present in reflection call by Eric Zhu (@ekzhu) in #5926
- Fixes an error that can occur when listing the contents of a directory. by afourney in #5938
- Upgrade llama cpp to 0.3.8 to fix windows related error by Eric Zhu (@ekzhu) in #5948
- Fix R1 reasoning parser for openai client by Zakrea (@ZakWork) in #5961
- Filter invalid parameters in Ollama client requests by Federico Villa (@federicovilla55) in https://github.com/micr...
python-v0.4.9.3
Patch Release
This release addresses a bug in MCP Server Tool that causes error when unset tool arguments are set to None and passed on to the server. It also improves the error message from server and adds a default timeout. #6080, #6125
Full Changelog: python-v0.4.9.2...python-v0.4.9.3
autogenstudio-v0.4.2
What's New
This release makes improvements to AutoGen Studio across multiple areas.
Component Validation and Testing
In the team builder, all component schemas are automatically validated on save. This way configuration errors (e.g., incorrect provider names) are highlighted early.
In addition, there is a test button for model clients where you can verify the correctness of your model configuration. The LLM is given a simple query and the results are shown.
Gallery Improvements
You can now modify teams, agents, models, tools, and termination conditions independently in the UI, and only review JSON when needed. The same UI panel for updating components in team builder is also reused in the Gallery. The Gallery in AGS is now persisted in a database, rather than local storage. Anthropic models supported in AGS.

Observability - LLMCallEvents
- Enable LLM Call Observability in AGS #5457
You can now view all LLMCallEvents in AGS. Go to settings (cog icon on lower left) to enable this feature.
Token Streaming
- Add Token Streaming in AGS in #5659
For better developer experience, the AGS UI will stream tokens as they are generated by an LLM for any agent where stream_model_client is set to true.
UX Improvements - Session Comparison
- AGS - Test Model Component in UI, Compare Sessions in #5963
It is often valuable, even critical, to have a side-by-side comparison of multiple agent configurations (e.g., using a team of web agents that solve tasks using a browser or agents with web search API tools). You can now do this using the compare button in the playground, which lets you select multiple sessions and interact with them to compare outputs.
Experimental Features
There are a few interesting but early features that ship with this release:
- Authentication in AGS: You can pass in an authentication configuration YAML file to enable user authentication for AGS. Currently, only GitHub authentication is supported. This lays the foundation for a multi-user environment (#5928) where various users can login and only view their own sessions. More work needs to be done to clarify isolation of resources (e.g., environment variables) and other security considerations.
See the documentation for more details.
loginags.mov
- Local Python Code Execution Tool: AGS now has early support for a local Python code execution tool. More work is needed to test the underlying agentchat implementation
Other Fixes
- Fixed issue with using AzureSQL DB as the database engine for AGS
- Fixed cascading delete issue in AGS (ensure runs are deleted when sessions are deleted) #5804 by Victor Dibia (@victordibia)
- Fixed termination UI bug #5888
- Fixed DockerFile for AGS by Napat Gun R. (@gunt3001) #5932
Thanks to Eric Zhu (@ekzhu) , Jack Gerrits (@jackgerrits) , Gagan Bansal (@gagb), Youness Berraha (@usag1e), Dominic Lachance (@dominiclachance) , Eitan Yarmush (@EItanya) and many others for testing and feedback
python-v0.4.9.2
Patch Fixes
- Fix logging error in
SKChatCompletionAdapter#5893 - Fix missing system message in the model client call during reflect step when
reflect_on_tool_use=True#5926 (Bug introduced in v0.4.8) - Fixing listing directory error in FileSurfer #5938
Security Fixes
- Use
SecretStrtype for model clients' API key. This will ensure the secret is not exported when callingmodel_client.dump_component().model_dump_json(). #5939 and #5947. This will affectOpenAIChatCompletionClientandAzureOpenAIChatCompletionClient, andAnthropicChatCompletionClient-- the API keys will no longer be exported when you serialize the model clients. It is recommended to use environment-based or token-based authentication rather than passing the API keys around as data in configs.
Full Changelog: python-v0.4.9...python-v0.4.9.2
python-v0.4.9
What's New
[Breaking] Serialized State Schema Change
Starting v0.4.9, the team state is using the agent name as the key instead of the agent ID, and the team_id field is removed from the state. This is to allow the state to be portable across different teams and runtimes. States saved with the old format may not be compatible with the new format in the future.
See migration scripts here: https://github.com/ekzhu/autogen-migration/
Anthropic Model Client
Native support for Anthropic models. Get your update:
Β
pip install -U "autogen-ext[anthropic]"
The new client follows the same interface as OpenAIChatCompletionClient so you can use it directly in your agents and teams.
import asyncio
from autogen_ext.models.anthropic import AnthropicChatCompletionClient
from autogen_core.models import UserMessage
async def main():
anthropic_client = AnthropicChatCompletionClient(
model="claude-3-sonnet-20240229",
api_key="your-api-key", # Optional if ANTHROPIC_API_KEY is set in environment
)
result = await anthropic_client.create([UserMessage(content="What is the capital of France?", source="user")]) # type: ignore
print(result)
if __name__ == "__main__":
asyncio.run(main())You can also load the model client directly from a configuration dictionary:
from autogen_core.models import ChatCompletionClient
config = {
"provider": "AnthropicChatCompletionClient",
"config": {"model": "claude-3-sonnet-20240229"},
}
client = ChatCompletionClient.load_component(config)To use with AssistantAgent and run the agent in a loop to match the behavior of Claude agents, you can use Single-Agent Team.
- Add anthropic docs by Victor Dibia (@victordibia) in #5882
LlamaCpp Model Client
LlamaCpp is a great project for working with local models. Now we have native support via its official SDK.
pip install -U "autogen-ext[llama-cpp]"
To use a local model file:
import asyncio
from autogen_core.models import UserMessage
from autogen_ext.models.llama_cpp import LlamaCppChatCompletionClient
async def main():
llama_client = LlamaCppChatCompletionClient(model_path="/path/to/your/model.gguf")
result = await llama_client.create([UserMessage(content="What is the capital of France?", source="user")])
print(result)
asyncio.run(main())To use it with a Hugging Face model:
import asyncio
from autogen_core.models import UserMessage
from autogen_ext.models.llama_cpp import LlamaCppChatCompletionClient
async def main():
llama_client = LlamaCppChatCompletionClient(
repo_id="unsloth/phi-4-GGUF", filename="phi-4-Q2_K_L.gguf", n_gpu_layers=-1, seed=1337, n_ctx=5000
)
result = await llama_client.create([UserMessage(content="What is the capital of France?", source="user")])
print(result)
asyncio.run(main())- Feature add Add LlamaCppChatCompletionClient and llama-cpp by PythicCoder (@aribornstein) in #5326
Task-Centric Memory (Experimental)
Task-Centric memory is an experimental module that can give agents the ability to:
- Accomplish general tasks more effectively by learning quickly and continually beyond context-window limitations.
- Remember guidance, corrections, plans, and demonstrations provided by users (teachability)
- Learn through the agent's own experience and adapt quickly to changing circumstances (self-improvement)
- Avoid repeating mistakes on tasks that are similar to those previously encountered.
For example, you can use Teachability as a memory for AssistantAgent so your agent can learn from user teaching.
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.experimental.task_centric_memory import MemoryController
from autogen_ext.experimental.task_centric_memory.utils import Teachability
async def main():
# Create a client
client = OpenAIChatCompletionClient(model="gpt-4o-2024-08-06", )
# Create an instance of Task-Centric Memory, passing minimal parameters for this simple example
memory_controller = MemoryController(reset=False, client=client)
# Wrap the memory controller in a Teachability instance
teachability = Teachability(memory_controller=memory_controller)
# Create an AssistantAgent, and attach teachability as its memory
assistant_agent = AssistantAgent(
name="teachable_agent",
system_message = "You are a helpful AI assistant, with the special ability to remember user teachings from prior conversations.",
model_client=client,
memory=[teachability],
)
# Enter a loop to chat with the teachable agent
print("Now chatting with a teachable agent. Please enter your first message. Type 'exit' or 'quit' to quit.")
while True:
user_input = input("\nYou: ")
if user_input.lower() in ["exit", "quit"]:
break
await Console(assistant_agent.run_stream(task=user_input))
if __name__ == "__main__":
import asyncio
asyncio.run(main())Head over to its README for details, and the samples for runnable examples.
- Task-Centric Memory by Ricky Loynd (@rickyloynd-microsoft) in #5227
New Sample: Gitty (Experimental)
Gitty is an experimental application built to help easing the burden on open-source project maintainers. Currently, it can generate auto reply to issues.
To use:
gitty --repo microsoft/autogen issue 5212Head over to Gitty to see details.
- Add new sample: Gitty by Gagan Bansal (@gagb) in #5842
Improved Tracing and Logging
In this version, we made a number of improvements on tracing and logging.
- add LLMStreamStartEvent and LLMStreamEndEvent by Eitan Yarmush (@EItanya) in #5890
- Allow for tracing via context provider by Eitan Yarmush (@EItanya) in #5889
- Fix span structure for tracing by Eric Zhu (@ekzhu) in #5853
- Add ToolCallEvent and log it from all builtin tools by Eric Zhu (@ekzhu) in #5859
Powershell Support for LocalCommandLineCodeExecutor
- feat: update local code executor to support powershell by Leonardo Pinheiro (@lspinheiro) in #5884
Website Accessibility Improvements
peterychang has made huge improvements to the accessibility of our documentation website. Thank you peterychang!
- word wrap prev/next links on autodocs by peterychang in #5867
- Allow Voice Access to find clickable cards by peterychang in #5857
- copy tooltip on focus. Upgrade PDT version by peterychang in #5848
- highlight focused code output boxes in jupyter notebook pages by peterychang in #5819
- Fix high contrast mode focus by peterychang in #5796
- Keyboard copy event and search bar cancellation by peterychang in #5820
Bug Fixes
- fix: save_state should not require the team to be stopped. by Eric Zhu (@ekzhu) in #5885
- fix: remove max_tokens from az ai client create call when stream=True by Eric Zhu (@ekzhu) in #5860
- fix: add plugin to kernel by Leonardo Pinheiro (@lspinheiro) in #5830
- fix: warn when using reflection on tool use with Claude models by Eric Zhu (@ekzhu) in #5829
Other Python Related Changes
- doc: update termination tutorial to include FunctionCallTermination condition and fix formatting by Eric Zhu (@ekzhu) in #5813
- docs: Add note recommending PythonCodeExecutionTool as an alternative to CodeExecutorAgent by Eric Zhu (@ekzhu) in #5809
- Update quickstart.ipynb by Taswar Bhatti (@taswar) in #5815
- Fix warning in selector gorup chat guide by Eric Zhu (@ekzhu) in #5849
- Support for external agent runtime in AgentChat by Eric Zhu (@ekzhu) in #5843
- update ollama usage docs by Eric Zhu (@ekzhu) in #5854
- Update markitdown requirements to >= 0.0.1, while still in the 0.0.x range by afourney in #5864
- Add client close by afourney in #5871
- Update README to clarify Web Browsing Agent Team usage, and use animated Chromium browser by Eric Zhu (@ekzhu) in #5861
- Add author name before their message in Chainlit team sample by DavidYu00 in #5878
- Bump axios from 1.7.9 to 1.8.2 in /python/packages/autogen-studio/frontend by Dependabot (@dependabot) in #5874
- Add an optional base path to FileSurfer by Hussein Mozannar (@husseinmozannar) in #5886
- feat: Pause and Resume for AgentChat Teams and Agents by Eric Zhu (@ekzhu) in https://github.com...