@anthropic-ai/claude-agent-sdk by pointing the engine’s
OpenTelemetry export at RunAgain. For guaranteed token/cost columns you can also wrap
each run in a manual span with the runagain SDK.
Install
Configure
.env.local
Point the engine at RunAgain
The Claude Agent SDK runs the Claude Code engine, which can export its own OTLP spans. Pass RunAgain’s endpoint + key into the query’senv and it streams runs, tool calls
and tokens to your project:
agent.ts
Guaranteed token & cost columns
The engine’s beta export can lag; to always land the numeric columns (and add your own identity/metadata), initialize therunagain SDK once at startup and wrap each run in an
invoke_agent span, reading token usage off the SDK’s result message:
execute_tool spans, error handling) lives in the
runagain-test-agents harness (src/agents/claude).