# MutengAgent **Repository Path**: mrbytes/muteng-agent ## Basic Information - **Project Name**: MutengAgent - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-30 - **Last Updated**: 2026-08-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MutengAgent - 多 Agent 智能助手 基于 **LangGraph + LangChain + Agens AI** 的多 Agent 个人助手系统,包含 Python 后端服务和 Electron 桌面客户端。支持语音对话、浏览器自动化、代码辅助、文件管理与数据库操作。 --- ## 项目结构 ``` MutengAgent/ │ ├── Muteng_Agents/ # Python 后端服务 │ ├── main.py # 主入口(文本/语音模式切换,基于 LangGraph) │ ├── server.py # Web API 服务入口(FastAPI + SSE + WebSocket) │ ├── requirements.txt # Python 依赖清单 │ ├── .env.example # 环境变量模板 │ │ │ ├── api/ # Web API 模块 │ │ ├── routes/ # RESTful 路由(chat / history) │ │ └── websocket/ # WebSocket 语音对话处理 │ │ │ ├── config/ # 配置模块(全局设置 + Agent 提示词) │ ├── core/ # LangGraph 编排层(StateGraph + Supervisor) │ ├── agents/ # 子 Agent 执行层 │ ├── tools/ # LangChain Tools 封装 │ ├── voice/ # 语音交互模块(STT / TTS) │ ├── memory/ # 记忆与持久化存储(SQLite) │ └── utils/ # 通用工具(日志等) │ ├── client/ │ └── client-electron/ # Electron 桌面客户端 │ ├── src/ # Vue 3 前端源码 │ ├── electron/ # Electron 主进程 │ ├── package.json # Node.js 依赖配置 │ └── vite.config.js # Vite 构建配置 │ └── logs/ # 运行日志目录 ``` ## 核心功能 | 模块 | 功能 | |------|------| | **Windows Agent** | 系统信息查询、应用启动、进程管理、命令执行 | | **Coding Agent** | 代码编写、调试、执行 Python/JS、代码解释 | | **Browser Agent** | Google 搜索、网页浏览、内容抓取、页面截图 | | **File Agent** | 文件搜索、内容读取、文件 CRUD 操作 | | **Database Agent** | SQLite 表结构查看、SQL 查询、数据管理 | | **语音交互** | STT(Faster-Whisper)+ TTS(Edge-TTS)实时语音对话 | ## 技术栈 ### 后端 - **Python 3.10+** - **LangGraph / LangChain** - 多 Agent 状态图编排 - **FastAPI + Uvicorn** - Web API(RESTful + SSE 流式) - **WebSocket** - 实时语音对话 - **Edge-TTS** - 微软在线语音合成 - **Faster-Whisper** - 本地语音识别 - **Playwright** - 浏览器自动化 - **SQLite + SQLAlchemy** - 数据持久化 ### 客户端 - **Vue 3** - 前端框架 - **Vite 5** - 构建工具 - **Electron 33** - 桌面应用框架 ## 快速开始 ### 1. 后端服务 ```bash # 进入后端目录 cd Muteng_Agents # 创建并激活虚拟环境 python -m venv .venv .venv\Scripts\activate # Windows # source .venv/bin/activate # macOS / Linux # 安装依赖 pip install -r requirements.txt # 配置环境变量 copy .env.example .env # Windows # cp .env.example .env # macOS / Linux # 编辑 .env 填入 API Key # AGENS_AI_API_KEY=your_api_key_here # 安装浏览器引擎(Browser Agent 需要) playwright install chromium # 启动 CLI 交互模式 python main.py # 或启动 Web API 服务 python server.py ``` ### 2. 桌面客户端 ```bash # 进入客户端目录 cd client/client-electron # 安装依赖 npm install # 开发模式 npm run electron:dev # 构建安装包 npm run electron:build ``` ## Web API 接口 | 接口 | 方法 | 说明 | |------|------|------| | `/api/chat` | POST | 文本对话(一次性回复) | | `/api/chat/stream` | POST | 文本对话(SSE 流式输出) | | `/api/history` | GET | 查看所有会话 | | `/api/history/{session_id}` | GET / DELETE | 查看/删除指定会话 | | `/ws/audio` | WebSocket | 实时语音对话 | | `/api/health` | GET | 健康检查 | ## 注意事项 1. **虚拟环境**:后端请先创建 Python 虚拟环境再安装依赖。 2. **语音合成**:使用 Edge-TTS(微软在线语音,无需 API Key),中文语音质量较高。 3. **语音识别**:使用 Faster-Whisper,首次运行会自动下载模型(约 500MB~1.5GB)。 4. **Web API**:默认监听 `0.0.0.0:8000`,Swagger 文档在 `http://localhost:8000/docs`。 5. **浏览器 Agent**:首次运行需执行 `playwright install chromium`。 6. **数据库**:对话历史自动保存在 `Muteng_Agents/data/assistant.db`。 ## 许可证 MIT