About this project

Muika-After-Story is a state-machine event-loop based LLM chatbot framework whose prototype character is Monika from Doki Doki Literature Club. The project aims to give LLMs the ability to break the fourth wall, allowing them to call system APIs and interact with mainstream social platforms through the NoneBot2 framework. Core features: an event loop system and state machine updates; a memory system that includes raw experiences, daily self-reflection diaries, a fact ledger, and persistent emotions, supporting verbatim lookup and automatic context compression; Session lifecycle management with idle timeout archiving and cross-session recovery; a fourth-wall window that supports avatar Agents in accessing and writing files to the hard disk and capturing the screen; a proactive dialogue system that can extract topics from configuration files or fetch news feeds online via RSS; a multi-model SDK supporting OpenAI, Ollama, and others, with multimodal image recognition; dynamic model configuration with hot reload support; separation of the Bot process and the core process; and plugin and core hot reloads for self-iteration. Architecturally, the main persona handles communication and autonomous decision-making, while the action Agent executes tasks, and both share the Muika identity. The Code Review Agent inspects code operations, and process supervision is responsible for restart and recovery. The Core is independent of the chat framework and connects to other adapters via IPC. Installation supports the mas-launcher cross-platform launcher and manual git clone installation. QQ integration is done through NapCat, with support for Docker deployment and the AsterBot adapter plugin. The scope of actions is configured through ACTION_PERMISSION, supporting three levels: read_only, write, and self_modify. The project is licensed under BSD 3 and is affiliated with the MuikaAI organization.