Convex Agents Usage Tracking
Installation
SKILL.md
Purpose
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.
When to Use This Skill
- Billing users based on token consumption
- Monitoring API costs
- Optimizing agent efficiency
- Tracking usage by user, agent, or team
- Generating invoices and cost reports
- Alerting on high usage
- Analyzing cost trends
How to Use It
1. Configure Usage Handler
Create a handler to log usage: