JSPM

@opengauge/openclaw-plugin

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q53894F
  • License MIT

PromptOps observability for OpenClaw: per-call cost tracking, runaway loop detection, circuit breaker, and budget enforcement

Package Exports

  • @opengauge/openclaw-plugin
  • @opengauge/openclaw-plugin/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@opengauge/openclaw-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@opengauge/openclaw-plugin

PromptOps observability for OpenClaw agents. Wraps every LLM provider call via registerProvider to give you per-call cost tracking, runaway loop detection, circuit breaker protection, and budget enforcement — without modifying your agent.

Install

openclaw plugins install @opengauge/openclaw-plugin

Or manually:

npm install @opengauge/openclaw-plugin

What it does

Once installed, the plugin transparently wraps your OpenClaw agent's LLM provider:

  • Per-call cost tracking — every API call logged to ~/.opengauge/data.db with token counts, cost estimates, and latency
  • Runaway loop detection — trigram Jaccard similarity detects when your agent is stuck making the same call repeatedly
  • Circuit breaker — optionally blocks calls when runaway loops or budget thresholds are breached
  • Budget enforcement — session, daily, and monthly spend limits
  • Fail-safe — if anything in OpenGauge fails, your agent is unaffected. Errors are logged to ~/.opengauge/error.log

Configuration

Create or edit ~/.opengauge/config.yml:

openclaw:
  circuit_breaker:
    enabled: true
    similarity_threshold: 0.8
    max_similar_calls: 5
    action: warn          # warn | block
  budget:
    session_limit_usd: 5.00
    daily_limit_usd: 20.00
    monthly_limit_usd: 400.00
  optimize: false
  log_response_text: true
  log_full_request: false

View stats

From within OpenClaw:

opengauge-stats

Or from the terminal:

npx opengauge stats --source=openclaw

How it works

The plugin uses OpenClaw's registerProvider API to wrap the active LLM provider. Every individual LLM call — including multi-call tool-use loops within a single agent turn — is intercepted, logged, analyzed, and forwarded. The agent never knows OpenGauge is there.

License

MIT