# bot-on-anything: a Python config file that wires one model to twelve chat channels

> Bot on Anything is a lightweight, MIT-licensed Python framework that pairs a large model with a delivery channel through a single config.json. The model and the channel are independent, so the same bot code can run in a terminal, on Telegram, or inside Gmail.

**zhayujie/bot-on-anything** — A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).

- Repository: https://github.com/zhayujie/bot-on-anything
- Website: https://cowagent.ai
- Stars: 4,220 · Forks: 910
- Language: Python
- License: MIT
- Published: 2026-09-14 · Updated: 2026-09-14 · Language: en
- Canonical page: https://hysenlabs.com/projects/zhayujie-bot-on-anything

## The problem bot-on-anything actually solves

Most chatbot tutorials start with a model and then stall on delivery. You have an API key, a Python script that prints a reply, and no idea how to get that reply into the tool your team already uses. Telegram wants a bot token, Slack wants an app manifest and event subscriptions, Gmail wants OAuth credentials. Each one is a separate weekend.

Bot on Anything collapses that into one repository. The README describes it as "a lightweight framework for building AI chatbots" where you pick one connection between a large model and an application channel, get it running, and switch paths later without leaving the project. The intended audience is someone who wants a working bot today on an overseas channel such as Telegram, Slack, Discord or Gmail, and who is comfortable editing JSON rather than writing adapter code.

The design assumption is worth stating plainly: models and channels are independent. Adding a channel reuses the models you already configured, and adding a model works across every channel. That is the whole pitch, and it is a narrow one. This is not an agent framework. The README explicitly redirects anyone who needs task planning, long-term memory, skills, MCP or self-evolution to a sibling project, CowAgent.

## How the model and channel blocks stay decoupled

The mechanism is a two-key config. At the top level, config.json splits into `model` and `channel`. The `model.type` field selects the model implementation; the `channel.type` field selects the channel. The README's own structure example shows `"type" : "openai"` under model and `"type": "slack"` under channel, with per-provider sub-objects below each.

That indirection is the architecture. The repository layout mirrors it: there is a `model/` directory, a `channel/` directory, a `bridge/` directory between them, and `common/` for shared code. Because the two sides are separate modules, the same Slack bot can run on OpenAI, LinkAI or ERNIE Bot by changing one string.

One detail matters more than it looks. The README states that `channel.type` can also be an array, in which case several channels start together as separate processes without interfering. So a single config file can run a Telegram bot and a Slack bot side by side, sharing one model configuration. That is the parallel-channel capability, and it is the main reason to prefer this over a single-purpose bot script.

Model coverage is uneven, and the README is honest about it. OpenAI is supported through the OpenAI-compatible chat API, so `api_base` can point at a compatible gateway. Everything else (DeepSeek, Claude, Gemini, Qwen, GLM) is reached through LinkAI rather than a native integration, which the README states as a one-key route to more than 100 models. If you want a first-party Claude or Gemini client, this is not it.

## Installing bot-on-anything and running a first bot

The README recommends Python 3.7.1 to 3.10 and states that Linux, MacOS and Windows all work. Clone the repository and install the pinned dependencies:

```bash
git clone https://github.com/zhayujie/bot-on-anything
cd bot-on-anything/
pip3 install -r requirements.txt
```

requirements.txt pins `openai>=0.27.0,<1.0.0`, so the legacy SDK is installed rather than the 1.x line. If that install fails, the README's advice is to upgrade pip first with `pip3 install --upgrade pip`. The project ships a template, and the README's instruction is to copy it into place:

```bash
cp config-template.json config.json
```

Now edit `config.json`. The minimum viable setup is one model block and one channel block. The README's OpenAI example uses these keys:

```json
{
  "model": {
    "type": "chatgpt",
    "openai": {
      "api_key": "YOUR API KEY",
      "api_base": "",
      "model": "gpt-5.5",
      "proxy": "http://127.0.0.1:7890",
      "character_desc": "You are ChatGPT, a large language model trained by OpenAI...",
      "conversation_max_tokens": 1000,
      "temperature": 0.75,
      "top_p": 0.7
    }
  }
}
```

Note the mismatch a new user will hit immediately: the README's structure example sets `model.type` to `openai`, while the OpenAI section's own configuration uses `"type": "chatgpt"`. Copy the value from the section that documents your provider, not from the overview diagram. Also note that `api_base` is optional and empty means the official API, and that the README states GPT-5 and o-series models only accept default sampling parameters, which the project skips automatically.

Add a channel block for the service you want. The default channel is the terminal, so the first run needs no channel credentials at all:

```bash
python3 app.py
```

You should see the process start and accept input from the terminal. Once that works, swap `channel.type` for `telegram`, `slack`, `discord` or `gmail` and fill in that channel's block. The README notes that each channel's configuration and run instructions are in a collapsible section of the same document, so the channel block is where the per-service keys live.

## Where bot-on-anything stops being the right tool

The clearest limitation is stated by the project itself. If you need an agent with task planning, long-term memory, skills, MCP support or self-evolution, the README sends you to CowAgent. Bot on Anything is a routing layer, not a reasoning loop. Anything that requires the bot to decide which tool to call next, or to remember a user across sessions beyond a conversation window, falls outside what this repository documents.

Memory is bounded. The OpenAI section lists `max_history_num` as an optional key controlling the maximum length of conversation memory, and the README's text on what happens when that limit is exceeded is cut off mid-sentence in the published file. Treat the memory model as a fixed window you configure, not a store you query.

Model support is narrower than the highlights table suggests. Native integrations are OpenAI, LinkAI, ERNIE Bot, New Bing and Bard. Claude, Gemini, DeepSeek, Qwen and GLM appear only as models reachable through LinkAI, which means a third-party account sits between you and the provider. If your compliance rules require a direct vendor relationship, that route is closed.

The release history is also worth reading before you plan upgrades. The most recent tagged release is 1.1.0 from 2023-04-11, while the last push to the default branch was on 2026-07-05. Development has continued on master without a matching release cadence, so pinning to a tag and pinning to a commit give you very different code.

## Compared with chatgpt-on-wechat and hand-rolled adapters

The most direct alternative is chatgpt-on-wechat, the sibling project this repository borrows its plugin model from. The README states that Bot on Anything is compatible with the plugin model of chatgpt-on-wechat, so plugins written for one are intended to work in the other. The difference is focus. chatgpt-on-wechat is built around WeChat, while Bot on Anything is aimed at overseas channels: the README calls it "a great fit for quickly spinning up bots on overseas channels like Telegram, Slack, Discord, and Gmail." If your users are on WeChat, the sibling is the more natural starting point. If they are on Slack or Telegram, this repository is.

The second alternative is writing your own adapter against the provider SDK. That is not a strawman. A Telegram bot with a single model is perhaps a hundred lines, and you own every failure mode. What you give up is the matrix: twelve channels, five model backends, and the ability to run several channels as separate processes from one config. If you only ever need one channel and one model, the framework's value is mostly the config template and the plugin compatibility, and you should weigh that honestly.

The third option is a hosted bot platform. The trade-off there is the opposite of this project's: you get a managed runtime and lose the ability to read the code that handles your API key. Bot on Anything is pure Python and MIT-licensed, so the entire path from incoming message to model call is inspectable.

## Maintenance, deployment and the MIT licence

Deployment is deliberately thin. The repository contains a Dockerfile built on `python:3.10-alpine` that copies requirements.txt, installs it, copies the source, and runs `python app.py` as the container command. There is no exposed port declared in the Dockerfile, which is consistent with the terminal-first default: a channel like Slack or Telegram uses outbound connections, so you may not need to publish anything. If you add a web channel, you will need to handle ingress yourself, and the Dockerfile gives no guidance on that.

The dependency list is short and mostly boring, which is a good sign for long-term maintenance: PyJWT, flask, flask_socketio, openai, EdgeGPT, requests, discord.py, wechatpy, cryptography, plus a pinned `itchat-uos==1.5.0.dev0`. That last pin is the one to watch. It is a development version of a WeChat library, pinned exactly, and it will not move on its own. If you do not use the WeChat channels, the pin is dead weight you could remove from your own build.

The openai pin at `>=0.27.0,<1.0.0` is the larger commitment. The README notes this is the legacy SDK and that requirements.txt already pins a compatible version. Migrating to the 1.x SDK is not something the documentation describes, so treat an SDK upgrade as work you would own.

The licence is MIT, which permits commercial use, modification and redistribution provided the copyright notice and permission notice are retained. That is a permissive licence with no copyleft obligation on your own code. It says nothing about the terms of the model providers or the LinkAI service you route through, and those are separate agreements you should read on their own terms. Nothing here is legal advice.

## Conclusion

Adopt bot-on-anything if you want a single Python process that puts an OpenAI-compatible model behind Telegram, Slack, Discord or Gmail, and you are willing to read config-template.json and edit two type fields. Do not adopt it if you need task planning, long-term memory, skills or MCP: the README points those users to CowAgent instead. Before you commit, verify that the channel you care about has a config block you can fill in, check the pinned openai>=0.27.0,<1.0.0 line in requirements.txt against your own SDK plans, and confirm whether the channel you need is one of the twelve listed or one you would have to write yourself.

## FAQ

### What exactly is bot-on-anything?

It is a lightweight Python framework for building AI chatbots, described in its README as a way to connect various large models to different application channels with a bit of configuration. Models and channels are independent, so you switch between them by editing the type fields in config.json.

### Where can I find and download bot-on-anything?

The README gives the clone command for the GitHub repository, followed by cd bot-on-anything/ and pip3 install -r requirements.txt. There is no separate installer or package distribution described.

### What are the top AI bots you can build with bot-on-anything?

The highlights table lists OpenAI (GPT-5.5, GPT-4.1 and similar), LinkAI for 100+ models including DeepSeek, Claude, Gemini, Qwen and GLM, plus ERNIE Bot, New Bing and Bard. Models from other providers are reached through LinkAI rather than a native integration.

### Are bots like bot-on-anything illegal?

The README does not discuss legality or platform terms. It documents the software only, and the terms that apply to your bot come from the channel you connect and the model provider you route through.

## Sources

- [License: MIT](https://github.com/zhayujie/bot-on-anything/blob/master/LICENSE)
- [Project website](https://cowagent.ai)
- [README](https://github.com/zhayujie/bot-on-anything/blob/master/README.md)
- [Releases](https://github.com/zhayujie/bot-on-anything/releases)
- [zhayujie/bot-on-anything on GitHub](https://github.com/zhayujie/bot-on-anything)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/zhayujie-bot-on-anything
