Skip to main content

Ai Usage

@webframp/ai-usagev2026.05.12.1· 8d agoMODELS·WORKFLOWS·REPORTS
01README

Unified cross-provider AI token usage monitoring — workflow, model, and report that aggregates Bedrock, Vertex AI, and Azure OpenAI token data into a single view.

Gracefully handles partial provider configurations. Unconfigured providers are shown with setup hints in the report output.

Quick Start

# Pull the extension (also pulls provider dependencies)
swamp extension pull @webframp/ai-usage

# Configure providers you use (any subset works)
swamp model create @webframp/aws/bedrock-usage bedrock-usage \
  --global-arg 'profiles=["default"]' --global-arg 'regions=["us-east-1"]'

swamp model create @webframp/gcp/vertex-usage vertex-usage \
  --global-arg 'projects=["my-project"]'

swamp model create @webframp/azure/openai-usage azure-ai-usage \
  --global-arg 'subscriptions=["sub-id"]'

# Create the unified model
swamp model create @webframp/ai-usage ai-usage

# Check provider status
swamp model method run ai-usage status

# Run the full scan workflow
swamp workflow run @webframp/ai-usage-scan

# Or generate report from existing data
swamp model method run ai-usage generate

Methods

  • status — Check which providers are configured, with setup hints
  • generate — Produce unified report from collected scan data

Workflow

  • @webframp/ai-usage-scan — Orchestrates scan across all configured providers then generates the unified report

Report

  • @webframp/ai-usage-report — Workflow-scope report for standalone use
02Models1
@webframp/ai-usagev2026.05.12.1ai_usage.ts
fn status()
Check which provider models are configured and provide setup hints for unconfigured providers.
fn generate(days: number)
Generate a unified cross-provider AI usage report from collected scan data. Shows coverage status with setup hints for unconfigured providers.
ArgumentTypeDescription
daysnumberExpected lookback period

Resources

status(1h)— Provider configuration status
report(6h)— Unified cross-provider AI usage report
03Workflows1
@webframp/ai-usage-scan239ea328-2c6d-4e77-8790-cda67e5715fe

Scan AI token usage across all configured cloud providers (AWS Bedrock, GCP Vertex AI, Azure OpenAI) and generate a unified cross-provider report. Gracefully handles missing providers — unconfigured provider steps fail silently (allowFailure: true) and the report shows coverage gaps with setup hints.

scanCollect token usage from each configured provider
1.aws-bedrockbedrock-usage.scan_accounts— Scan AWS Bedrock token usage across profiles/regions
2.gcp-vertexvertex-usage.scan_projects— Scan GCP Vertex AI token usage across projects
3.azure-openaiazure-ai-usage.scan_subscriptions— Scan Azure OpenAI token usage across subscriptions
reportGenerate unified cross-provider usage report
1.generateai-usage.generate— Aggregate scan data into unified report with coverage hints
04Reports1
@webframp/ai-usage-reportworkflow
ai_usage_report.ts

Cross-provider AI token usage report with coverage status, per-provider breakdown, and highlights

aitoken-usagefinopsmonitoring
05Stats
A
100 / 100
Downloads
1
Archive size
15.8 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels