Respan instrumentation plugin for AgentScope
Project description
respan-instrumentation-agentscope
Respan instrumentation plugin for AgentScope.
This package patches AgentScope 2.x agent, chat-model, and toolkit execution surfaces and emits Respan-compatible OpenTelemetry spans directly.
Configuration
1. Install
pip install respan-instrumentation-agentscope
2. Set Environment Variables
| Variable | Required | Description |
|---|---|---|
RESPAN_API_KEY |
Yes | Your Respan API key for trace export. |
RESPAN_BASE_URL |
No | Defaults to https://api.respan.ai/api. |
Quickstart
import os
from dotenv import load_dotenv
from respan import Respan
from respan_instrumentation_agentscope import AgentScopeInstrumentor
load_dotenv()
respan = Respan(
api_key=os.environ["RESPAN_API_KEY"],
base_url=os.getenv("RESPAN_BASE_URL", "https://api.respan.ai/api"),
instrumentations=[AgentScopeInstrumentor()],
)
# Build and run AgentScope agents as usual.
respan.flush()
What Is Captured
- Agent
reply()andreply_stream()calls asagentspans. - Chat model calls as
chatspans with canonicalgen_ai.*,llm.*, andtraceloop.*fields. - Toolkit
call_tool()execution astoolspans.
The instrumentor does not emit off-contract shortcut attributes such as
tools, tool_calls, model, prompt_tokens, or respan.span.tool_calls.
Further Reading
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file respan_instrumentation_agentscope-0.1.0.tar.gz.
File metadata
- Download URL: respan_instrumentation_agentscope-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45bbc2019bcd14b06eb72cd960eb191c5936a20d27a8914366cf82b1c52b2c5a
|
|
| MD5 |
7eeadbd6915669d8536442d80622e393
|
|
| BLAKE2b-256 |
bef927bfb595063b3ccac3057bae7cb77d2b7be086ded8035eea328094bcaf23
|
File details
Details for the file respan_instrumentation_agentscope-0.1.0-py3-none-any.whl.
File metadata
- Download URL: respan_instrumentation_agentscope-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5480eb7e8018c81f49c21761ffb3ef4b27197620a4d7918b307f694a3906e4d
|
|
| MD5 |
1dc23bb37417850c425fafd637f5ba48
|
|
| BLAKE2b-256 |
9ca98719df43a09c829598292979f8cf045e31847dffb397737445e77109e277
|