Convex Agents Usage Tracking

Tracks token usage and generates invoices for Convex agents via predefined mutations and queries.

1|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/AbrahamX3/hivio --skill convex-agents-usage-tracking-abrahamx3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Convex Agents Usage Tracking
Source: https://github.com/AbrahamX3/hivio/tree/main/.cursor/skills/convex-agents-usage-tracking
Command: npx skills add https://github.com/AbrahamX3/hivio --skill convex-agents-usage-tracking-abrahamx3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tracking token usage and costs across Convex agents to enable accurate billing, cost control, and resource optimization.

Core Features & Use Cases

  • Usage logging per user and per agent for transparent cost attribution
  • Automated invoice generation by billing period and status tracking
  • Analytics dashboards for cost trends, agent efficiency, and budgeting

Quick Start

Configure a Convex agent with a usageHandler and call recordUsage to start logging token usage and 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 token usage and costs for Convex agents?

Track token usage and costs for Convex agents by configuring a usageHandler and calling recordUsage to log consumption metrics. The Skill implements usage logging, cost calculations, and analytics queries to enable transparent cost attribution and monitoring.

Can I generate automated invoices based on Convex agent token consumption?

Yes, you can generate automated invoices for Convex agent token consumption. The Skill implements invoice generation by billing period and tracks invoice status using predefined Convex scheduled jobs and mutations.

Does this approach support per-user billing and cost analysis?

Yes, this approach supports per-user billing and cost analysis by logging usage metrics per user and per agent. It enables accurate cost attribution, agent efficiency comparisons, and budgeting through dedicated analytics queries.

What is the best way to compare agent efficiency using token consumption data?

The best way to compare agent efficiency is by using the Skill's analytics dashboards and queries to evaluate cost trends and token consumption across multiple Convex agents. This allows direct performance and resource optimization comparisons.

Do I need predefined Convex mutations to monitor agent usage?

Yes, you need predefined Convex mutations and queries to monitor agent usage effectively. The Skill relies on these native Convex functions alongside scheduled jobs to execute usage logging, cost calculations, and analytics tasks.

Why use scheduled jobs for monthly invoicing of agent token usage?

Use scheduled jobs for monthly invoicing because they automate invoice generation and status tracking across billing periods. This ensures accurate, recurring cost calculations without manual intervention for your Convex agents.