OpenGauge: Open-source tool for tracking LLM agent costs locally

What OpenGauge does
OpenGauge is an open-source monitoring tool that tracks API usage and costs for LLM agents like those built with OpenClaw. It runs locally on your machine, storing all data in a SQLite database without sending information to external services.
Key features from the source
- Proxy mode: Routes API calls through OpenGauge for automatic logging. Command:
npx opengauge watch ANTHROPIC_BASE_URL=http://localhost:4000 claude - Cost statistics: Shows detailed breakdowns with commands like
npx opengauge stats --period=7dthat display per-model costs, daily trends, token counts, and most expensive sessions - Circuit breaker: Detects and stops runaway loops where agents make repeated identical calls
- Budget limits: Can be set per session, daily, or monthly to prevent unexpected charges
- Multi-provider support: Works with Anthropic, OpenAI, Gemini, and local models through Ollama
- OpenClaw plugin: Specific integration for OpenClaw agents with simple installation:
openclaw plugins install /openclaw-pluginfollowed byopenclaw gateway restart
How it addresses common problems
The source author reported issues with:
- Lack of visibility into per-session costs (only seeing total usage in provider dashboards)
- Runaway loops where an agent made the same call 30+ times before being stopped
- Unexpected billing alerts due to uncontrolled usage
OpenGauge solves these by providing session-level cost tracking, similarity detection for repeated prompts, and configurable budget limits.
Getting started
For general use: npx opengauge (no installation needed)
For OpenClaw-specific tracking: npx opengauge stats --source=openclaw or npx opengauge stats --source=openclaw --period=7d
The tool can also function as a proxy for other development tools like Claude Code and Cursor.
📖 Read the full source: r/openclaw
👀 See Also

Maggy: An Autonomous Engineering Platform on Claude Code with Cross-Session Memory and P2P Team Learning
Maggy sits at Level 4 of the AI coding tool spectrum: multi-model orchestration, cross-session memory, process intelligence from CI/reviews, and P2P team learning. Benchmarks show 83% reduction in Claude usage while catching 7 security issues missed by single-pipeline Claude Code.

SkillOpt: Optimizing Markdown Skill Files as Trainable Parameters for AI Agents
SkillOpt formalizes the ad-hoc process of editing markdown skill files for AI coding agents, using frontier models to propose bounded edits gated against validation sets. Best skills converge with 1-4 accepted edits out of many proposals, and transfer across models like Codex to Claude Code.

Steelman R5: Fine-tuned 14B Model Outperforms Claude Opus on Ada Code Generation
A developer fine-tuned Qwen2.5-Coder-14B-Instruct using QLoRA on a compiler-verified dataset of 3,430 Ada/SPARK instruction pairs, achieving 68.6% compilation rate on a custom benchmark versus Claude Opus 4.6's 42.1%. The model is available via Ollama and fits in 12GB VRAM.

Bullshit Benchmark Tests LLM Resistance to Nonsensical Prompts
The Bullshit Benchmark evaluates whether AI models identify and push back on obvious nonsense prompts instead of confidently generating incorrect answers. Results show Claude models perform significantly better than Gemini models at detecting nonsensical questions.