Monitor your Vercel AI SDK features in production.

AI features shipped with the Vercel AI SDK serve real users in your product. Agent Ping wraps your calls so each one becomes a run record with cost, status and optional quality, attributed to the customer and feature.

Production AI in Vercel AI SDK fails quietly.

A Vercel AI SDK feature lives in your product, called by real users. When the AI bill moves, you need to know which feature and which customer drove it, and when a feature starts returning weaker answers, you want to know before the support queue does.

Wire it up in a few lines.

Start a run and spread withAgentPing into the call. It wires the AI SDK's onFinish callback, so a call lands as one model call plus a row for each tool the model used, and a streamed generation is captured once the stream completes.

Install

install Vercel AI SDK
npm install @agentping/sdk

Instrument

example · typescript Vercel AI SDK
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import * as agentping from "@agentping/sdk";

agentping.init({ apiKey: process.env.AGENTPING_API_KEY });

// One run per call, attributed to the customer and feature.
const run = agentping.run("copilot", { customerId: "acme-corp", feature: "summarise" });

const { text } = await generateText({
  model: openai("gpt-4o-mini"),
  prompt: "…",
  ...agentping.withAgentPing(run),
});

await run.finish({ status: "success" });

Full setup, environment variables and options are in the Vercel AI SDK docs.

What Agent Ping tracks for Vercel AI SDK.

  • Cost per run, attributed to the customer and feature you tag.
  • Run status and latency for every AI call in the product.
  • Cost spike alerts when a feature breaks its baseline.
  • Output quality checks so a regression is caught early.
  • Streaming-aware: a streamed response is still one clean run record.

A Vercel AI SDK dashboard, per feature and per customer.

Vercel shows you function invocations and your provider shows you a token total. Neither tells you which feature or customer a call was for, or whether the answers are getting worse. That is what the Agent Ping dashboard is built around.

Every call, with its cost

Each generateText or streamText call lands as a run with the provider and model taken from the AI SDK's response, input and output tokens summed across every step, cached and reasoning tokens when reported, the finish reason and the latency. Agent Ping prices it from a maintained rate card, so the cost column is there without any maths in your code.

The tools the model used

Each tool the model called appears on the run with its arguments and result, and a tool that errored is marked as an error. Turn on perStep and a tool-using call shows each model round trip separately, so you can see which step was the expensive one.

Spend by feature and by customer

Tag the run with customerId and feature and the cost views break down that way: which AI feature in your product costs the most, which accounts drive it, and how both are trending against their baseline.

Quality and failures next to cost

With scoring on, a sampled share of runs is judged against your rubric, so a weaker answer shows up as a falling line next to the cost line. A call that throws before onFinish never reaches the helper, so finish the run with an error status in your catch block and failures show up beside the rest.

What you see in the dashboard.

  • A run list for Vercel AI SDK, each row showing cost, status and latency, filterable by agent, customer and feature.
  • Cost by agent, customer and feature, so you can see which accounts and features drive AI spend, not just one provider total.
  • An incident the moment a scheduled run misses its window or a cost spike breaks its baseline, delivered to Slack, email, PagerDuty or a webhook.
  • A quality trend once you turn on scoring, so a regression in your Vercel AI SDK output shows up as a falling line, not a support ticket.
Does it handle streaming responses?
Yes. A streamed generation is captured as a single run with its tokens, cost and final output, so streaming does not fragment your cost or quality data.
Can I attribute cost to the end customer?
Yes. Tag the run with the customer and feature, and the cost of that AI feature rolls up per customer, so you can see whether your pricing covers the cost of serving them.
What does it cost to monitor Vercel AI SDK?
There is a free plan with no card and no time limit, enough to wire up your first agents. Paid plans start at $99/month with named limits and no metered billing, so the bill never surprises you. Annual billing is two months free.
Does Agent Ping see my prompts and outputs?
Only if you choose to send them. By default Agent Ping prices runs from model and token counts and tracks status and timing, which needs no prompt or output content. Payload capture for quality scoring is opt-in and configurable per agent.

Monitor your Vercel AI SDK AI workflows.

Send one run from Vercel AI SDK and see cost, status and latency. Then add an alert for cost spikes or missed runs.

Step-by-step guide: monitor Vercel AI SDK agents → Spend, cost attribution → Verify, quality scoring → Pulse, live monitoring →