AstrBot

创建于 2026年3月25日
更新于 2026年3月25日

Multi-platform chatbot framework with agentic IM bot infrastructure. Agent-driven messaging bot supporting QQ, WeChat, Telegram, Discord with plugin system and LLM integration.

Multi-Platform Chatbot Framework - Agentic IM Bot Infrastructure

AstrBot is a powerful multi-platform chatbot framework built with an agentic architecture. Supporting QQ, WeChat, Telegram, Discord, and more, AstrBot combines traditional chatbot capabilities with modern LLM integration, enabling intelligent conversations across all your messaging platforms. GitHub: https://github.com/AstrBotDevs/AstrBot Developer: AstrBotDevs (Community Open Source) License: AGPL-3.0 Documentation: https://astrbot.dev/ Key Innovation: AstrBot bridges the gap between traditional rule-based chatbots and modern LLM-powered agents, providing a unified framework for intelligent messaging across multiple platforms.

Core Philosophy: "One bot to rule them all - intelligent, extensible, everywhere"


Why AstrBot?

Multi-Platform: Deploy once, run everywhere - QQ, WeChat, Telegram, Discord.

Agentic Design: Built from the ground up for AI agent capabilities.

Plugin System: Extend functionality with a rich plugin ecosystem.

LLM Native: Deep integration with modern large language models.


Key Features

$#1.
Platform Support

  • QQ: Official and unofficial protocols
  • WeChat: Personal and Work
  • Telegram: Full bot API
  • Discord: Bot integration
  • OneBot: Standard protocol
  • Web: Built-in web interface

$#2.
Agentic Architecture

  • Event-driven design
  • Message pipeline
  • Context management
  • State persistence
  • Async execution

$#3.
LLM Integration

  • OpenAI compatible APIs
  • Local model support
  • Streaming responses
  • Token management
  • Cost tracking

$#4.
Plugin System

  • Hot reloading
  • Dependency management
  • Event hooks
  • Custom commands
  • Shared marketplace

$#5.
Management Interface

  • Web dashboard
  • Real-time monitoring
  • Configuration UI
  • Log viewer
  • Plugin manager

Installation

# Pull image
docker pull astrbot/astrbot:latest

# Run container
docker run -d \
  --name astrbot \
  -v ~/astrbot/data:/app/data \
  -v ~/astrbot/plugins:/app/plugins \
  -p 6185:6185 \
  astrbot/astrbot:latest

One-Click Install

# Linux/macOS
curl -fsSL https://astrbot.dev/install.sh | bash

# Windows PowerShell
iwr -useb https://astrbot.dev/install.ps1 | iex

Manual Installation

# Clone repository
git clone https://github.com/AstrBotDevs/AstrBot.git
cd AstrBot

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/macOS
venv\Scripts\activate     # Windows

# Install dependencies
pip install -r requirements.txt

# Run
python main.py

Configuration

config.json

{
  "platform": {
    "telegram": {
      "enabled": true,
      "token": "YOUR_BOT_TOKEN"
    },
    "qq": {
      "enabled": false,
      "account": "YOUR_QQ",
      "password": "YOUR_PASSWORD"
    }
  },
  "provider": {
    "openai": {
      "api_key": "YOUR_API_KEY",
      "model": "gpt-4o-mini",
      "base_url": "https://api.openai.com/v1"
    }
  },
  "astrbot": {
    "port": 6185,
    "host": "0.0.0.0",
    "debug": false
  }
}

Web Dashboard

Access: http://localhost:6185
Default credentials: admin/admin
Change password after first login

Plugin Development

Basic Plugin

from astrbot.api import *

@register(
    name="HelloPlugin",
    version="1.0.0",
    description="A simple hello plugin"
)
class HelloPlugin(Plugin):
    @event_message_type(EventMessageType.ALL)
    async def on_message(self, event: MessageEvent):
        if event.get_message() == "hello":
            yield event.plain_result("Hello there!")

LLM Plugin

from astrbot.api.provider import LLMRequest

@register(name="ChatPlugin")
class ChatPlugin(Plugin):
    @event_message_type(EventMessageType.ALL)
    async def on_message(self, event: MessageEvent):
        response = await self.context.llm_request(
            LLMRequest(prompt=event.get_message())
        )
        yield event.plain_result(response.text)

Pricing

Free: AstrBot is completely free and open source under AGPL-3.0 license. You only pay for:

  • AI model API usage
  • Server hosting (if applicable)
  • Platform-specific fees (if any)

System Requirements

ComponentMinimumRecommended
OSLinux, macOS, WindowsLinux (Ubuntu 20.04+)
RuntimePython 3.9+Python 3.11+
Memory512MB RAM1GB+ RAM
Storage200MB1GB
NetworkRequiredStable internet

Use Cases

Multi-Platform Chatbot

Deploy a single bot that works across QQ, WeChat, Telegram, and Discord.

Community Management

Automate community moderation, welcome messages, and FAQ responses.

Customer Service Bot

Provide 24/7 customer support across multiple messaging channels.

Group Chat Assistant

Add intelligent assistance to group conversations.

LLM-Powered Conversations

Enable natural, intelligent conversations powered by large language models.

Custom Bot Development

Build custom bots for specific use cases with the plugin system.


Community and Support


License

AGPL-3.0 License - Free for personal and commercial use (with source disclosure requirements).


Tags

ai-agent, chatbot, multi-platform, qq, wechat, telegram, discord, llm, python, agentic