Releases: microsoft/autogen
v0.4.3
What's new
This is the first release since 0.4.0 with significant new features! We look forward to hearing feedback and suggestions from the community.
Chat completion model cache
One of the big missing features from 0.2 was the ability to seamlessly cache model client completions. This release adds ChatCompletionCache
which can wrap any other ChatCompletionClient
and cache completions.
There is a CacheStore
interface to allow for easy implementation of new caching backends. The currently available implementations are:
import asyncio
import tempfile
from autogen_core.models import UserMessage
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.models.cache import ChatCompletionCache, CHAT_CACHE_VALUE_TYPE
from autogen_ext.cache_store.diskcache import DiskCacheStore
from diskcache import Cache
async def main():
with tempfile.TemporaryDirectory() as tmpdirname:
openai_model_client = OpenAIChatCompletionClient(model="gpt-4o")
cache_store = DiskCacheStore[CHAT_CACHE_VALUE_TYPE](Cache(tmpdirname))
cache_client = ChatCompletionCache(openai_model_client, cache_store)
response = await cache_client.create([UserMessage(content="Hello, how are you?", source="user")])
print(response) # Should print response from OpenAI
response = await cache_client.create([UserMessage(content="Hello, how are you?", source="user")])
print(response) # Should print cached response
asyncio.run(main())
ChatCompletionCache
is not yet supported by the declarative component config, see the issue to track progress.
GraphRAG
This releases adds support for GraphRAG as a tool agents can call. You can find a sample for how to use this integration here, and docs for LocalSearchTool
and GlobalSearchTool
.
import asyncio
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.ui import Console
from autogen_ext.tools.graphrag import GlobalSearchTool
from autogen_agentchat.agents import AssistantAgent
async def main():
# Initialize the OpenAI client
openai_client = OpenAIChatCompletionClient(
model="gpt-4o-mini",
)
# Set up global search tool
global_tool = GlobalSearchTool.from_settings(settings_path="./settings.yaml")
# Create assistant agent with the global search tool
assistant_agent = AssistantAgent(
name="search_assistant",
tools=[global_tool],
model_client=openai_client,
system_message=(
"You are a tool selector AI assistant using the GraphRAG framework. "
"Your primary task is to determine the appropriate search tool to call based on the user's query. "
"For broader, abstract questions requiring a comprehensive understanding of the dataset, call the 'global_search' function."
),
)
# Run a sample query
query = "What is the overall sentiment of the community reports?"
await Console(assistant_agent.run_stream(task=query))
if __name__ == "__main__":
asyncio.run(main())
#4612 by @lspinheiro
Semantic Kernel model adapter
Semantic Kernel has an extensive collection of AI connectors. In this release we added support to adapt a Semantic Kernel AI Connector to an AutoGen ChatCompletionClient using the SKChatCompletionAdapter
.
Currently this requires passing the kernel during create, and so cannot be used with AssistantAgent
directly yet. This will be fixed in a future release (#5144).
#4851 by @lspinheiro
AutoGen to Semantic Kernel tool adapter
We also added a tool adapter, but this time to allow AutoGen tools to be added to a Kernel, called KernelFunctionFromTool
.
#4851 by @lspinheiro
Jupyter Code Executor
This release also brings forward Jupyter code executor functionality that we had in 0.2, as the JupyterCodeExecutor
.
Please note that this currently on supports local execution and should be used with caution.
Memory
It's still early on but we merged the interface for agent memory in this release. This allows agents to enrich their context from a memory store and save information to it. The interface is defined in core and AssistantAgent in agentchat accepts memory as a parameter now. There is an initial example memory implementation which simply injects all memories as system messages for the agent. The intention is for the memory interface to be able to be used for both RAG and agent memory systems going forward.
- Tutorial
- Core
Memory
interface - Existing
AssistantAgent
with new memory parameter
#4438 by @victordibia, #5053 by @ekzhu
Declarative config
We're continuing to expand support for declarative configs throughout the framework. In this release, we've added support for termination conditions and base chat agents. Once we're done with this, you'll be able to configure and entire team of agents with a single config file and have it work seamlessly with AutoGen studio. Stay tuned!
#4984, #5055 by @victordibia
Other
- Add sources field to TextMentionTermination by @Leon0402 in #5106
- Update gpt-4o model version to 2024-08-06 by @ekzhu in #5117
Bug fixes
- Retry multiple times when M1 selects an invalid agent. Make agent sel… by @afourney in #5079
- fix: normalize finish reason in CreateResult response by @ekzhu in #5085
- Pass context between AssistantAgent for handoffs by @ekzhu in #5084
- fix: ensure proper handling of structured output in OpenAI client and improve test coverage for structured output by @ekzhu in #5116
- fix: use tool_calls field to detect tool calls in OpenAI client; add integration tests for OpenAI and Gemini by @ekzhu in #5122
Other changes
- Update website for 0.4.1 by @jackgerrits in #5031
- PoC AGS dev container by @JohanForngren in #5026
- Update studio dep by @ekzhu in #5062
- Update studio dep to use version bound by @ekzhu in #5063
- Update gpt-4o model version and add new model details by @keenranger in #5056
- Improve AGS Documentation by @victordibia in #5065
- Pin uv to 0.5.18 by @jackgerrits in #5067
- Update version to 0.4.3 pre-emptively by @jackgerrits in #5066
- fix: dotnet azure pipeline (uv sync installation) by @bassmang in #5042
- docs: .NET Documentation by @lokitoth in #5039
- [Documentation] Update tools.ipynb: use system messages in the tool_agent_caller_loop session by @zysoong in #5068
- docs: enhance agents.ipynb with parallel tool calls section by @ekzhu in #5088
- Use caching to run tests and report coverage by @lspinheiro in #5086
- fix: ESPR dotnet code signing by @bassmang in #5081
- Update AGS pyproject.toml by @victordibia in #5101
- docs: update AssistantAgent documentation with a new figure, attention and warning notes by @ekzhu in #5099
- Rysweet fix integration tests and xlang by...
v0.4.2
- Change async input strategy in order to remove unintentional and accidentally added GPL dependency (#5060)
Full Changelog: v0.4.1...v0.4.2
v0.4.1
What's Important
- Fixed console user input bug that affects
m1
and other apps that use console user input. #4995 - Improved component config by allowing subclassing the
BaseComponent
class. #5017 To read more about how to create your own component config to support serializable components: https://microsoft.github.io/autogen/stable/user-guide/core-user-guide/framework/component-config.html - Fixed
stop_reason
related bug by making the stop reason setting more robust #5027 - Disable
Console
output statistics by default. - Minor doc fixes.
All Changes since v0.4.0
- Update magentic-one-cli version to 0.2.0 by @jackgerrits in #4973
- Update switcher versions and make 0.4.0 stable by @jackgerrits in #4940
- Fix version switcher rendering by @jackgerrits in #4974
- Don't show banner on stable by @jackgerrits in #4976
- Remove accidentally added character by @jackgerrits in #4980
- Update README.md to fix spelling error by @guinaut in #4982
- Minor API doc update for openai assistant agent by @ekzhu in #4986
- Add guidance for docstrings when adding an API by @jackgerrits in #4981
- Fix typo in
Multi-Agent Design Patterns -> Intro
docs by @timrogers in #4991 - Add missing py.typed in autogen_ext, fix type issue in core by @jackgerrits in #4993
- Minor Updates to AGS Docs by @victordibia in #5010
- Fix: Properly await
agent.run()
in READMEHello World
example by @Programmer-RD-AI in #5013 - Add python version requirement to frontpage and readme by @ekzhu in #5014
- Disable output usage stat summary in Console as the stats is often inaccurate. by @ekzhu in #5021
- Add AGS to README.md by @ekzhu in #5019
- fix: fix user input in m1 by @jackgerrits in #4995
- Typo in teams.ipynb by @SudhakarPunniyakotti in #5028
- fix: Normalize openai client stop reason to make more robust by @jackgerrits in #5027
- Add tiktoken as a dependency in pyproject.toml by @JohanForngren in #5008
- fix: Fix provider string for AzureTokenProvider by @jackgerrits in #4992
- Split apart component infra to allow for abstract class integration by @jackgerrits in #5017
- Update version to 0.4.1 by @jackgerrits in #5029
- Fixup autogen-ext version by @jackgerrits in #5030
New Contributors
- @guinaut made their first contribution in #4982
- @timrogers made their first contribution in #4991
- @Programmer-RD-AI made their first contribution in #5013
- @SudhakarPunniyakotti made their first contribution in #5028
- @JohanForngren made their first contribution in #5008
Full Changelog: v0.4.0...v0.4.1
v0.4.0
What's Important
🎉 🎈 Our first stable release of v0.4! 🎈 🎉
To upgrade from v0.2, read the migration guide. For a basic setup:
pip install -U "autogen-agentchat" "autogen-ext[openai]"
You can refer to our updated README for more information about the new API.
Major Changes from v0.4.0.dev13
- [New] Added m1 cli package by @afourney in #4949
- [New] Activate deactivate agents by @peterychang in #4800
- [New] Add coverage task & integrate with poe check by @srjoglekar246 in #4847
- [New] Move core samples to /python/samples by @ekzhu in #4911
- [New] feat: Add o1-2024-12-17 model by @bassmang in #4965
- [Breaking] fix!: Move azure auth provider to separate module by @jackgerrits in #4912
- [Breaking] feat!: Add message context to signature of intervention handler, add more to docs by @jackgerrits in #4882
- [Breaking] Remove deprecated items for release by @jackgerrits in #4927
Change Log from v0.4.0.dev13: v0.4.0.dev13...v0.4.0
New Contributors to v0.4.0
❤️ Big thanks to all the contributors since the first preview version was open sourced. ❤️
- @lspinheiro made their first contribution in #3652
- @husseinmozannar made their first contribution in #3714
- @NiklasGustafsson made their first contribution in #3727
- @maxgolov made their first contribution in #3758
- @vikas434 made their first contribution in #3770
- @tarockey made their first contribution in #3813
- @zboyles made their first contribution in #3855
- @markdouthwaite made their first contribution in #3871
- @gziz made their first contribution in #3876
- @SeryioGonzalez made their first contribution in #3901
- @rohanthacker made their first contribution in #3929
- @Ucoming made their first contribution in #3979
- @auphof made their first contribution in #3972
- @ReubenBond made their first contribution in #4034
- @maheshpec made their first contribution in #4070
- @mbaneshi made their first contribution in #4168
- @hasamm90 made their first contribution in #4170
- @tsinggggg made their first contribution in #4130
- @genlin made their first contribution in #4205
- @kkasemos made their first contribution in #4218
- @JMLX42 made their first contribution in #4201
- @ksachdeva made their first contribution in #4265
- @MervinPraison made their first contribution in #4280
- @thainduy made their first contribution in #4123
- @goyalpramod made their first contribution in #4149
- @kartikx made their first contribution in #4336
- @wi-ski made their first contribution in #4102
- @timparka made their first contribution in #4432
- @vballoli made their first contribution in #4548
- @eranco74 made their first contribution in #4639
- @hsm207 made their first contribution in #4655
- @iamarunbrahma made their first contribution in #4500
- @inbal2l made their first contribution in #4717
- @r-bit-rry made their first contribution in #4759
- @jspv made their first contribution in #4755
- @akurniawan made their first contribution in #4681
- @lanbaoshen made their first contribution in #4767
- @srjoglekar246 made their first contribution in #4801
- @richard-gyiko made their first contribution in #4826
- @kimmywork made their first contribution in #4732
- @Leon0402 made their first contribution in #4848
- @w121211 made their first contribution in #4874
- @PratyushNag made their first contribution in #4903
Changes from v0.2.36
- Use trusted publisher for pypi release by @jackgerrits in #3596
- Fix typos in Cerebras doc by @henrytwo in #3590
- Add blog post announcing the new architecture preview by @jackgerrits in #3599
- Fix dotnet test and reformat dotnet code by @LittleLittleCloud in #3603
- Update PR link in blog post by @jackgerrits in #3602
- Create CI to tag issues with needs triage by @jackgerrits in #3605
- Update Magentic-One Results by @afourney in #3611
- Update issue templates by @jackgerrits in #3610
- add logging to agentchat by @victordibia in #3606
- Add staging to workflow target; fix circular imports in autogen_agentchat by @ekzhu in #3651
- Add redirects from current website to /0.2/ by @jackgerrits in #3659
- Remove accidentally added files from 0.2 by @jackgerrits in #3661
- Try fix docs CI by @jackgerrits in #3660
- fix: remove subscription on client disconnect in worker runtime by @MohMaz in #3653
- Move tools to agent in
agentchat
; refactored logging to support tool events by @ekzhu in #3665 - [.Net] Remove merging primitive from .editorconfig and gitignore by @LittleLittleCloud in #3676
- Add poethepoet to dev deps by @jackgerrits in #3675
- Rysweet hello fix by @rysweet in #3683
- add a way to provide extra grpc options by @MohMaz in #3667
- Selector group chat that uses LLM to select the next speaker by @ekzhu in #3680
- Add Documentation for AgentChat by @victordibia in #3635
- Set logging of internal messages to debug by @ekzhu in #3694
- Lspinheiro/chore/migrate azure executor autogen ext by @lspinheiro in #3652
- remove broken sample and update readme quickstart for the good sample by @rysweet in #3687
- Website design tweaks by @jackgerrits in #3699
- Termination condition for agentchat teams by @ekzhu in #3696
- Rysweet dotnet folder moves by @rysweet in #3693
- add documentation for dotnet AutoGen 0.4 HellowWorld sample by @rysweet in #3698
- Add clarity to new site by @jackgerrits in #3704
- Documentation tweaks by @jackgerrits in #3705
- Add more FAQs to readme by @jackgerrits in #3707
- Include license file in package by @jackgerrits in #3703
- Update references by @jackgerrits in #3708
- Refactor logging in agentchat by @ekzhu in #3709
- New AutoGen Architecture Preview by @jackgerrits in #3600
- Fix output directory for website by @jackgerrits in #3712
- Update logo link by @jackgerrits in #3713
- Fix redirects taking into account base path by @jackgerrits in #3716
- Fix packages link by @jackgerrits in #3718
- Move from tomllib to tomli by @husseinmozannar in #3714
- Add workflow for package releases by @jackgerrits i...
v0.4.0.dev13
What's new
- An initial version of the migration guide is ready. Find it here! (#4765)
- Model family is now available in the model client (#4856)
Breaking changes
- Previously deprecated module paths have been removed (#4853)
SingleThreadedAgentRuntime.process_next
is now blocking and has moved to be an internal API (#4855)
Fixes
- Fix SingleThreadedAgentRuntime busy loop by @jackgerrits in #4855
- Fix BaseOpenAIChatCompletionClient token usage by @gziz in #4770
Doc changes
- Migration guide for 0.4 by @ekzhu in #4765
- Clarify tool use in agent tutorial by @ekzhu in #4860
- AgentChat tutorial update to include model context usage and langchain tool by @ekzhu in #4843
- Add missing model context attribute by @Leon0402 in #4848
Other
- Replace Tuple[type[ChatMessage], ...] with Sequence[type[ChatMessage]] by @ekzhu in #4857
- Make
register_factory
a user facing API by @jackgerrits in #4854 - Move intervention objects to root module by @jackgerrits in #4859
New Contributors
Full Changelog: v0.4.0.dev12...v0.4.0.dev13
v0.4.0.dev12
Important Changes
run
andrun_stream
now support a list of messages astask
input.- Introduces
AgentEvent
union type in AgentChat, for all messages that are not meant to be consumed by other agents. ReplaceAgentMessage
withAgentEvent | ChatMessage
union type in your code, e.g., in your custom selector function forSelectorGroupChat
and processing code forTaskResult.messages
. - Introduce
ToolCallSummaryMessage
toChatMessage
for tool call results from agents. Read AssistantAgent Doc - Introduce
ModelContext
parameter forAssistantAgent
, allow usage ofBufferedChatCompletionContext
to limit context window size sent to model. - Introduce
ComponentConfig
and add configuration loader forChatCompletionClient
. See Component Config - Moved
autogen_core.tools.PythonCodeExecutorTool
toautogen_ext.tools.code_execution.PythonCodeExecutionTool
. - Documentation updates.
Upcoming Changes
- Deprecating
@message_handler
. Use@event
or@rpc
to annotate handlers instead.@message_handler
will be kept with a deprecation warning until further notice. #4828 - Token counting mechanism bug fixes #4719
New Contributors
- @hsm207 made their first contribution in #4655
- @iamarunbrahma made their first contribution in #4500
- @inbal2l made their first contribution in #4717
- @r-bit-rry made their first contribution in #4759
- @jspv made their first contribution in #4755
- @akurniawan made their first contribution in #4681
- @lanbaoshen made their first contribution in #4767
- @srjoglekar246 made their first contribution in #4801
- @richard-gyiko made their first contribution in #4826
- @kimmywork made their first contribution in #4732
Full Changelog: v0.4.0.dev11...v0.4.0.dev12
v0.2.40
What's Changed
- Add warning message when NoEligibleSpeaker by @thinkall in #4535
- [Bug]: Bedrock client uses incorrect environment variables for authentication by @vaisakh-prod in #4657
- fix "keep_first_message" to make sure messages are in correct order, by @milkmeat in #4653
- fix: No context vars for async agents replies by @violonistahiles in #4640
- update version by @ekzhu in #4713
New Contributors
- @vaisakh-prod made their first contribution in #4657
- @milkmeat made their first contribution in #4653
- @violonistahiles made their first contribution in #4640
Full Changelog: v0.2.39...v0.2.40
v0.4.0.dev11
Important Changes:
autogen_agentchat.agents.AssistantAgent
behavior has been updated in dev10. It will not perform multiple rounds of tool calls -- only 1 round of tool call, followed by an optional reflection step to provide a natural language response. Please see the API doc forAssistantAgent
.- Module renamings:
autogen_core.base
-->autogen_core
autogen_core.application.SingleThreadedAgentRuntime
-->autogen_core.SingleThreadedAgentRuntime
.autogen_core.application.logging
-->autogen_core.logging
.autogen_core.components.*
-->autogen_core.*
, formodels
,model_context
,tools
,tool_agent
andcode_executor
.autogen_core.components.code_executor.LocalCommandLineCodeExecutor
-->autogen_ext.code_executors.local.LocalCommandLineCodeExecutor
autogen_agentchat.task.Console
-->autogen_agentchat.ui.Console
.autogen_agentchat.task.<termination conditions>
-->autogen_agentchat.conditions.<termination_conditions>
.autogen_ext.models
gets divided intoautogen_ext.models.openai
,autogen_ext.models.replay
.autogen_ext.agents
gets divided into separate submodules for each extension agent class.autogen_ext.code_executors
gets divided into separate submodules for each executor class.
New Contributors
Full Changelog: v0.4.0.dev9...v0.4.0.dev11
v0.2.39
What's Changed
- fix: GroupChatManager async run throws an exception if no eligible speaker by @leryor in #4283
- Bugfix: Web surfer creating incomplete copy of messages by @Hedrekao in #4050
New Contributors
Full Changelog: v0.2.38...v0.2.39
v0.2.38
What's Changed
- docs: fix bullet formatting for kubernetes pod executor by @lukehsiao in #3911
- Fix 0.2 Quickstart example llm_config issue by @victordibia in #4060
- Bugfix: Optional rate limiting by @kampernet in #4066
New Contributors
- @lukehsiao made their first contribution in #3911
- @kampernet made their first contribution in #4066
Full Changelog: v0.2.37...v0.2.38