Skip to main content
The Claude Agent SDK is Anthropic’s framework for building AI agents that can reason, use tools, and complete multi-step tasks. It includes built-in support for OpenTelemetry tracing, making it easy to capture detailed telemetry from your agent workflows. This quickstart shows how to send traces from your Claude Agent SDK (Python v0.1.18+, TypeScript v0.1.71+) applications to Scorecard for observability, debugging, and evaluation.
Using the standard Anthropic SDK? Check out the general Tracing Quickstart for the proxy method that works with any Anthropic client.

Steps

1

Set up environment variables

Configure the OpenTelemetry exporter to send traces to Scorecard. You’ll need your Scorecard API key from Settings.
Replace <your_scorecard_api_key> with your actual Scorecard API key (starts with ak_).
Optional: To send traces to a specific project, set the project ID:
If not set, traces will default to your oldest project in the organization.
2

Run your agent

With the environment variables configured, run your Claude Agent SDK application. All agent activity is automatically traced.
example.py
3

View traces in Scorecard

Navigate to the Records page in Scorecard to see your agent traces.
It may take 1-2 minutes for traces to appear on the Records page.
Records table showing Claude Agent SDK tracesRecords table showing Claude Agent SDK traces

Records page showing agent traces

Click on any record to view the full trace details, including the complete request/response data and model usage.
Trace details viewTrace details view

Trace details with request/response data and model usage

What Gets Traced

The Claude Agent SDK automatically captures:

Environment Variables Reference

Next Steps

Tracing Features

Learn about advanced tracing patterns and trace grouping

Metrics

Create custom metrics to evaluate agent performance

Trace to Testcase

Convert production traces into evaluation test cases