---
title: "OpenClaw and Hermes Agent on a cheap OpenAI-compatible model"
description: "Connect OpenClaw or Hermes Agent to an OpenAI-compatible endpoint, see why scheduled checks burn tokens, and cut the bill with lighter context and cheaper models."
url: https://broadrouter.com/blog/openclaw-hermes-agent-cheap-model/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# OpenClaw and Hermes Agent on a cheap model: setup and token math

By the BroadNet Inference team · 6 min read · Published 2026-11-15

Both agents accept a custom OpenAI-compatible endpoint: OpenClaw under models.providers with api "openai-completions", Hermes Agent with provider: custom and a base\_url. Cost is driven by context size times how often the agent runs times the model price. Shrink the context, run scheduled checks less often and on a cheaper model, and test tool calling before you commit.

## Key takeaways

-   An always-on agent resends its context on every scheduled check and turn, so context size times frequency sets the bill.
-   OpenClaw takes a custom endpoint under models.providers with api "openai-completions"; Hermes Agent takes provider: custom plus base\_url in config.yaml.
-   Hermes Agent needs at least 64,000 tokens of context for tool use, which rules out 32K-context models as the main model.
-   On BroadNet, tool calling is documented for GLM 5.3 and Qwen3.8 27B only. Test DeepSeek V4.1 Flash with your agent before you rely on the flat plan.
-   Light context, fewer runs and a cheaper model for routine checks cut tokens more than any discount.

**On this page**

1.  Why do always-on agents cost so much?
2.  How do you connect OpenClaw to an OpenAI-compatible endpoint?
3.  How do you point Hermes Agent at a custom endpoint?
4.  Which BroadNet models fit these agents?
5.  What does the token math look like?
6.  How do you cut the bill without breaking the agent?
7.  When does a flat plan make sense?
8.  What about voice notes?
9.  Where BroadNet Inference fits

OpenClaw and Hermes Agent are personal agents you leave running: they read your messages, run tools and wake up on a schedule to check things. Both can use any OpenAI-compatible endpoint, so you can choose a cheaper model than the defaults. The catch is that every run sends context, and context is what you pay for.

## Why do always-on agents cost so much?

A chat app sends a model one message at a time. A personal agent sends its system prompt, its workspace files, its memory and a slice of the conversation on every turn, and it also runs turns on its own, on a schedule. The bill is roughly:

**context tokens per run × runs per day × price per token**, plus output.

Notebookcheck reported in February 2026 that OpenClaw’s “heartbeat” check, which ran every 30 minutes, sent the entire context window to the API, about 120,000 tokens for a trivial check. One user’s overnight run of about 25 such checks on Claude Opus reportedly cost about USD 18.75. Those figures are user reports quoted by Notebookcheck, not measurements of ours, but the mechanism is the point: an idle agent still spends tokens.

Since then, OpenClaw’s docs describe heartbeats as retired. Scheduled checks are now ordinary automation jobs, and `openclaw doctor --fix` migrates old heartbeat settings into them. The setup job still runs every 30 minutes unless the provider supplies a different cadence, so the arithmetic below still applies.

## How do you connect OpenClaw to an OpenAI-compatible endpoint?

OpenClaw registers custom providers under `models.providers.<id>`. For an OpenAI-compatible server, set `baseUrl`, `apiKey`, `api: "openai-completions"` and a `models` array. Only `id` is required per model, but the docs recommend explicit `contextWindow` and `maxTokens` values that match the server. Pointed at BroadNet Inference, with field names from the OpenClaw docs and values from BroadNet’s docs and price feed:

```json5
{
  models: {
    providers: {
      broadnet: {
        baseUrl: "https://inference.broadnet.ai/v1",
        apiKey: "${BROADNET_API_KEY}",
        api: "openai-completions",
        models: [
          { id: "broadnet/glm-5.3", name: "GLM 5.3", reasoning: true,
            input: ["text"], contextWindow: 1048576 },
          { id: "broadnet/qwen3.8-27b", name: "Qwen3.8 27B", reasoning: true,
            input: ["text", "image"], contextWindow: 262144 },
        ],
      },
    },
  },
}
```

Model references are the provider id, a slash, then the model id. `agents.defaults.models` only sets aliases and metadata; it does not register a model, so the `models.providers` entry is what makes it callable. Two compatibility notes from the same page: `compat.supportsReasoningEffort: false` stops OpenClaw sending `reasoning_effort` if an endpoint rejects it (BroadNet’s docs accept `reasoning_effort: low`), and a model that takes images needs `input: ["text", "image"]` so attachments go in natively.

Set the `cost` fields too. OpenClaw’s automation estimates use the prices in your local `models.json` when a runtime reports tokens without a cost, and the default is zero, which makes every run look free.

## How do you point Hermes Agent at a custom endpoint?

Run `hermes model` in a terminal and choose the custom endpoint option; it asks for the base URL, API key and model name. Or edit `~/.hermes/config.yaml`:

```yaml
model:
  default: broadnet/qwen3.8-27b
  provider: custom
  base_url: https://inference.broadnet.ai/v1
  key_env: BROADNET_API_KEY
```

Three things from the Hermes docs matter when you pick a model:

-   **Context floor.** Hermes Agent requires at least 64,000 tokens of context for agent use with tools and rejects smaller windows at startup.
-   **Tool calls.** If the server does not parse tool calls, the model prints them as text and nothing runs.
-   **Auxiliary tasks.** Vision, compression and titles go to your main chat model by default, and each can be overridden to a cheaper model.

## Which BroadNet models fit these agents?

| Model | Context | Tools documented by BroadNet | Input / cached / output per 1M | Fits Hermes 64K floor |
| --- | --- | --- | --- | --- |
| [GLM 5.3](https://broadrouter.com/models/glm-5.3/) | 1,048,576 | Yes | $0.78 / $0.173 / $3.46 | Yes |
| [Qwen3.8 27B](https://broadrouter.com/models/qwen3.8-27b/) | 262,144 | Yes | $0.175 / $0.0435 / $2.17 | Yes |
| [DeepSeek V4.1 Flash](https://broadrouter.com/models/deepseek-v4.1-flash/) | 1,048,576 | Not documented | $0.175 / $0.0055 / $0.52, or $60 a month flat | Yes |
| [Gemma 4 VL 26B](https://broadrouter.com/models/gemma-4-vl-26b/) | 32,768 | Not documented | $0.10 / no cache price / $0.22 | No |

Both agents live on tool calls, so start with GLM 5.3 or Qwen3.8 27B. DeepSeek V4.1 Flash has the lowest output and cached-input prices of the three that fit, and it is the only one on a flat plan, but BroadNet does not document tool calling for it. Run your real agent on a $1 Meteor hour and watch whether tools actually fire before you buy a month. [Tool calling with open models](https://broadrouter.com/blog/tool-calling-open-models/) covers what to check. Gemma is the model the $5 starting credit covers, but its 32K window is below the Hermes floor and tight for a workspace-heavy OpenClaw agent.

## What does the token math look like?

Illustrative assumptions, not measurements. Read your own numbers from the `usage` block of each response or your provider’s usage page.

| Scheduled check | Context per run | Runs a day | Input tokens a month (30 days) |
| --- | --- | --- | --- |
| Full context every 30 minutes | 120,000 | 48 | 172.8 million |
| Full context every hour | 120,000 | 24 | 86.4 million |
| Light context every hour | 15,000 | 24 | 10.8 million |
| Light context, every 2 hours, 12 active hours | 15,000 | 6 | 2.7 million |

That is before any chat or task. Multiply the input column by the per-1M input price in the table above, or run it through the [LLM API cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/). If the prefix stays identical between runs, much of it can bill at the cached price instead, $0.0055 rather than $0.175 per 1M on DeepSeek V4.1 Flash; [how to keep the prefix cacheable](https://broadrouter.com/blog/prompt-structure-for-caching/). To see where an agent’s tokens go beyond scheduled checks, read [agent token budget](https://broadrouter.com/blog/agent-token-budget/).

## How do you cut the bill without breaking the agent?

Use the controls each tool documents:

-   **Light context for routine jobs (OpenClaw).** `--light-context` skips workspace bootstrap file injection. Isolated jobs start a fresh session, so they don’t drag the whole conversation along. Keep job scratch short; it is injected into every run, up to 256 KiB.
-   **A cheaper model per job.** OpenClaw’s `--model` sets a job’s primary model ahead of session preferences, and its docs say routine summaries and status checks suit a lighter model. In Hermes, `hermes cron create --model … --provider …` pins a model per job, and unpinned jobs use `cron.model` if set.
-   **Fewer runs, active hours only.** OpenClaw jobs take an `activeHours` window. Halving frequency halves scheduled-check tokens.
-   **Quiet results.** In OpenClaw, a check with nothing to report returns `NO_REPLY` and stays silent, so you are not messaged on every run.
-   **No-model jobs.** Hermes script jobs run with no model, so pure polling costs nothing.
-   **Spend limits.** Put a budget on the key; [LLM API spend control](https://broadrouter.com/blog/llm-api-spend-control/) covers budgets and loop protection.

## When does a flat plan make sense?

A Full Moon session has no token meter, window or cap for DeepSeek V4.1 Flash: $60 a month, $15 a week or $1 an hour. A 120,000-token context every 30 minutes costs the same as a light one. Two limits stay:

-   **One request at a time per session.** A scheduled job and your chat reply queue behind each other. Buy a second session if they often overlap. [How sessions work](https://broadrouter.com/guides/unlimited-llm-api-sessions/).
-   **Tool calling is your test, not BroadNet’s promise.** See above.

If your agent mostly sleeps and runs a few light checks a day, pay-as-you-go is cheaper. Compare both with the [flat-rate vs per-token calculator](https://broadrouter.com/tools/flat-rate-vs-per-token-calculator/).

## What about voice notes?

If your agent receives WhatsApp or Telegram voice notes, transcribe them before the LLM sees them. BroadNet Transcribe Arabic costs $0.0042 a minute and BroadNet Transcribe (14 languages) $0.002, and both work on the starting credit. The [WhatsApp voice note guide](https://broadrouter.com/guides/transcribe-whatsapp-voice-notes/) has the conversion step.

## Where BroadNet Inference fits

BroadNet gives these agents an OpenAI-compatible endpoint with two tool-documented models, a flat-rate model for heavy context, cached-input prices and speech to text on one key, and it does not retain prompts or answers. It is not the best fit if you need a model whose tool calling is proven in your agent on day one at the lowest price, or many parallel requests on one flat session. Agents with heavy browser or vision use may also do better on a larger multimodal model elsewhere. Test with your own agent for an hour before you commit.

Free tools for this

-   [Agent run cost estimator](https://broadrouter.com/tools/agent-run-cost-estimator/) Context growth per step, total tokens and cost of one agent run, with a DeepSeek session comparison.
-   [LLM batch job planner](https://broadrouter.com/tools/llm-batch-job-planner/) Run time, binding limit, cost per model and the flat sessions needed to finish a big job by a deadline.
-   [Flat-rate vs per-token LLM cost calculator](https://broadrouter.com/tools/flat-rate-vs-per-token-calculator/) Break-even between an unlimited plan and paying per token, per agent.
-   [LLM rate limit and concurrency calculator](https://broadrouter.com/tools/llm-rate-limit-calculator/) Which limit binds first: RPM, TPM or concurrency, with Little's law.

[All free tools](https://broadrouter.com/tools/)

## Terms in this article

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[API key](https://broadrouter.com/glossary/api-key/)

An API key is a secret string that identifies and authorizes a client calling an API. LLM APIs usually expect it in an Authorization: Bearer header, and anyone who holds the key can make requests that are billed to the account that owns it.

[Base URL](https://broadrouter.com/glossary/base-url/)

A base URL is the fixed root address of an API, such as https://api.example.com/v1, that a client puts in front of every endpoint path, such as /chat/completions. In OpenAI-compatible SDKs, changing the base URL, together with the API key and model ID, points the same code at a different provider.

[Concurrency](https://broadrouter.com/glossary/concurrency/)

Concurrency is the number of requests a client has in flight at the same time. LLM APIs often cap it per key or plan, separately from requests per minute, because each open request holds GPU capacity until its response has finished.

[Context window](https://broadrouter.com/glossary/context-window/)

A context window is the maximum number of tokens a language model can work with in a single request. It covers the prompt, conversation history, tool definitions, images and the generated output, including any reasoning tokens. Anything that does not fit must be cut, summarised or split across several requests.

[Input and output tokens](https://broadrouter.com/glossary/input-and-output-tokens/)

Input tokens are the tokens a language model reads in a request, including the system prompt, conversation history, tool definitions and images. Output tokens are the tokens it generates in reply, including any reasoning. LLM APIs usually price them separately, and output usually costs more.

[Multimodal AI](https://broadrouter.com/glossary/multimodal/)

Multimodal AI is a model or system that works with more than one type of data, such as text, images, video and audio. A multimodal model might read a photo and a question together, or take speech in and answer in text. A vision-language model is the most common kind.

## Questions

### Can OpenClaw use a custom OpenAI-compatible API?

Yes. Add a provider under models.providers with a baseUrl, an apiKey (an environment reference is best), api set to "openai-completions" and a models array with at least each model id. Refer to the model as provider id, a slash, then model id.

### How do I point Hermes Agent at a custom endpoint?

Run hermes model and pick the custom endpoint option, or set model.provider to custom, model.base\_url to the /v1 URL, model.default to the model id, and api\_key or key\_env in ~/.hermes/config.yaml.

### Why does OpenClaw use so many tokens when idle?

Scheduled checks are model calls. A Notebookcheck report from February 2026 described a 30-minute check that sent about 120,000 tokens of context each time. OpenClaw has since moved heartbeats to automation jobs, which can run with light context and their own model.

### Which BroadNet model should I use for OpenClaw or Hermes Agent?

Start with GLM 5.3 or Qwen3.8 27B, the two models whose tool calling BroadNet documents. DeepSeek V4.1 Flash is cheaper and has a flat plan, but test its tool calls in your agent first.

### Can I run Hermes Agent on the free starting credit?

Not well. The starting credit covers BroadNet Gemma 4 VL 26B and the Transcribe models, and Gemma has a 32,768-token context, below the 64,000 tokens Hermes Agent requires for tool use. The chat models that fit need a top-up or a plan.

### Does a flat plan stop agent costs from growing?

A Full Moon session has no token meter, so long contexts and frequent checks do not raise the bill. It runs one request at a time, so a scheduled job and a chat reply queue behind each other unless you buy a second session.

## Keep reading

-   [Agent token budget: where an agent loop's tokens go](https://broadrouter.com/blog/agent-token-budget/)
-   [Cached input tokens: how to cut an LLM API bill](https://broadrouter.com/blog/cached-input-tokens-explained/)
-   [How to structure prompts so the prefix caches](https://broadrouter.com/blog/prompt-structure-for-caching/)
-   [LLM API spend control: budgets, key limits and loop protection](https://broadrouter.com/blog/llm-api-spend-control/)
-   [Tool calling with open models: schemas, parallel calls, retries](https://broadrouter.com/blog/tool-calling-open-models/)
-   [What "unlimited" really means in an LLM API plan](https://broadrouter.com/blog/what-unlimited-llm-api-really-means/)
-   [Claude Code with open models: proxies, native endpoints and limits](https://broadrouter.com/blog/claude-code-with-openai-compatible-models/)
-   [Prompt injection in coding agents: defences that actually hold](https://broadrouter.com/blog/prompt-injection-coding-agents/)
-   [Guide: How the unlimited LLM API plans work for agents](https://broadrouter.com/guides/unlimited-llm-api-sessions/)
-   [Guide: Transcribe WhatsApp voice notes to text with an API](https://broadrouter.com/guides/transcribe-whatsapp-voice-notes/)
-   [Guide: BroadNet Inference error codes and when to retry](https://broadrouter.com/guides/errors-and-retries/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-openclaw-hermes-agent-cheap-model&utm_content=page-cta) ·

**Sources**

-   [OpenClaw docs, custom providers and local runtimes (checked 2026-11-15)](https://docs.openclaw.ai/concepts/model-providers/custom-providers)
-   [OpenClaw docs, heartbeat migration to automation jobs (checked 2026-11-15)](https://docs.openclaw.ai/gateway/heartbeat)
-   [OpenClaw docs, automation job payloads: sessions, scratch, model override, light context (checked 2026-11-15)](https://docs.openclaw.ai/automation/cron-jobs/payloads)
-   [Hermes Agent docs, providers and custom OpenAI-compatible endpoints (checked 2026-11-15)](https://hermes-agent.nousresearch.com/docs/integrations/providers)
-   [Hermes Agent docs, scheduled tasks (cron) (checked 2026-11-15)](https://hermes-agent.nousresearch.com/docs/user-guide/features/cron)
-   [Notebookcheck, OpenClaw token use report, 4 February 2026 (checked 2026-11-15)](https://www.notebookcheck.net/Free-to-use-AI-tool-can-burn-through-hundreds-of-Dollars-per-day-OpenClaw-has-absurdly-high-token-use.1219925.0.html)
-   [BroadNet Inference API reference: models, tools, reasoning, limits (checked 2026-11-15)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-openclaw-hermes-agent-cheap-model&utm_content=sources)
-   [BroadNet Inference machine-readable prices, pricing.json (checked 2026-11-15)](https://inference.broadnet.ai/pricing.json?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-openclaw-hermes-agent-cheap-model&utm_content=sources)
