[{"data":1,"prerenderedAt":1469},["ShallowReactive",2],{"blog-post-hermes-agent-token-usage":3,"related-posts-hermes-agent-token-usage":1442,"decoder-links-hermes-agent-token-usage":1467,"hero-size-hermes-agent-token-usage":1468},{"id":4,"title":5,"author":6,"body":11,"category":1414,"date":1415,"definedTerm":1416,"description":1417,"extension":1418,"featured":1419,"hideToc":1419,"image":1420,"imageAlt":1421,"imageHeight":1422,"imageWidth":1423,"itemList":1416,"lang":1416,"lead":1416,"meta":1424,"navigation":1425,"noindex":1419,"path":1426,"primaryHub":1416,"readingTime":1427,"redirected":1419,"relatedSlugs":1416,"seo":1428,"seoTitle":1429,"stem":1430,"subtitle":1431,"tags":1432,"updatedDate":1415,"__hash__":1441},"blog/blog/hermes-agent-token-usage.md","Hermes Agent Token Usage: How to Check It, When It Compresses, and 8 Ways to Cut It",{"name":7,"role":8,"avatar":9,"bio":10},"Shabnam Katoch","Growth Head","/img/avatars/shabnam-profile.jpeg","Shabnam leads growth at BetterClaw and has spent the past three years building organic distribution for AI-native products. She writes about no-code agent builders, content strategy, and what it actually takes to grow without an ads budget.",{"type":12,"value":13,"toc":1381},"minimark",[14,36,39,109,115,118,123,132,137,140,144,150,155,159,165,176,179,200,204,228,232,238,252,261,268,275,279,282,291,304,310,320,330,333,339,343,346,349,569,578,585,602,610,616,620,631,637,647,716,721,729,734,738,745,752,763,769,776,782,786,789,793,802,806,821,865,872,876,890,894,909,1003,1014,1018,1030,1037,1041,1046,1125,1135,1139,1150,1230,1233,1237,1250,1256,1260,1263,1266,1270,1273,1276,1287,1291,1295,1309,1313,1316,1320,1330,1334,1346,1350,1365,1369,1377],[15,16,17,18,22,23,27,28,31,32,35],"p",{},"Run ",[19,20,21],"code",{},"/usage"," to see ",[24,25,26],"strong",{},"Hermes Agent token usage"," and your provider's remaining quota; ",[19,29,30],{},"/context"," shows what fills the window, and ",[19,33,34],{},"hermes prompt-size"," shows your fixed per-message cost before any conversation. Hermes compresses at 50% of the context window, 75% on windows under 512K, and its gateway steps in at 85%.",[15,37,38],{},"Prompt caching, which the docs say cuts input cost by about 75% on multi-turn chats, holds until you switch models. Below: how to read the numbers, and eight fixes checked on v0.23.4 (published 24 November 2026).",[40,41,42,58],"table",{},[43,44,45],"thead",{},[46,47,48,52,55],"tr",{},[49,50,51],"th",{},"You want to",[49,53,54],{},"Run",[49,56,57],{},"Where",[59,60,61,74,85,97],"tbody",{},[46,62,63,67,71],{},[64,65,66],"td",{},"See this session's tokens and context",[64,68,69],{},[19,70,21],{},[64,72,73],{},"CLI and chat apps",[46,75,76,79,83],{},[64,77,78],{},"See what fills the window, and the cache",[64,80,81],{},[19,82,30],{},[64,84,73],{},[46,86,87,90,95],{},[64,88,89],{},"See the last 30 days, with estimated cost",[64,91,92],{},[19,93,94],{},"/insights",[64,96,73],{},[46,98,99,102,106],{},[64,100,101],{},"See the fixed cost of every message",[64,103,104],{},[19,105,34],{},[64,107,108],{},"Terminal, offline",[15,110,111],{},[112,113,114],"em",{},"Checked: 27 November 2026 (Hermes Agent v0.23.4)",[15,116,117],{},"Picture this: your Hermes bot answered forty short questions in Telegram this week, and the invoice looks like you ran a research lab.",[15,119,120],{},[112,121,122],{},"Where did all those tokens go?",[15,124,125,126,131],{},"Mostly into things you never typed. This guide is Hermes-only; for tools that work across agents, see our tested roundup of the ",[127,128,130],"a",{"href":129},"/blog/skills-that-reduce-token-usage","skills that reduce token usage",".",[133,134,136],"h2",{"id":135},"how-to-check-hermes-agent-token-usage","How to check Hermes Agent token usage",[15,138,139],{},"All of these are free to run: none makes a model call.",[141,142,21],"h3",{"id":143},"usage",[15,145,146,147,149],{},"The reference says ",[19,148,21],{}," shows token usage, a cost breakdown, session duration and \"an Account limits section with remaining quota / credits / plan usage pulled live from the provider's API.\" In the terminal that means input, output, prompt (total), completion and total tokens, API calls, duration, context, messages and compressions; chat apps show a shorter list plus an estimated breakdown by category.",[15,151,152,153,131],{},"Two details from the v0.23.4 source: \"Input tokens\" counts only uncached input while \"Prompt tokens (total)\" adds cache reads and writes, so a wide gap means the cache is working (the CLI status bar shows a cache-hit percentage). And neither version prints a cost line; for money, use ",[19,154,94],{},[141,156,158],{"id":157},"context-alias-ctx","/context (alias /ctx)",[15,160,161,162,164],{},"In the CLI, ",[19,163,30],{}," draws a 5 by 20 grid (each cell about 1% of the window) plus an estimated table: system prompt, tool definitions, rules, skills index, MCP, subagents, memory and conversation. Chat apps get a gauge with the auto-compression threshold and headroom.",[15,166,167,168,171,172,175],{},"Both list each context file (",[19,169,170],{},".hermes.md",", the AGENTS.md chain, CLAUDE.md, ",[19,173,174],{},".cursorrules",", SOUL.md) with a token estimate, plus a cache line such as \"Prompt cache: expired 15m ago (5m, declared); the next message re-processes the full prompt.\"",[141,177,94],{"id":178},"insights",[15,180,181,183,184,187,188,191,192,195,196,199],{},[19,182,94],{}," covers the last 30 days (",[19,185,186],{},"/insights 7"," in a chat app, or ",[19,189,190],{},"hermes insights --days 7 --source telegram","). It reports tokens, cost split into estimated, subscription-included and unknown, models, platforms, top tools and top skills; if ",[19,193,194],{},"terminal"," or ",[19,197,198],{},"read_file"," tops the tool list (it counts calls, not tokens), tool output is the likely culprit.",[141,201,203],{"id":202},"hermes-prompt-size-and-hermes-usage","hermes prompt-size and hermes usage",[15,205,206,208,209,212,213,216,217,220,221,224,225,131],{},[19,207,34],{}," breaks a fresh session's system prompt into the skills index, memory, profile, prompt tiers and tool schemas, offline (add ",[19,210,211],{},"--platform telegram"," for a chat app). ",[19,214,215],{},"hermes usage --provider openai-codex --json"," prints the Account limits block without a session; the reference lists ",[19,218,219],{},"openai-codex",", ",[19,222,223],{},"anthropic"," and ",[19,226,227],{},"openrouter",[141,229,231],{"id":230},"why-usage-can-look-lower-than-your-bill","Why /usage can look lower than your bill",[15,233,234,235,237],{},"In the v0.23.4 source, ",[19,236,21],{}," counts the main conversation loop plus Hermes's small cache keep-alives. Subagents keep their tokens in their own sessions (only their estimated cost reaches the parent), and compression summaries, background reviews, titles and vision calls are logged separately.",[15,239,240,241,244,245,247,248,251],{},"The CLI reference says the same of scripted runs, whose ",[19,242,243],{},"--usage-file"," counters \"cover the main agent loop only\". So trust your provider's dashboard for money, use ",[19,246,21],{}," to compare sessions, and use ",[19,249,250],{},"/status"," for totals plus a local recap with \"no LLM call, no prompt-cache impact\".",[253,254,255],"blockquote",{},[15,256,257,258,260],{},"If ",[19,259,21],{}," looks small but the invoice doesn't, look at the work Hermes does around your chat.",[15,262,263,264,131],{},"A reply cut off mid-sentence is an output limit, not usage: see our ",[127,265,267],{"href":266},"/blog/hermes-response-truncated-fix","guide to truncated Hermes responses",[15,269,270],{},[271,272],"img",{"alt":273,"src":274},"How to check Hermes Agent token usage: /usage, /insights, /context, hermes prompt-size and a per-run usage file","/img/blog/hermes-agent-token-usage-check.jpg",[133,276,278],{"id":277},"where-hermes-tokens-go","Where Hermes tokens go",[15,280,281],{},"Five things fill a Hermes bill, and the first two repeat on every turn.",[15,283,284,287,288,290],{},[24,285,286],{},"The fixed prompt."," System prompt, skills index, memory snapshot, context files and tool schemas go out with every call. When we measured a fresh Hermes v0.23.1 install on 16 November 2026, about 10,800 tokens went out before the first word (up from about 10,400 on v0.22.5 in October), so treat that as a direction and run ",[19,289,34],{}," for today's figure.",[15,292,293,296,297,195,300,303],{},[24,294,295],{},"History."," Every turn re-sends the conversation, and in a chat app that's one session until ",[19,298,299],{},"/new",[19,301,302],{},"/reset","; the memory docs warn that \"a chat can run for weeks as a single session\".",[15,305,306,309],{},[24,307,308],{},"Tool output."," Terminal output, file reads and web extracts stay in history until pruned or compacted, and on large windows compaction \"rarely fires, so bulky tool outputs ... get re-sent on every subsequent turn\".",[15,311,312,315,316,319],{},[24,313,314],{},"Side work."," Subagents run their own requests (a parallel batch \"typically burns the large majority of a run's total tokens\"), and so do ",[19,317,318],{},"/review",", the background memory and skill review (every 10 user turns or 10 tool-calling iterations) and compression summaries, all on your main model by default.",[15,321,322,325,326,329],{},[24,323,324],{},"Cache misses."," A model switch, a provider fallback, a key rotation or ",[19,327,328],{},"/reload-mcp"," makes the next turn re-read the whole conversation at full input price.",[15,331,332],{},"That shape isn't unique to Hermes: The New Stack (27 August 2026) summarised a benchmark of twelve agent setups, Hermes among them, in which the startup prompt times the number of turns predicted tokens per solved task (R-squared 0.99). It's context, not a verdict on Hermes.",[15,334,335],{},[271,336],{"alt":337,"src":338},"Where Hermes Agent tokens go: the fixed prompt, history, tool output, side work such as subagents and reviews, and cache misses","/img/blog/hermes-agent-token-usage-where.jpg",[133,340,342],{"id":341},"when-hermes-compresses-context-and-how-to-change-it","When Hermes compresses context, and how to change it",[15,344,345],{},"Hermes runs two layers. The developer guide calls them \"Gateway Session Hygiene (85% threshold)\", fixed and firing only once a session has at least 4 messages, and \"Agent ContextCompressor (50% threshold, configurable)\", which works from the token counts your provider reports.",[15,347,348],{},"The gateway's number is higher on purpose: \"Setting it at 50% (same as the agent) caused premature compression on every turn in long gateway sessions.\" And 50% isn't the whole story, because windows under 512K are floored at 75%: a 200,000-token model compresses at about 150,000 tokens and a 1M model at about 500,000 (calculated).",[40,350,351,367],{},[43,352,353],{},[46,354,355,361,364],{},[49,356,357,358],{},"Key under ",[19,359,360],{},"compression:",[49,362,363],{},"Default",[49,365,366],{},"What it does",[59,368,369,384,399,414,432,447,466,481,496,511,526,540,554],{},[46,370,371,376,381],{},[64,372,373],{},[19,374,375],{},"enabled",[64,377,378],{},[19,379,380],{},"true",[64,382,383],{},"Automatic compression on or off",[46,385,386,391,396],{},[64,387,388],{},[19,389,390],{},"threshold",[64,392,393],{},[19,394,395],{},"0.50",[64,397,398],{},"Trigger share of the window; 0.75 floor below 512K",[46,400,401,406,411],{},[64,402,403],{},[19,404,405],{},"threshold_tokens",[64,407,408],{},[19,409,410],{},"null",[64,412,413],{},"Optional hard cap; the lower trigger wins",[46,415,416,421,426],{},[64,417,418],{},[19,419,420],{},"model_thresholds",[64,422,423],{},[19,424,425],{},"{}",[64,427,428,429],{},"Per-model ratios, such as ",[19,430,431],{},"\"claude-sonnet\": 0.35",[46,433,434,439,444],{},[64,435,436],{},[19,437,438],{},"tail_mode",[64,440,441],{},[19,442,443],{},"lean",[64,445,446],{},"Tail of 2.5% of the window (10K to 25K tokens)",[46,448,449,454,459],{},[64,450,451],{},[19,452,453],{},"target_ratio",[64,455,456],{},[19,457,458],{},"0.20",[64,460,461,462,465],{},"Tail size in ",[19,463,464],{},"legacy"," mode only",[46,467,468,473,478],{},[64,469,470],{},[19,471,472],{},"protect_last_n",[64,474,475],{},[19,476,477],{},"20",[64,479,480],{},"\"Minimum number of recent messages always preserved\"",[46,482,483,488,493],{},[64,484,485],{},[19,486,487],{},"min_tail_user_messages",[64,489,490],{},[19,491,492],{},"1",[64,494,495],{},"User messages kept word for word",[46,497,498,503,508],{},[64,499,500],{},[19,501,502],{},"protect_first_n",[64,504,505],{},[19,506,507],{},"3",[64,509,510],{},"Opening messages pinned",[46,512,513,518,523],{},[64,514,515],{},[19,516,517],{},"idle_compact_after_seconds",[64,519,520],{},[19,521,522],{},"0",[64,524,525],{},"Compact after this long idle",[46,527,528,533,537],{},[64,529,530],{},[19,531,532],{},"codex_gpt55_autoraise",[64,534,535],{},[19,536,380],{},[64,538,539],{},"85% trigger on the ChatGPT Codex sign-in route",[46,541,542,547,551],{},[64,543,544],{},[19,545,546],{},"in_place",[64,548,549],{},[19,550,380],{},[64,552,553],{},"Compact on the same session id",[46,555,556,561,566],{},[64,557,558],{},[19,559,560],{},"prepare_ahead",[64,562,563],{},[19,564,565],{},"false",[64,567,568],{},"Prepare the next summary early",[15,570,571],{},[112,572,573,574,577],{},"Checked: 27 November 2026 (Hermes v0.23.4 docs; the summary model lives under ",[19,575,576],{},"auxiliary.compression",")",[15,579,580,581,584],{},"Nous reports lean mode kept about 49K tokens against about 162K in legacy mode on 500K-token sessions (author-claimed). Edits to ",[19,582,583],{},"compression.*"," apply on a running gateway from the next message.",[253,586,587],{},[15,588,589,592,593,595,596,598,599,601],{},[112,590,591],{},"Gotcha:"," ",[19,594,405],{}," caps every model, per-model ratios included, and the cap survives model switches. If a ",[19,597,420],{}," entry never seems to fire, look for a leftover ",[19,600,405],{}," line in your config.yaml.",[15,603,604,605,609],{},"There's no warning before a compaction, by design: Hermes removed intermediate context-pressure warnings because \"they caused models to 'give up' prematurely on complex tasks\". If compaction hangs or takes minutes, our ",[127,606,608],{"href":607},"/blog/hermes-agent-compaction-slow-fix","Hermes compaction fix guide"," covers it.",[15,611,612],{},[271,613],{"alt":614,"src":615},"When Hermes compresses: 75% on windows under 512K, 50% on larger windows, gateway hygiene at 85%","/img/blog/hermes-agent-token-usage-compression.jpg",[133,617,619],{"id":618},"compress-vs-clear","/compress vs /clear",[15,621,622,623,626,627,630],{},"Hermes calls it compress, not compact. ",[19,624,625],{},"/compress"," will \"Manually compress conversation context (flush memories + summarize)\"; ",[19,628,629],{},"/compress here 4"," keeps your last 4 exchanges word for word (2 if you give no number), and a topic narrows the summary.",[15,632,633,634,636],{},"Nothing is thrown away. In the default in-place mode, compacted turns are soft-archived and \"still searchable via session_search and recoverable, never deleted\", and a manual ",[19,635,625],{}," also clears a failed compaction's cooldown and retries.",[15,638,639,642,643,195,645,131],{},[19,640,641],{},"/clear"," does the opposite: \"Clear screen and start a new session\". It's CLI-only, so in Telegram, Discord or Slack you send ",[19,644,299],{},[19,646,302],{},[40,648,649,662],{},[43,650,651],{},[46,652,653,656,659],{},[49,654,655],{},"Situation",[49,657,658],{},"Use",[49,660,661],{},"Why",[59,663,664,678,690,703],{},[46,665,666,669,675],{},[64,667,668],{},"Switching to an unrelated task",[64,670,671,195,673],{},[19,672,641],{},[19,674,299],{},[64,676,677],{},"Nothing from the old chat is re-sent",[46,679,680,683,687],{},[64,681,682],{},"Mid-task, replies slowing down or getting truncated",[64,684,685],{},[19,686,625],{},[64,688,689],{},"The tips page's trigger for it",[46,691,692,695,700],{},[64,693,694],{},"Only one thread of a long chat still matters",[64,696,697],{},[19,698,699],{},"/compress \u003Ctopic>",[64,701,702],{},"The summary keeps that topic",[46,704,705,708,713],{},[64,706,707],{},"A chat-app thread you never reset",[64,709,710,712],{},[19,711,299],{}," at natural breaks",[64,714,715],{},"Chats can run for weeks as one session",[15,717,718],{},[112,719,720],{},"Checked: 27 November 2026 (Hermes v0.23.4 docs)",[15,722,723,724,728],{},"That last row matters most on an always-on gateway, where nothing ends a chat for you; our ",[127,725,727],{"href":726},"/hermes-agent-hosting","Hermes Agent hosting guide"," compares where to run one.",[253,730,731],{},[15,732,733],{},"Compress when you'd be sorry to lose the thread. Start fresh when you wouldn't.",[133,735,737],{"id":736},"why-switching-models-breaks-the-cache","Why switching models breaks the cache",[15,739,740,741,744],{},"Hermes's tips page is blunt: \"The cache is keyed to the model and account\", so a ",[19,742,743],{},"/model"," switch, a provider fallback or a credential-pool rotation all \"force the next turn to re-read the entire conversation at full input price.\" Its verdict: \"Occasional switches are fine; frequent switching in a long session multiplies your cost.\"",[15,746,747,748,751],{},"On Claude, Hermes sets Anthropic ",[19,749,750],{},"cache_control"," breakpoints in a \"system_and_3\" layout (the system prompt plus the last three messages), which the developer guide says \"Reduces input token costs by ~75% on multi-turn conversations\". That's the design figure, not a measurement of your bill.",[15,753,754,755,758,759,762],{},"Since v0.23.3, ",[19,756,757],{},"prompt_caching.cache_ttl"," defaults to ",[19,760,761],{},"auto",": 1-hour caching for human-paced chats (each starts on 5 minutes until its first pause) and 5 minutes for machine-paced work (subagents, cron, one-shots, webhooks, Kanban, the API server). 1-hour writes cost 2x base input and 5-minute writes 1.25x.",[15,764,765,766,768],{},"Memory is a frozen snapshot, so mid-session writes leave the prompt alone (\"the prompt cache isn't invalidated mid-session\"). ",[19,767,328],{}," rebuilds the tool set and does invalidate it, and a fallback costs twice, because \"that first request back on the primary is a full re-read too\".",[15,770,771,772,131],{},"The fix is the tips page's: \"on long sessions it's often cheaper to start a fresh session on the other model than to bounce back and forth.\" For cache prices and lifetimes across providers, see our guide to ",[127,773,775],{"href":774},"/blog/ai-agent-prompt-caching-cost-savings","prompt caching for AI agents",[15,777,778],{},[271,779],{"alt":780,"src":781},"What breaks the Hermes prompt cache: model switch, fallback, key rotation, /reload-mcp and compaction, versus memory writes and read-only commands","/img/blog/hermes-agent-token-usage-cache.jpg",[133,783,785],{"id":784},"_8-fixes-that-reduce-hermes-agent-token-usage","8 fixes that reduce Hermes Agent token usage",[15,787,788],{},"Each fix: what to change, what it saves, and the catch.",[141,790,792],{"id":791},"_1-measure-the-fixed-cost-and-trim-it","1. Measure the fixed cost and trim it",[15,794,17,795,797,798,801],{},[19,796,34],{}," and shrink what dominates. Memory is capped at about 2,200 characters (MEMORY.md) and 1,375 (USER.md), but each context file such as SOUL.md or AGENTS.md may run to 20,000 to 500,000 characters, scaled to the model's window, unless you set ",[19,799,800],{},"context_file_max_chars","; the tips page warns that \"Every character counts against your token budget\". Catch: edits apply from the next session.",[141,803,805],{"id":804},"_2-disable-skills-and-tools-you-dont-use","2. Disable skills and tools you don't use",[15,807,808,809,812,813,816,817,820],{},"Tool schemas and the skills index go out with every call. Use ",[19,810,811],{},"hermes tools"," to pick tools per platform, ",[19,814,815],{},"hermes skills config"," to enable or disable skills per platform, and ",[19,818,819],{},"agent.disabled_toolsets"," to switch a toolset off everywhere:",[822,823,828],"pre",{"className":824,"code":825,"language":826,"meta":827,"style":827},"language-yaml shiki shiki-themes github-light","agent:\n  disabled_toolsets:\n    - web        # no web_search / web_extract anywhere\n","yaml","",[19,829,830,843,851],{"__ignoreMap":827},[831,832,835,839],"span",{"class":833,"line":834},"line",1,[831,836,838],{"class":837},"shJU0","agent",[831,840,842],{"class":841},"sgsFI",":\n",[831,844,846,849],{"class":833,"line":845},2,[831,847,848],{"class":837},"  disabled_toolsets",[831,850,842],{"class":841},[831,852,854,857,861],{"class":833,"line":853},3,[831,855,856],{"class":841},"    - ",[831,858,860],{"class":859},"sYBdl","web",[831,862,864],{"class":863},"sAwPA","        # no web_search / web_extract anywhere\n",[15,866,867,868,871],{},"MCP and plugin tools are already deferred by default (",[19,869,870],{},"tools.tool_search.enabled: auto","). Catch: tool schemas sit in the cached prefix, so change them between sessions.",[141,873,875],{"id":874},"_3-lower-reasoning-where-it-isnt-needed","3. Lower reasoning where it isn't needed",[15,877,878,881,882,885,886,889],{},[19,879,880],{},"/reasoning low"," cuts thinking on routine turns (",[19,883,884],{},"--global"," saves it), and side tasks have their own knob, ",[19,887,888],{},"auxiliary.compression.reasoning_effort: low",", which the docs suggest \"to cut side-task latency and cost\". Catch: on hard multi-step work, less reasoning can mean more turns.",[141,891,893],{"id":892},"_4-tune-compression","4. Tune compression",[15,895,896,897,899,900,902,903,905,906,908],{},"On a 1M-window model, set ",[19,898,405],{}," (the docs' example, 256000, compacts \"at 256K instead of 500K\"); below 512K, use it instead of a ",[19,901,390],{}," under 0.75. Turn on ",[19,904,560],{}," if compaction pauses hurt, and use ",[19,907,517],{}," for long-lived chats.",[822,910,912],{"className":824,"code":911,"language":826,"meta":827,"style":827},"compression:\n  threshold_tokens: 256000          # 1M-window models: compact at 256K, not 500K\n  prepare_ahead: true               # write the next summary in the background\n  idle_compact_after_seconds: 1800  # compact a chat idle for 30 minutes\nauxiliary:\n  compression:\n    provider: openrouter\n    model: google/gemini-3-flash-preview   # the docs' cheaper summariser example\n",[19,913,914,921,936,948,962,970,978,989],{"__ignoreMap":827},[831,915,916,919],{"class":833,"line":834},[831,917,918],{"class":837},"compression",[831,920,842],{"class":841},[831,922,923,926,929,933],{"class":833,"line":845},[831,924,925],{"class":837},"  threshold_tokens",[831,927,928],{"class":841},": ",[831,930,932],{"class":931},"sYu0t","256000",[831,934,935],{"class":863},"          # 1M-window models: compact at 256K, not 500K\n",[831,937,938,941,943,945],{"class":833,"line":853},[831,939,940],{"class":837},"  prepare_ahead",[831,942,928],{"class":841},[831,944,380],{"class":931},[831,946,947],{"class":863},"               # write the next summary in the background\n",[831,949,951,954,956,959],{"class":833,"line":950},4,[831,952,953],{"class":837},"  idle_compact_after_seconds",[831,955,928],{"class":841},[831,957,958],{"class":931},"1800",[831,960,961],{"class":863},"  # compact a chat idle for 30 minutes\n",[831,963,965,968],{"class":833,"line":964},5,[831,966,967],{"class":837},"auxiliary",[831,969,842],{"class":841},[831,971,973,976],{"class":833,"line":972},6,[831,974,975],{"class":837},"  compression",[831,977,842],{"class":841},[831,979,981,984,986],{"class":833,"line":980},7,[831,982,983],{"class":837},"    provider",[831,985,928],{"class":841},[831,987,988],{"class":859},"openrouter\n",[831,990,992,995,997,1000],{"class":833,"line":991},8,[831,993,994],{"class":837},"    model",[831,996,928],{"class":841},[831,998,999],{"class":859},"google/gemini-3-flash-preview",[831,1001,1002],{"class":863},"   # the docs' cheaper summariser example\n",[15,1004,1005,1006,1010,1011,1013],{},"Catch: the summary model's window must be at least as large as your main model's, or the middle turns are \"dropped without a summary\" (an undersized one also causes the 64,000-token error in our ",[127,1007,1009],{"href":1008},"/blog/hermes-context-length-fix","Hermes context length fix","). And ",[19,1012,472],{}," is weaker than it looks: the v0.23.4 code sizes the kept tail in tokens and guarantees only 3 to 8 messages.",[141,1015,1017],{"id":1016},"_5-prune-old-tool-results","5. Prune old tool results",[15,1019,1020,1023,1024,1026,1027,1029],{},[19,1021,1022],{},"compression.proactive_prune_tokens"," is off by default (",[19,1025,522],{},"). Once re-sent history passes the size you set, Hermes dedupes identical tool results and summarises old oversized ones without calling a model, sparing the newest ",[19,1028,472],{}," messages. Catch: each prune rewrites sent history and breaks the cache, which is why it only commits when it reclaims at least 4,096 tokens.",[15,1031,1032,1033,1036],{},"Since v0.23.3 a separate prune also runs once the prompt cache has expired, saving originals under ",[19,1034,1035],{},"~/.hermes/cache/pruned/"," with a pointer the agent can read back.",[141,1038,1040],{"id":1039},"_6-dont-switch-models-mid-session-pin-a-model-per-task","6. Don't switch models mid-session; pin a model per task",[15,1042,1043,1044,131],{},"Change models only at a new session, and give cheaper models the work outside your main chat: subagents, the background review and ",[19,1045,318],{},[822,1047,1049],{"className":824,"code":1048,"language":826,"meta":827,"style":827},"delegation:\n  model: google/gemini-3-flash-preview   # every delegate_task child runs on this\n  provider: openrouter\n  max_summary_chars: 8000                # our example; the default is 24000\nauxiliary:\n  background_review:\n    provider: openrouter                 # or enabled: false to skip automatic reviews\n    model: google/gemini-3-flash-preview\n",[19,1050,1051,1058,1070,1079,1092,1098,1105,1116],{"__ignoreMap":827},[831,1052,1053,1056],{"class":833,"line":834},[831,1054,1055],{"class":837},"delegation",[831,1057,842],{"class":841},[831,1059,1060,1063,1065,1067],{"class":833,"line":845},[831,1061,1062],{"class":837},"  model",[831,1064,928],{"class":841},[831,1066,999],{"class":859},[831,1068,1069],{"class":863},"   # every delegate_task child runs on this\n",[831,1071,1072,1075,1077],{"class":833,"line":853},[831,1073,1074],{"class":837},"  provider",[831,1076,928],{"class":841},[831,1078,988],{"class":859},[831,1080,1081,1084,1086,1089],{"class":833,"line":950},[831,1082,1083],{"class":837},"  max_summary_chars",[831,1085,928],{"class":841},[831,1087,1088],{"class":931},"8000",[831,1090,1091],{"class":863},"                # our example; the default is 24000\n",[831,1093,1094,1096],{"class":833,"line":964},[831,1095,967],{"class":837},[831,1097,842],{"class":841},[831,1099,1100,1103],{"class":833,"line":972},[831,1101,1102],{"class":837},"  background_review",[831,1104,842],{"class":841},[831,1106,1107,1109,1111,1113],{"class":833,"line":980},[831,1108,983],{"class":837},[831,1110,928],{"class":841},[831,1112,227],{"class":859},[831,1114,1115],{"class":863},"                 # or enabled: false to skip automatic reviews\n",[831,1117,1118,1120,1122],{"class":833,"line":991},[831,1119,994],{"class":837},[831,1121,928],{"class":841},[831,1123,1124],{"class":859},"google/gemini-3-flash-preview\n",[15,1126,1127,1130,1131,1134],{},[19,1128,1129],{},"max_summary_chars"," caps each subagent summary at the lower of that ceiling and a budget sized to the parent's remaining context (it's in Hermes's config defaults, not yet the docs), and an ",[19,1132,1133],{},"output_schema"," lets you \"require only the fields you will actually read\". Catch: the delegation model applies to the whole batch, and the docs' 3 to 5 times saving for a cheaper review model is author-claimed.",[141,1136,1138],{"id":1137},"_7-compress-tool-output-with-a-plugin","7. Compress tool output with a plugin",[15,1140,1141,1142,1145,1146,1149],{},"tokenjuice (CLI 0.11.2, Hermes plugin 0.10.0) is a native Hermes plugin, listed as community in the Hermes catalog, that compacts successful terminal output through ",[19,1143,1144],{},"transform_terminal_output","; its README claims no percentage. RTK (v1.2.1) installs a Hermes plugin with ",[19,1147,1148],{},"rtk init --agent hermes"," that rewrites terminal commands to compact versions, claiming \"up to 90% less command output\" (author-claimed) while adding that \"a 90% cut in command output is not a 90% cut in cost.\" Caveman (v4.2.0) mainly shortens replies, its 4.2.0 notes say its engine now unwraps Hermes tool results, and its docs list Hermes subagents as \"not verified\".",[822,1151,1155],{"className":1152,"code":1153,"language":1154,"meta":827,"style":827},"language-bash shiki shiki-themes github-light","npm install -g tokenjuice && hermes plugins install tokenjuice   # answer yes to \"Enable now?\"\nbrew install rtk && rtk init --agent hermes\nnpx @caveman-ai/cli@latest                                       # then start Hermes with:\ncaveman hermes\n","bash",[19,1156,1157,1188,1212,1223],{"__ignoreMap":827},[831,1158,1159,1163,1166,1169,1172,1175,1178,1181,1183,1185],{"class":833,"line":834},[831,1160,1162],{"class":1161},"s7eDp","npm",[831,1164,1165],{"class":859}," install",[831,1167,1168],{"class":931}," -g",[831,1170,1171],{"class":859}," tokenjuice",[831,1173,1174],{"class":841}," && ",[831,1176,1177],{"class":1161},"hermes",[831,1179,1180],{"class":859}," plugins",[831,1182,1165],{"class":859},[831,1184,1171],{"class":859},[831,1186,1187],{"class":863},"   # answer yes to \"Enable now?\"\n",[831,1189,1190,1193,1195,1198,1200,1203,1206,1209],{"class":833,"line":845},[831,1191,1192],{"class":1161},"brew",[831,1194,1165],{"class":859},[831,1196,1197],{"class":859}," rtk",[831,1199,1174],{"class":841},[831,1201,1202],{"class":1161},"rtk",[831,1204,1205],{"class":859}," init",[831,1207,1208],{"class":931}," --agent",[831,1210,1211],{"class":859}," hermes\n",[831,1213,1214,1217,1220],{"class":833,"line":853},[831,1215,1216],{"class":1161},"npx",[831,1218,1219],{"class":859}," @caveman-ai/cli@latest",[831,1221,1222],{"class":863},"                                       # then start Hermes with:\n",[831,1224,1225,1228],{"class":833,"line":950},[831,1226,1227],{"class":1161},"caveman",[831,1229,1211],{"class":859},[15,1231,1232],{},"All three checked 27 November 2026. Pick one per layer, compare a matched task, and see the roundup linked at the top for independent tests.",[141,1234,1236],{"id":1235},"_8-use-compress-before-a-long-new-task-and-clear-between-unrelated-ones","8. Use /compress before a long new task and /clear between unrelated ones",[15,1238,17,1239,1241,1242,195,1244,1246,1247,1249],{},[19,1240,625],{}," before a long new task in the same chat, and ",[19,1243,641],{},[19,1245,299],{}," when the next task is unrelated. Check ",[19,1248,250],{}," in between for totals without a model call.",[15,1251,1252],{},[271,1253],{"alt":1254,"src":1255},"8 fixes that reduce Hermes Agent token usage, from trimming the fixed prompt to plugins and session habits","/img/blog/hermes-agent-token-usage-fixes.jpg",[133,1257,1259],{"id":1258},"the-tokens-worth-chasing-are-the-ones-you-never-typed","The tokens worth chasing are the ones you never typed",[15,1261,1262],{},"Here's the thing about Hermes token usage: the expensive part is rarely the chat you see, but what Hermes carries, re-sends and runs around it.",[15,1264,1265],{},"Measure first, keep one model and one key per session, reset chats when a task ends, and add plugins last.",[133,1267,1269],{"id":1268},"want-an-always-on-agent-without-tuning-any-of-this","Want an always-on agent without tuning any of this?",[15,1271,1272],{},"BetterClaw is not hosted Hermes. It's our own managed agent platform: an always-on agent in Slack, Telegram, Discord or Gmail that uses tools, runs on a schedule and remembers context, with no server to maintain.",[15,1274,1275],{},"It runs on your own model keys across 28+ providers with zero markup. The free plan is 1 agent, 100 credits a month and 3 connectors with no expiry; paid plans start with Starter at $19 a month.",[15,1277,1278,1282,1283],{},[127,1279,1281],{"href":1280},"/free-plan","Start free"," · ",[127,1284,1286],{"href":1285},"/pricing","See plans and pricing",[133,1288,1290],{"id":1289},"frequently-asked-questions","Frequently Asked Questions",[141,1292,1294],{"id":1293},"how-do-i-see-my-token-usage-in-hermes-agent","How do I see my token usage in Hermes Agent?",[15,1296,17,1297,1299,1300,1302,1303,1305,1306,1308],{},[19,1298,21],{}," for this session's tokens, API calls and context, and ",[19,1301,94],{}," for the last 30 days with estimated cost; ",[19,1304,30],{}," shows what fills the window. For money, trust your provider's dashboard, because ",[19,1307,21],{}," leaves out subagent and auxiliary calls.",[141,1310,1312],{"id":1311},"why-does-hermes-agent-use-so-many-tokens","Why does Hermes Agent use so many tokens?",[15,1314,1315],{},"Every turn re-sends the fixed prompt (system prompt, skills index, memory, tool schemas) and the whole conversation, and tool output rides along until pruned. Subagents, background reviews and compression summaries add calls, and model switches re-read everything at full price.",[141,1317,1319],{"id":1318},"does-hermes-agent-support-prompt-caching","Does Hermes Agent support prompt caching?",[15,1321,1322,1323,1326,1327,1329],{},"Yes. On Claude it sets Anthropic cache breakpoints automatically (the docs say about 75% lower input cost on multi-turn chats), and ",[19,1324,1325],{},"cache_ttl: auto"," picks the tier. The cache is keyed to the model and account, so ",[19,1328,743],{}," switches, fallbacks and key rotations break it.",[141,1331,1333],{"id":1332},"what-is-the-difference-between-compress-and-clear-in-hermes","What is the difference between /compress and /clear in Hermes?",[15,1335,1336,1338,1339,1341,1342,195,1344,131],{},[19,1337,625],{}," summarises the conversation, keeps recent turns and soft-archives the rest, so the task continues on a smaller context. ",[19,1340,641],{}," clears the screen and starts a new session with nothing carried over; it's CLI-only, and chat apps use ",[19,1343,299],{},[19,1345,302],{},[141,1347,1349],{"id":1348},"how-do-i-change-when-hermes-compresses-context","How do I change when Hermes compresses context?",[15,1351,1352,1353,1356,1357,1360,1361,1364],{},"Set ",[19,1354,1355],{},"compression.threshold"," (default 0.50, floored at 0.75 on windows under 512K) or a hard cap with ",[19,1358,1359],{},"compression.threshold_tokens",", and Hermes uses whichever is lower. ",[19,1362,1363],{},"compression.model_thresholds"," sets ratios per model, and changes apply on a running gateway from the next message.",[141,1366,1368],{"id":1367},"does-hermes-or-openclaw-use-fewer-tokens","Does Hermes or OpenClaw use fewer tokens?",[15,1370,1371,1372,1376],{},"Neither project publishes a like-for-like figure, and both re-send their prompt, tools and history every turn. Run the same task on both and compare billed usage; our ",[127,1373,1375],{"href":1374},"/blog/openclaw-vs-hermes","OpenClaw vs Hermes comparison"," covers the rest.",[1378,1379,1380],"style",{},"html pre.shiki code .shJU0, html code.shiki .shJU0{--shiki-default:#22863A}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}",{"title":827,"searchDepth":845,"depth":845,"links":1382},[1383,1390,1391,1392,1393,1394,1404,1405,1406],{"id":135,"depth":845,"text":136,"children":1384},[1385,1386,1387,1388,1389],{"id":143,"depth":853,"text":21},{"id":157,"depth":853,"text":158},{"id":178,"depth":853,"text":94},{"id":202,"depth":853,"text":203},{"id":230,"depth":853,"text":231},{"id":277,"depth":845,"text":278},{"id":341,"depth":845,"text":342},{"id":618,"depth":845,"text":619},{"id":736,"depth":845,"text":737},{"id":784,"depth":845,"text":785,"children":1395},[1396,1397,1398,1399,1400,1401,1402,1403],{"id":791,"depth":853,"text":792},{"id":804,"depth":853,"text":805},{"id":874,"depth":853,"text":875},{"id":892,"depth":853,"text":893},{"id":1016,"depth":853,"text":1017},{"id":1039,"depth":853,"text":1040},{"id":1137,"depth":853,"text":1138},{"id":1235,"depth":853,"text":1236},{"id":1258,"depth":845,"text":1259},{"id":1268,"depth":845,"text":1269},{"id":1289,"depth":845,"text":1290,"children":1407},[1408,1409,1410,1411,1412,1413],{"id":1293,"depth":853,"text":1294},{"id":1311,"depth":853,"text":1312},{"id":1318,"depth":853,"text":1319},{"id":1332,"depth":853,"text":1333},{"id":1348,"depth":853,"text":1349},{"id":1367,"depth":853,"text":1368},"Guides","2026-11-27",null,"How to see Hermes Agent token usage with /usage, /context and /insights, how compression and prompt caching work in v0.23, and eight fixes that cut spend.","md",false,"/img/blog/hermes-agent-token-usage.jpg","Hermes Agent token usage cover: a /usage window with input and prompt token rows and the current context meter, above an Account limits card fed live by the provider",512,1024,{},true,"/blog/hermes-agent-token-usage","14 min read",{"title":5,"description":1417},"Hermes Agent Token Usage: Check It, Compress It, 8 Fixes","blog/hermes-agent-token-usage","Every command, threshold and config key below was checked against Hermes Agent v0.23.4's docs and source code on 27 November 2026.",[1433,1434,1435,1436,1437,1438,1439,1440],"hermes agent token usage","hermes agent reduce token usage","hermes agent prompt caching","hermes compress vs clear","hermes /usage","hermes insights","hermes compression threshold","hermes protect_last_n","aOjVJuL69jGwFdzLMhlBb4vxH_avt8K2tlGV61zyyAs",[1443,1451,1459],{"stem":1444,"title":1445,"description":1446,"date":1447,"image":1448,"category":1414,"redirected":1419,"author":1449,"readingTime":1450},"blog/hermes-agent-hosting","Run Hermes Agent 24/7: setup, monitoring and recovery","Keep Hermes Agent running with restart policies, persistent storage, backups and checks. Includes an AWS Lightsail example and real billing caveats.","2026-11-14","/img/blog/hermes-agent-hosting.jpg",{"name":7,"role":8,"avatar":9,"bio":10},"11 min read",{"stem":1452,"title":1453,"description":1454,"date":1455,"image":1456,"category":1414,"redirected":1419,"author":1457,"readingTime":1458},"blog/hermes-agent-latest-version","Hermes Agent latest version: updates and slash commands","Check the current Hermes Agent release, update safely, and find official slash-command documentation. Commands vary by version and setup.","2026-11-10","/img/blog/hermes-agent-latest-version.jpg",{"name":7,"role":8,"avatar":9,"bio":10},"9 min read",{"stem":1460,"title":1461,"description":1462,"date":1463,"image":1464,"category":1414,"redirected":1419,"author":1465,"readingTime":1466},"blog/hermes-agent-desktop-app","Hermes Agent Desktop: install plugins safely","Install Hermes Agent Desktop, understand what plugins can do, and use the official consent flow before granting access to your files or keys.","2026-11-05","/img/blog/hermes-agent-desktop-app.jpg",{"name":7,"role":8,"avatar":9,"bio":10},"7 min read",[],{"width":1423,"height":1422},1795783802151]