
This is the follow-up to the OpenClaw Getting Started Guide, assuming you’ve already installed OpenClaw and gotten basic Telegram interactions working. This covers the advanced techniques you’ll want once you’re actually using it in production.
Multi-Agent Task Division
OpenClaw lets you configure multiple Agents in the same Telegram group, each handling a different domain. This is probably the most underrated feature.
Why split Agents
Without splitting, your AI assistant is a generalist—good at everything but specialized in nothing. Ask it about infrastructure and it won’t know your server setup. Ask about quant strategies and it’ll miss your position logic.
With multiple Agents, each gets:
- System prompt: Injected domain knowledge for that specific role
- Skill set: Only the relevant tools mounted
- Isolated conversation history: Won’t get cluttered by other tasks
Configuration example
Define multiple Agents in ~/.openclaw/config.yml:
agents:
- name: "ops"
description: "Server infrastructure assistant"
skills:
- healthcheck
- ssh-tools
system_prompt: |
You're the infrastructure engineer managing our servers.
You know Nginx, Docker, and system monitoring inside out.
When a task requires executing commands, explain first, then act.
- name: "quant"
description: "Quant strategy monitoring"
skills:
- binance-watcher
- grafana-query
system_prompt: |
You monitor algorithmic trading strategies.
You understand trend-following logic, can read position signals and returns data.
Never expose specific strategy parameters.
- name: "writer"
description: "Writing assistant"
skills:
- obsidian
system_prompt: |
You help with writing: brainstorming, drafting, and organizing notes.
Style: direct, opinionated, no filler.
Switch to an Agent in Telegram with /agent ops, and all subsequent messages use that Agent’s config.
Telegram Advanced Interaction
Command shortcuts
OpenClaw’s Telegram Bot supports custom commands defined in config.yml:
commands:
- command: "/status"
description: "Quick system check"
action: "ops:Quickly check key metrics across all servers"
- command: "/pnl"
description: "Today's P&L"
action: "quant:Tell me today's returns and current position direction"
- command: "/draft"
description: "Draft article"
action: "writer:Based on my recent notes, list topics I could write about today"
Once configured, just tap the command menu in Telegram—no typing required.
Send files and images directly to Agents
Telegram lets you send files to the Bot:
- Send
.txt/.mdfiles → OpenClaw reads and analyzes content - Send screenshots → OCR or image understanding (if the model supports multimodal)
- Send
.csv→ Perform data analysis
My workflow: snap a photo of the architecture diagram on the whiteboard, send it to the ops Agent, ask “what’s wrong with this design?”
Scheduled tasks
OpenClaw supports cron syntax for scheduled pushes:
schedules:
- cron: "0 9 * * 1-5" # Mon–Fri at 9 AM
action: "quant:Daily strategy status: position direction, yesterday's returns"
- cron: "0 */4 * * *" # Every 4 hours
action: "ops:Check if critical services are healthy; alert immediately if not"
It’ll proactively push updates without you asking.
Quant Strategy Monitoring Workflow
My OpenClaw quant workflow has three tiers:
Tier one: Passive monitoring (auto-push)
schedules:
# Daily summary
- cron: "0 8 * * *"
action: "quant:Daily returns report: position direction / yesterday's P&L / cumulative returns / last signal time"
# Check for new signals every 15 min
- cron: "*/15 * * * *"
action: "quant:Check KV for the latest signal timestamp; warn if it's more than 2 hours stale"
Tier two: On-demand queries
Ask anytime in Telegram:
- “What’s the current position direction?”
- “Last 7 days of returns data”
- “How’s it performing vs. BTC in the same period?”
The Agent pulls data from CF KV or Prometheus APIs and answers directly.
Tier three: Anomaly alerts
Set up condition-triggered alerts:
monitors:
- name: "strategy-heartbeat"
check: "quant:Check when the strategy script last ran"
condition: "last_run > 2h"
alert: "⚠️ Strategy script hasn't run in 2+ hours—check it out"
interval: 30m
Custom binance-watcher Skill
If the official Binance Skill doesn’t exist, building one is straightforward:
# skills/binance-watcher/main.py
import requests
def get_balance(symbol="USDT"):
"""Check account balance"""
# Read from env, never hardcode
api_key = os.environ["BINANCE_API_KEY"]
# ... call Binance API
return {"balance": balance, "symbol": symbol}
def get_position():
"""Check current position"""
# ...
return {"side": "LONG", "size": size, "entry_price": price}
A Skill is just a set of functions the AI can call. Write them and register in config.yml.
Custom Skills: From Scratch
Skill structure
A minimal Skill needs three files:
skills/my-skill/
├── skill.yml # Skill definition (name, description, tools)
├── main.py # Tool implementation
└── README.md # Documentation
Example skill.yml:
name: my-grafana
description: Query Grafana data
tools:
- name: query_metric
description: Query Prometheus metric
parameters:
- name: query
type: string
description: PromQL query string
- name: range
type: string
description: Time range, e.g., 1h, 24h
Example main.py:
import requests
import os
GRAFANA_URL = os.environ.get("GRAFANA_URL", "http://localhost:3000")
GRAFANA_TOKEN = os.environ["GRAFANA_TOKEN"]
def query_metric(query: str, range: str = "1h"):
"""Query Prometheus metric and return readable results"""
resp = requests.get(
f"{GRAFANA_URL}/api/datasources/proxy/1/api/v1/query_range",
params={"query": query, "start": f"now-{range}", "end": "now", "step": "60"},
headers={"Authorization": f"Bearer {GRAFANA_TOKEN}"}
)
data = resp.json()
# Extract latest value
results = {}
for series in data["data"]["result"]:
label = series["metric"].get("id", "unknown")
latest_value = series["values"][-1][1] if series["values"] else "N/A"
results[label] = latest_value
return results
Install custom Skills
openclaw skill install ./skills/my-grafana
Restart OpenClaw and the new Skill is live.
Use skill-creator meta-Skill
OpenClaw includes a meta-Skill called skill-creator that generates other Skills for you.
Install it:
openclaw skill install skill-creator
Then tell it what you want:
I need a Skill that queries the aff.panshi.io/stats endpoint and returns today’s click counts for each AFF project as a formatted table
It generates skill.yml and main.py ready to copy in.
Cost Control
Every Agent response costs tokens. A few ways to stay lean:
Trigger on-demand, skip polling: Call the model only when users ask or cron fires. Don’t put real-time monitoring in the AI (use Prometheus + Alertmanager instead—more accurate and cheaper).
Tier your models: Use cheap Haiku for simple status checks, reserve Sonnet/Opus for complex analysis.
agents:
- name: "ops-basic"
model: "claude-haiku-4-5" # Cheap, routine checks
- name: "ops-deep"
model: "claude-sonnet-4-6" # Expensive, deep analysis
Limit conversation history:
agents:
- name: "ops"
max_history_turns: 10 # Keep only the last 10 turns
→ See OpenClaw Getting Started Guide → See OpenClaw Quant Workflow
📷 Hero image · Generated with Flux Schnell AI · panshi.io brand style