General Introduction
AstrBot is an open source chatbot development framework, which supports QQ, Telegram, WeChat and other messaging platforms, and can easily access OpenAI, DeepSeek, Google Gemini AstrBot is designed to allow users to quickly build intelligent chatbots, such as picture understanding and speech-to-text. The framework provides a plugin system, a visual management panel and multimodal features such as image understanding and speech-to-text.AstrBot is designed to allow users to quickly build intelligent chatbots for developers and technology enthusiasts. It uses the AGPL-v3 license, has open code and an active community.
Function List
- Supports multi-platform messaging access, including QQ, QQ Channel, Telegram, WeChat (personal and enterprise WeChat), Flybook, Nail, and more.
- Integrate multiple big language models, such as OpenAI, Google Gemini, DeepSeek, Claude, Ollama, etc., and support local models.
- Provides multi-round dialog function, can set the personality, supports picture understanding and speech to text (based on Whisper).
- Built-in visual management panel for configuring bots, viewing logs and managing plugins.
- Plugin extensions are supported and users can develop customized functions such as check-in or code execution.
- Provides Agent functionality, including web search, natural language to-do list and docking Dify Platform.
- Includes content security management, such as keyword filtering and Baidu content auditing.
- WebUI is provided so that users can talk to the robot directly through the web page.
Using Help
AstrBot's installation and use process is clear, the official documentation provides a variety of deployment methods. The following is a detailed description of the installation steps and the main features of the operation.
Installation process
AstrBot supports source code deployment, Docker deployment, Windows one-click installation, Pagoda panel deployment and many other ways. Here is an example of source code deployment and Docker deployment.
Source code deployment
- Preparing the environment
Ensure that Git and Python 3.11+ are installed; Windows users can download Python from the official Python website, Linux users can use itsudo apt install python3
Installation. - Download Code
Runs in the terminal:
git clone https://github.com/AstrBotDevs/AstrBot
cd AstrBot
Or download the ZIP file from GitHub and unzip it.
- Installation of dependencies
Recommendeduv
Tools:
pip install uv
uv run main.py
Or in the traditional way:
pip install -r requirements.txt
python main.py
- triggering program
After running, the terminal will display the management panel address, such ashttp://localhost:6185
. Use the default accountastrbot
and passwordsastrbot
Log in.
Docker Deployment
- Installing Docker
Make sure Docker is installed and availabledocker --version
Check. - Pull the image and run
Enter it in the terminal:
docker run -d -p 6185:6185 -v astrbot-data:/app/data soulter/astrbot:latest
-p 6185:6185
mapping port.-v
Create a data volume to save the configuration.
- access panel
Open your browser and typehttp://localhost:6185
, login with the default account password.
Main Functions
Configuring the Big Language Model
- Log in to the admin panel and click on Provider settings.
- Select the model type, e.g.
openai_chat_completion
The - Enter the API key (obtained from a platform such as OpenAI) and address (default)
https://api.openai.com/v1
). - Select the specific model (e.g.
gpt-3.5-turbo
), save it and it takes effect.
Multi-platform access
- Select a platform, such as Telegram, from the Messaging Platforms option in the admin panel.
- Enter the necessary information (e.g. Telegram's Bot Token, obtained from BotFather).
- Save the configuration and the bot can respond to messages on the corresponding platform. For example, in Telegram, type
/start
, the robot will reply.
Using plug-ins
- Download the plugin (e.g. Telegram adapter) and put it into the
<AstrBot目录>/data/plugins
The - Restart AstrBot and the plugin loads automatically.
- Enable the plugin in the admin panel and configure parameters, such as setting message rate limits.
multimodal function
- Picture comprehension: Send an image to the bot with a prompt (e.g. "Explain this image") and the bot will analyze it and reply.
- speech-to-text: To send a voice file, enable Whisper in Provider Settings and the bot will convert it to text and respond.
Agent Function
- Web Search: Send "search weather forecast" and the bot will return results.
- code execution: To send a code snippet (e.g. Python), enable the sandboxed code executor, which the bot will run and return the result.
caveat
- Server deployment requires that the
localhost
to the server IP. - WeChat personal number access using Gewechat, it is recommended to use an alternate account to avoid blocking.
- Docker deployment requires mapping
/var/run/docker.sock
, otherwise the code executor is not available. - The first run generates a configuration file
<AstrBot目录>/data/config.json
, which can be edited manually.
With these steps, users can easily deploy and utilize AstrBot.
application scenario
- Personal Assistant
Set reminders, check messages and be ready to help on Telegram with AstrBot. - Group Chat Management
In QQ group or Flybook, the robot can automatically answer questions, manage check-ins and improve efficiency. - Learning Tools
Students can use AstrBot to analyze picture formulas or transcribe voice notes to aid in learning. - development testing
Developers can test the effects of LLM conversations or develop new plug-in extensions.
QA
- Which platforms are already supported?
QQ (official and OneBot), QQ Channel, Telegram, WeChat (personal and enterprise WeChat), Flybook, and Nail are already supported, while Discord and others are under development. - How do I add a new model?
Add it in the admin panel "Providers", e.g. by typing Ollama The local address and model name of the model is sufficient. - What if the startup fails?
Check the terminal logs, there may be missing dependencies or ports occupied. Make surerequirements.txt
The installation is complete. - How are plugins developed?
Refer to official documentation<https://astrbot.app/dev/plugin.html>
, put the code into thedata/plugins
Reboot after.