Why Performance Matters

Every OpenClaw agent runs a Reason-Act loop: the agent calls the LLM, receives a decision, executes a tool, and feeds results back for the next reasoning step. In a typical task this loop runs 5–20 times. At $0.005 per 1 000 tokens with GPT-4o, a 10-step task consuming 2 000 tokens per step costs $0.10 per run. Multiply by thousands of daily tasks and costs compound quickly. Latency multiplies too: a 2-second LLM response time × 10 steps = 20 seconds end-to-end before any tool execution overhead.

OpenClaw addresses this at four levels: response caching eliminates redundant LLM calls for identical prompts; parallel execution runs independent tool calls concurrently instead of sequentially; token optimization reduces prompt size without degrading output quality; and model selection routes straightforward sub-tasks to cheaper, faster models. Together these techniques can cut latency by 5× and reduce costs by 90% in real-world workloads.

Key Performance Metrics

MetricTypical BaselineOptimized TargetPrimary Lever
Task completion latency20–60 seconds4–12 secondsCaching + Parallel execution
Tokens per task10 000–50 0002 000–10 000Prompt compression
Cost per 1 000 tasks$5–$50$0.50–$5Model selection + Caching
Cache hit rate0%50–80%Response cache config
Parallel speedup2–5×Async tool execution

Quick-Start: Minimal Performance Config

Add these settings to your openclaw.yaml to immediately activate the most impactful performance improvements:

performance:
  cache:
    enabled: true          # Enable in-memory response cache
    ttl: 3600              # Cache TTL in seconds (1 hour)
    backend: memory        # Use 'redis' for distributed deployments
  parallel:
    enabled: true          # Parallelize independent tool calls
    max_workers: 4         # Concurrent tool execution threads
  tokens:
    max_system_prompt: 500 # Trim system prompt aggressively
    context_window: 8192   # Cap context to control costs
  model_routing:
    default: gpt-4o-mini   # Use a fast/cheap model by default
    complex_tasks: gpt-4o  # Route only complex reasoning up

After applying this config, run openclaw profile run "your task" to measure the before/after improvement. See the Profiling guide for a full walkthrough.

Sections

Provider Benchmark Comparison

Performance varies significantly across LLM providers. The table below shows representative numbers for a standard 10-step research task (measured March 2026):

Provider / ModelAvg Latency / StepCost / 1K TokensBest For
GPT-4o1.8 s$0.005Complex multi-step reasoning
GPT-4o-mini0.7 s$0.00015Routine tasks, cost optimization
Claude 3.5 Sonnet1.4 s$0.003Long-context, code review
Gemini 1.5 Flash0.9 s$0.00035High-volume, fast turnaround
Llama 3.1 (Ollama)0.4 s$0 (local)Dev/test, private data

See the full Benchmarks page for hardware-specific results and multi-agent scenarios.

Quick Wins

TechniqueTypical SavingsEffort
Enable response caching50–90% on repeated callsLow
Use gpt-4o-mini instead of gpt-4o~15× cost reductionLow
Parallelize independent tool calls2–5× speed improvementMedium
Trim system prompt to <500 tokens10–20% cost reductionLow
Use local LLM (Ollama) for dev/test100% API cost reductionMedium