Guide

OpenClaw Performance Tuning: How to Speed Up Your Agent

2026-11-16

OpenClaw Performance Tuning: How to Speed Up Your Agent

Most slow OpenClaw agents are not slow because of the hardware. They are slow because every turn carries too much: a heavy model on routine work, a long conversation history, a pile of tools and workspace files injected into each request. The fastest fixes are to measure first, route easy work to a faster model, keep context small, and trim tools you do not use. If you would rather not run the server yourself, a managed deployment removes the infrastructure half of the problem. This guide covers the rest, in the order that pays off.

TL;DR

  • Measure before you change anything: time to first reply, tool-call time and token use per turn tell you where the delay actually sits.
  • Context is the usual culprit. Replies that get slower as a conversation grows point to context bloat, not weak hardware.
  • Use a fast, cheaper model tier for routine turns and keep the heavy model for hard reasoning.
  • Cut unused tools, skills and workspace files from the prompt, and change one setting at a time so you can see what helped.
  • A managed server takes sizing, updates and uptime off your plate, so tuning is only about how the agent behaves.

Table of Contents

What "slow" means for an OpenClaw agent

Before tuning, decide what you are trying to improve. An agent has several kinds of delay, and each has a different fix:

  • Time to first token (TTFT): how long you wait before the reply starts appearing. It is driven by how much text the model must read first.
  • Total response time: TTFT plus generation time plus every tool call the agent makes along the way.
  • Tool-call latency: how long a browser step, file read or integration takes to return.
  • Token use: not speed directly, but it moves with speed, because more tokens in means more reading time and more cost.
  • Memory (RAM) use: relevant when the agent slows down or restarts on its own.

A practitioner write-up on profiling agents suggests targets of under 2 seconds at the median, under 5 seconds at the 95th percentile and under 10 seconds at the 99th, with most tool calls returning in under a second at the 95th percentile. The percentile idea matters: the median is how a typical reply feels, the 95th percentile is how the slow one in twenty feels. Those are one team's targets, not a standard, but they give you a number to aim at.

A research paper on tuning model serving for OpenClaw makes a related point: because each run carries the system prompt, the full conversation history and tool outputs, prefill time and cache pressure matter more than raw throughput, and what users feel is time to first token and how predictable the slow cases are. In plain terms, shrinking what the model reads before it answers is usually the biggest lever you have.

What "slow" means for an OpenClaw agent

Measure first, then change one thing

OpenClaw's own performance guidance for contributors is a good habit for anyone. It says to count operations before timing them, run the baseline and the candidate interleaved with at least five samples each, keep cold and warm runs separate, and report the median and the 95th percentile. A cold run is the first request after a start or a long idle period. A warm run is a later one, when caches are filled.

You do not need a lab. A practical routine for a personal or team agent:

  1. Pick three real tasks you do often: a short question, a task that uses a tool, and one that needs a long answer.
  2. Run each five times and write down the time to first reply and the total time. Note whether the run was cold or warm.
  3. Record the median and the slowest result.
  4. Change one setting.
  5. Repeat the same runs and compare.

If you want the comparison automated, the open-source openclaw-eval project runs the same scenarios against before-and-after setups in isolated temporary agents and captures latency, token use, files read, tool calls and answers. That last part matters: a change that makes replies faster but makes them worse is not a win.

The same practitioner write-up reports that adding instrumentation first is what surfaced the real problems in their deployment: tool calls taking more than 10 seconds, unnecessary skill loading and inefficient caching. None of those would have been guessed from the outside.

Fix the waste before you add tricks

OpenClaw's performance guidance gives an order for fixes: delete the waste, compute once, carry the prepared result forward, batch independent work, and only then cache. The same document notes that caching fixes were often silent misses, meaning the cache was in place but never actually hit.

That order translates well to configuration. Before you reach for a clever setting, ask what the agent does on each turn that it does not need to do:

  • Does it load skills it never uses?
  • Does it inject large workspace files into every message?
  • Does it start tool servers for sessions that will never call them?
  • Does it send a frontier-class model a question a small model could answer?

The documented cases show how much waste can hide. In one fix, a registry lookup that imported the plugin loader was cut from 47.07 seconds to 10.36 seconds at startup. In another, a full rescan on every streamed update dropped from 5,342 ms to 1 ms of CPU at 256 KiB. Those are runtime fixes made in the project itself, which is the point: the biggest gains usually come from removing work, not from adding clever layers.

Choose the right model for each job

Model choice is the largest single factor in how fast a reply starts, and it is the setting non-technical users can change most easily.

OpenClaw's agent configuration docs describe several routing slots. The model setting accepts either a single string or a primary model with an ordered list of fallbacks. A separate utilityModel handles short internal tasks such as naming sessions and threads, defaulting to a small model from your provider when unset. An imageModel takes over vision work when the main model cannot accept images. The same page explains that contextTokens can lower the effective context budget of a large model but cannot raise it above the model's real window, and that per-model parameters can include maxTokens and cacheRetention.

In practice that gives you a simple split:

Kind of turnWhat mattersModel tier
Quick question, reminder, short chat replySpeedFast, small tier
Heartbeats and background checksCost, not speedCheapest tier
Multi-step planning, code, long analysisQualityLarger model
Screenshots and imagesVision supportA vision-capable model via `imageModel`

Benchmarks published by a routing vendor report that fast, mini-class models deliver two to five times faster time to first token than frontier models. Treat that as a rough guide to the size of the gap, and test it with your own tasks, because it varies by provider and by day.

Two cautions keep routing reliable. Keep a fallback in the model setting so an outage at one provider does not stall the agent. And lower the thinking effort for routine turns rather than leaving deep reasoning on for everything, since extra reasoning is time you pay for on every message.

Our guides on OpenClaw supported models and copy-paste model routing go through providers, thresholds and example configuration in more detail.

Keep context small

Context is everything the model reads on a turn: the system prompt, your workspace files, the conversation so far, tool results. The longer it grows, the longer the wait before the first word appears. If replies slow down as a conversation goes on, this is almost always why.

The levers, from simplest to most technical:

  • Start fresh sessions for new topics. The /new command begins a clean session, and /compact summarizes the current one.
  • Compact on purpose. OpenClaw's compaction docs list defaults you can tune: it keeps the most recent 20,000 tokens, limits summaries to 16,000 characters and preserves the last 3 turns. Compaction has a 180-second timeout per window, and the post-compaction index sync is asynchronous by default for lower latency, with a synchronous option when you want the freshest memory.
  • Cap the output. A maxTokens limit stops long, rambling answers on tasks that need a sentence.
  • Limit what gets injected. The bootstrapMaxChars setting limits how much of your workspace files go into the prompt.
  • Keep the front of the prompt stable. Provider prompt caching only works when the unchanging parts, such as the system prompt and memory block, come first. The routing vendor's benchmarks report that a stable prefix can cut input spend by half or more, and cached input is typically discounted heavily.

What about dropping the injected files entirely? An OpenClaw issue shows how large the effect can be. On a Raspberry Pi 5 with a small Anthropic model, a trivial Telegram /weather command took about 30 seconds because the full workspace was injected on every turn. Turning off context injection and reasoning brought it to single-digit seconds, but it also removed the identity and personality files from every session. So the lesson is to trim, not to strip: keep the files that define how your agent behaves short and let it read others on demand.

Memory design matters here too. Facts stored in persistent memory and retrieved when relevant cost far fewer tokens than an ever-growing chat. We cover that in how OpenClaw memory management works and in a six-step persistent memory setup.

Trim tools, skills and concurrency

Every tool you connect gives the agent more reach, and every tool adds work: choosing the function, passing arguments, returning output to the model. A research paper on agent resource use frames it as a structural trade-off, since tool integration increases model and tool invocations, latency and context demand. That is not a reason to avoid tools. It is a reason to give each agent only the ones it needs.

Practical trims:

  • Restrict skills per agent, so a scheduling agent does not load browser or code skills.
  • Narrow tool lists to what a job uses.
  • Use the lighter heartbeat settings, isolatedSession and lightContext, so background checks do not drag the full conversation along.
  • Keep local models loaded if you run any, to avoid cold starts.

If you run several sessions at once, watch for duplication. An OpenClaw issue documents that sessions with identical workspace and tool-server settings spawned eight separate tool-server sessions in an eight-session test, each adding memory and CPU overhead. More concurrent sessions can mean multiplied overhead, so for a team it is worth checking how many tool servers are running before blaming the model. Our guide on OpenClaw for business teams covers rollout patterns that keep this manageable.

One more documented case is worth knowing, because it shows when the model is not the problem. In one reported version, preparation steps spent roughly 73 seconds of CPU work before the model was even called on a workspace with 13 agents, while a separate runtime on the same machine with the same model replied in under 10 seconds. If your delay appears before any model output starts, and trimming context does not help, check your version and its issue tracker, and update.

Hosting resources: RAM, updates and restarts

Hardware matters when the agent crashes, restarts, or slows everything down at once, especially with browser automation, which uses real memory for every browser instance. Our OpenClaw system requirements guide lists RAM and Node.js requirements for developers who self-host.

Running it yourself also means owning the maintenance: updates, restarts, backups and uptime. Many performance regressions are fixed upstream, so staying current is itself a tuning step, and it is one more routine to keep up. That is the part a managed deployment is built to remove.

Check that each change actually helped

After every change, rerun your three tasks and compare medians and slowest runs. Also compare quality: read the answers. Three failure patterns are common:

  1. Faster but forgetful. You trimmed context so far that the agent loses instructions. Restore the identity files or move facts into memory.
  2. Faster but shallow. A small model handles a task that needed reasoning. Route that task type to the larger tier.
  3. Cheaper but not faster. A cache that never hits. Check that the stable parts of the prompt come first and do not change between turns.

Keep a short log: date, setting changed, before and after medians. After a few rounds you will know which two or three settings matter for your workload, and you can stop tuning.

Skip the server work with a managed OpenClaw

If you want a fast agent without managing a server, ClawBase runs OpenClaw for you: one-click deployment on a dedicated, encrypted cloud server, 99.9% uptime, automated updates, daily encrypted backups, persistent memory management, and access to more than 50 AI models with multi-model routing. It connects to Telegram, Discord, Slack and WhatsApp, and you do not need sysadmin skills. Plans are LITE at $16 per month or $199 per year, PRO at $33 per month or $399 per year, and MAX at $66 per month or $799 per year, and the entry plan includes a 7-day free trial. See the ClawBase plans and pricing, or the use cases to see what agents are used for.

Clawbase

If you want to learn the settings as you go, the ClawBase tutorial walks through setting up and mastering your agent.

Our perspective on tuning

> Tuning an agent is mostly a discipline of subtraction. The teams that get a fast OpenClaw are rarely the ones with the most exotic settings. They are the ones that decided what the agent is for, gave it the tools and memory for that job, and nothing else.

>

> We think the right split is this: you should spend your attention on behavior, meaning which model handles which kind of request, what the agent remembers, and which skills it carries. You should not spend it on patching servers, watching RAM or restoring from a failed update. That is why we built ClawBase around a dedicated, always-on server with updates, encrypted backups and uptime handled for you, and with multi-model routing and persistent memory available from the start.

>

> Speed is also a habit rather than a one-time project. Measure a few real tasks, change one thing, and keep what helps. A managed setup makes that loop cheaper, because the base you are measuring against stays stable.

>

> *Iosif Peterfi*

FAQ

Why does my OpenClaw agent get slower during a long conversation?

Every turn sends the growing history to the model, so it has more to read before it can answer. Start a new session with /new when you change topics, or run /compact to summarize the old one. Moving lasting facts into persistent memory also keeps the history short.

What is the quickest way to speed up OpenClaw?

Switch routine turns to a faster model tier and lower the thinking effort for them. Fast, mini-class models are reported to start answering two to five times sooner than frontier models. Keep the larger model for work that needs real reasoning.

Do more tools and skills make OpenClaw slower?

Often, yes. Each tool adds choices, arguments and results the model must handle, and unused skills still take space in the prompt. Restrict skills and tool lists per agent so each one carries only what its job needs.

How do I know if a change made things better?

Time the same three tasks before and after, at least five runs each, and compare medians and the slowest runs. Read the answers too, so you do not trade quality for speed. An evaluation tool such as openclaw-eval can automate the comparison.

Sources

Recommended