-
Notifications
You must be signed in to change notification settings - Fork 78
[Breaking Change] Introduce AgentScope Context Adapter #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Breaking Change] Introduce AgentScope Context Adapter #186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the AgentScope integration by extracting message and memory conversion logic into dedicated adapter modules. The changes improve code organization and maintainability by separating concerns and reducing code duplication.
Key changes:
- Extracted message conversion logic from
agentscope_agent.pyinto a newadapters/agentscope/message.pymodule - Created a new
AgentScopeSessionHistoryMemoryadapter class that integrates AgentScope's memory interface with the runtime's SessionHistoryService - Added deprecation warning to
ContextComposerclass indicating removal in version 1.0 - Updated agent code to use the new adapter modules
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/agentscope_runtime/engine/services/context_manager.py |
Added deprecation warning to ContextComposer.__init__ |
src/agentscope_runtime/engine/runner.py |
Fixed reference from context.agent to self._agent and added TODO comment |
src/agentscope_runtime/engine/agents/agentscope_agent.py |
Removed inline message converter, refactored to use new adapter modules |
src/agentscope_runtime/adapters/agentscope/message.py |
New module with bidirectional message conversion functions |
src/agentscope_runtime/adapters/agentscope/memory/_memory_adapter.py |
New memory adapter implementing AgentScope memory interface |
src/agentscope_runtime/adapters/agentscope/memory/__init__.py |
Module initialization exposing AgentScopeSessionHistoryMemory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/agentscope_runtime/adapters/agentscope/memory/_memory_adapter.py
Outdated
Show resolved
Hide resolved
src/agentscope_runtime/adapters/agentscope/memory/_memory_adapter.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 34 out of 36 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/agentscope_runtime/engine/deployers/utils/service_utils/service_factory.py
Show resolved
Hide resolved
src/agentscope_runtime/adapters/agentscope/long_term_memory/_long_term_memory_adapter.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 39 out of 41 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Introduce AgentScope Context Adapter
Change List
custom_build_fnType of Change
Component(s) Affected
Checklist