agentscope
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "agentscope" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5389245e8550a8cf252d518f79defeddfc79d4cf7129f63b787ce21dd885e265. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
AgentScope agent observability: for building transparent, observable AI agents with full execution tracing and debugging capabilities. Suitable for production-grade agents that require observability, debugging complex agent behavior, and creating agents with audit trails.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: agentscope
description: >-
Build transparent, observable AI agents using AgentScope — agents you can see, understand,
and trust with full execution tracing and debugging. Use when: building production agents
that need observability, debugging complex agent behaviors, creating agents with audit trails.
license: Apache-2.0
compatibility: "Python 3.10+ or Node.js 18+"
metadata:
author: terminal-skills
version: "1.0.0"
category: data-ai
tags:
- agents
- observability
- debugging
- tracing
- productionAgentScope
Build transparent, observable AI agents using AgentScope — a framework for creating agents you can see, understand, and trust with full execution tracing and debugging.
Overview
AgentScope provides three pillars of observability for AI agents: execution tracing (every step recorded with inputs, outputs, timing), decision logging (why the agent chose action A over B), and live debugging (inspect, pause, and replay agent executions). It integrates with monitoring stacks like OpenTelemetry, Prometheus, Datadog, and Grafana.
Instructions
Installation
pip install agentscope
Or with Node.js:
npm install agentscope
Basic Agent with Tracing
from agentscope import Agent, Tracer
tracer = Tracer(output="./traces/")
agent = Agent(
name="research-assistant",
model="claude-sonnet-4-20250514",
tracer=tracer,
)
result = agent.run("Summarize the key findings from this paper")
trace = tracer.latest()
print(f"Steps: {trace.step_count}")
print(f"Duration: {trace.duration_ms}ms")
print(f"Tokens used: {trace.total_tokens}")
for step in trace.steps:
print(f" [{step.type}] {step.name}: {step.duration_ms}ms")
print(f" Input: {step.input[:100]}...")
print(f" Output: {step.output[:100]}...")
Decision Logging
Track why an agent made specific choices:
from agentscope import Agent, DecisionLogger
logger = DecisionLogger(
log_alternatives=True,
log_reasoning=True,
)
agent = Agent(
name="trading-agent",
model="claude-sonnet-4-20250514",
decision_logger=logger,
tools=["market-data", "portfolio", "trade-executor"],
)
result = agent.run("Review portfolio and suggest rebalancing")
for decision in logger.decisions:
print(f"Decision: {decision.action}")
print(f"Reasoning: {decision.reasoning}")
for alt in decision.alternatives:
print(f" - {alt.action} (score: {alt.score:.2f}, rejected: {alt.rejection_reason})")
Multi-Agent Observability
from agentscope import AgentTeam, Tracer, Dashboard
tracer = Tracer(output="./traces/")
team = AgentTeam(
agents=[
Agent(name="researcher", model="claude-sonnet-4-20250514", role="research"),
Agent(name="analyst", model="claude-sonnet-4-20250514", role="analysis"),
Agent(name="writer", model="claude-sonnet-4-20250514", role="writing"),
],
tracer=tracer,
coordination="sequential",
)
result = team.run("Create a market analysis report for Q4 2025")
for message in tracer.messages():
print(f"[{message.sender} → {message.receiver}] {message.content[:80]}...")
dashboard = Dashboard(tracer)
dashboard.serve(port=8080)
Structured Audit Trails
from agentscope import Agent, AuditTrail
audit = AuditTrail(
storage="./audit_logs/",
format="jsonl",
include_timestamps=True,
redact_pii=True,
)
agent = Agent(
name="claims-processor",
model="claude-sonnet-4-20250514",
audit_trail=audit,
)
result = agent.run("Process insurance claim #12345")
report = audit.export(
trace_id=result.trace_id,
format="pdf",
include_decisions=True,
)
report.save("audit-claim-12345.pdf")
OpenTelemetry Integration
from agentscope import Agent, Tracer
from agentscope.exporters import OTelExporter
exporter = OTelExporter(
endpoint="http://localhost:4317",
service_name="my-agent-service",
)
tracer = Tracer(exporters=[exporter])
agent = Agent(name="support-agent", model="claude-sonnet-4-20250514", tracer=tracer)
# Traces automatically appear in Jaeger/Grafana/Datadog
Examples
Example 1: Debug a Multi-Agent Research Pipeline
from agentscope import AgentTeam, Tracer, Replayer
tracer = Tracer(output="./traces/")
team = AgentTeam(
agents=[
Agent(name="researcher", model="claude-sonnet-4-20250514", role="research"),
Agent(name="analyst", model="claude-sonnet-4-20250514", role="analysis"),
],
tracer=tracer,
)
result = team.run("Analyze Q4 revenue trends for FAANG companies")
# Replay and inspect each step
trace = tracer.latest()
replayer = Replayer(trace)
for step in replayer:
print(f"Step {step.index}: {step.name} — {step.duration_ms}ms")
if step.is_decision:
print(f" Chose: {step.decision.action}, Alternatives: {len(step.decision.alternatives)}")
Example 2: Production Audit Trail for Insurance Claims
from agentscope import Agent, AuditTrail
from agentscope.exporters import PrometheusExporter
audit = AuditTrail(storage="./audit_logs/", format="jsonl", redact_pii=True)
metrics = PrometheusExporter(port=9090)
agent = Agent(
name="claims-processor",
model="claude-sonnet-4-20250514",
audit_trail=audit,
tracer=Tracer(exporters=[metrics]),
)
result = agent.run("Process insurance claim #67890 for water damage — $12,400")
report = audit.export(trace_id=result.trace_id, format="pdf", include_decisions=True)
report.save("audit-claim-67890.pdf")
# Prometheus exposes: agent_step_duration_seconds, agent_total_tokens, agent_error_count
Guidelines
- Enable
log_alternatives=Trueduring development to understand agent decision-making - Use the Dashboard web UI for visual debugging — much easier than reading JSON traces
- Set
redact_pii=Truein production to avoid logging sensitive data - OpenTelemetry export integrates with existing monitoring stacks (Datadog, Grafana, New Relic)
- For multi-agent systems, trace inter-agent messages to find communication bottlenecks
- Execution replay is invaluable for reproducing bugs — save traces from production errors
- Keep audit trail storage separate from application logs for compliance isolation
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供生产级智能体的完整可观测性解决方案,解决AI黑盒问题
- 支持执行追踪、决策日志和实时调试三大核心功能
- 适用于保险理赔、金融交易等需要审计追踪的关键业务场景
Highlights
- 触发词精准覆盖构建可观测智能体、调试复杂行为、创建审计追踪等核心场景
- 适用场景描述清晰,边界明确,不易与其他Skill混淆
Highlights
- 文档结构完整,包含概述、安装、基础用法、高级功能、示例和指南
- 提供了多个端到端代码示例,涵盖单智能体、多智能体和集成场景
- frontmatter信息完整,包含兼容性、许可证和元数据
Highlights
- 提供了完整的Python和Node.js安装与使用说明
- 代码示例参数正确,覆盖了追踪、决策日志、审计追踪等主要功能
- 集成了OpenTelemetry、Prometheus等主流监控栈,可靠性高
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Save or modify files
Confirm the output directory and whether existing files will be replaced. Back up important files and prefer a new output directory.
Mentioned in main document · lines 148, 212 -
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 34, 40
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
- localhost
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.