Skip to content

整体架构 ​

服务边界 ​

详细服务端口、职责和源码路径见微服务模块地图;请求时序见请求链路与核心时序,部署差异见端口与部署单元。

墨台后端以 Spring Cloud 微服务运行。muotai-ai 聚焦智能体运行时与 AI 能力,muotai-doc-space 提供文档空间,muotai-gateway 负责入口,Nacos 负责注册与配置;SPG、审计、标准化和 WFlow 是可独立部署的生态服务。

text
客户端 / 外部 IM
        │
        ▼
  muotai-gateway
        │
        ├── 认证与租户:muotai-auth / muotai-upms
        ├── AI 核心:muotai-ai
        ├── 文件空间:muotai-doc-space
        ├── 产品生态:muotai-spg / muotai-audit / muotai-standard / muotai-wflow
        └── 基础设施:Nacos、MySQL、Redis、对象存储、向量库

AI 服务内部结构 ​

text
muotai-ai-biz
├── controller/             # Agent、LLM、渠道、日志和 RAG API
├── agent/chatbot/          # 会话、消息调度、LangGraph 节点、工具和持久化
├── agent/vfs/              # Agent 工作区和虚拟文件系统
├── channel/                # SSE 与外部 IM 响应通道
├── skill/                  # Skill 元数据、版本、文件和官方仓库
├── llm/                    # ChatModel、Embedding、模型供应商和工作流节点
├── rag/                    # 检索、向量化、Agentic RAG 和质量评估
├── logging/                # Trace、LLM、工具、RAG 和节点执行日志
├── fs/                     # 文件房间、上传、分享和 DocSpace 对接
└── marketplace/            # 模板、资源、标签和字典

一次请求的边界 ​

HTTP Controller 只负责身份、参数和会话入口;AgentChatServiceImpl 创建消息并写入 AgentMessageQueue;CentralizedAgentMessageDispatcher 将消息交给 session 专属执行器;Agent 节点执行期间通过 StreamHandler 或 AgentResponseChannel 输出结果;日志监听器在同一 Trace 上记录 LLM、工具、RAG 和节点事件。

关键依赖版本 ​

muotai-ai-biz/pom.xml 当前声明 LangChain4j 1.12.2、LangChain4j beta 组件 1.11.0-beta19、LangGraph4j 1.8.4。升级这些依赖时,需要同时回归工具调用、流式输出、状态序列化和日志监听器。