OpenClaw Token Saving Ultimate Guide: Use the Strongest Model, Spend the Least Money / Includes Prompts

marsbitОпубліковано о 2026-02-11Востаннє оновлено о 2026-02-11

Анотація

This guide provides strategies to reduce OpenClaw token usage by 60-85% when using expensive models like Claude Opus. The main costs come not just from your input and the model's output, but from hidden overhead: a fixed System Prompt (~3000-5000 tokens), injected context files like AGENTS.md and MEMORY.md (~3000-14000 tokens), and conversation history. Key strategies include: 1. **Model Tiering:** Use the cheaper Claude Sonnet for 80% of daily tasks (chat, simple Q&A, cron jobs) and reserve Opus for complex tasks like writing and deep analysis. 2. **Context Slimming:** Drastically reduce the token count in injected files (AGENTS.md, SOUL.md, MEMORY.md) and remove unnecessary files from `workspaceFiles`. 3. **Cron Optimization:** Lower the frequency, merge tasks, and downgrade non-critical cron jobs to Sonnet. Configure deliveries for notifications only when necessary. 4. **Heartbeat Tuning:** Increase the interval (e.g., 45-60 minutes), set a silent period overnight, and slim down the HEARTBEAT.md file. 5. **Precise Retrieval with QMD:** Implement the local, zero-cost qmd tool for semantic search. This allows the agent to retrieve only specific relevant paragraphs from documents instead of reading entire files, saving up to 90% of tokens per query. 6. **Memory Search Selection:** For small memory files, use local embedding; for larger or multi-language needs, consider Voyage AI's free tier. By implementing these changes—model switching, context reduction, and smarter...

Author: xiyu

Want to use Claude Opus 4.6 but don't want the bill to explode at the end of the month? This guide will help you cut 60-85% of the cost.

1. Where do tokens go?

You think tokens are just "what you say + what the AI replies"? Actually, it's far more than that.

Hidden costs of each conversation:

  • System Prompt (~3000-5000 tokens): OpenClaw core instructions, cannot be changed

  • Context file injection (~3000-14000 tokens): AGENTS.md, SOUL.md, MEMORY.md, etc., included in every conversation – this is the biggest hidden cost

  • Message history: Gets longer the more you chat

  • Your input + AI output: This is what you thought was the "whole" thing

A simple "How's the weather today?" actually consumes 8000-15000 input tokens. Calculated with Opus, just the context costs $0.12-0.22.

Cron is even worse: Each trigger = a brand new conversation = re-injecting all context. A cron running every 15 minutes, 96 times a day, costs $10-20 per day under Opus.

Heartbeat is the same principle: Essentially also a conversation call, the shorter the interval, the more money it burns.

2. Model Tiering: Sonnet for Daily, Opus for Critical

The first major money-saving trick, with the most dramatic effect. Sonnet is priced at about 1/5 of Opus, and is fully sufficient for 80% of daily tasks.

markdown

Prompt:

Please help me change OpenClaw's default model to Claude Sonnet,

and only use Opus when deep analysis or creation is needed.

Specific needs:

1) Set default model to Sonnet

2) cron tasks default to Sonnet

3) Only specify Opus for writing, deep analysis tasks

Opus scenarios: Long-form writing, complex code, multi-step reasoning, creative tasks

Sonnet scenarios: Daily chat, simple Q&A, cron checks, heartbeat, file operations, translation

Actual test: After switching, monthly cost dropped 65%, experience almost no difference.

3. Context Slimming: Cut the Hidden Token Hogs

The "background noise" per call can be 3000-14000 tokens. Streamlining injected files is the optimization with the highest cost-performance ratio.

markdown

Prompt:

Help me streamline OpenClaw's context files to save tokens.

Specifically include: 1) Delete unnecessary parts of AGENTS.md (group chat rules, TTS, unused features), compress to within 800 tokens

2) Simplify SOUL.md to concise key points, 300-500 tokens

3) Clean up expired information in MEMORY.md, control within 2000 tokens

4) Check workspaceFiles configuration, remove unnecessary injected files

Rule of thumb: For every 1000 tokens reduced in injection, calculated at 100 Opus calls per day, save about $45 per month.

4. Cron Optimization: The Most Hidden Cost Killer

markdown

Prompt: Help me optimize OpenClaw's cron tasks to save tokens.

Please:

1) List all cron tasks, their frequency, and model

2) Downgrade all non-creative tasks to Sonnet

3) Merge tasks in the same time period (e.g., combine multiple checks into one)

4) Reduce unnecessary high frequency (system check from 10 minutes to 30 minutes, version check from 3 times/day to 1 time/day)

5) Configure delivery to notify on demand, no message when normal

Core principle: More frequent is not always better, most "real-time" demands are false demands. Merging 5 independent checks into 1 call saves 75% context injection cost.

5. Heartbeat Optimization

markdown

Prompt: Help me optimize OpenClaw heartbeat configuration:

1) Set work hour interval to 45-60 minutes

2) Set 23:00-08:00 at night as silent period

3) Streamline HEARTBEAT.md to the minimum number of lines

4) Merge scattered check tasks into heartbeat for batch execution

6. Precise Retrieval: Use qmd to Save 90% Input Token

When the agent looks up information, it defaults to "reading the full text" – a 500-line file is 3000-5000 tokens, but it only needs 10 lines from it. 90% of input tokens are wasted.

qmd is a local semantic retrieval tool that builds a full-text + vector index, allowing the agent to pinpoint paragraphs instead of reading the entire file. All computed locally, zero API cost.

Use with mq (Mini Query): Preview directory structure, precise paragraph extraction, keyword search – only read the needed 10-30 lines each time.

markdown

Prompt:

Help me configure qmd knowledge base retrieval to save tokens.

Github address: https://github.com/tobi/qmd

Needs:

1) Install qmd

2) Build index for the working directory

3) Add retrieval rules in AGENTS.md, force agent to prioritize qmd/mq search over direct read full text

4) Set up scheduled index updates

Actual effect: Each information lookup dropped from 15000 tokens to 1500 tokens, a 90% reduction.

Difference from memorySearch: memorySearch manages "memories" (MEMORY.md), qmd manages "looking up information" (custom knowledge base), they do not affect each other.

7. Memory Search Choice

markdown

Prompt: Help me configure OpenClaw's memorySearch.

If I don't have many memory files (dozens of md),

recommend using local embedding or Voyage AI?

Please explain the cost and retrieval quality differences of each.

Simple conclusion: Use local embedding for few memory files (zero cost), use Voyage AI for high multilingual needs or many files (200 million tokens per account free).

8. Ultimate Configuration Checklist

markdown

Prompt:

Please help me optimize OpenClaw configuration in one go to save tokens to the maximum extent, execute according to the following checklist:

Change default model to Sonnet, only reserve Opus for creative/analysis tasks

Streamline AGENTS.md / SOUL.md / MEMORY.md

Downgrade all cron tasks to Sonnet + merge + reduce frequency

Heartbeat interval 45 minutes + nighttime silence

Configure qmd precise retrieval to replace full-text reading

workspaceFiles only keep necessary files

Regularly streamline memory files, control MEMORY.md within 2000 tokens

Configure once, benefit long-term:

1. Model Tiering — Sonnet daily, Opus critical, save 60-80%

2. Context Slimming — Streamline files + qmd precise retrieval, save 30-90% input token

3. Reduce Calls — Merge cron, extend heartbeat, enable silent period

Sonnet 4 is already very strong, can't feel the difference in daily use. Just switch to Opus when you really need it.

Based on multi-agent system practical experience, data are desensitized estimates.

Трендові криптовалюти

Пов'язані питання

QWhat are the main hidden costs of token usage in OpenClaw according to the article?

AThe main hidden costs include the System Prompt (~3000-5000 tokens), context file injections like AGENTS.md, SOUL.md, and MEMORY.md (~3000-14000 tokens), and the accumulation of historical messages in conversations.

QWhat is the primary strategy recommended for reducing costs with model selection?

AThe primary strategy is model layering: using Claude Sonnet for daily tasks and reserving Claude Opus only for critical tasks like deep analysis or creative work, as Sonnet is about 1/5 the cost of Opus.

QHow does using qmd help in reducing token consumption?

Aqmd is a local semantic retrieval tool that creates a vector index for precise paragraph retrieval instead of reading entire files, reducing input tokens by up to 90% for research tasks, as it only fetches the needed 10-30 lines.

QWhat optimizations are suggested for cron tasks to save tokens?

AOptimizations include downgrading non-creative tasks to Sonnet, merging multiple tasks into single calls, reducing unnecessary high frequency (e.g., from 10 to 30 minutes), and configuring delivery for on-demand notifications to avoid messages when normal.

QWhat is the recommended approach for heartbeat configuration to minimize costs?

ASet heartbeat intervals to 45-60 minutes during work hours, implement a silent period from 23:00 to 08:00,精简 HEARTBEAT.md to minimal lines, and consolidate scattered check tasks into batch executions within heartbeat.

Пов'язані матеріали

Low Investment Isn't Apple's Immunity Pass

While Meta and Google face investor scrutiny over ballooning AI capital expenditures, Apple's minimal AI investment has paradoxically become a strength. Its market cap recently reclaimed the global top spot, surpassing $5 trillion. The irony is deep: Apple's own AI efforts have lagged, with "Apple Intelligence" delayed and core talent lost, forcing reliance on partners like Google Gemini and Alibaba's Qianwen. Its Q3 FY2026 (Q2 CY) earnings initially seemed stellar. Revenue hit $109.4B (up 16% YoY), with iPhone and Mac sales, growing 22% and 29% respectively, driving most of the growth. However, the stock fell over 8% post-earnings. The primary concern was a weaker Q4 revenue growth forecast of 9-11%, below expectations, due to looming supply chain constraints. Apple is feeling the indirect cost of the AI boom. Soaring memory and chip prices, fueled by massive data center investments from Microsoft, Amazon, and others, are forcing Apple to raise Mac and iPad prices significantly. The upcoming iPhone launch is also expected to see substantial price hikes. Despite avoiding heavy AI infrastructure spending—its capital expenditures are actually down 28%—Apple cannot escape the industry-wide supply and cost pressures. While Apple's operating cash flow remains robust, its substantial R&D spending (up 32% YoY) has yet to yield major AI breakthroughs. As Tim Cook prepares to step down as CEO, Apple faces a challenging transition: balancing its premium hardware success against the strategic and cost pressures of the AI era it has so far cautiously navigated.

marsbit17 хв тому

Low Investment Isn't Apple's Immunity Pass

marsbit17 хв тому

PA Graphics Explanation | One Chart to Understand the Major Web3 Events in August 2026

**PANews Crypto Calendar: Key Web3 Events in August 2026** PANews introduces its revamped crypto calendar, featuring comprehensive coverage, flexible filtering, and easy export options. The market in August will be shaped by multiple key events across macroeconomics, regulation, tokenomics, and project developments: * **Macro & Policy:** Key US economic data releases (July Non-Farm Payrolls, CPI), the Federal Reserve meeting minutes, and the Jackson Hole Economic Symposium will be in focus. On the regulatory front, the US Senate plans to release a new draft of the *CLARITY Act*, while the EU's expanded crypto ban against Belarus comes into effect. * **Token Unlocks:** Significant token unlocks are scheduled for assets including ENA, AVAX, CONX, ZRO, and KAITO, which may influence market volatility. * **Project Updates & Shutdowns:** Several services, including Exchange Art, Ctrl Wallet, Zapper, NFTfi, and Summer.fi, are set to cease operations or undergo major adjustments. Users are advised to manage their assets accordingly. * **Corporate Activity:** Q2 earnings reports from companies like SpaceX, Circle, and Nvidia are due. Unitree Robotics will initiate its IPO subscription on the STAR Market, and Moonshot AI plans to begin a Pre-IPO financing round. * **Industry Events:** Major conferences such as Bitcoin Asia 2026 and the 2026 Digital Expo will take place. The overarching market narrative for August will revolve around macroeconomic expectations, regulatory developments, token unlock schedules, and ongoing industry consolidation.

marsbit27 хв тому

PA Graphics Explanation | One Chart to Understand the Major Web3 Events in August 2026

marsbit27 хв тому

Wall Street's Most Famous 'Cassandra' Now Has His Sights Set on Nvidia

Michael Burry, the famed "Big Short" investor, has once again captured Wall Street's attention with a series of short positions against major tech and semiconductor stocks, most notably Nvidia. In late June and July, through his "Cassandra Unchained" newsletter, Burry disclosed short bets against Nvidia, Tesla, Applied Materials, Caterpillar, the SOXX semiconductor ETF, and later, Micron Technology. His core thesis revolves around potential distortions in the AI infrastructure boom, specifically questioning whether extended depreciation schedules (e.g., 6 years vs. a realistic 2-3 years for AI chips) by cloud giants like Microsoft and Google artificially inflate profits. He also raises concerns about possible "off-balance-sheet circular financing," where chip demand might be propped up by vendor-backed funding to clients. Nvidia's stock experienced volatility following these disclosures, briefly dipping but largely holding near Burry's reported entry points, leaving his positions roughly flat or slightly underwater as of late July. This move is part of a pattern for Burry, whose track record since his legendary 2008 bet is mixed. He has faced notable losses, such as on Tesla in 2021, while scoring on broader market turns like the 2020 pandemic crash. His methodology focuses intensely on free cash flow and scrutinizing original financial documents to spot overvaluation and structural risks, but it often struggles with timing the market. The article contrasts Burry's stance with other prominent investors. Steve Eisman, another "Big Short" figure, is not shorting Nvidia, citing strong fundamentals but expressing nervousness about sustainability. Jim Chanos agrees with the broad "accounting mismatch" concern—comparing it to the dot-com bubble—but targets financial leverage in private equity firms rather than the chip stocks themselves. While Nvidia's short interest remains relatively low at 1.3-1.4% of float, the massive stock size means absolute short losses have been significant, exceeding $5 billion earlier this year. The piece concludes that for ordinary investors, the key takeaway is not replicating specific short bets but learning from the critical frameworks these investors use: questioning rosy accounting, identifying structural vulnerabilities, and maintaining skepticism during market euphoria, even if pinpointing the exact catalyst for a downturn remains elusive.

marsbit52 хв тому

Wall Street's Most Famous 'Cassandra' Now Has His Sights Set on Nvidia

marsbit52 хв тому

Weekly Selection丨Epic Stock Market Volatility, Changxin Tech's IPO Reshapes Storage Landscape, Saylor Aims to Re-Anchor STRC Around September 8th

PANews Weekly Digest: Market Turmoil, Tech Breakthroughs, and Crypto Developments. The week saw significant volatility across global markets. South Korea's KOSPI index experienced extreme turbulence, including multiple trading halts, largely driven by sharp declines in AI hardware stocks like SK Hynix. In contrast, China's Changxin Xinqiao (CXC) achieved a landmark IPO with a market cap surpassing 4 trillion yuan, marking a major success for the domestic DRAM industry after a decade of losses. In the crypto and Web3 space, several key narratives emerged. AI is driving demand for new infrastructure, with projects like AI agent wallets and programmable payments gaining traction, attracting interest from firms like Coinbase. The Bitcoin mining sector is pivoting, with companies like MARA focusing on energy management as electricity becomes a core AI-era asset. Meanwhile, the RWA (Real World Assets) sector faces a "utilization puzzle," with hundreds of billions in on-chain assets remaining dormant. Notable market movements included a historic single-day surge of over 17% for the KOSPI index and a significant migration of $16.5 billion in staked ETH within the Lido ecosystem. Michael Saylor announced a target to re-peg the STRC stablecoin around September 8th. Other highlights include discussions on Ethereum's ambitious 2030 roadmap for scaling and privacy, analysis showing high protocol revenues not always translating to token price gains, and warnings from Citi about potential extreme commodity price shocks by late 2026.

marsbit57 хв тому

Weekly Selection丨Epic Stock Market Volatility, Changxin Tech's IPO Reshapes Storage Landscape, Saylor Aims to Re-Anchor STRC Around September 8th

marsbit57 хв тому

When the Market Begins to Question AI Capex: A Full Analysis of Q2 Earnings Reports from Five Tech Giants

In late July 2026, five major US tech giants—Alphabet, Intel, Microsoft, Meta, and Apple—released their Q2 earnings reports. While all companies exceeded revenue and profit expectations, driven by strong AI-related business growth, investor reactions diverged sharply due to concerns over escalating AI capital expenditures (capex) and their impact on free cash flow. Alphabet reported strong revenue growth and a surging cloud business, but its stock fell after announcing a doubled year-on-year capex and negative quarterly free cash flow for the first time. Intel posted its strongest revenue growth in over 15 years, but its stock experienced volatile trading after significantly raising its full-year capex guidance. Microsoft saw its stock surge after beating estimates and, crucially, lowering its capex forecast while projecting positive free cash flow. Meta faced the most severe sell-off as its profits declined despite revenue beats, with free cash flow plunging over 90% and its capex guidance raised. Apple reported record June-quarter results, but its stock plummeted after providing Q4 revenue guidance that fell short of expectations, citing supply chain constraints and forex headwinds. The overall takeaway is that the market's focus has shifted from validating AI demand to scrutinizing the timeline for returns on massive AI investments. Companies demonstrating a clearer path to managing capex and preserving free cash flow, like Microsoft, were rewarded, while those signaling continued aggressive spending faced investor skepticism.

Odaily星球日报1 год тому

When the Market Begins to Question AI Capex: A Full Analysis of Q2 Earnings Reports from Five Tech Giants

Odaily星球日报1 год тому

Торгівля

Спот

Популярні статті

Як купити T

Ласкаво просимо до HTX.com! Ми зробили покупку Threshold Network Token (T) простою та зручною. Дотримуйтесь нашої покрокової інструкції, щоб розпочати свою криптовалютну подорож.Крок 1: Створіть обліковий запис на HTXВикористовуйте свою електронну пошту або номер телефону, щоб зареєструвати обліковий запис на HTX безплатно. Пройдіть безпроблемну реєстрацію й отримайте доступ до всіх функцій.ЗареєструватисьКрок 2: Перейдіть до розділу Купити крипту і виберіть спосіб оплатиКредитна/дебетова картка: використовуйте вашу картку Visa або Mastercard, щоб миттєво купити Threshold Network Token (T).Баланс: використовуйте кошти з балансу вашого рахунку HTX для безперешкодної торгівлі.Треті особи: ми додали популярні способи оплати, такі як Google Pay та Apple Pay, щоб підвищити зручність.P2P: Торгуйте безпосередньо з іншими користувачами на HTX.Позабіржова торгівля (OTC): ми пропонуємо індивідуальні послуги та конкурентні обмінні курси для трейдерів.Крок 3: Зберігайте свої Threshold Network Token (T)Після придбання Threshold Network Token (T) збережіть його у своєму обліковому записі на HTX. Крім того, ви можете відправити його в інше місце за допомогою блокчейн-переказу або використовувати його для торгівлі іншими криптовалютами.Крок 4: Торгівля Threshold Network Token (T)Легко торгуйте Threshold Network Token (T) на спотовому ринку HTX. Просто увійдіть до свого облікового запису, виберіть торгову пару, укладайте угоди та спостерігайте за ними в режимі реального часу. Ми пропонуємо зручний досвід як для початківців, так і для досвідчених трейдерів.

529 переглядів усьогоОпубліковано 2024.12.10Оновлено 2026.06.02

Як купити T

Обговорення

Ласкаво просимо до спільноти HTX. Тут ви можете бути в курсі останніх подій розвитку платформи та отримати доступ до професійної ринкової інформації. Нижче представлені думки користувачів щодо ціни T (T).

活动图片