Respan Exporter for Anthropic Agent SDK
Exporter for Anthropic Agent SDK telemetry to Respan.
Respan is a proxy and tracing platform. Your Respan API key authenticates both LLM inference (proxy) and telemetry export (tracing).
Configuration
1. Install
pip install claude-agent-sdk respan-exporter-anthropic-agents
2. Set Environment Variables
| Variable | Required | Description |
|---|---|---|
RESPAN_API_KEY |
Yes | Your Respan API key. Authenticates both proxy and tracing. |
RESPAN_BASE_URL |
No | Defaults to https://api.respan.ai. |
export RESPAN_API_KEY=your_respan_key
# export RESPAN_BASE_URL=https://api.respan.ai # default, only override if self-hosting
That's it. Everything else is derived:
- Proxy:
ANTHROPIC_BASE_URL=RESPAN_BASE_URL+/api/anthropic - Auth:
ANTHROPIC_API_KEY=RESPAN_API_KEY - Tracing: The exporter reads
RESPAN_API_KEYandRESPAN_BASE_URLautomatically.
Quickstart
3. Run Script
Save this as quickstart.py:
import asyncio
import os
from claude_agent_sdk import ClaudeAgentOptions
from respan_exporter_anthropic_agents import RespanAnthropicAgentsExporter
respan_api_key = os.environ["RESPAN_API_KEY"]
respan_base_url = os.getenv("RESPAN_BASE_URL", "https://api.respan.ai")
exporter = RespanAnthropicAgentsExporter()
async def main() -> None:
options = exporter.with_options(
options=ClaudeAgentOptions(
allowed_tools=["Read", "Glob", "Grep"],
permission_mode="acceptEdits",
env={
"ANTHROPIC_API_KEY": respan_api_key,
"ANTHROPIC_BASE_URL": f"{respan_base_url}/api/anthropic",
},
)
)
async for message in exporter.query(
prompt="Analyze this repository and summarize architecture.",
options=options,
):
print(message)
asyncio.run(main())
Run it:
python quickstart.py
4. View Dashboard
Open:
https://platform.respan.ai/platform/traces
Further Reading
Runnable examples with full setup instructions:
- Python examples root: python/tracing/anthropic-agents-sdk
- Python basic scripts:
- TypeScript examples root: typescript/tracing/anthropic-agents-sdk
Dev Guide
Running Tests
# Unit tests
python -m unittest tests.test_exporter -v
# Live integration test (opt-in, makes real API calls)
export RESPAN_API_KEY="your_respan_key"
export IS_REAL_GATEWAY_TESTING_ENABLED=1
python -m unittest tests.test_real_gateway_integration -v
Metadata
Release files for respan-exporter-anthropic-agents 1.0.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| respan_exporter_anthropic_agents-1.0.16.tar.gz | 9.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respan_exporter_anthropic_agents-1.0.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / respan_exporter_anthropic_agents-1.0.16.tar.gz
| Download URL | respan_exporter_anthropic_agents-1.0.16.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b48070a2350c361019c02eb0b07296f40b2e5ff10740e987e8bcb2e503fd074
|
|
BLAKE2b-256 checksum How to use checksums |
e5b4e76679be5b5a6748ea7173b26fe1628e4b3c8023a737b3b4ad79f092870b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.8 Darwin/25.2.0
|
Release files / respan_exporter_anthropic_agents-1.0.16-py3-none-any.whl
| Download URL | respan_exporter_anthropic_agents-1.0.16-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfd65d9967fccbdd633f57e3787e552ffd1157ec9404ad8ae61cd67a8587ebfc
|
|
BLAKE2b-256 checksum How to use checksums |
aa5b3aeecd7a5ee048904d292ac9146b58b98c6e23c835b013faa422aaf887d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.8 Darwin/25.2.0
|
Security for respan-exporter-anthropic-agents 1.0.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.