How watergodfurina/astrbot-golang works
AstrBot-golang is a Go chat-bot framework with a Vue management dashboard. Its main runtime path receives messages through platform adapters, processes them through the event bus and pipeline, and returns replies through the platform; the pipeline can use providers, agents, skills, and knowledge retrieval. The dashboard configures and manages the framework through its API. The README documents these subsystem relationships; sampled files confirm selected details, but many runtime connections and dashboard routes were not inspected, so uncertain links are omitted.
Main entry points: server.go Dashboard API · pipeline Message Pipeline · host_service.go Plugin Runtime · lifecycle.go Lifecycle Manager
Components 21
Message Runtime
- Platform Adapters
internal/platform - Event Bus
internal/core/event_bus.go - Message Pipeline
internal/pipeline - Lifecycle Manager
internal/lifecycle/lifecycle.go - Application Entry
cmd/astrbot/main.go
AI Capabilities
- AI Providers
internal/provider - Agent System
internal/agent - Knowledge Base
internal/knowledgebase - Skills Manager
internal/skills/manager.go - Skill Sandbox
internal/sandbox/manager.go
Management
- Plugin Runtime
internal/plugin/host_service.go - Command System
internal/star/manager.go - Scheduled Jobs
internal/cron/manager.go
Web Dashboard
- Dashboard UI
dashboard/src/App.vue - Dashboard API
internal/dashboard/server.go - API Handlers
internal/dashboard/handlers.go
Persistent State
- Conversation Manager
internal/conversation/manager.go - SQLite Database
internal/db/database.go - Configuration
internal/config/config.go
Other components
- Chat User
- AI Services
Connections 25
- Chat User → Platform Adapters: sends messages
- Platform Adapters → Event Bus: emits events
- Event Bus → Message Pipeline: dispatches events
- Message Pipeline → AI Providers: requests inference
internal/pipeline/plugin_llm.go - AI Providers → AI Services: calls APIs
internal/provider/sources/volcengine_tts_source.go - Message Pipeline → Agent System: uses agents
- Message Pipeline → Knowledge Base: retrieves knowledge
- Message Pipeline → Skills Manager: injects skills
- Skill Sandbox → Skills Manager: syncs skills
internal/sandbox/manager.go - Plugin Runtime → Skills Manager: bridges skills
internal/plugin/host_service.go - Plugin Runtime → AI Providers: exposes providers
internal/plugin/host_service.go - Plugin Runtime → Scheduled Jobs: registers jobs
internal/plugin/host_service.go - Message Pipeline → Platform Adapters: sends replies
- Application Entry → Lifecycle Manager: starts runtime
cmd/astrbot/main.go - Lifecycle Manager → Event Bus: assembles runtime
- Chat User → Dashboard UI: manages bot
- Dashboard UI → Dashboard API: uses API
- Dashboard API → API Handlers: routes requests
- Dashboard API → Conversation Manager: manages conversations
internal/dashboard/server.go - Dashboard API → Plugin Runtime: manages plugins
internal/dashboard/server.go - Dashboard API → Knowledge Base: manages knowledge
internal/dashboard/server.go - Dashboard API → Configuration: updates configuration
internal/dashboard/server.go - Conversation Manager → SQLite Database: persists history
internal/conversation/manager.go - Scheduled Jobs → SQLite Database: persists jobs
internal/cron/manager.go - Lifecycle Manager → Dashboard API: starts API