Install
openclaw skills install agent-usage-trackerTrack AI agent token usage, model costs, and budget thresholds with a TypeScript and SQLite workflow. Use when the user wants to instrument agent runs, calcu...
openclaw skills install agent-usage-trackerUse this skill when you need local token accounting for AI agents.
src/UsageTracker.ts: ingestion, storage, and reportingsrc/CostCalculator.ts: pricing catalog and cost mathsrc/BudgetManager.ts: budget policy evaluationexamples/basic-usage.ts: end-to-end usage exampletests/: reference behavior for tracking, budgeting, and aggregationUsageTracker with a SQLite path or :memory: for tests.CostCalculator.BudgetManager.setBudget, then call evaluateBudget before or after new work to warn or stop when a limit is exceeded.UsageTracker.getUsageSummary or getTimeSeries for reporting.metadata for provider-specific fields such as request id or tool name.startTime and endTime before dispatching new work.This skill ships as a local Node.js package with tests and examples. Extend CostCalculator if your provider pricing changes.