Skip to content

Conversation

@rayrayraykk
Copy link
Member

@rayrayraykk rayrayraykk commented Nov 7, 2025

Description

Introduce AgentScope Context Adapter

Change List

  • Memory Adapter
  • Long Term Memory Adapter
  • State Adapter
  • Remove RAG Service
  • Support custom_build_fn

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Engine
  • Sandbox
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Copilot AI review requested due to automatic review settings November 7, 2025 09:18
@rayrayraykk rayrayraykk added the Agent Agent related label Nov 7, 2025
Copy link
Contributor

Copilot AI left a 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.py into a new adapters/agentscope/message.py module
  • Created a new AgentScopeSessionHistoryMemory adapter class that integrates AgentScope's memory interface with the runtime's SessionHistoryService
  • Added deprecation warning to ContextComposer class 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.

@rayrayraykk rayrayraykk added the enhancement New feature or request label Nov 7, 2025
@rayrayraykk rayrayraykk changed the title [WIP] [Breaking Change] Introduce AgentScope Memory Adapter [Breaking Change] Introduce AgentScope Memory Adapter Nov 7, 2025
@rayrayraykk rayrayraykk changed the title [Breaking Change] Introduce AgentScope Memory Adapter [Breaking Change] Introduce AgentScope Context Adapter Nov 11, 2025
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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.

@rayrayraykk rayrayraykk merged commit 0ca6bd4 into agentscope-ai:main Nov 12, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agent Agent related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants