Guide
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.
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.
npm install @agentping/sdk
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.
See the pillars behind these: Spend, Pulse and Verify. For why teams monitor Vercel AI SDK with AgentPing, see the Vercel AI SDK integration.
Add the SDK, send one run, and watch cost, status and quality land in the dashboard.