Claude Agent SDK logo + P
Integration

Observe, evaluate, and improve your Claude Agent SDK agents

Capture every Claude Agent SDK tool call through the same hooks the SDK itself exposes for permission control — PreToolUse and PostToolUse — not a separate interception layer.

What Prefactor records from Claude Agent SDK

agent turnstool use (PreToolUse / PostToolUse hooks)sub-agent callsLLM calls

Claude Agent SDK + Prefactor

How the Claude Agent SDK integration works

See setup + the install snippet →

Claude Agent SDK integration FAQ

Do I need a dedicated package for Claude Agent SDK?

Claude Agent SDK has a native package (@prefactor/claude); you can also instrument it today with the framework-agnostic prefactor-core SDK.

What does Prefactor capture from Claude Agent SDK?

Prefactor records agent turns, tool use, sub-agent calls and LLM calls as structured, timestamped spans — so every Claude Agent SDK run is captured as trace data you can reconstruct, search and export end to end.

Does Prefactor add latency or change how Claude Agent SDK runs?

No. Observability capture is designed to stay off your agent's critical path, so it doesn't alter your Claude Agent SDK logic or your users' responses. The only part that acts inline is the optional runtime guardrails you enable per agent — by design, so a high-risk or low-confidence action can be held for human approval before it executes.

Can I evaluate agents built with Claude Agent SDK and catch regressions?

Yes. Once runs are captured, eval suites score quality and groundedness on real traffic, drift detection flags behaviour changes after deployment, and versioned eval history catches regressions before they ship — the observe → evaluate → improve loop applied to your Claude Agent SDK agents.

Related guides

See it on your Claude Agent SDK agents

Book a 15-minute setup and our team gets you tracing in production.