state.db, Claude Code transcripts, and Cursor usage CSV exports — or event payloads from any framework via xerg ingest — normalizes activity locally, and surfaces where spend is leaking.
Local audits and --compare are free with no account. A Free hosted workspace (up to 2 members) saves the last 30 days of pushed audits with up to 100 stored snapshots per month. Ask Xerg, hosted MCP, Slack, and policies require a Pro or Enterprise workspace.
Working inside a coding agent? Install the Xerg skill with npx skills add xergai/skills and ask your agent to audit your spend. See skill bundle.
What Xerg does
- Guides first-time local setup with
xerg init. - Audits local OpenClaw or Hermes activity from default paths or explicit files.
- Optionally collects OpenClaw traces over loopback with
collect openclaw, sanitizing before local persistence and never pushing automatically. - Audits local Claude Code session transcripts from
~/.claude/projects/. - Audits local Cursor usage CSV exports.
- Audits any other framework through a versioned JSON event payload with
xerg ingest. - Compares the current audit with the newest compatible cached snapshot.
- Audits OpenClaw SSH and Railway targets from your local machine.
- Exports human-readable, Markdown, and machine-readable JSON output.
- Connects to a hosted workspace with
xerg connect, pushes summaries when you choose, and can fail CI when confirmed waste is above a threshold. - Tracks pushed audits, sources, trends, Optimizations, policies, and workspace API keys in the hosted dashboard.
- Exposes hosted audit history, recommendations, sources, policies, and guarded write actions through hosted MCP.
What Xerg surfaces
Xerg splits findings into two buckets:- Confirmed waste:
retry-waste,loop-waste, and Cursorcache-carryoverwhen its billed pattern clears the waste bar - Savings opportunities:
context-outlier,idle-spend,candidate-downgrade, and Cursormax-mode-concentration
Default data sources
By default, Xerg looks for:- OpenClaw gateway logs at
/tmp/openclaw/openclaw-*.log - OpenClaw session transcripts at
~/.openclaw/agents/*/sessions/*.jsonl - Hermes state database at
~/.hermes/state.db(preferred and read-only) - optional Hermes observer ledger at
~/.hermes/xerg/events/; legacy logs/transcripts remain fallback inputs where present - Claude Code session transcripts at
~/.claude/projects/ - Cursor usage CSV exports through
--cursor-usage-csv - Event payloads from any framework through
xerg ingest --file
--state-db for Hermes, --log-file / --sessions-dir for legacy sources, or --claude-code-dir for Claude Code.
For optional OpenClaw traces, see OpenClaw trace collection. Existing captures use --otlp-file and remain independent from transcript/log audits.
Start here
- Install Xerg.
- Start with
xerg initor run the quickstart. - Keep the most useful commands nearby with the CLI cheat sheet.
- If the data lives elsewhere, start with doctor. Use remote audits for OpenClaw SSH and Railway targets.
- Learn the core model in waste taxonomy, metrics, and how it works.
- When you want hosted features, use hosted dashboard, connect and push, hosted MCP, and optimizations and policies.
- When you want local automation, use CI gates.
Hosted workspace features
With a free Xerg workspace, you can:- connect and push audit summaries into a hosted workspace with authentication and push
- review the last 30 days of audit history, sources, trends, Optimizations, workspace API keys, members, and billing in the hosted dashboard
- track recommendation-backed work in optimizations and policies
Current limits
- Cost per outcome requires outcome signals (declared with
xerg outcome, carried on ingest events, or derived from terminal call states); runs without a signal stay untracked. See metrics for details. - Opportunity findings are recommendations to test, not proven waste.
- Xerg stores economic metadata and audit summaries locally. It does not store prompt or response content.