Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microck/Convex Agents Usage Tracking
Tracks LLM token consumption and usage metrics for billing, monitoring, and optimization. Use this to log token usage, calculate costs, generate invoices, and understand which agents or users consume the most resources.
Passed 18 of 22 test cases with the skill, and 9 of 22 without it.
and 9 more in the full report
9 fixed9 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
When scheduling the generateMonthlyInvoices cron job in Convex crons.ts, what exact schedule execution parameters should be provided to crons.monthly?
| Checked | Without skill | With skill |
|---|---|---|
| Schedules the cron on day 2 of the month with hourUTC set to 0 and minuteUTC set to 0. | Missed | Passed |
The instructions your model reads when the skill loads.
Usage tracking records how many tokens each agent uses, enabling accurate billing, cost monitoring, and performance optimization. Essential for understanding LLM costs and user impact.
Create a handler to log usage:
// convex/agents/myAgent.ts
import { Agent } from "@convex-dev/agent";
import { components } from "../_generated/api";
import { openai } from "@ai-sdk/openai";
import { internal } from "../_generated/api";
const myAgent = new Agent(components.agent, {
name: "My Agent",
languageModel: openai.chat("gpt-4o-mini"),
usageHandler: async (ctx, args) => {
const {
userId,
threadId,
agentName,
model,
provider,
usage, // { inputTokens, outputTokens, totalTokens }
providerMetadata,
} = args;
test cases passed, vs 9 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.