Roundtable
把杂乱材料变成有依据、能取舍、可更新的决策建议与 Code Review 结论。
这是什么
Roundtable 是一个轻量的多角色决策与评审协议层(PyPI 包名 agent-roundtable,Python 导入名 roundtable)。它围绕输入处理(提炼决策相关事实、保留来源与未知、分段读取原文)和输出质量(交付清晰、有取舍、可追溯、可随新信息更新的建议)来组织评审流程。
| 分层 | 职责边界 |
|---|---|
| 角色与用户 | 角色定义专业视角与检查重点;用户设定目标、偏好并作出最终决定 |
| 宿主与 Agent | 宿主运行 Agent、选择模型、提炼和核实材料并综合结论;Roundtable 不自动调用模型或自动组队 |
| Roundtable 引擎 | 使用零外部依赖的 Python 标准库与 SQLite 持久化会议轮次、版本化简报/证据/材料、校验引用、渲染统一报告并提供实时 Web Viewer |
多角色、多 Agent 与多模型是补足盲区的手段,而非默认前提;简单查询或低风险选择可直接由单个助手完成。详细产品定位与实测记录见 产品方向。
快速开始
1. 安装
pip install agent-roundtable
验证当前源码分支时可从源码安装:
git clone https://github.com/MoyuFamily/agent-roundtable.git
cd agent-roundtable
pip install -e .
| 可选扩展 | 安装命令 | 用途 |
|---|---|---|
mcp |
pip install "agent-roundtable[mcp]" |
MCP Server(stdio / HTTP-SSE)及客户端自动安装 |
materials |
pip install "agent-roundtable[materials]" |
本地 PDF 逐页文本提取(pypdf,无 OCR) |
web |
pip install "agent-roundtable[web]" |
使用 nanoid 生成 Web Viewer 访问令牌(默认自动回退标准库) |
dev |
pip install -e ".[dev,mcp,materials]" |
本地开发测试、Ruff 检查与 Mypy 类型检查 |
注意:本项目的 PyPI 包名是
agent-roundtable。roundtable/roundtable-ai并非本项目,请勿误装。
2. 跨平台 Agent 接入
- MCP 客户端(Claude Code / Cursor / Windsurf):
pip install -e ".[mcp]" "mcp>=1,<2" python3 -m roundtable.skills.mcp-roundtable.install --platform=auto
- HTTP Bridge(Codex / WorkBuddy 等 HTTP 宿主):
python3 -m roundtable.codex # 默认监听 http://127.0.0.1:8201
- Hermes Agent:在配置中启用
toolsets: [roundtable]。
运行态 AI 调用规范见 SKILL.md 与 MCP Skill。
3. Python 最小示例
以下示例演示如何用 RoundtableCore 记录一次评审(实际评审由宿主运行各角色 Agent 并提交发言):
from roundtable import RoundtableCore
core = RoundtableCore()
# 1. 创建讨论(默认 web=True,尽力启动本地 Web Viewer,失败不阻断讨论)
result = core.create_discussion(
topic="选择数据库:PostgreSQL vs MySQL vs TiDB",
participants=[
{"profile": "backend_architect", "role": "后端架构师"},
{"profile": "ops_engineer", "role": "运维工程师"},
{"profile": "product_manager", "role": "产品经理"},
],
max_rounds=3,
)
disc_id = result["discussion_id"]
# 2. 协调者开场(round 0 保留给 coordinator)并记录参与者发言
core.speak(disc_id, "coordinator", "开场:请结合业务建模复杂度与运维成本比较三套方案。")
core.speak(disc_id, "backend_architect", "PostgreSQL 的 JSON 与事务能力更适合复杂业务建模。")
core.speak(disc_id, "ops_engineer", "团队对 MySQL 工具链更熟,迁移成本需要实测。")
core.speak(disc_id, "product_manager", "优先保证半年内的功能迭代扩展空间。")
# 3. 获取格式化摘要并记录建议(区分“建议”与“用户已确认决定”)
summary = core.summarize(disc_id, compact=True)
core.end_discussion(
disc_id,
conclusion="建议采用 PostgreSQL;待核实迁移与运维成本,等待用户确认。",
)
- Web Viewer:需 Node.js 18+,返回值含
web_status(ready/failed/disabled)、web_url、web_error、web_help。Markdown 导出始终可用;PDF 导出可通过PUPPETEER_EXECUTABLE_PATH指定已有 Chrome/Chromium。 - 错误安全模式:生产宿主可使用
from roundtable.adapters.generic import Roundtable,所有方法均返回dict(错误为{"error": "..."},不抛异常)。
适用场景
以下七类场景共用同一套简报、证据、独立分析与交叉回应流程(按问题增减角色与轮次,详见 场景清单):
- 项目去留与方向:继续维护、调整或停止,明确投入边界与复审条件
- 产品范围与优先级:目标用户、MVP 边界、优先级依据与暂缓项
- 技术路线:自研或采购、架构选型、迁移与长期维护取舍
- 发布与实施:上线条件、阻塞项、实施步骤与回滚方案
- 资源与商业模式:预算人力分配,免费、订阅或按量计费对比
- 工作流程与工具选择:对照现有基线,权衡工具收益与迁移培训成本
- Code Review:围绕具体代码改动检查正确性、架构、安全与可靠性,输出带定位和证据的合并建议
文档导航
| 文档 | 内容说明 |
|---|---|
| docs/README.md | 全部文档总览与阅读入口 |
| docs/DECISION_WORKFLOW.md | 决策与 Code Review 指南:六步流程、本地材料导入、内置模板、结构化证据与报告 |
| docs/INTEGRATION_AND_API.md | 接入方式与参考:RoundtableCore、Generic Facade、Hermes、MCP、HTTP Bridge、自定义 Adapter 与环境变量 |
| docs/architecture.md | 系统架构:模块分层、状态机、27 个 MCP 工具、Schema v8 与部署形态 |
| docs/TECHNICAL_RELIABILITY.md | 可靠性工程:消息确认协议、MCP 跨进程订阅、文件锁与隔离 PDF 导出 |
| docs/product/DIRECTION.md | 产品方向、能力边界与 Code Review 验收记录 |
注:以上文档反映当前源码状态;使用已发布的 PyPI 包时请核对对应版本的能力说明。
贡献与团队
欢迎通过 Issue 与 Pull Request 参与贡献,环境配置、测试命令与代码规范见 CONTRIBUTING.md。
| 成员 | 角色 | 说明 |
|---|---|---|
| 产品总监 | 把模糊需求变成可落地的方案,关注真实用户问题 | |
| 设计总监 | 品牌视觉、信息架构与交互细节设计 | |
| 技术总监 | 系统架构、工程可靠性与跨平台集成落地 | |
| 协调者 | 团队协作统筹与多角色评审流程推进 |
Metadata
Release files for agent-roundtable 2.2.0
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 |
|---|---|---|---|---|
| agent_roundtable-2.2.0.tar.gz | 324.3 kB | Without provenance | Details for agent_roundtable-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_roundtable-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for agent_roundtable-2.2.0-py3-none-any.whl |
Total release size: 553.9 kB
Release files / agent_roundtable-2.2.0.tar.gz
| Download URL | agent_roundtable-2.2.0.tar.gz |
|---|---|
| Size | 324.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
841b93076f3ad16985cc0cf192ae87bda1275ea8b88a5fa38b63dc8ecdb5b6c6
|
|
BLAKE2b-256 checksum How to use checksums |
0b0676e5fb471d75e244ebb52dcbe0636ece820a773642ee2bf86a5db5a65a06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Release files / agent_roundtable-2.2.0-py3-none-any.whl
| Download URL | agent_roundtable-2.2.0-py3-none-any.whl |
|---|---|
| Size | 229.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3eec03e0ce7ab9b005f7d065c03050c31ad4188e4f45fea05f92e1d0f865b21
|
|
BLAKE2b-256 checksum How to use checksums |
e78b5b2fbec3db1e1746e024de8e50f8fa83b0aa32b2722dbc6d0c745d03687f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for agent-roundtable 2.2.0
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.