CountBot
An AI work assistant that runs on your server
Bind the chat tools you already use, and let it push digests and run tasks on schedule
中文 | English
What Is CountBot
CountBot is a lightweight, low-footprint AI assistant that runs on your server and stays up. A modest machine is enough to host it. Once it is bound to the chat tools you already use, you can call it directly from Lark, WeCom, WeChat or QQ, or work with it through the web interface.
Unlike a plain chat bot, CountBot can actually execute work. It reads and writes files, runs commands, searches the web, takes screenshots and sends media. Beyond that, you can wrap your recurring routines into skills, let it run on a schedule, and have the results delivered to the channel you choose.
Key points below.
- Entry points are the IM tools you already use, including Lark, WeCom, WeChat, QQ, DingTalk, Telegram and Weibo, plus ServerChan for push-only delivery
- Recurring routines can be wrapped into skills, triggered by a single instruction or run automatically by the scheduler
- Scheduled tasks combine with proactive greetings to push digests, reminders and summaries on plan
- Long-term memory keeps context across sessions, so earlier instructions do not have to be repeated
- 22 model providers are built in, and models can be assigned per session or per task
Skills
The skill system is the core mechanism of CountBot.
A lot of daily work follows fixed procedures. Compiling a competitive digest every week, summarizing new content from a few sites every day, cleaning spreadsheets by a fixed rule. You have done these many times and know the steps by heart, yet still run them by hand each time.
Skills fix that. Write the procedure once, and afterwards a single instruction triggers it, or the scheduler runs it automatically.
Writing one is not hard. Describe when to use it and how it works, and that is enough. If you are not sure where to start, the built-in skill-creator walks you through the whole process, from clarifying the goal to validating the result. Finished skills can be enabled, disabled and configured from the panel, or installed from the SkillsHub.
Multi-Agent Teams
For more complex work, a single agent tends to lose track of things. Agent Teams let you group several roles, each owning one part, working in stages or in parallel.
Three orchestration modes are available.
pipeline runs stages in sequence, where the output of one stage becomes the input of the next. It suits tasks with a clear order of steps.
graph lets you declare dependencies between roles first, then runs everything without unmet dependencies in parallel. It suits tasks with branches and a final merge. If the dependencies form a cycle, the system reports an error instead of looping.
council has each member produce an independent result from their own perspective, then review each other, and finally consolidate. It suits judgment calls that need several angles weighed.
Once a team exists, send /team <team name> <task> in a session to invoke it, or mention the team name with @.
A team can carry its own model configuration. When configured, execution inside the team uses the team configuration; otherwise it inherits the model of the current session.
Session-Level Model Configuration
Changing models used to mean editing the global default, which affected every session. Now it can be switched inside a session.
A model picker sits next to the chat input. The selection applies only to the current session and leaves the global default untouched. Right beside it, the reasoning effort for that session can be adjusted, with the available levels determined by the model.
Switching the level on the same model is enough to cover different scenarios. Long tasks get a higher level, quick questions drop back to a lower one, without repeated trips to the settings page.
Order of precedence is as follows. The model selected in a session applies to that session; if a team has its own model configured, execution inside the team follows the team configuration; when neither is configured, the global default applies.
What It Can Do For You
| Scenario |
Description |
| Daily digest delivery |
Scheduled tasks fetch and summarize the topics you specify by cron, then push to Lark, WeChat, QQ, ServerChan and other channels |
| In-group assistant |
Mention the bot in a group to ask questions, look up material, draft content and call tools |
| Scheduled tasks and reminders |
Run arbitrary instructions on a schedule, with a selectable delivery target and bot account, and a selectable model per task |
| Proactive greetings |
A heartbeat mechanism starts conversations or reminders at the frequency you set, suited to schedule reminders and shift handover briefings |
| Material handling |
Web scraping, document parsing, knowledge base retrieval, file read/write and batch processing |
| Multi-role collaboration |
Split complex work across an Agent Team, run it in parts and consolidate |
| External coding tools |
Connect Claude Code, Codex, OpenCode and dsh (DeepSeek Harness), either as callable tools or as agents bound to a channel |
Supported Channels
| Channel |
Direction |
Notes |
| Lark |
Two-way |
Event subscription, supports groups and direct messages |
| WeCom |
Two-way |
Enterprise internal bot |
| WeChat |
Two-way |
Multiple account binding supported |
| QQ |
Two-way |
QQ Open Platform bot |
| DingTalk |
Two-way |
Enterprise internal bot |
| Telegram |
Two-way |
Direct Bot API |
| Weibo |
Two-way |
Weibo bot |
| Xiaozhi |
Two-way |
Xiaozhi AI hardware integration |
| ServerChan |
Push only |
A single HTTP request delivers a notification to WeChat, with no persistent connection, suited to pure broadcasting |
All two-way channels share the same session model. A session processes one turn at a time, so concurrent messages from multiple entry points do not interfere with each other.
Supported Models
22 providers are built in, covering mainstream Chinese and international models, along with OpenAI-compatible custom endpoints and local inference.
openrouter anthropic openai deepseek moonshot zhipu
groq mistral cohere together qwen hunyuan
ernie doubao yi baichuan minimax vllm
ollama lm_studio custom_openai custom_anthropic
The request protocol is determined by the provider setting or by user selection.
| Protocol |
Endpoint |
| OpenAI Chat Completions |
/chat/completions |
| OpenAI Responses |
/responses |
| Anthropic Messages |
/v1/messages |
A single provider can hold multiple models, fetched from the upstream /models endpoint or entered manually. Each model records its context window, image input capability, reasoning levels and related metadata. The global default, session level and scheduled task level can each designate which model to use.
Core Capabilities
| Module |
Description |
| Skill system |
Turn recurring routines into skills that load automatically as callable capability. Supports enable/disable, parameter configuration and SkillsHub installs, with skill-creator built in for guided creation |
| Multi-agent teams |
Three orchestration modes, pipeline, graph and council, invoked through /team or @, with optional team-level model configuration |
| Agent Loop |
ReAct reasoning, tool invocation, result feedback and iteration control |
| Layered configuration |
Team, session and global layers fall back in order, and each layer can designate its own model |
| Channel matrix |
A single workspace serves multiple channels, bot accounts and business entry points |
| Providers and models |
Multiple model lists, three protocols, and context window and image capability metadata |
| Reasoning levels |
Levels declared per model, adjustable at session and task level, with support for custom values |
| Context compaction |
A four-stage pipeline of pruning, boundary, summarization and assembly, triggered automatically by water level or manually from the session list |
| Memory |
One fact per record, where a new value under the same key replaces the old one, across pinned, recent and archived tiers |
| Built-in tools |
Files, Shell, web, screenshots, memory, workflows, media delivery, file search, external coding tools |
| External execution tools |
Claude Code, Codex, OpenCode and dsh (DeepSeek Harness) connected to a unified runtime |
| Knowledge base |
Wiki module with BM25 full-text retrieval, which can layer a vector channel on top once an embedding endpoint is configured |
| MCP |
Multi-server connections, health checks and tool discovery, disabled by default |
| Scheduling and heartbeat |
Cron tasks, proactive greetings and long-running background operation, with selectable model and delivery target |
| Security and workspace |
Path restrictions, audit logs, timeout control, remote authentication boundary and a one-time initialization entry |
Latest Updates
Why CountBot
The way software is used keeps changing. Commands had to be memorized and configuration learned; today more and more operations take a single natural-language sentence.
The real difficulty is never the model itself, but how to bring models, tools, channels, permission boundaries and long-running operation into one system that can be deployed and maintained. Building a demo is not hard; running stably for months is a different order of requirement.
OpenClaw proved the direction viable for local execution and autonomous agents. CountBot fills in what it does not cover, including Chinese-language scenarios, server-resident operation, a lower barrier to entry, security control and governance.
Quick Start
Option 1: Run From Source
git clone https://github.com/countbot-ai/CountBot.git
cd CountBot
# default install
pip install -r requirements.txt
# Aliyun mirror for networks in China
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
python start_app.py
Once started, http://127.0.0.1:8000 opens by default.
The listen address and port can be overridden with environment variables, where COUNTBOT_HOST / COUNTBOT_PORT take precedence over the defaults.
# Linux / macOS, bind 0.0.0.0 for server-resident use and put a reverse proxy in front
COUNTBOT_HOST=0.0.0.0 COUNTBOT_PORT=8000 python start_app.py
$env:COUNTBOT_HOST = '0.0.0.0'
$env:COUNTBOT_PORT = '8001'
python start_app.py
set COUNTBOT_HOST=0.0.0.0
set COUNTBOT_PORT=8001
python start_app.py
If GitHub is hard to reach from China, switch to Gitee.
git clone https://gitee.com/countbot-ai/CountBot.git
Option 2: Desktop Build
Deploying To A Server
CountBot is an ordinary web service and can be hosted persistently with systemd, supervisor or a container. Before opening remote access, set the initialization password first, then open the port as needed and configure a reverse proxy. The initialization entry is one-time, and its validity window is controlled by REMOTE_SETUP_SECRET_TTL_MINUTES.
Project Status
CountBot is still under active iteration. Since the early base framework, the provider and model system, context compaction, memory storage and channel matrix have all undergone substantial rework, so the directory structure may look different if you come back after a while.
Questions and bug reports are welcome through Issues, and pull requests for fixes, new capabilities and documentation are accepted.
Development And Contributing
Local Development
# backend
uvicorn backend.app:app --reload --host 0.0.0.0 --port 8000
# frontend
cd frontend && npm install && npm run dev
Reporting Issues
License And Credits
License
MIT License
Contributors
Thanks to the following contributors for the code and documentation they have submitted.
Inspiration
- OpenClaw
- NanoBot
- ZeroClaw
- anthropics/skills
Technical Credits
Thanks to the open-source projects FastAPI, Vue.js, SQLAlchemy and Pydantic.
评论