Guide

Monitor your Vercel AI SDK agents.

The Vercel AI SDK powers streaming, tool-calling agents in TypeScript. AgentPing wraps the run so one record lands with the cost, status and output behind it, streaming included.

Two lines, then every run reports in.

Install the SDK and point it at your Vercel AI SDK agent. One record lands per run with the cost, status, latency and output behind it.

shellinstall
npm install @agentping/sdk
typescriptmonitor your agent
import { init, run } from "@agentping/sdk";
import { generateText } from "ai";

init({ apiKey: "apk_…", agent: "copilot" });

// Wrap the call; the model usage rolls up into one run.
await run({ agent: "copilot" }, async () => {
  return await generateText({ model, prompt: "…" });
});

The wrap captures token usage from the AI SDK result and reports it as one run, including streamed responses. Full reference is in the docs.

What AgentPing tracks for Vercel AI SDK.

  • Cost per run, from the AI SDK token usage, attributed to the customer you tag.
  • A missed-run alert when a scheduled job stops running.
  • Output quality on the response, scored against your rubric.

See the pillars behind these: Spend, Pulse and Verify. For why teams monitor Vercel AI SDK with AgentPing, see the Vercel AI SDK integration.

Does it work with streaming?
Yes. The TypeScript SDK wraps streamText and generateText, so a streamed response is still one run with the full token usage and cost once it completes.
Does it run on the edge?
The SDK is non-blocking with a bounded queue and a hard timeout, so it is safe in serverless and edge runtimes; if AgentPing is unreachable your route runs unchanged.
Can I tag the customer?
Yes. Pass customer and feature when you open the run and spend is attributed that way across the dashboard.

Monitor your Vercel AI SDK agents in minutes.

Add the SDK, send one run, and watch cost, status and quality land in the dashboard.