# Repository Briefing: AstrBotDevs/AstrBot
> Source: https://repoforai.com/repo/AstrBotDevs/AstrBot (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/AstrBotDevs/AstrBot
- **Official Docs / Website**: https://astrbot.app
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: AGPL-3.0
- **Engineering Health**: A (87/100 · Maintenance 35/35 · Adoption 21/25 · Releases 20/20 · License 11/20)
- **Latest Release**: v4.30.3 (2026-12-03) — https://github.com/AstrBotDevs/AstrBot/releases
- **Review Snapshot**: 2026-12-03 (Note: v4.30.3 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Docker, Self-Hosted
- **Momentum**: 47,926 ★ total (+16 24h / +298 7d) · 3,737 forks
- **Topics**: `agent`, `ai`, `astrbot`, `chatbot`, `chatgpt`, `discord`, `docker`, `gemini`, `gpt`, `llama`, `llm`, `mcp`
- **When to Use**: Best for: Teams and individuals who want to run one configurable assistant across chat platforms such as QQ, Telegram, Feishu, or Slack and choose their own model endpoints and plugins. Skip if: You want a fully managed bot service, do not want to maintain connectors and upgrades, or cannot meet the AGPL obligations that apply to your deployment.

## Overview
```text
### Architecture & Core Mechanics
AstrBot is a Python 3.12+ application that sits between messaging platforms and model services. The integration flow is to receive a message through an IM adapter or Web ChatUI, handle it through the built-in agent runtime, and return the response through that channel. Messaging and inference are configured separately, so choosing an OpenAI-compatible or Ollama endpoint does not dictate which chat platform to use.

The tree includes main.py, runtime_bootstrap.py, the astrbot/ package, and dashboard/. FastAPI is listed in the Python stack, with SQLAlchemy asyncio support and aiosqlite among the persistence dependencies. Libraries such as dingtalk-stream, lark-oapi, and python-telegram-bot reflect the platform-specific adapter layer. Plugins and MCP extend agent tooling; the Agent Sandbox provides a separate execution environment for code and shell calls, with resources reusable within a session.

### Key Capabilities & Differentiators
Official integrations include QQ, OneBot v11, Telegram, WeCom, WeChat Official Accounts, Feishu, DingTalk, Slack, and Discord. Matrix and Rocket.Chat rely on community adapters, and WhatsApp is listed as forthcoming. Web ChatUI gives operators a way to test conversations without first configuring an IM account, but channel-specific behavior still needs to be tested on the target platform.

Model integrations span OpenAI-compatible APIs, Anthropic, Gemini, DeepSeek, and self-hosted endpoints served by Ollama or LM Studio. Dify and Coze are supported as LLMOps integrations. Speech is configured separately through options such as OpenAI Whisper for speech-to-text and GPT-Sovits or Edge TTS for text-to-speech. The one-click catalog contains more than 3,000 plugins; that breadth does not establish compatibility with every release or feature parity across chat adapters.

### Trade-offs & Limitations
Compared with using managed Coze, AstrBot gives you control over where the bot runs, which messaging adapters it uses, and which model endpoints it calls. It also makes you responsible for service credentials, dashboard exposure, plugin updates, and backups. Self-hosting the bot does not keep inference traffic on-premises if it still calls hosted model or speech APIs. Local model endpoints shift more of the cost and capacity planning to your own infrastructure.

Plugin breadth is useful when adapting the same assistant to several channels, but community adapters and third-party plugins need compatibility and permissions review before production use. Treat the sandbox as one isolation layer rather than a substitute for reviewing the tools you enable and the data they can access. For commercial deployments, AGPL-3.0 permits commercial use but carries source-offer obligations when users interact with your modified version over a network.

### Hardware & Deployment Guide
Docker Compose is the most concrete self-hosted path: the supplied service runs soulter/astrbot:latest, publishes WebUI port 6185 and optional OneBot v11 WebSocket port 6199, and bind-mounts ./data at /AstrBot/data. The service sets no-new-privileges. Restrict dashboard access, omit the 6199 mapping if unused, and pin a tested image version rather than relying on latest. The supplied Compose file defines only the AstrBot service; local inference is configured separately.

Source execution requires Python 3.12 or later. Hosted model APIs do not require a GPU on the bot host; for local inference, size the model service for the chosen model, context length, and concurrency. Back up data and configuration before upgrading from a version earlier than v4.30.0. That release migrates conversation, agent, session, tool and skill, and button callback data; it also standardizes MCP tool names, so check existing permissions and enablement settings after upgrading. Plan rollback with the pre-upgrade backup, not just an older image: migrated conversations may appear missing in the older version.
```

## Key Capabilities
```text
- Messaging adapters: Official integrations cover QQ, OneBot v11, Telegram, Feishu, DingTalk, Slack, and Discord; Matrix is community maintained.
- Model routing: OpenAI-compatible, Anthropic, and Gemini services sit alongside self-hosted Ollama and LM Studio endpoints.
- Agent extensions: A catalog with more than 3,000 plugins, MCP support, and a sandbox for code and shell execution with session-level resource reuse.
- Web access: Web ChatUI supports direct interaction, and Compose exposes the WebUI on port 6185.
- Container persistence: Compose bind-mounts ./data to /AstrBot/data; port 6199 is optional for OneBot v11 WebSocket.
- Upgrade boundary: v4.30.0 requires Python 3.12 or later, migrates stored state, and renames MCP tools.
```

## Quick Start / Clone
```bash
curl -fsSL https://docs.astrbot.app/install.sh | bash
# For future upgrades, please use `uv tool upgrade astrbot --python 3.12`
```
