Convex Agents Usage Tracking

Tracks LLM token usage and costs via usageHandler with billing-period persistence and cron invoicing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/danmarauda/agent-alias-configurator --skill convex-agents-usage-tracking-danmarauda
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Convex Agents Usage Tracking
Source: https://github.com/danmarauda/agent-alias-configurator/tree/main/convex-skills-main/convex-agents-usage-tracking
Command: npx skills add https://github.com/danmarauda/agent-alias-configurator --skill convex-agents-usage-tracking-danmarauda

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill tracks LLM token consumption and usage metrics for billing, monitoring, and optimization, enabling precise cost accounting and performance analysis across agents and users.

Core Features & Use Cases

  • Recording per-call token usage and costs via a usageHandler to power billing, invoices, and analytics.
  • Aggregated reporting by user, agent, and time period to identify cost drivers and optimize resource allocation.
  • Automated invoicing workflows and alerts for usage exceedance to streamline financial operations.

Quick Start

Run your convex agents with a usageHandler to automatically log per-call usage and generate per-user cost reports.

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 and costs for per-user billing?▼

You can track LLM token usage and costs by running your agents with a usageHandler that automatically logs per-call consumption, enabling precise per-user billing and cost reporting.

What's the best way to automate agent billing and monthly invoicing for token consumption?▼

Automating agent billing is handled through a cron-based invoice generator that aggregates logged token usage and associated costs into monthly invoices for streamlined financial operations.

Can I compare agent performance by analyzing token costs across different users and time periods?▼

Yes, you can compare agent performance through aggregated reporting by user, agent, and billing period, which identifies cost drivers and helps optimize resource allocation across your agents.

Does this usage tracking approach support automated alerts for usage exceedance?▼

Yes, the usage tracking approach supports automated alerts for usage exceedance, allowing you to monitor token consumption thresholds and streamline financial operations proactively.

Do I need a specific database setup to persist token usage data and billing periods?▼

You need a database environment that supports persisting token usage data with defined billing periods, enabling the usageHandler to log records and the cron-based invoice generator to query them.

How does the usageHandler mechanism work for logging LLM agent calls?▼

The usageHandler mechanism works by intercepting LLM agent calls to record per-call token usage and associated costs, persisting the data with billing periods for subsequent queries and automated invoicing.