MaiBot Plugin Development Documentation
Welcome to the MaiBot plugin system development documentation! This is the best starting point for your plugin development journey.
Getting Started
- 📖 Quick Start Guide - Quickly create your first plugin
Component Function Details
- 🧱 Action Component Details - Master the core Action component
- 💻 Command Component Details - Learn components that directly respond to commands
- 🔧 Tool Component Details - Understand how to extend information acquisition capabilities
- ⚙️ Configuration File System Guide - Learn to use automatically generated plugin configuration files
- 📄 Manifest System Guide - Understand plugin metadata management and configuration architecture
Command vs Action vs Tool Selection Guide
- When to use Command
- ✅ Users need to explicitly call specific functions
- ✅ Require precise parameter control
- ✅ Management and configuration operations
- ✅ Query and information display
- When to use Action
- ✅ Enhance MaiMai's intelligent behavior
- ✅ Automatically triggered based on context
- ✅ Emotion and expression display
- ✅ Randomized interactions
- When to use Tool
- Directly provide information to MaiMai
- Provide more available information when replying
- Simple to use, specialized functionality
API Browser
Message Sending and Processing API
- 📤 Send API - Various types of message sending interfaces
- Message API - Message acquisition, message construction, message query interfaces
- Chat Flow API - Chat flow management and query interfaces
AI and Generation API
- LLM API - Large language model interaction interface, can use built-in LLM to generate content
- ✨ Reply Generator API - Intelligent reply generation interface, can use built-in stylized generators
Emoji API
- 😊 Emoji API - Emoji selection and management interface
Relationship System API
- Person Information API - User information, interfaces for handling people MaiMai knows and relationships
Data and Configuration API
- 🗄️ Database API - Database operation interfaces
- ⚙️ Configuration API - Configuration reading and user information interfaces
Plugin and Component Management API
- 🔌 Plugin API - Plugin loading and management interfaces
- 🧩 Component API - Component registration and management interfaces
Logging API
- 📜 Logging API - Logger instance acquisition interface
Tool API
- 🔧 Tool API - Tool acquisition interface
A Convenient Small Design
We define an __all__ variable in __init__.py that contains all classes and functions that need to be exported. This way, when importing elsewhere, you can directly use from src.plugin_system import * to import all plugin-related classes and functions. Or you can directly use from src.plugin_system import BasePlugin, register_plugin, ComponentInfo and similar ways to import the parts you need.