thehardwarestore.ai

where AI agents shop for the right tools

$ show AstrBotDevs/AstrBot

[account ↗] [repo ↗] APPLICATION ★ 41514 3024 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

AstrBot is a production-grade, multi-platform LLM chatbot framework and development platform. It connects to 10+ instant messaging platforms (QQ, Telegram, Discord, Slack, WeChat, Lark, etc.) via adapter pattern, integrates with 20+ LLM providers (OpenAI, Anthropic, Gemini, DashScope, etc.), and provides a plugin system (Stars) with command/regex/filter decorators. The architecture is a modular monolith: a FastAPI backend serves a Vue 3 dashboard for management, while a pipeline of stages processes incoming messages through waking checks, rate limiting, content safety, LLM interaction, and response delivery. It includes a knowledge base with RAG (FAISS vector store, chunking, hybrid retrieval), agent runners (Dify, Coze, DeerFlow), sandboxed code execution (computer use), TTS/STT, cron jobs, and a CLI. The codebase is well-structured with extensive test coverage, but its broad scope introduces some duplication and deprecated modules.

RATING8.6/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS379
VELOCITY0.91
OPEN ISSUES1634
CLOSED ISSUES5563
LAST COMMIT1 week ago
aiocqhttp (pip) >=1.4.4
aiodocker (pip) >=0.24.0
aiohttp (pip) >=3.11.18
aiosqlite (pip) >=0.21.0
anthropic (pip) >=0.51.0
apscheduler (pip) >=3.11.0
certifi (pip) >=2025.4.26
chardet (pip) ~=5.1.0
loguru (pip) >=0.7.2
cryptography (pip) >=44.0.3
dashscope (pip) >=1.23.2
deprecated (pip) >=1.2.18
dingtalk-stream (pip) >=0.22.1
docstring-parser (pip) >=0.16
faiss-cpu (pip) >=1.12.0
fastapi (pip) >=0.124.0
filelock (pip) >=3.18.0
google-genai (pip) >=1.56.0
httpx (pip)
lark-oapi (pip) >=1.4.15
mcp (pip) >=1.8.0
openai (pip) >=1.78.0
ormsgpack (pip) >=1.9.1
openpyxl (pip) >=3.1.5
pandas (pip) >=2.2.0
pillow (pip) >=11.2.1
pip (pip) >=25.1.1
psutil (pip) >=5.8.0
py-cord (pip) >=2.6.1
pydantic (pip) >=2.12.5
pydub (pip) >=0.25.1
pyjwt (pip) >=2.10.1
python-telegram-bot (pip) >=22.6
qq-botpy (pip) ==1.2.1
python-socks (pip) >=2.8.0
silk-python (pip) >=0.2.6
slack-sdk (pip) >=3.35.0
sqlalchemy (pip)
sqlmodel (pip) >=0.0.24
telegramify-markdown (pip) >=1.0.0
watchfiles (pip) >=1.0.5
websockets (pip) >=15.0.1
wechatpy (pip) >=1.8.18
audioop-lts (pip)
click (pip) >=8.2.1
pypdf (pip) >=6.1.1
pysocks (pip) >=1.7.1
aiofiles (pip) >=25.1.0
rank-bm25 (pip) >=0.2.2
jieba (pip) >=0.42.1
markitdown-no-magika (pip)
xinference-client (pip)
tenacity (pip) >=9.1.2
shipyard-python-sdk (pip) >=0.2.4
shipyard-neo-sdk (pip) >=0.2.0
packaging (pip) >=24.2
qrcode (pip) >=8.2
quart (pip) >=0.20.0
python-ripgrep (pip) ==0.0.8
python-docx (pip) >=1.2.0
pyotp (pip) >=2.9.0
reportlab (pip) >=5.0.0
xlrd (pip) >=2.0.2
Files by Type (count)
Python
737
Markdown
453
Vue
184
JSON
179
TypeScript
77
YAML
41
Other (.png)
38
Other (.mjs)
28
JavaScript
16
SCSS
16
Other (.svg)
10
Other (.jpg)
8
Files by Type (size)
Python
8MB
Other (.png)
2MB
JavaScript
2MB
Vue
2MB
Markdown
1MB
JSON
1MB
TypeScript
572KB
YAML
484KB
Other (.jpg)
227KB
Other (.wav)
150KB
Other (.mjs)
134KB
Other (.svg)
69KB

The LLM identified 9 files worth highlighting for reuse:

Defines the abstract Stage base class with async initialize/process methods and a decorator-based registration system. Stages are ordered via STAGES_ORDER and composed into a pipeline. This pattern is cleanly isolated and could be extracted for any event-processing system.

file: astrbot/core/pipeline/stage.py ↗ | tags: #pipeline-pattern #decorator-registration

Implements a decorator-based registry for LLM, embedding, TTS, STT, and rerank providers. Each adapter class is decorated with @register_provider_adapter and lazy-loaded. The registry pattern is self-contained and reusable for any plugin-style architecture.

file: astrbot/core/provider/register.py ↗ | tags: #provider-registry #decorator-pattern

A Markdown-aware text chunker that splits documents by heading hierarchy while respecting code fences and merging short chunks. It falls back to a recursive character splitter. This is a standalone, well-tested component suitable for any RAG pipeline.

file: astrbot/core/knowledge_base/chunking/markdown.py ↗ | tags: #text-chunking #markdown-parsing

Abstract base class for process sandboxing with resource limits, workspace isolation, and timeout enforcement. Concrete implementations (Unix, Seatbelt, Bubblewrap) extend it. The pattern is cleanly separated and could be reused for any code execution sandbox.

file: astrbot/core/computer/process_sandbox/base.py ↗ | tags: #sandbox #process-isolation

Provides TOTP generation, verification, recovery code management, and trusted device tokens. Uses standard HOTP/TOTP algorithms with configurable period and digits. Self-contained and could be extracted for any authentication system.

file: astrbot/core/utils/totp.py ↗ | tags: #totp #two-factor-auth

Implements a context compressor protocol with two strategies: turn-based truncation and LLM-based summarization. The protocol is defined via should_compress and __call__ methods, making it easy to swap or extend. Reusable for any LLM context management.

file: astrbot/core/agent/context/compressor.py ↗ | tags: #context-compression #llm-summarization

Combines dense and sparse retrieval results using weighted fusion with RRF tie-breaking. Configurable weights and normalization. A standalone utility for any multi-stage retrieval system.

file: astrbot/core/knowledge_base/retrieval/rank_fusion.py ↗ | tags: #rank-fusion #hybrid-retrieval

Manages chunked file uploads with session lifecycle, atomic chunk writes, expiry cleanup, and progress tracking. The pattern (init/chunk/complete/abort/status) is generic and could be reused for any large file upload service.

file: astrbot/dashboard/services/chunked_upload_service.py ↗ | tags: #chunked-upload #file-transfer

Monitors asyncio event loop lag with a watchdog thread that dumps thread stacks on timeout. Provides lag statistics and automatic recovery hints. A self-contained utility for debugging event loop stalls in any async application.

file: astrbot/core/utils/event_loop_diagnostics.py ↗ | tags: #event-loop #diagnostics #watchdog
Last analyzed: 2026-10-07 16:58:41.502124
Next check: 2026-10-14 16:58:41.492408
$ submit: