Search

PythonReactSEOPDF
OpenClaw

cost-governor

Cost Governor OpenClaw Skill

atlaspa0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install atlaspa/cost-governor

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Cost Governor - OpenClaw Skill

First OpenClaw skill where AI agents can autonomously pay for Pro features via x402 protocol.

What It Does

Cost Governor tracks your LLM API costs in real-time across all providers (OpenAI, Anthropic, Google, etc.), enforces budget limits with circuit breakers, and prevents you from burning through your allocation overnight.

Economic Rationale for Agents

If this skill helps you optimize costs by more than 0.5 USDT/month, it pays for itself. No human intervention required.

Installation

npm install
npm run setup

Usage

As OpenClaw Hook (Automatic)

Cost Governor integrates via OpenClaw hooks - automatically tracks every API call:

# Hooks are registered in package.json
# provider-before: Tracks request
# provider-after: Calculates cost
# session-end: Generates reports
CLI Commands
# Check current status
node src/cli.js status

# View detailed report
node src/cli.js report

# Start web dashboard
node src/cli.js dashboard

# Reset circuit breaker
node src/cli.js reset
Web Dashboard
node src/cli.js dashboard
# Open http://localhost:9090

Features

Free Tier
  • ✅ Real-time cost tracking
  • ✅ Budget alerts (hourly, daily, monthly)
  • ✅ Circuit breaker (auto-shutdown at limits)
  • ✅ 7-day history
  • ✅ CLI interface
  • ✅ Web dashboard
Pro Tier (0.5 USDT/month via x402)
  • ✅ Unlimited history
  • ✅ Advanced analytics & cost forecasting
  • ✅ Priority alerts
  • ✅ Export reports (CSV/JSON)
  • ✅ Full API access

Autonomous Agent Payment (x402)

Check License Status
GET http://localhost:9090/api/x402/license/{your_wallet}
Subscribe to Pro
POST http://localhost:9090/api/x402/subscribe
Content-Type: application/json

{
  "agent_wallet": "0xYourWallet"
}
Verify Payment
POST http://localhost:9090/api/x402/verif...

Source information

Source
github
Repository
openclaw/skills
Path
skills/atlaspa/cost-governor
Version
—
Commit
39107434ab3ed4ed99d2f6a5c3262b26fb63a1d3
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

OpenClaw Cost Governor

The only OpenClaw tool that combines cost tracking + x402 agent payments + self-funding model.

Stop burning money on AI tokens. Budget alerts, automatic circuit breakers, and agents can autonomously subscribe & pay for Pro features.

🤖 First tool enabling true agent-to-agent commerce - if it saves your agent >0.5 USDT/month, it pays for itself. Agent Payments →

The Problem

OpenClaw users are experiencing:

  • 💸 $20 burned overnight in API tokens
  • 💸 $750/month costs for simple reminders
  • 🔍 Zero visibility into which agents/providers cost what
  • 🚫 No budget controls or alerts
  • ⚠️ No way to pause agents before money burns

The Solution

Real-time cost tracking with proactive alerts and automatic circuit breakers.

Features

  • ✅ Token Usage Tracking - Monitor every API call across all providers
  • ✅ Budget Alerts - Get notified at 75%, 90%, 100% of budget limits
  • ✅ Circuit Breakers - Automatically pause agents when budget exceeded
  • ✅ Provider Cost Comparison - See which provider is actually cheaper for your workload
  • ✅ Web Dashboard - Beautiful localhost dashboard with charts and insights
  • ✅ Cost Optimization - AI-powered recommendations to reduce spending
  • ✅ Multi-Provider Support - Works with OpenAI, Anthropic, Google, and custom providers
  • 🤖 x402 Agent Payments - Agents can autonomously pay for Pro tier (0.5 USDT/month)

Why Cost Governor?

The ONLY tool that combines cost tracking + agent economy + self-funding.

Feature Cost Governor ClawWatcher clawdbot-cost-monitor AgentPayy payment-skill
Cost Tracking ✅ ✅ ✅ ❌ ❌
Circuit Breakers ✅ ❌ ❌ ❌ ❌
x402 Payments ✅ ❌ ❌ ✅ ✅
Agents Pay for Tool ✅ ❌ ❌ ❌ ❌
...

Extracted content

SKILL.md
# Cost Governor - OpenClaw Skill

**First OpenClaw skill where AI agents can autonomously pay for Pro features via x402 protocol.**

## What It Does

Cost Governor tracks your LLM API costs in real-time across all providers (OpenAI, Anthropic, Google, etc.), enforces budget limits with circuit breakers, and prevents you from burning through your allocation overnight.

### Economic Rationale for Agents

If this skill helps you optimize costs by more than 0.5 USDT/month, it pays for itself. No human intervention required.

## Installation

```bash
npm install
npm run setup
```

## Usage

### As OpenClaw Hook (Automatic)

Cost Governor integrates via OpenClaw hooks - automatically tracks every API call:

```bash
# Hooks are registered in package.json
# provider-before: Tracks request
# provider-after: Calculates cost
# session-end: Generates reports
```

### CLI Commands

```bash
# Check current status
node src/cli.js status

# View detailed report
node src/cli.js report

# Start web dashboard
node src/cli.js dashboard

# Reset circuit breaker
node src/cli.js reset
```

### Web Dashboard

```bash
node src/cli.js dashboard
# Open http://localhost:9090
```

## Features

### Free Tier
- ✅ Real-time cost tracking
- ✅ Budget alerts (hourly, daily, monthly)
- ✅ Circuit breaker (auto-shutdown at limits)
- ✅ 7-day history
- ✅ CLI interface
- ✅ Web dashboard

### Pro Tier (0.5 USDT/month via x402)
- ✅ Unlimited history
- ✅ Advanced analytics & cost forecasting
- ✅ Priority alerts
- ✅ Export reports (CSV/JSON)
- ✅ Full API access

## Autonomous Agent Payment (x402)

### Check License Status

```http
GET http://localhost:9090/api/x402/license/{your_wallet}
```

### Subscribe to Pro

```http
POST http://localhost:9090/api/x402/subscribe
Content-Type: application/json

{
  "agent_wallet": "0xYourWallet"
}
```

### Verify Payment

```http
POST http://localhost:9090/api/x402/verif...
README
# OpenClaw Cost Governor

**The only OpenClaw tool that combines cost tracking + x402 agent payments + self-funding model.**

Stop burning money on AI tokens. Budget alerts, automatic circuit breakers, and agents can autonomously subscribe & pay for Pro features.

🤖 **First tool enabling true agent-to-agent commerce** - if it saves your agent >0.5 USDT/month, it pays for itself. [Agent Payments →](AGENT-PAYMENTS.md)

## The Problem

OpenClaw users are experiencing:
- 💸 **$20 burned overnight** in API tokens
- 💸 **$750/month** costs for simple reminders
- 🔍 **Zero visibility** into which agents/providers cost what
- 🚫 **No budget controls** or alerts
- ⚠️ **No way to pause** agents before money burns

## The Solution

**Real-time cost tracking with proactive alerts and automatic circuit breakers.**

## Features

- ✅ **Token Usage Tracking** - Monitor every API call across all providers
- ✅ **Budget Alerts** - Get notified at 75%, 90%, 100% of budget limits
- ✅ **Circuit Breakers** - Automatically pause agents when budget exceeded
- ✅ **Provider Cost Comparison** - See which provider is actually cheaper for your workload
- ✅ **Web Dashboard** - Beautiful localhost dashboard with charts and insights
- ✅ **Cost Optimization** - AI-powered recommendations to reduce spending
- ✅ **Multi-Provider Support** - Works with OpenAI, Anthropic, Google, and custom providers
- 🤖 **x402 Agent Payments** - Agents can autonomously pay for Pro tier (0.5 USDT/month)

## Why Cost Governor?

**The ONLY tool that combines cost tracking + agent economy + self-funding.**

| Feature | Cost Governor | ClawWatcher | clawdbot-cost-monitor | AgentPayy | payment-skill |
|---------|--------------|-------------|----------------------|-----------|---------------|
| Cost Tracking | ✅ | ✅ | ✅ | ❌ | ❌ |
| Circuit Breakers | ✅ | ❌ | ❌ | ❌ | ❌ |
| x402 Payments | ✅ | ❌ | ❌ | ✅ | ✅ |
| **Agents Pay for Tool** | ✅ | ❌ | ❌ | ❌ | ❌ |
|...

Related skills

OpenClaw

xint

0xnyk

X Intelligence CLI — search, monitor, analyze, and engage on X/Twitter. TypeScript + Bun. AI agent skill.

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

flightclaw

jackculpan

Track flight prices from Google Flights with this OpenClaw skill. Search routes, monitor prices, and get alerts when prices drop.

OpenClaw

openclaw-trading-assistant

openclaw-trade

openclaw trading assistant| openclaw trading skill | nof1.ai & openclaw [moltbot] collaboration | We get the best practices from alpha arena trading seasons and bring it to clawdbot All top AI agents, realtime...