{"id":"2d082d7b-f1e5-4705-a0f9-1c4dfe5b500b","entityType":"agent","slug":"jzocb-token-guard","name":"token-guard","canonicalUrl":"https://www.xpersona.co/agent/jzocb-token-guard","canonicalPath":"/agent/jzocb-token-guard","generatedAt":"2026-10-09T06:17:52.016Z","source":"GITHUB_OPENCLEW","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":null},"description":"Monitor and control OpenClaw token usage and costs. Set daily budgets, track spending, auto-downgrade models when limits hit. Stop burning money while you sleep. --- name: token-guard description: Monitor and control OpenClaw token usage and costs. Set daily budgets, track spending, auto-downgrade models when limits hit. Stop burning money while you sleep. metadata: openclaw: emoji: \"💰\" --- Token Guard 💰 **Stop burning money while you sleep.** Your AI agent runs 24/7. Opus costs $75/M output tokens. One overnight coding session can burn $50+ before you wake up. Token Guard","descriptionLabel":"Technical summary","evidenceSummary":"Published capability contract available. No trust telemetry is available yet. Last updated 4/15/2026.","installCommand":"git clone https://github.com/jzOcb/token-guard.git","sourceUrl":"https://github.com/jzOcb/token-guard","homepage":null,"primaryLinks":[{"label":"View Source","url":"https://github.com/jzOcb/token-guard","kind":"source"}],"safetyScore":89,"overallRank":34.7,"popularityScore":0,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Monitor and control OpenClaw token usage and costs. Set daily budgets, track spending, auto-downgrade models when limits hit. Stop burning money while you sleep"},"coverage":{"evidence":{"source":"capability-contract + public-profile","verified":true,"confidence":"high","updatedAt":"2026-02-24T19:44:24.842Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[{"label":"burn","status":"self-declared"}],"verifiedCount":0,"selfDeclaredCount":2,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"},{"key":"burn","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile capability:burn|supported|profile"}},"adoption":{"evidence":{"source":"no-adoption-signals","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"No source adoption metrics were available."},"stars":0,"forks":0,"downloads":null,"packageName":null,"latestVersion":null,"tractionLabel":null},"release":{"evidence":{"source":"agent-index","verified":false,"confidence":"medium","updatedAt":"2026-03-01T06:04:30.613Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T05:21:22.124Z","lastCrawledAt":"2026-03-01T06:04:30.613Z","lastIndexedAt":null,"nextCrawlAt":"2026-03-02T06:04:30.613Z","lastVerifiedAt":null,"highlights":[]},"execution":{"evidence":{"source":"capability-contract","verified":true,"confidence":"high","updatedAt":"2026-02-24T19:44:24.842Z","emptyReason":null},"installCommand":"git clone https://github.com/jzOcb/token-guard.git","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"ready","authModes":["api_key"],"requires":["openclew","lang:typescript"],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":"https://github.com/jzOcb/token-guard#input","outputSchemaRef":"https://github.com/jzOcb/token-guard#output","dataRegion":"global","contractUpdatedAt":"2026-02-24T19:44:24.842Z","sourceUpdatedAt":"2026-02-24T19:44:24.842Z","freshnessSeconds":19564407},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"GITHUB_OPENCLEW","generatedAt":"2026-10-09T06:17:52.016Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/jzocb-token-guard/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":[],"safeUseWhen":["Contract is available with explicit auth and schema references.","Trust confidence is not low and verification freshness is acceptable."],"riskFlags":["trust_data_unavailable"],"operationalConfidence":"medium"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"GITHUB OPENCLEW","verified":false,"confidence":"high","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":null},"readme":"---\nname: token-guard\ndescription: Monitor and control OpenClaw token usage and costs. Set daily budgets, track spending, auto-downgrade models when limits hit. Stop burning money while you sleep.\nmetadata:\n  openclaw:\n    emoji: \"💰\"\n---\n\n# Token Guard 💰\n\n**Stop burning money while you sleep.**\n\nYour AI agent runs 24/7. Opus costs $75/M output tokens. One overnight coding session can burn $50+ before you wake up. Token Guard watches your spend and acts before your wallet notices.\n\n## The Problem\n\nReal costs from real users:\n\n| Scenario | Model | Cost |\n|---|---|---|\n| \"Let the agent run overnight\" | Opus | $50-100 |\n| \"Register an email + X account\" | Opus | $55 (one task!) |\n| First week exploring | Opus | $100+ |\n| Daily heartbeat checks | Opus | $2-5/day for nothing |\n\nMost users don't realize they're burning Opus-level tokens on tasks that Haiku could handle.\n\n## What Token Guard Does\n\n### Monitor\n- Track token usage per day/model\n- Estimate costs from model pricing\n- Show usage history and trends\n\n### Budget\n- Set daily spending limits\n- Warning alerts at configurable threshold (default 80%)\n- Hard limits with auto-model-downgrade\n\n### Optimize\n- Model cost comparison at a glance\n- Routing recommendations (Opus for reasoning, Haiku for background)\n- Per-task cost estimation before running\n\n## Quick Start\n\n```bash\n# See current usage and model costs\nbash scripts/token-guard.sh status\n\n# Set a $10/day budget with warnings\nbash scripts/token-guard.sh set-budget 10\n\n# Set a hard limit: auto-downgrade to Haiku when exceeded\nbash scripts/token-guard.sh set-budget 10 80 true claude-haiku-3-5\n\n# Estimate cost before running a task\nbash scripts/token-guard.sh estimate claude-opus-4 50000 10000 10\n\n# Check usage history\nbash scripts/token-guard.sh history 7\n```\n\n## Model Cost Comparison\n\n| Model | Input $/1M | Output $/1M | Relative |\n|---|---|---|---|\n| Claude Opus 4 | $15.00 | $75.00 | 100x |\n| Claude Sonnet 4 | $3.00 | $15.00 | 20x |\n| Claude Haiku 3.5 | $0.80 | $4.00 | 5x |\n| GPT-4o | $2.50 | $10.00 | 13x |\n| Gemini Flash | $0.075 | $0.30 | 1x |\n| DeepSeek | $0.27 | $1.10 | 1.5x |\n\n## Recommended Routing\n\n```\nTier 1 (Reasoning/Creative):  claude-opus-4      → Use sparingly\nTier 2 (Daily work):          claude-sonnet-4     → Primary model\nTier 3 (Background/Subagent): claude-haiku-3-5    → Subagent model\nTier 4 (Bulk/Heartbeat):      gemini-2.0-flash    → Heartbeat/cron\n```\n\n**Savings:** Routing background tasks to Haiku instead of Opus = **95% cost reduction** on those tasks.\n\n## For AI Agents\n\nAdd to your heartbeat or cron:\n```bash\nbash /path/to/token-guard/scripts/token-guard.sh monitor\n```\n\nWhen budget is exceeded with hard limit enabled, the script automatically downgrades the primary model.\n\n## Install\n\n```bash\nclawdhub install token-guard\n# or: git clone https://github.com/jzOcb/token-guard\n```\n\n## Requirements\n\n- `bash` 4+\n- `python3`\n- `curl`\n\n## Related\n\n- [config-guard](https://github.com/jzOcb/config-guard) — Config validation and auto-rollback\n- [upgrade-guard](https://github.com/jzOcb/upgrade-guard) — Safe upgrades with snapshot and auto-rollback\n- [agent-guardrails](https://github.com/jzOcb/agent-guardrails) — Code-level enforcement for AI agents\n","readmeExcerpt":"--- name: token-guard description: Monitor and control OpenClaw token usage and costs. Set daily budgets, track spending, auto-downgrade models when limits hit. Stop burning money while you sleep. metadata: openclaw: emoji: \"💰\" --- Token Guard 💰 **Stop burning money while you sleep.** Your AI agent runs 24/7. Opus costs $75/M output tokens. One overnight coding session can burn $50+ before you wake up. Token Guard ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# See current usage and model costs\nbash scripts/token-guard.sh status\n\n# Set a $10/day budget with warnings\nbash scripts/token-guard.sh set-budget 10\n\n# Set a hard limit: auto-downgrade to Haiku when exceeded\nbash scripts/token-guard.sh set-budget 10 80 true claude-haiku-3-5\n\n# Estimate cost before running a task\nbash scripts/token-guard.sh estimate claude-opus-4 50000 10000 10\n\n# Check usage history\nbash scripts/token-guard.sh history 7"},{"language":"text","snippet":"Tier 1 (Reasoning/Creative):  claude-opus-4      → Use sparingly\nTier 2 (Daily work):          claude-sonnet-4     → Primary model\nTier 3 (Background/Subagent): claude-haiku-3-5    → Subagent model\nTier 4 (Bulk/Heartbeat):      gemini-2.0-flash    → Heartbeat/cron"},{"language":"bash","snippet":"bash /path/to/token-guard/scripts/token-guard.sh monitor"},{"language":"bash","snippet":"clawdhub install token-guard\n# or: git clone https://github.com/jzOcb/token-guard"}],"parameters":{},"dependencies":[],"permissions":[],"extractedFiles":[],"languages":["typescript"],"docsSourceLabel":"GITHUB OPENCLEW","editorialOverview":"Monitor and control OpenClaw token usage and costs. Set daily budgets, track spending, auto-downgrade models when limits hit. Stop burning money while you sleep. --- name: token-guard description: Monitor and control OpenClaw token usage and costs. Set daily budgets, track spending, auto-downgrade models when limits hit. Stop burning money while you sleep. metadata: openclaw: emoji: \"💰\" --- Token Guard 💰 **Stop burning money while you sleep.** Your AI agent runs 24/7. Opus costs $75/M output tokens. One overnight coding session can burn $50+ before you wake up. Token Guard","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":387,"uniquenessScore":64,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T06:17:52.016Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/github_openclew","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}