# MaiBot

> A self-hosted group-chat companion that reads the room instead of answering questions

- Category: Agents & Automation / Assistants & Chatbots
- Language: Python
- Licence: GPL-3.0
- Repository: https://github.com/Mai-with-u/MaiBot
- Website: https://docs.mai-mai.org
- Canonical page: https://ai-tldr.dev/tools/maibot/

## In short

MaiBot — MaiSaka — is an LLM-based interactive agent built on a different premise from most assistants: it is not trying to be a helpful task-completing bot. It sits in the Assistants & Chatbots category of the Agents & Automation tools and is open-source, written in Python and licensed GPL-3.0.

## Overview

MaiBot — MaiSaka — is an LLM-based interactive agent built on a different premise from most assistants: it is not trying to be a helpful task-completing bot. The project's stated aim is a conversational presence that feels warm and authentic rather than perfect or efficient, so replies are short or long chat turns instead of long markdown-heavy answers, and the bot is designed to know when to join a conversation and when to stay quiet.

It is built for group chats specifically. In a multi-person conversation MaiSaka picks up how the people around it speak, learns new slang and in-group vocabulary as it goes, and — drawing on personality theory — accumulates a longer-term picture of each person's information, likes, dislikes and behaviour. A plugin system with APIs and an event system is the documented extension path, and the project ships a WebUI with a plugin marketplace for installing adapters and extensions.

Deployment is self-hosted and deliberately low-friction: a one-click package for Windows sets up Python and runs a setup wizard without touching a command line, while Linux and macOS users can use the repository's Docker Compose stack, which runs the core service, a NapCat container for QQ, and a SQLite browser over the shared data volume. You need a computer with an internet connection (Windows 10+, Linux or macOS), at least 2 GB of free memory, and an LLM API key — the model provider is configured in the WebUI, not baked in. It requires Python 3.12+ and is GPL-3.0 licensed.

## What it does

- Conversational style tuned for group chat — variable-length casual turns rather than markdown-formatted answers
- Decides when to speak and when to stay silent instead of replying to every message
- Picks up the speaking style, slang and in-group vocabulary of the people in a conversation
- Long-running per-person understanding, informed by personality theory, that accumulates across conversations
- WebUI for model configuration, plugins and a plugin marketplace
- Plugin system with APIs and an event system for extensions
- Platform adapters — QQ via NapCat is the documented common case, with other platforms supported through adapters
- Self-hosted deployment: a Windows one-click package, or a Docker Compose stack with core, NapCat and a SQLite browser

## Getting started

You need Windows 10+, Linux or macOS, at least 2 GB of free memory, and an LLM API key. Windows users can skip the command line entirely with the one-click launcher.

1. Install

   On Windows, download the Maibot OneKey package — it configures Python and starts a setup wizard. Otherwise clone the repository and bring up the bundled Docker Compose stack, which runs the core service plus NapCat and a SQLite browser.

```bash
git clone https://github.com/Mai-with-u/MaiBot.git
cd MaiBot
docker compose up -d
```

2. Open the WebUI

   Visit the WebUI in a browser and paste the login token printed in the startup message. The service listens on port 8001; the Docker Compose file maps it to 18001 on the host.

```text
http://localhost:8001      # one-click / source install
http://localhost:18001     # docker compose (mapped port)
```

3. Configure a model

   In the WebUI's model configuration section, fill in your API provider address and key, then choose the model you want the bot to speak with.

```text
WebUI → model configuration → provider address + API key → select model
```

4. Connect a chat platform

   For QQ — the most common case — install NapCat and enable forward WebSocket, then install and enable the NapCat adapter from the WebUI's plugin marketplace. Other platforms connect through their own adapters.

```text
NapCat → enable forward WebSocket
WebUI → plugin marketplace → install + enable "NapCat adapter"
```

## When to use it

- Reach for it when you want a persistent presence in a group chat rather than a question-answering bot
- Reach for it to run a companion bot entirely on your own machine against your own API key
- Reach for it when the bot should hold context about the people in the room across weeks, not just the current thread
- Reach for it as a plugin-extensible base for chat-platform automations built on an event system
