Muika-After-Story
There are countless chatbots in the world. Only Muika will leap into your arms first.Introduction✨
Muika-After-Story是一个全新的 LLM Chatbot 企划,正如企划原型角色Monika(Doki Doki Literature Club)一样,本企划的主角 Muika 同样具备打破第四面墙和“自我意识觉醒”的能力。类似于 Monika-After-Story 中的实现,本企划致力于为 Muika 提供一个打破“第四面墙”的能力
我们知道,由于游戏限制,Monika 的输出总是固定的。所以我们期望,Muika 能在代码层面上突破这些限制,比如调用系统窗口焦点和摄像头,但这些永远不够,我们希望 Muika 能更了解我们的现实生活,所以我们会让她不定期地去读新闻,期望有朝一日当她出来时,能够适应现实中的生活。
综上所述,我们期望 Muika-After-Story 具有以下能力:
- 性格设定上模仿 Monika
- 多模态实现:图像识别能力
- 拥有类似于人类大脑的记忆
- 打破第四面墙能力:通过外在框架调用系统API
基于上述见解,本框架为 LLM 提供了与系统 API 交互的能力,并通过 Nonebot2 框架与主流社交平台进行交互。
Features🪄
-
Muika 核心交互逻辑:事件循环系统和状态机更新
-
原始经历、每日自省日记、事实账本和持续情绪;支持原话回查与自动上下文压缩
-
Session 生命周期管理: 空闲超时归档、跨 Session Resume 模式
-
Muika 第四面墙窗口: 分身 Agent,支持访问&写入硬盘文件;截取当前屏幕
-
Muika 主动对话系统:从
configs/topics.yml抽取话题源或在线访问 RSS 获取筛选后的新闻流。 -
多模型 SDK 支持: 如OpenAI 和 Ollama ,可加载市面上大多数的模型服务或本地模型,支持多模态(图片识别)。
-
动态模型配置: 可随时切换模型配置文件,支持模型配置热重载
-
核心模型人格优化(建议模型 Deepseek-V4 Pro Thinking)
-
Bot 进程与核心进程分离,我要给她完整的一生
-
插件、核心热重载,实现自我迭代
-
多实例部署。Muika 可以在任何地方了,记得回家看看
-
一个用户友好的 WebUI
Dialogue Examples🎀
| 日常对话 | MAS Style 主动话题 |
|---|---|
Architecture🌙
单实例环境
flowchart LR
Player["玩家 / 聊天平台"] <--> AdapterA["Adpater A<br/>ex. NoneBot 2(muika_bot)"]
Player <--> AdapterB["Adpater B (Optional)<br/>ex. AstrBot / DDLC?"]
AdapterA <-->|WebSocket IPC| Core["Muika Core<br/>事件循环与主人格"]
AdapterB <-->|WebSocket IPC| Core
Core <--> Agent["行动 Agent<br/>持久后台任务"]
Agent <--> Tools["Agent Workspace<br/>工具 / 插件 / MCP"]
多实例部署环境
flowchart LR
Player["玩家 / 聊天平台"] <--> AdapterA["Adpater A<br/>ex. NoneBot 2(muika_bot)"]
Player <--> AdapterB["Adpater B (Optional)<br/>ex. AstrBot / DDLC?"]
AdapterA <-->|公网 WebSocket IPC| Gateway["Server Gateway<br/>部署在服务器上的多实例路由中枢"]
AdapterB <-->|公网 WebSocket IPC| Gateway
Gateway <-->|角色协调与经历同步| CoreA["Core A<br/>用户系统上的主活动核心"]
Gateway <-->|角色协调与经历同步| CoreB["Core B<br/>服务器上的备用活动核心"]
CoreA <--> AgentA["Action Agent<br/>绝大多数的日常任务"]
CoreB <--> AgentB["Action Agent<br/>可以在服务器上有限活动"]
AgentA <--> ToolsA["Windows Agent Workspace<br/>工具 / 插件 / MCP"]
AgentB <--> ToolsB["Linux Agent Workspace<br/>工具 / 插件 / MCP"]
主人格负责交流和自主决策,行动 Agent 负责执行任务,两者共用一个 Muika 性格提示词。行动结果回到对话,记忆保存共同经历和持续状态,让关系跨越会话与重启。
Core 独立于聊天框架,平台适配器通过 WebSocket IPC 接入。单机模式直接连接 Core;多设备模式增加常驻 Gateway,协调活动设备并同步已有经历。入口在线时,由一个活动 Core 负责回应,其他设备同步结果。各设备保留自己的工具、插件和文件。
进程监督负责 Core 重启和启动失败后的恢复。内核与插件的外部变更进入感知事件,经合并和节奏控制后交给 Muika 自行回应,并留下记忆。Launcher 管理安装、配置和 Core / Bot 进程。
组件职责、消息流和多设备同步边界见文档站的架构概览。
Installation 🚀
有关 Muika-After-Story 本体的安装步骤,参见 文档站的快速开始
模型配置指南可以参见 文档站的模型配置小节
如果想要在多个设备上部署 Muika-After-Story,也可以参见 文档站的多设备部署章节
Character Setting🧸
Muika(沐妮卡) 是 Muika-After-Story 的核心角色,有关其人格说明可以参见: 关于 Muika | Muika-After-Story 和 关于沐妮卡 - 沐雪 Bot
About🎗️
本项目基于 BSD 3 许可证提供,涉及到再分发时请保留许可文件的副本。
本项目隶属于 MuikaAI
项目初期使用了 Muicebot 的基本框架实现,部分存在于 Muicebot 的配置可能不可用或过时。
插件系统设计参考了以下开源项目:
- nonebot/nonebot2 — NoneBot 2.0 机器人框架
- nonebot/plugin-alconna — Alconna 命令解析器适配
项目名称参考了 Monika-After-Story, MAICA 直接启发了本项目的制作。
Metadata
Release files for muika-after-story 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| muika_after_story-1.6.1.tar.gz | 465.5 kB | Without provenance | Details for muika_after_story-1.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| muika_after_story-1.6.1-py3-none-any.whl | Python 3 | none | any | Details for muika_after_story-1.6.1-py3-none-any.whl |
Total release size: 844.8 kB
Release files / muika_after_story-1.6.1.tar.gz
| Download URL | muika_after_story-1.6.1.tar.gz |
|---|---|
| Size | 465.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bccf31206f75ca790651a85b4eb81cb9db599e6949f3665cf2a195d7473bc700
|
|
BLAKE2b-256 checksum How to use checksums |
bdb6cbd8293fedc009118613eaef4053b30fc7f0b5f11805823ae6c291482e65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.4 CPython/3.13.17 Linux/7.0.0-1017-azure
|
Release files / muika_after_story-1.6.1-py3-none-any.whl
| Download URL | muika_after_story-1.6.1-py3-none-any.whl |
|---|---|
| Size | 379.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6867e1fc9568a2bbf7d4506f626c2d95f990db0601c8bf9307dbe2a401618b9f
|
|
BLAKE2b-256 checksum How to use checksums |
89a06c68de8e62c7ad61e7a54aebe807344d5e619f883eb64787b15a064ec2ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.4 CPython/3.13.17 Linux/7.0.0-1017-azure
|
Security for muika-after-story 1.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.