Skip to content

feat(agentscope): support AgentScope v2#208

Open
sipercai wants to merge 2 commits into
mainfrom
feat/agentscope-v2-support
Open

feat(agentscope): support AgentScope v2#208
sipercai wants to merge 2 commits into
mainfrom
feat/agentscope-v2-support

Conversation

@sipercai

@sipercai sipercai commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes #207

This PR makes the AgentScope instrumentation version-aware and adds AgentScope v2 support while preserving the existing AgentScope v1 path.

The v1 monkey-patch implementation is kept behind lazy imports and continues to run for agentscope >= 1.0.0, < 2.0.0. AgentScope v2 uses the framework's Agent middleware hooks to emit LoongSuite GenAI telemetry for agent replies, model calls, and tool execution through opentelemetry.util.genai helpers.

It also adds a dedicated v2 tox environment with VCR-recorded e2e coverage for non-streaming, streaming, and concurrent Agent calls.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • tox -e precommit
  • uvx tox -c tox-loongsuite.ini -e py311-test-loongsuite-instrumentation-agentscopev2
  • uvx tox -c tox-loongsuite.ini -e py311-test-loongsuite-instrumentation-agentscope-latest
  • uvx tox -c tox-loongsuite.ini -e lint-loongsuite-instrumentation-agentscope

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AgentScope instrumentation should cap v1 and define v2 support strategy

4 participants