python-v0.6.0
What's New
Change to BaseGroupChatManager.select_speaker and support for concurrent agents in GraphFlow
We made a type hint change to the select_speaker method of BaseGroupChatManager to allow for a list of agent names as a return value. This makes it possible to support concurrent agents in GraphFlow, such as in a fan-out-fan-in pattern.
# Original signature:
async def select_speaker(self, thread: Sequence[BaseAgentEvent | BaseChatMessage]) -> str:
...
# New signature:
async def select_speaker(self, thread: Sequence[BaseAgentEvent | BaseChatMessage]) -> List[str] | str:
...
Now you can run GraphFlow with concurrent agents as follows:
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.conditions import MaxMessageTermination
from autogen_agentchat.teams import DiGraphBuilder, GraphFlow
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main():
# Initialize agents with OpenAI model clients.
model_client = OpenAIChatCompletionClient(model="gpt-4.1-nano")
agent_a = AssistantAgent("A", model_client=model_client, system_message="You are a helpful assistant.")
agent_b = AssistantAgent("B", model_client=model_client, system_message="Translate input to Chinese.")
agent_c = AssistantAgent("C", model_client=model_client, system_message="Translate input to Japanese.")
# Create a directed graph with fan-out flow A -> (B, C).
builder = DiGraphBuilder()
builder.add_node(agent_a).add_node(agent_b).add_node(agent_c)
builder.add_edge(agent_a, agent_b).add_edge(agent_a, agent_c)
graph = builder.build()
# Create a GraphFlow team with the directed graph.
team = GraphFlow(
participants=[agent_a, agent_b, agent_c],
graph=graph,
termination_condition=MaxMessageTermination(5),
)
# Run the team and print the events.
async for event in team.run_stream(task="Write a short story about a cat."):
print(event)
asyncio.run(main())
Agent B and C will run concurrently in separate coroutines.
- Enable concurrent execution of agents in GraphFlow by @ekzhu in https://github.com/microsoft/autogen/pull/6545
Callable conditions for GraphFlow edges
Now you can use lambda functions or other callables to specify edge conditions in GraphFlow. This addresses the issue of the keyword substring-based conditions cannot cover all possibilities and leading to "cannot find next agent" bug.
NOTE: callable conditions are currently experimental, and it cannot be serialized with the graph.
- Add callable condition for GraphFlow edges by @ekzhu in https://github.com/microsoft/autogen/pull/6623
New Agent: OpenAIAgent
- Feature: Add OpenAIAgent backed by OpenAI Response API by @jay-thakur in https://github.com/microsoft/autogen/pull/6418
MCP Improvement
- Support the Streamable HTTP transport for MCP by @withsmilo in https://github.com/microsoft/autogen/pull/6615
AssistantAgent Improvement
- Add tool_call_summary_msg_format_fct and test by @ChrisBlaa in https://github.com/microsoft/autogen/pull/6460
- Support multiple workbenches in assistant agent by @bassmang in https://github.com/microsoft/autogen/pull/6529
Code Executors Improvement
- Add option to auto-delete temporary files in LocalCommandLineCodeExecutor by @holtvogt in https://github.com/microsoft/autogen/pull/6556
- Include all output to error output in docker jupyter code executor by @ekzhu in https://github.com/microsoft/autogen/pull/6572
OpenAIChatCompletionClient Improvement
- Default usage statistics for streaming responses by @peterychang in https://github.com/microsoft/autogen/pull/6578
- Add Llama API OAI compatible endpoint support by @WuhanMonkey in https://github.com/microsoft/autogen/pull/6442
OllamaChatCompletionClient Improvement
- Add qwen3 support by @mirpo in https://github.com/microsoft/autogen/pull/6528
AnthropicBedrockChatCompletionClient Improvement
- Allow implicit AWS credential setting for AnthropicBedrockChatCompletionClient by @GeorgeEfstathiadis in https://github.com/microsoft/autogen/pull/6561
MagenticOneGroupChat Improvement
- Use structured output for m1 orchestrator by @ekzhu in https://github.com/microsoft/autogen/pull/6540
Other Changes
- Update website 0.5.7 by @ekzhu in https://github.com/microsoft/autogen/pull/6527
- feat: add qwen3 support by @mirpo in https://github.com/microsoft/autogen/pull/6528
- Fix missing tools in logs by @afzalmushtaque in https://github.com/microsoft/autogen/pull/6532
- Update to stable Microsoft.Extensions.AI release by @stephentoub in https://github.com/microsoft/autogen/pull/6552
- fix: CodeExecutorAgent prompt misuse by @Dormiveglia-elf in https://github.com/microsoft/autogen/pull/6559
- Update README.md by @CakeRepository in https://github.com/microsoft/autogen/pull/6506
- fix:Prevent Async Event Loop from Running Indefinitely by @wfge in https://github.com/microsoft/autogen/pull/6530
- Update state.ipynb, fix a grammar error by @realethanyang in https://github.com/microsoft/autogen/pull/6448
- Add gemini 2.5 fash compatibility by @dmenig in https://github.com/microsoft/autogen/pull/6574
- remove superfluous underline in the docs by @peterychang in https://github.com/microsoft/autogen/pull/6573
- Add/fix windows install instructions by @peterychang in https://github.com/microsoft/autogen/pull/6579
- Add created_at to BaseChatMessage and BaseAgentEvent by @withsmilo in https://github.com/microsoft/autogen/pull/6557
- feat: Add missing Anthropic models (Claude Sonnet 4, Claude Opus 4) by @withsmilo in https://github.com/microsoft/autogen/pull/6585
- Missing UserMessage import by @AlexeyKoltsov in https://github.com/microsoft/autogen/pull/6583
- feat: [draft] update version of azureaiagent by @victordibia in https://github.com/microsoft/autogen/pull/6581
- Add support for specifying the languages to parse from the
CodeExecutorAgentresponse by @Ethan0456 in https://github.com/microsoft/autogen/pull/6592 - feat: bump ags version, minor fixes by @victordibia in https://github.com/microsoft/autogen/pull/6603
- note: note selector_func is not serializable by @bassmang in https://github.com/microsoft/autogen/pull/6609
- Use structured output for m1 orchestrator by @ekzhu in https://github.com/microsoft/autogen/pull/6540
- Parse backtick-enclosed json by @peterychang in https://github.com/microsoft/autogen/pull/6607
- fix typo in the doc distributed-agent-runtime.ipynb by @bhakimiy in https://github.com/microsoft/autogen/pull/6614
- Update version to 0.6.0 by @ekzhu in https://github.com/microsoft/autogen/pull/6624
New Contributors
- @mirpo made their first contribution in https://github.com/microsoft/autogen/pull/6528
- @ChrisBlaa made their first contribution in https://github.com/microsoft/autogen/pull/6460
- @WuhanMonkey made their first contribution in https://github.com/microsoft/autogen/pull/6442
- @afzalmushtaque made their first contribution in https://github.com/microsoft/autogen/pull/6532
- @stephentoub made their first contribution in https://github.com/microsoft/autogen/pull/6552
- @CakeRepository made their first contribution in https://github.com/microsoft/autogen/pull/6506
- @wfge made their first contribution in https://github.com/microsoft/autogen/pull/6530
- @realethanyang made their first contribution in https://github.com/microsoft/autogen/pull/6448
- @GeorgeEfstathiadis made their first contribution in https://github.com/microsoft/autogen/pull/6561
- @dmenig made their first contribution in https://github.com/microsoft/autogen/pull/6574
- @holtvogt made their first contribution in https://github.com/microsoft/autogen/pull/6556
- @AlexeyKoltsov made their first contribution in https://github.com/microsoft/autogen/pull/6583
- @bhakimiy made their first contribution in https://github.com/microsoft/autogen/pull/6614
Full Changelog: https://github.com/microsoft/autogen/compare/python-v0.5.7...python-v0.6.0