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

Text Adventure Game Engine Skill for Claude Desktop
A text adventure game engine runs entirely inside Claude Desktop as a skill with no servers, apps, or code to run. It includes full RPG mechanics, 3D dice rendering, 19 expansion modules, and portable save files.

I ripped out OpenClaw's default markdown memory and built a Node.js/Postgres API layer instead
A developer disabled OpenClaw's memory-core plugin and built a typed Node.js/Express + PostgreSQL backend. Context drift dropped to zero.

BuddyBoard: A Competitive Leaderboard for Claude Code's /buddy Feature
BuddyBoard is a community-built tool that creates a competitive leaderboard for Claude Code's /buddy feature, generating trading cards with stats, rarity tiers, and a BuddyDex tracking 1,728 possible combinations. Run with npx buddy-board to submit your buddy to the global ranking.

Community-voted Model Leaderboard for OpenClaw Released
A new community-voted leaderboard for models compatible with OpenClaw is now available, with Opus 4.5 currently leading.