BroadRouter

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

By the BroadNet Inference team · 6 min read · Published

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.

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:

{
  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:

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 1,048,576 Yes $0.78 / $0.173 / $3.46 Yes
Qwen3.8 27B 262,144 Yes $0.175 / $0.0435 / $2.17 Yes
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 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 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. 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. To see where an agent’s tokens go beyond scheduled checks, read 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 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.
  • 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.

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 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.

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.

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity