Guide
Mastra builds typed agents and workflows in TypeScript. AgentPing wraps the run, or rides Mastra's OpenTelemetry output, so one record lands per run with the cost, status and output behind it.
Install the SDK and point it at your Mastra 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";
init({ apiKey: "apk_…", agent: "mastra-agent" });
// Wrap the agent call; the model usage rolls up into one run.
await run({ agent: "mastra-agent" }, async () => {
return await agent.generate("…");
});
Mastra also emits OpenTelemetry; if you already export traces, point the OTLP exporter at AgentPing instead of wrapping calls. Full reference is in the docs.
Add the SDK, send one run, and watch cost, status and quality land in the dashboard.