Vercel AI SDK logo + P
Integration

Observe, evaluate, and improve your Vercel AI SDK agents

Capture every Vercel AI SDK run through its own telemetry integration interface — the same lifecycle hooks the SDK uses for its own instrumentation, not a bolted-on tracer.

What Prefactor records from Vercel AI SDK

model calls (onLanguageModelCallStart / onLanguageModelCallEnd)tool executions (onToolExecutionStart / onToolExecutionEnd)step boundaries (onStepStart / onStepEnd)generateText / streamText run (onStart / onEnd, onAbort, onError)

Vercel AI SDK + Prefactor

How the Vercel AI SDK integration works

See setup + the install snippet →

Vercel AI SDK integration FAQ

Do I need a dedicated package for Vercel AI SDK?

Vercel AI SDK has a native package (@prefactor/ai) that registers as a Telemetry integration; you can also instrument it today with the framework-agnostic prefactor-core SDK.

What does Prefactor capture from Vercel AI SDK?

Prefactor hooks the SDK's own telemetry lifecycle — onStart/onEnd, onStepStart/onStepEnd, onLanguageModelCallStart/End, and onToolExecutionStart/End — as structured, timestamped spans, so every Vercel AI SDK run is captured as trace data you can reconstruct, search and export end to end.

Does Prefactor add latency or change how Vercel AI SDK runs?

No. Observability capture is designed to stay off your agent's critical path, so it doesn't alter your Vercel AI 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 Vercel AI 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 Vercel AI SDK agents.

Related guides

See it on your Vercel AI SDK agents

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