token-budget-tracking

Official

Control multi-agent token spend with budgets.

Authorcosmicstack-labs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents runaway costs in production multi-agent LLM systems by tracking token usage, attributing spend, and enforcing budget limits before overages occur.

Core Features & Use Cases

  • Real-time token accounting with attribution: tracks prompt vs completion tokens and aggregates usage by agent and task to identify what’s costly.
  • Budget enforcement and reservation: applies per-agent and global (daily/weekly) token ceilings, blocking requests that would exceed limits.
  • Token optimization and proactive cost controls: compresses context, summarizes older history, and selects more cost-effective model tiers based on available budget.
  • Budget dashboards and alerting rules: generates current burn status, cost estimates, and threshold-based alerts (spikes, runaway detection, forecast notifications).
  • Use case: in an agent workflow that loops through research and code steps, allocate daily budgets per agent, detect a spike from one agent-task pair, compress context automatically, and switch to cheaper models for low-difficulty steps.

Quick Start

Ask your AI system to instrument token tracking, define per-agent and daily budgets, enable alerts at 80% spend, and run a budget-optimized request flow that compresses context when usage is near the limit.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: token-budget-tracking
Download link: https://github.com/cosmicstack-labs/mercury-agent-skills/archive/main.zip#token-budget-tracking

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.