Files
multi-agent-bidding/README.md
hubian 05950a3c84 feat: 多智能体竞标调度系统 v1.0.0
核心组件:
- Orchestrator: 意图理解、任务拆分、竞标管理、结果验证
- Worker: 竞标任务、执行交付
- TaskBoard: 状态管理、信息存储
- BidEvaluator: 竞标评估算法
- ExecutionMonitor: 执行监控、超时处理
- LLMClient: 大模型接口调用

功能特性:
- 竞标机制:Agent主动竞争任务
- 动态调度:串行/并行任务智能调度
- 智能容错:超时切换、验证重试
- 质量保证:结果验证、历史追踪

Web界面:首页、请求列表、任务列表、Agent管理
API接口:请求/任务/Agent管理、测试接口
端口:19015
2026-04-12 01:54:15 +08:00

120 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 多智能体竞标调度系统
基于邮件方案实现的多智能体竞标调度架构,核心包含:
- **规划Agent (Orchestrator)**:意图理解、任务拆分、竞标管理、结果验证
- **执行Agent (Worker)**:竞标任务、执行交付
- **任务公告板 (Task Board)**:状态管理、信息存储
## 核心特性
### 1. 竞标机制
Agent主动竞争任务展示能力和方案规划Agent综合评估选择最佳执行者。
评估公式:
```
综合得分 = 0.3×能力匹配 + 0.2×自信度 + 0.2×时间效率 + 0.2×方案质量 + 0.1×历史表现
```
### 2. 动态调度
- **串行任务**:严格按依赖关系执行
- **并行任务**:最大化并发执行
- **任务图**:自动计算执行顺序
### 3. 智能容错
- **超时切换**超时后自动启动备选Agent
- **验证重试**:验证失败给予重试机会
- **历史追踪**:记录失败原因,改进系统
### 4. 质量保证
- **结果验证**:完整性、正确性、质量检查
- **反馈改进**验证失败时给予Agent反馈
- **历史统计**追踪Agent表现数据
## 技术架构
```
用户请求 → 意图理解 → 任务拆分 → 任务发布 → 竞标收集 →
竞标评估 → 执行分配 → 执行监控 → 结果收集 → 结果验证 →
├─ 验证通过 → 结果整合 → 返回用户
├─ 验证失败 → 重试机会 → 再次失败 → 换Agent
└─ 全部失败 → 任务终止 → 返回错误报告
```
## 安装
```bash
pip install -r requirements.txt
```
## 运行
```bash
# 方式1使用启动脚本
./start.sh
# 方式2直接运行
python3 -m app.app --port 19015
# 方式3后台运行
nohup python3 -m app.app --port 19015 > logs/app.log 2>&1 &
```
## API接口
### 用户请求
- `POST /api/request` - 创建用户请求
- `GET /api/request/<id>` - 获取请求详情
- `GET /api/requests` - 列出所有请求
### 任务管理
- `GET /api/tasks` - 列出所有任务
- `GET /api/task/<id>` - 获取任务详情(含竞标和尝试记录)
### Agent管理
- `GET /api/agents` - 列出所有Agent
- `POST /api/agent` - 注册Agent
- `DELETE /api/agent/<id>` - 注销Agent
### 测试接口
- `POST /api/test` - 快速测试LLM
- `POST /api/test_intent` - 测试意图分析
- `POST /api/test_split` - 测试任务拆分
## 配置
LLM接口配置在 `app/llm_client.py`
- 默认URL: `http://192.168.2.17:19007/v1`
- 默认模型: `auto`
可通过环境变量或代码修改配置。
## Web界面
访问 `http://localhost:19015` 打开Web管理界面
- **首页**:发送请求、查看日志、统计信息
- **请求列表**:查看历史请求及详情
- **任务列表**:查看任务执行状态
- **Agent管理**注册、注销、查看Agent
## 默认Agent
系统预设4个Agent
| Agent | 能力 |
|-------|------|
| coder_agent | coding, debugging, optimization |
| search_agent | search, research, summarization |
| writer_agent | writing, documentation, translation |
| analyst_agent | analysis, reporting, visualization |
可通过API或Web界面注册新Agent。
## 数据存储
任务数据存储在 `~/.multi_agent/task_board.json`
## Git仓库
http://192.168.2.8:12007/coder/multi-agent-bidding