CheapClaw multi-bot orchestration CLI
Project description
CheapClaw
CheapClaw is a multi-bot orchestration app built on top of the infiagent SDK.
It is designed for a practical deployment shape:
- one shared LLM config can serve all bots
- users can start with a local web chat first
- then add Telegram / Feishu / other channels incrementally
- the supervisor decides whether a new message should reuse an old
task_id, append to a running task, or fork a new one
Quick start
Install
After publishing to PyPI:
python -m pip install -U cheapclaw
For local development:
cd /Users/chenglin/Desktop/research/claw_dev/cheapclaw
python -m pip install -U -e .
First run
cheapclaw config --interactive
cheapclaw up
Open:
http://127.0.0.1:8787/dashboard
If you only have one api_key and one base_url, that is enough.
Just fill them once during cheapclaw config --interactive; all bots will share that LLM config by default.
Full Chinese usage guide:
The core problem it solves is not "how to connect one more chat channel". The real problem is:
- a user sends a new request while several agents are already running
- sometimes the new message should continue an old task
- sometimes it should inject a new requirement into a running task
- sometimes it should start a parallel branch
- and the system needs to choose that path automatically without losing context
CheapClaw is built around that decision layer.
Why CheapClaw exists
Compared with OpenClaw-like systems, the main motivation here is cost and long-horizon stability.
OpenClaw is impressive, but for many practical deployments it is expensive. CheapClaw uses infiagent as the execution substrate because infiagent already has several properties that matter for weaker models:
- short-step execution instead of giant long-context monologues
- resumable task memory keyed by
task_id - configurable fresh / resume behavior
- agent-system level composition
- SDK-level control over runtime, task state, and tool execution
That makes it much more suitable for small-model orchestration, especially when tasks are long and iterative.
What is different
1. Instant message insertion into existing work
This is the main feature, not a side feature.
CheapClaw has a supervisor agent that decides how a new message should be routed:
- continue an old task by reusing the same
task_id - append a requirement to a currently running task without stopping it
- fork into a new task when the work is genuinely different
These are different operations and they are handled differently.
Continue an old task
If the work is still the same deliverable, CheapClaw can restart a new worker on the same task_id.
That matters because the old task keeps:
- workspace
- share context
- historical outputs
- prior task memory
So "modify the old report", "redo that script", "continue the previous result" does not have to become a brand new task.
Append to a running task
If a worker is still running, CheapClaw can inject a new requirement into that running task.
This does not require stopping the worker first. The requirement is appended and absorbed on the next safe loop boundary.
That is a different behavior from resuming an old task, and it is one of the main pain points CheapClaw is designed to solve.
2. Built on the InfiAgent SDK, not a closed custom runtime
CheapClaw is not a monolithic framework. It is an application built on the infiagent SDK.
That means it inherits several useful runtime capabilities:
- different thinking and execution models
- different models for different sub-agents
- mixed local models and provider models
- mixed API vendors in one overall system
- task-level runtime control through the SDK
In practice, this means you can build a system where:
- the supervisor uses one model
- the worker uses another
- a compression model is different again
- some parts use local inference and others use hosted APIs
This is configured at the agent-system level and in the model config.
3. Better behavior for weaker models
CheapClaw benefits from InfiAgent's short-step execution strategy.
For weak or small models, that matters a lot. With the same model, total cost can go either way depending on the exact task, but on long-running tasks the short-step strategy is often more stable and more cost-efficient than trying to force a weak model through a giant single planning loop.
Practical rule:
- the weaker the model, the shorter the step window should be
- do not set it below 10
- a good default is 20
4. Skills are not the only extension mechanism
CheapClaw supports normal skills, but it also treats full agent systems as a reusable extension layer.
In the default CheapClaw layout there are only two systems:
CheapClawSupervisorCheapClawWorkerGeneral
But infiagent itself also ships with other agent systems, for example:
ResearcherOpenCowork
If you want to reuse them in this kind of setup, remove human_in_loop from their config first.
Using a full agent system as a reusable capability is sometimes better than a narrow skill:
- a skill is good for a compact workflow or tool pattern
- an agent system is good for a whole class of related tasks with a stronger internal role design
You can think of an agent system as a kind of "skill pro": broader coverage, more prompt budget, more specialization.
You can install an extra agent system from a zip archive:
cheapclaw bot-agent-system add /path/to/agent_system.zip --bot-id bot_1
cheapclaw bot-agent-system add /path/to/agent_system.zip --bot-id bot_1 --reload-after
cheapclaw bot-agent-system add /path/to/agent_system.zip --global
Notes:
--bot-idinstalls only into one bot runtime--reload-afterwill restart that bot immediately after install--globalinstalls into shared project assets; bots pick it up aftercheapclaw prepareorcheapclaw reload-bot --prepare-first
Architecture
CheapClaw has three layers:
- Channel adapters
- A supervisor agent
- Worker tasks running on InfiAgent
The supervisor does not do the real work. It decides:
- direct reply
- reuse old
task_id - append to running task
- start a new task
- restart / fresh / reset when needed
Workers do the execution.
Current capabilities
- local web chat (
localweb) - Telegram integration
- Feishu integration through long connection mode
- WhatsApp Cloud API integration
- Discord integration
- QQ integration through OneBot v11 bridge
- WeChat integration through OneBot v11 bridge
- dashboard and panel view
- conversation-to-task binding
- task completion observation
- watchdog observation
- task-level visible skill filtering
- task-level message append
- task-level restart on the same
task_id - file sending for Telegram
Skills behavior
CheapClaw uses task-level visible-skill filtering for worker agents.
By default, workers only see:
docxpptxxlsxfind-skills
The supervisor can expose more skills to a worker when needed.
This is implemented by filtering what the model sees in <available_skills>, not by breaking the global skill installation mechanism. That means normal skill installation still works.
Install and run
Use the CLI workflow directly. You do not need to run cheapclaw_service.py manually for normal usage.
1) Install
Published package:
python -m pip install -U cheapclaw
Local development:
cd /Users/chenglin/Desktop/research/claw_dev/cheapclaw
python -m pip install -e .
2) Initialize and configure
cheapclaw config --interactive
You can set context compression thresholds in manifest context (for example user_history_compress_threshold_tokens).
These values are synced into each bot app config during prepare/up.
If you press Enter on path prompts, defaults are:
- manifest:
~/cheapclaw/fleet.manifest.json - runtime root:
~/cheapclaw/runtime - fleet config:
~/cheapclaw/runtime/fleet.generated.json - llm config:
~/cheapclaw/runtime/config/llm_config.yaml
If you only have one provider:
- fill
llm.base_url - fill
llm.api_key - fill
llm.model
That single LLM config will be reused by all bots unless you intentionally split it later.
3) Start all enabled bots (and web console)
cheapclaw up
Open dashboard:
http://127.0.0.1:8787/dashboard
4) Daily operations
cheapclaw status
cheapclaw logs --bot-id bot_1
cheapclaw add-bot
cheapclaw reload-bot --bot-id bot_1 --prepare-first
5) Stop
cheapclaw stop
Current behavior:
cheapclaw stopstops all bots and stops fleet web console by default.cheapclaw stop --no-web-consolestops bots only.- If manifest is missing,
cheapclaw stopfalls back to process-scan stop mode (stops all running CheapClaw bot loops and fleet web console processes started from this repo).
Command quick reference
cheapclaw config --interactivecheapclaw upcheapclaw statuscheapclaw logs --bot-id <bot_id>cheapclaw add-botcheapclaw start-bot --bot-id <bot_id>cheapclaw stop-bot --bot-id <bot_id>cheapclaw reload-bot --bot-id <bot_id> --prepare-firstcheapclaw stopcheapclaw web-statuscheapclaw web-startcheapclaw web-stop
Channel credentials
Telegram
bot_token
Feishu
app_idapp_secretverify_token- optional:
encrypt_key
CheapClaw uses Feishu long connection mode, so it does not require a public webhook endpoint.
WhatsApp Cloud API
access_tokenphone_number_idverify_token
Discord
bot_token- optional:
intents(default37377) - optional:
require_mention_in_guild(defaulttrue)
QQ / WeChat(OneBot v11 bridge)
onebot_api_base(e.g.http://127.0.0.1:5700)- optional:
onebot_access_token - optional:
onebot_post_secret - optional:
onebot_self_id
Repository layout
cheapclaw_service.py: main service entrytool_runtime_helpers.py: panel, task, and runtime helpersassets/agent_library/: supervisor and worker systemsassets/config/: example config filestools_library/: CheapClaw-specific toolsskills/: CheapClaw-specific skillsweb/: dashboard
Notes for separate release
CheapClaw is intended to live in its own repository.
The framework-level changes that made it possible are mostly SDK and runtime improvements in infiagent, especially:
- SDK task control
- task snapshotting
- fresh / resume support
- tool hooks
- context hooks
- skill visibility filtering
If you publish infiagent to PyPI, CheapClaw can then be shipped as a clean separate application repo on top of that package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cheapclaw-1.0.0.tar.gz.
File metadata
- Download URL: cheapclaw-1.0.0.tar.gz
- Upload date:
- Size: 145.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e41ccf2a5a8cc97d0a8c20ae2c713f699a5897d4bfbdb83246e0444c8e612f5
|
|
| MD5 |
e965d053c08c2a006f0f62710d1b6848
|
|
| BLAKE2b-256 |
9bfab893790eeaf89eb308b99beda35b897fbc629f40841a9c97eefe6cfb36af
|
File details
Details for the file cheapclaw-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cheapclaw-1.0.0-py3-none-any.whl
- Upload date:
- Size: 159.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9494c3f4e670db1f4b949fb323b766952604d626673e822344962b3a6196a88
|
|
| MD5 |
836c3e6a91d256fad1d38920d9c61104
|
|
| BLAKE2b-256 |
8bb865e18fcaa5532b53c276489a387fa3c0b4320a7b9433ae5b0cddcbe036e6
|