Convex Agents Usage Tracking

Track LLM token usage and calculate costs for billing reports.

322|45|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Microck/ordinary-claude-skills --skill convex-agents-usage-tracking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Convex Agents Usage Tracking
Source: https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/convex-agents-usage-tracking
Command: npx skills add https://github.com/Microck/ordinary-claude-skills --skill convex-agents-usage-tracking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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.

Core Features & Use Cases

  • Usage logging: Record per-agent/token usage data for auditing and cost tracking.
  • Cost calculation: Compute approximate costs from token usage for invoices and dashboards.
  • Usage analytics: Analyze trends to optimize agent performance and resource allocation.

Quick Start

Configure a usage handler in your agent to log inputs, outputs, and total tokens, then query monthly usage by user to generate invoices.

Frequently Asked Questions about Convex Agents Usage Tracking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I track LLM token usage for billing and cost analysis?

Token usage tracking records input and output tokens consumed by agents or users, then calculates costs using defined rates to support invoicing, cost analysis, and resource optimization. Configure a usage handler to log tokens per agent or user across sessions, store daily records with billing periods, and query monthly usage data to generate invoices and cost reports.

Can I monitor token consumption by individual agent or user?

Yes, usage logging records per-agent and per-user token consumption for auditing and cost tracking. Query monthly usage by user or agent to identify which consumers use the most resources and allocate costs accordingly for billing and dashboards.

What's the best way to calculate LLM costs from token metrics?

Define token rates in your cost calculation configuration, then apply them to recorded input and output tokens to compute approximate costs. Store daily records with billing periods so you can generate invoices and cost reports for each billing cycle.

How do I set up usage alerts for high LLM token consumption?

Usage tracking collects and stores token metrics by agent, user, or team, enabling alerting on high usage thresholds. Analyze usage trends from the tracked data to set alerts and optimize agent performance based on resource consumption patterns.

Can I use token tracking to optimize agent performance?

Usage analytics analyze token consumption trends to identify inefficient agents or workflows. Use these insights to optimize agent performance and resource allocation by understanding which agents or users consume the most tokens.