Fix #6227 - Add MessageStore abstraction for external message persistence in all 5 team types#7863
Open
Whning0513 wants to merge 1 commit into
Open
Fix #6227 - Add MessageStore abstraction for external message persistence in all 5 team types#7863Whning0513 wants to merge 1 commit into
Whning0513 wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add MessageStore base class abstraction for storing message thread in teams
Feature request from maintainer ekzhu: Add a simple storage abstraction for
message_threadwith a TTL policy parameter. This enables teams to persist their message history externally (e.g., to databases or other storage backends) rather than keeping it only in memory.Filed by: ekzhu (maintainer)
Teams stored message history solely in memory within
BaseGroupChatManager. There was no abstraction layer to support external persistence, which limited scalability and recovery capabilities for long-running conversations.11 files changed, primarily:
File 1:
python/packages/autogen-agentchat/src/autogen_agentchat/storage/_message_store.py(new)MessageStorebase class with TTL policy supportFile 2:
python/packages/autogen-agentchat/src/autogen_agentchat/storage/__init__.pyMessageStoreclassFiles 3-11: Team implementations
_base_group_chat.py,_base_group_chat_manager.py,_events.pyRoundRobinGroupChat(_round_robin_group_chat.py),SelectorGroupChat(_selector_group_chat.py),SwarmGroupChat(_swarm_group_chat.py),MagenticOneGroupChat(_magentic_one_group_chat.py,_magentic_one_orchestrator.py),DiGraphGroupChat(_digraph_group_chat.py)message_storeparameter and uses it for message persistenceLow - The new
MessageStoreabstraction is entirely opt-in through an optional constructor parameter. Teams that do not provide amessage_storecontinue to use the default in-memory behavior with no changes. New storage implementations can be added without modifying team code.