Token Saver Pack for OpenClaw
Ready-to-apply OpenClaw 2026.11.10 config patches, automation throttling commands, and a read-only local usage-report skill. Includes a local Ollama profile (zero paid API keys) and a hybrid cloud + Ollama profile with fallback chains, utilityModel and sub-agent routing, safeguard compaction, and cloud cache-TTL context pruning.
One pack: pay once on Stripe, no account needed. All packs: a subscription you can cancel any time. Refund Policy.
What you get
- Local Ollama JSON5 config patch with native /api/chat, 32k context cap, fallbacks, safeguard compaction, and zero paid API keys
- Hybrid cloud + Ollama JSON5 config patch with cheaper fallbacks, local utilityModel, short cache retention, and 1h cache-TTL context pruning
- Continuation-skip bootstrap injection, efficient image resizing, and per-reply token footers
- Sub-agent cheaper model routing plus concurrency, timeout, and archive-after caps
- Copy-paste openclaw cron / openclaw automations commands for throttling proactive-check jobs on a running Gateway
- Read-only usage-report skill and Python 3 stdlib script summarizing local SQLite token usage and recorded cost
Test results
Run on 2026-11-26 with OpenClaw 2026.11.10 (6ea542f). macOS 15.7.4 (Apple M3 Max), Node v24.22.3, a fresh OpenClaw profile, local Ollama model gemma4:31b. Commands ran in a sandbox without system service control. Paths are shortened and long output is cut. The output below is what those runs printed, shortened.
Back up the current OpenClaw config before making changes
$ openclaw backup create --only-config --output ./config-backup.tar.gz --jsonBackup progress: stage=plan phase=start Backup progress: stage=archive-write phase=start { "createdAt": "2026-11-26T13:23:11.905Z", "archiveRoot": "2026-11-26T20-23-11.905+07-00-openclaw-backup", "archivePath": "./config-backup.tar.gz", … "onlyConfig": true, … "skipped": [], "skippedVolatileCount": 0 } Backup progress: stage=plan phase=summary runs=1 bytes=0 outputBytes=0 elapsedMs=11 complete=true Backup progress: stage=archive-write phase=summary runs=1 bytes=3411 outputBytes=1355 elapsedMs=11 complete=trueDry-run, apply, and validate the local Ollama cost-control config patch
$ openclaw config patch --file ./packs/token-saver/config/token-saver-ollama.json5 --replace-path models.providers.ollama.models --dry-run && openclaw config patch --file ./packs/token-saver/config/token-saver-ollama.json5 --replace-path models.providers.ollama.models && openclaw config validateDry run successful: 32 update(s) validated against ~/.openclaw/openclaw.json. Applied 32 config update(s). Change will apply without restarting the gateway. Config valid: ~/.openclaw/openclaw.jsonConfirm applied compaction, sub-agent, utility model, response footer, and fallback routing settings
$ openclaw config get agents.defaults.compaction && openclaw config get agents.defaults.subagents && openclaw config get agents.defaults.utilityModel && openclaw config get messages.responseUsage && openclaw models status{ "mode": "safeguard", "thinkingLevel": "off", "keepRecentTokens": 12000, "maxSummaryChars": 12000, … "timeoutSeconds": 180, … "model": "ollama/gemma4", "runTimeoutSeconds": 180 … "primary": "ollama/gemma4", … "ollama/qwen3:4b" … tokens … Fallbacks (1) : ollama/qwen3:4b … Providers w/ OAuth/tokens (0): - - ollama effective=models.json:marker(ollama-local) | models.json=marker(ollama-local) | source=models.json: ~/.openclaw/agents/main/agent/models.json OAuth/token status - none (node:97451) [DEP_PLUGIN_SDK] DeprecationWarning: Plugin SDK: resolveAuthStorePathForDisplay is deprecated; use provider/profile identifiers for displays (there is no public async database-path replac (Use `node --trace-deprecation ...` to show where the warning was created)Install the usage-report skill and verify OpenClaw marks it ready
$ openclaw skills install ./packs/token-saver/skills/usage-report && openclaw skills info usage-report && openclaw skills checkInstalling to ~/.openclaw/workspace/skills/usage-report… Skill files changed, but local Gateway refresh failed: Gateway not reachable at ws://127.0.0.1:19790 (ECONNREFUSED). Start it with `openclaw gateway run` or check `openclaw gateway status`. Gateway target: ws://127.0.0.1:19790 Source: local loopback … Installed usage-report from path -> ~/.openclaw/workspace/skills/usage-report 📊 usage-report ✓ Ready … Visible to model: yes … Ready and visible to model: … 🧾 summarize (bins: summarize) ✅ things-mac (bins: things) 📋 trello (env: TRELLO_API_KEY, TRELLO_TOKEN) 🐦 xurl (bins: xurl) Tip: use `openclaw skills search`, `openclaw skills install`, and `openclaw skills update` for ClawHub-backed skills.Verify offline usage-report script options and automation edit CLI flags
$ python3 ./packs/token-saver/skills/usage-report/scripts/usage_report.py --help && openclaw automations edit --helpusage: usage_report.py [-h] [--state-dir STATE_DIR] [--agent AGENTS] [--days DAYS] [--top TOP] [--source {auto,transcripts,sessions}] [--json] Summarize local OpenClaw token usage, prompt cache reads, compaction counts, and recorded model costs from agent SQLite stores (read-only, no network). … --state-dir STATE_DIR … --days DAYS Include activity from the last N days (default: 30; … --active-hours-start <HH:MM> Execution window start (inclusive) … --idle-only Yield scheduled execution to foreground … --light-context Use lightweight bootstrap context for … --url <url> Gateway WebSocket URL (defaults to gateway.remote.url when configured) --wake <mode> Wake mode (now|next-heartbeat) --webhook <url> POST the finished payload to a webhook URLRun a one-shot local Ollama agent turn with retained state and summarize its recorded tokens
$ mkdir -p ./state-check && openclaw agent exec "Reply with the single word OK." --state-dir ./state-check --model "$OLLAMA_MODEL" --thinking off && python3 ./packs/token-saver/skills/usage-report/scripts/usage_report.py --state-dir ./state-check --days 1 --json > ./state-check/report.json && python3 -c "import json; d=json.load(open('./state-check/report.json')); s=d['summary']; assert s['assistantTurns']>=1 and s['totalTokens']>0, s; print('REPORT_VERIFIED', 'turns=' + str(s['assistantTurns']), 'tokens=' + str(s['totalTokens']))" && python3 ./packs/token-saver/skills/usage-report/scripts/usage_report.py --state-dir ./state-check --days 1[agents/agent-command] [agent] run e723aa56-dbc3-4e83-b8cc-12837f6e4e3c ended with stopReason=stop OK [state/agent-db] agent database clean-close receipt: written; agent=main REPORT_VERIFIED turns=1 tokens=14081 OpenClaw Local Token Usage Report … Date Turns Input Output Total Cost 2026-11-26 1 14,075 6 14,081 $0.0000 Notes & Coverage -------------------------------------------------------------------- - Skipped 1 zstd-compressed transcript rows (Python 3.14+ stdlib compression.zstd is required to read event_zstd rows offline; use `openclaw gateway usage-cost` for Gateway-decoded totals).
Requirements
- OpenClaw 2026.11.10
- Python 3 (python3 on PATH; Python 3.14+ recommended for offline zstd transcript rows)
- Local Ollama running at http://127.0.0.1:11434 with at least one pulled model (gemma4 by default) for local-only use
- Authenticated cloud provider credentials only if using config/token-saver-hybrid.json5
- Running Gateway only if using openclaw automations or openclaw gateway usage-cost commands
Not included
- Paid cloud API keys or provider accounts
- Ollama installation or model weight downloads
- External billing dashboards, hosted telemetry, or provider-side spending hard caps
- Legacy agents.defaults.heartbeat config or HEARTBEAT.md (retired in OpenClaw 2026.11.10)
Files in the zip
packs/token-saver/LICENSE.txt
packs/token-saver/README.md
packs/token-saver/TESTED.md
packs/token-saver/config/token-saver-hybrid.json5
packs/token-saver/config/token-saver-ollama.json5
packs/token-saver/skills/usage-report/SKILL.md
packs/token-saver/skills/usage-report/scripts/usage_report.py23 KB · SHA-256 ef00588a3b2b036bac76d64ed7ff2551615be8edb45426f21e60b07769d5308d
Licence: for your own use and your own team. No resale or republishing. Not an official OpenClaw product.
Other packs
- Gateway Fix Kit: Diagnose and fix OpenClaw gateway startup, auth, update, config, and channel issues.
- Secure Setup Pack: Hardened config patches, audit checklist, and approval-gated security triage skill.
- Soul and Memory Pack: Workspace templates, memory settings and scripts to check why an agent forgot.
- Heartbeat and Cron Pack: A checklist monitor plus morning, evening, and weekly review jobs for OpenClaw.
- Skill Safety Checker: Scan third-party OpenClaw skills for red flags before they get installed.
- Spreadsheet Analyst Skill: Profile CSV/TSV files, group metrics, and write Markdown reports from computed numbers.