You've deployed OpenClaw, connected a messaging channel, and installed a couple of skills. It works. But "works" and "works well" are different things. This guide covers the advanced techniques that separate a basic setup from a finely tuned, cost-efficient, production-grade AI agent.
Not every conversation needs your most expensive model. OpenClaw supports configuring multiple LLM providers, and with the right setup, you can route queries based on complexity:
Configure your models through the visual panel or via the onboarding wizard:
clawdbot onboard
# Select "Add Model" and configure multiple providers
# Store each API key as an environment variable
# CRITICAL: Never hard-code API keys in config files or scripts
export OPENCLAW_PRIMARY_KEY="sk-cost-effective-model-key"
export OPENCLAW_PREMIUM_KEY="sk-premium-model-key"
For custom model setup details: Custom Model Tutorial.
Your system prompt is the single biggest lever for both quality and cost. Every token in the system prompt is included in every API call, so bloat compounds fast.
Before (bloated — 380 tokens):
You are a helpful, friendly, professional customer service assistant for an online store. You should always be polite and courteous. You sell electronics, clothing, and home goods. Your return policy allows returns within 30 days. Shipping takes 3-5 business days domestically and 7-14 days internationally...
After (lean — 120 tokens):
Store CS agent. Products: electronics, clothing, home goods. Returns: 30 days. Shipping: domestic 3-5 days, international 7-14 days. Be concise and helpful. Escalate disputes to human.
The lean version conveys the same information at one-third the token cost. Over thousands of daily API calls, this difference is significant.
Long conversations balloon your token usage because the entire history is sent with each API call. Advanced strategies:
The real power emerges when multiple skills work together. For example:
OpenClaw's planning loop automatically selects the right skills for each step. Your job is to install the right combination and let the agent orchestrate.
# Install a skill stack for e-commerce
# From the OpenClaw chat:
# "Please install a skill for me using Clawhub; its name is ecommerce-cs-assistant."
# "Please install a skill for me using Clawhub; its name is logistics-tracker."
# "Please install a skill for me using Clawhub; its name is inventory-monitor."
# Verify the full stack
# "Check which skills you have currently installed."
For the complete skill guide: Installing OpenClaw Skills.
Some skills are flagged as high-risk because they require elevated permissions (file system access, network requests, etc.). OpenClaw will warn you before installation. Best practices:
# Full daemon setup sequence
loginctl enable-linger $(whoami)
export XDG_RUNTIME_DIR=/run/user/$(id -u)
# Install the systemd service
clawdbot daemon install
# Start / stop / restart
clawdbot daemon start
clawdbot daemon stop
clawdbot daemon restart
# Check status and logs
clawdbot daemon status
clawdbot daemon logs
# Uninstall (if you need to reconfigure from scratch)
clawdbot daemon uninstall
The daemon is configured to auto-restart on failure. If the OpenClaw process crashes (out-of-memory, unhandled exception), systemd will restart it automatically. You can verify this behavior:
# Simulate a crash (for testing only)
kill $(pgrep -f clawdbot)
# Wait 5 seconds, then check
clawdbot daemon status
# Should show "running" again
A single OpenClaw instance can connect to Telegram, Discord, WhatsApp, and Slack at the same time. Each channel maintains its own conversation context, but they share the same skills and model configuration.
Channel-specific guides:
You can configure different personas for different channels. Your Discord bot might be casual and emoji-heavy, while your WhatsApp business bot is formal and concise. Adjust the system prompt per channel in the configuration.
| Technique | Estimated Savings | Effort |
|---|---|---|
| Trim system prompt to <150 tokens | 20–30% | Low |
Set max_tokens cap (100–150) |
10–15% | Low |
| Implement conversation summarization | 15–25% | Medium |
| Route simple queries to cheaper model | 20–40% | Medium |
| Cache frequent responses | 10–20% | Medium |
Combined, these techniques can reduce monthly token spend by 40–60%.
clawdbot daemon logs shows per-request timing.Advanced configurations demand reliable infrastructure. Multi-channel, multi-skill, daemon-mode operation means your server needs to be:
Mastering these advanced techniques transforms OpenClaw from a novelty into a core business tool. Start with prompt optimization (highest ROI for lowest effort), then layer in multi-model routing and skill composition as your needs grow.
For the latest features and updates, check the OpenClaw Feature Update Log.
Ready to level up?
The basics get you running. The advanced techniques get you winning.