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-pluginOr manually:
npm install @opengauge/openclaw-pluginWhat 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.dbwith 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: falseView stats
From within OpenClaw:
opengauge-statsOr from the terminal:
npx opengauge stats --source=openclawHow 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