ReAct Agent Enhanced
增强型 ReAct Agent 项目,支持多模型选择和 MCP 服务管理。
快速开始
环境要求
- Python 3.8+
- Node.js 16+
- npm 或 yarn
启动后端
开发模式(带详细日志)
python start_backend.py --host 0.0.0.0 --port 7582 --log-level info --no-env-check生产模式(推荐,多worker)
python start_backend.py --host 0.0.0.0 --port 7582 --log-level warning --workers 4 --no-env-check参数说明:
--host: 监听地址,默认 0.0.0.0--port: 端口号,默认 7582--log-level: 日志级别 (debug/info/warning/error)--workers: worker 进程数(生产模式)--no-env-check: 跳过环境检查
启动前端
python start_frontend.py \
--host 0.0.0.0 \
--port 7583 \
--backend-url http://180.213.184.159:7582 \
--no-backend-check参数说明:
--host: 监听地址,默认 0.0.0.0--port: 端口号,默认 7583--backend-url: 后端服务地址--no-backend-check: 跳过后端连接检查
访问应用
启动成功后,在浏览器中访问:
http://localhost:7583或使用服务器 IP 地址:
http://180.213.184.159:7583配置说明
模型配置
编辑 config/models.yaml 文件配置可用的 AI 模型。
MCP 服务配置
编辑 config/mcp_services.yaml 文件配置 MCP 服务。
项目结构
.
├── backend/ # 后端服务
│ ├── api/ # API 路由
│ ├── core/ # 核心功能
│ └── db/ # 数据库模型
├── frontend/ # 前端应用
│ ├── app/ # Next.js 页面
│ └── components/ # React 组件
├── config/ # 配置文件
├── data/ # 数据存储
└── scripts/ # 启动脚本开发说明
后端开发
cd backend
pip install -r requirements.txt前端开发
cd frontend
npm install
npm run devLicense
MIT
