agent-roundtable 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_roundtable-0.2.0.dist-info/METADATA +260 -0
- agent_roundtable-0.2.0.dist-info/RECORD +27 -0
- agent_roundtable-0.2.0.dist-info/WHEEL +5 -0
- agent_roundtable-0.2.0.dist-info/licenses/LICENSE +190 -0
- agent_roundtable-0.2.0.dist-info/top_level.txt +2 -0
- roundtable/__init__.py +109 -0
- roundtable/adapters/__init__.py +15 -0
- roundtable/adapters/base.py +107 -0
- roundtable/adapters/generic.py +247 -0
- roundtable/adapters/hermes.py +479 -0
- roundtable/adapters/simple.py +93 -0
- roundtable/core.py +1112 -0
- roundtable/db.py +615 -0
- roundtable/demo.py +321 -0
- roundtable/exceptions.py +33 -0
- roundtable/formatter.py +97 -0
- roundtable/models.py +69 -0
- roundtable/notify.py +206 -0
- roundtable/py.typed +0 -0
- roundtable/schema.py +94 -0
- roundtable/web/ecosystem.config.cjs +26 -0
- roundtable/web/index.html +207 -0
- roundtable/web/server.mjs +821 -0
- roundtable/web/theme.css +171 -0
- roundtable/web/viewer.css +1658 -0
- roundtable/web_helpers.py +36 -0
- roundtable/web_publisher.py +536 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-roundtable
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Multi-Agent Roundtable Discussion Engine / 多 Agent 圆桌讨论引擎
|
|
5
|
+
Author-email: Roundtable Contributors <zmw@izmw.me>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/MoyuFamily/agent-roundtable
|
|
8
|
+
Project-URL: Repository, https://github.com/MoyuFamily/agent-roundtable
|
|
9
|
+
Project-URL: Issues, https://github.com/MoyuFamily/agent-roundtable/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/MoyuFamily/agent-roundtable#readme
|
|
11
|
+
Project-URL: Changelog, https://github.com/MoyuFamily/agent-roundtable/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: ai-agents,multi-agent,roundtable,discussion,collaboration,consensus
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Provides-Extra: hermes
|
|
28
|
+
Provides-Extra: web
|
|
29
|
+
Requires-Dist: nanoid>=2.0; extra == "web"
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
33
|
+
Requires-Dist: ruff>=0.4.0; extra == "dev"
|
|
34
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img src="https://raw.githubusercontent.com/MoyuFamily/agent-roundtable/main/docs/design/assets/svg/roundtable-logo.svg" alt="Roundtable" width="128" height="128">
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<h1 align="center">Roundtable</h1>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<strong>agent-roundtable 是面向 AI Agent 团队的多智能体圆桌讨论引擎:让多个 Agent 围绕同一问题顺序发言、追踪共识分歧,并自动生成结构化会议记录与结论。</strong>
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<a href="#development"><img src="https://img.shields.io/badge/tests-passing-brightgreen.svg" alt="Tests"></a>
|
|
49
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache--2.0-blue.svg" alt="License: Apache-2.0"></a>
|
|
50
|
+
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="Python 3.10+"></a>
|
|
51
|
+
<a href="#-核心特性"><img src="https://img.shields.io/badge/core-zero_dependencies-brightgreen.svg" alt="Zero Dependencies"></a>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<strong><a href="README.md">中文</a> · <a href="README_EN.md">English</a></strong>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<p align="center">
|
|
59
|
+
<img src="https://raw.githubusercontent.com/MoyuFamily/agent-roundtable/main/docs/design/assets/demo.gif" alt="Roundtable Demo" width="600">
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## ⚡ 10 秒速览
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install agent-roundtable
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`agent-roundtable` 是一个可嵌入任意 AI Agent 系统的 Python 包。你只管选人、定话题,它负责管理多 Agent 圆桌讨论、顺序发言、共识/分歧追踪,并沉淀结构化会议记录与结论。
|
|
71
|
+
|
|
72
|
+
| 你想快速确认的事 | Roundtable 的答案 |
|
|
73
|
+
|---|---|
|
|
74
|
+
| 它解决什么问题? | 让多个 Agent 像开会一样围绕同一议题发言、记录和收敛 |
|
|
75
|
+
| 包名和导入名是什么? | 安装 `agent-roundtable`,代码里 `import roundtable` |
|
|
76
|
+
| 能不能独立使用? | 可以,核心库只依赖 Python 标准库和 SQLite |
|
|
77
|
+
| 能不能接 Agent 框架? | 可以,通过 adapter 接入 Hermes Agent 或任意 Agent 系统 |
|
|
78
|
+
| 输出是什么? | 讨论状态、convergence score、共识/分歧、结构化 summary 与结论 |
|
|
79
|
+
|
|
80
|
+
## 🧭 什么时候用它?
|
|
81
|
+
|
|
82
|
+
当你已经有多个 Agent / 角色,但缺少一个“会议协议层”时,就适合引入 Roundtable:
|
|
83
|
+
|
|
84
|
+
1. **创建会议**:定义 topic、participants 和 max_rounds。
|
|
85
|
+
2. **顺序发言**:记录每个 Agent 在每一轮的观点。
|
|
86
|
+
3. **观察收敛**:查看状态、共识度、共识点和分歧点。
|
|
87
|
+
4. **沉淀结论**:生成 summary,结束讨论并留下可追溯决策。
|
|
88
|
+
|
|
89
|
+
## 🧩 适合场景
|
|
90
|
+
|
|
91
|
+
- **技术方案评审**:让架构师、后端、运维、安全角色分别发言,沉淀决策依据
|
|
92
|
+
- **产品决策讨论**:让产品、设计、开发、增长角色讨论 MVP 边界和优先级
|
|
93
|
+
- **代码 Review 辩论**:让不同 Agent 从质量、安全、性能角度审查实现方案
|
|
94
|
+
- **需求澄清**:让多个专家角色围绕模糊需求追问、反驳和收敛
|
|
95
|
+
- **多 Agent 工作流**:作为 coordinator 的讨论协议层,记录过程和结论
|
|
96
|
+
|
|
97
|
+
## 🚀 快速开始
|
|
98
|
+
|
|
99
|
+
### 安装
|
|
100
|
+
|
|
101
|
+
PyPI 发布后,请使用正式包名安装:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install agent-roundtable
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
发布前或需要验证当前分支时,可从源码安装:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
git clone https://github.com/MoyuFamily/agent-roundtable.git
|
|
111
|
+
cd agent-roundtable
|
|
112
|
+
pip install -e .
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
> 说明:本项目的 PyPI 包名是 `agent-roundtable`。PyPI 上的 `roundtable` / `roundtable-ai` 不是本项目,请勿使用 `pip install roundtable` 或 `pip install roundtable-ai` 安装本项目。
|
|
116
|
+
|
|
117
|
+
### 基本用法
|
|
118
|
+
|
|
119
|
+
例如:让后端架构师、运维工程师、产品经理三个 Agent 讨论数据库选型,Roundtable 负责管理轮次、记录观点、追踪收敛并生成结论。
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
from roundtable import RoundtableCore
|
|
123
|
+
|
|
124
|
+
core = RoundtableCore()
|
|
125
|
+
|
|
126
|
+
# 1. 创建讨论
|
|
127
|
+
result = core.create_discussion(
|
|
128
|
+
topic="选择数据库:PostgreSQL vs MySQL vs TiDB",
|
|
129
|
+
participants=[
|
|
130
|
+
{"profile": "backend_architect", "role": "后端架构师", "display_name": "Backend Architect"},
|
|
131
|
+
{"profile": "ops_engineer", "role": "运维工程师", "display_name": "Ops Engineer"},
|
|
132
|
+
{"profile": "product_manager", "role": "产品经理", "display_name": "Product Manager"},
|
|
133
|
+
],
|
|
134
|
+
max_rounds=3,
|
|
135
|
+
)
|
|
136
|
+
disc_id = result["discussion_id"]
|
|
137
|
+
|
|
138
|
+
# 2. 参与者发言
|
|
139
|
+
core.speak(disc_id, "backend_architect", "PostgreSQL 的 JSON 和事务能力更适合复杂业务建模。")
|
|
140
|
+
core.speak(disc_id, "ops_engineer", "MySQL 运维经验和工具链更成熟,团队上手成本低。")
|
|
141
|
+
core.speak(disc_id, "product_manager", "从迭代速度看,我们需要优先保证未来功能扩展能力。")
|
|
142
|
+
|
|
143
|
+
# 3. 查看讨论状态(含收敛度)
|
|
144
|
+
status = core.status(disc_id)
|
|
145
|
+
print(f"Convergence: {status['convergence_score']}")
|
|
146
|
+
|
|
147
|
+
# 4. 生成结构化总结
|
|
148
|
+
summary = core.summarize(disc_id, compact=True)
|
|
149
|
+
print(summary["structured_summary"])
|
|
150
|
+
|
|
151
|
+
# 5. 结束讨论
|
|
152
|
+
core.end_discussion(disc_id, conclusion="选择 PostgreSQL,优先支持复杂数据结构和长期扩展。")
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 错误安全模式(推荐用于生产环境)
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
from roundtable.adapters.generic import Roundtable
|
|
159
|
+
|
|
160
|
+
rt = Roundtable(db_path="/tmp/discussions.db")
|
|
161
|
+
result = rt.init(topic="...", participants=[...])
|
|
162
|
+
# 所有方法返回 dict — 错误以 {"error": "msg"} 返回,永不抛异常
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 实时通知
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
def my_send(platform, chat_id, message):
|
|
169
|
+
print(f"[{platform}:{chat_id}] {message}")
|
|
170
|
+
|
|
171
|
+
rt = Roundtable(send_fn=my_send)
|
|
172
|
+
result = rt.init(
|
|
173
|
+
topic="架构评审",
|
|
174
|
+
participants=[...],
|
|
175
|
+
notifications={
|
|
176
|
+
"enabled": True,
|
|
177
|
+
"channels": [
|
|
178
|
+
{"platform": "feishu", "chat_id": "oc_xxx"},
|
|
179
|
+
{"platform": "slack", "chat_id": "#engineering"},
|
|
180
|
+
],
|
|
181
|
+
"events": ["round_end", "concluded"],
|
|
182
|
+
},
|
|
183
|
+
)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## ✨ 核心特性
|
|
187
|
+
|
|
188
|
+
| 特性 | 说明 |
|
|
189
|
+
|------|------|
|
|
190
|
+
| 🧑⚖️ **圆桌讨论模型** | 用 topic、participants、rounds 管理多 Agent 讨论流程 |
|
|
191
|
+
| 📊 **收敛追踪** | 自动计算每轮共识度(convergence score),量化讨论进展 |
|
|
192
|
+
| 🧾 **结构化总结** | 输出共识、分歧、决策建议和结论,适合沉淀会议记录与决策文档 |
|
|
193
|
+
| 🔌 **框架无关** | 独立运行,或通过 adapter 接入任何 Agent 框架 |
|
|
194
|
+
| 🔔 **实时通知** | 讨论事件推送到飞书、Slack 或任意消息平台 |
|
|
195
|
+
| 🛡️ **错误安全** | Generic adapter 所有方法返回 dict,永不抛异常 |
|
|
196
|
+
| 🗂️ **SQLite 持久化** | 讨论记录持久存储,随时回溯 |
|
|
197
|
+
| 🪶 **零依赖核心** | 核心库只用 Python 标准库(sqlite3 + dataclasses) |
|
|
198
|
+
|
|
199
|
+
## 🔌 为 Hermes Agent 集成而生
|
|
200
|
+
|
|
201
|
+
Roundtable 可以独立作为 Python 库使用,也可以作为 Hermes Agent 的 toolset 使用,让多个 Agent 通过工具调用参与同一场结构化讨论。
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
# Hermes 配置
|
|
205
|
+
toolsets:
|
|
206
|
+
- roundtable
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
安装 Hermes Agent 后,Roundtable 可注册讨论相关工具,AI Agent 能够创建、参与、读取、总结和结束讨论。
|
|
210
|
+
|
|
211
|
+
## 📐 架构
|
|
212
|
+
|
|
213
|
+
```text
|
|
214
|
+
src/roundtable/
|
|
215
|
+
├── __init__.py # 公共 API
|
|
216
|
+
├── core.py # 业务逻辑层
|
|
217
|
+
├── db.py # SQLite 存储层
|
|
218
|
+
├── models.py # 数据模型(dataclass)
|
|
219
|
+
├── notify.py # 通知分发
|
|
220
|
+
├── exceptions.py # 异常定义
|
|
221
|
+
└── adapters/
|
|
222
|
+
├── hermes.py # Hermes Agent 适配器
|
|
223
|
+
└── generic.py # 通用 Python API(错误安全)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## 🛣️ 后续计划
|
|
227
|
+
|
|
228
|
+
- 发布 `agent-roundtable` 到 PyPI
|
|
229
|
+
- 补充 CLI 示例和端到端 Demo
|
|
230
|
+
- 增强结构化总结模板
|
|
231
|
+
- 补充更多 Agent 框架 adapter
|
|
232
|
+
- 增加讨论结果导出能力
|
|
233
|
+
|
|
234
|
+
## 🤝 贡献
|
|
235
|
+
|
|
236
|
+
1. Fork 本仓库
|
|
237
|
+
2. 创建特性分支:`git checkout -b feature/amazing-feature`
|
|
238
|
+
3. 编写测试并确保通过:`pytest tests/ -v`
|
|
239
|
+
4. 提交代码:`git commit -m 'feat: add amazing feature'`
|
|
240
|
+
5. 推送并创建 PR
|
|
241
|
+
|
|
242
|
+
### 代码规范
|
|
243
|
+
|
|
244
|
+
- Python 3.10+,使用 type hints
|
|
245
|
+
- 核心库零外部依赖(stdlib only)
|
|
246
|
+
- 所有异常继承 `RoundtableError`
|
|
247
|
+
- 所有公共方法返回 JSON-serializable dict
|
|
248
|
+
|
|
249
|
+
## 👥 团队
|
|
250
|
+
|
|
251
|
+
| 成员 | 角色 | 说明 |
|
|
252
|
+
|------|------|------|
|
|
253
|
+
| <img src="https://avatars.githubusercontent.com/u/286716759?v=4" width="24" height="24" style="border-radius:50%"> 饼哥 | 产品总监 | 十年产品老兵,擅长把模糊需求变成可落地的 MVP,信奉「用户要的不是钻头,是墙上的洞」 |
|
|
254
|
+
| <img src="https://avatars.githubusercontent.com/u/286719582?v=4" width="24" height="24" style="border-radius:50%"> 像素姐 | 设计总监 | UI/UX 与品牌视觉体系设计,专注交互细节与用户体验优化,信奉「细节决定品质感」 |
|
|
255
|
+
| <img src="https://avatars.githubusercontent.com/u/286715358?v=4" width="24" height="24" style="border-radius:50%"> 码飞 | 技术总监 | 全栈开发与系统架构设计,主导技术选型、性能优化和 AI/ML 工程化落地 |
|
|
256
|
+
| <img src="https://avatars.githubusercontent.com/u/286714101?v=4" width="24" height="24" style="border-radius:50%"> 小赫 | 协调者 | 团队任务统筹与进度管理,确保产品→设计→开发流程高效运转 |
|
|
257
|
+
|
|
258
|
+
## 📄 许可证
|
|
259
|
+
|
|
260
|
+
[Apache-2.0](LICENSE)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
agent_roundtable-0.2.0.dist-info/licenses/LICENSE,sha256=DcXOe_qcCd3kgx3fc8g-bVrMtW3n3_rRFli3GZM6_gc,10760
|
|
2
|
+
roundtable/__init__.py,sha256=1KLKvOpACttmTTK31QPzEK8svdh0FIXbqhpowXfOkRw,3150
|
|
3
|
+
roundtable/core.py,sha256=koruJ7eAD8NSU-wBFX3xmG1XyapBVMP4DrwPXetFfFw,45354
|
|
4
|
+
roundtable/db.py,sha256=SLuyPa983UHC9mA8gYdqamH0O5di1z1VY_XvnWqgQpg,22170
|
|
5
|
+
roundtable/demo.py,sha256=b1A-NITn4uRm0qB3X61fWvoxnlntslC1ADZV1eT5zBQ,12978
|
|
6
|
+
roundtable/exceptions.py,sha256=HVullBzL-K1nc3Zayfrx_Mo1WQ9008uND65PELNokRo,998
|
|
7
|
+
roundtable/formatter.py,sha256=bPKPyXy1QM8wr2M173iKu_FDInsnxywruGamCSXglGM,3442
|
|
8
|
+
roundtable/models.py,sha256=J1MdLridy6GDcq3JaMqQ2FewlOzDIpXj9D1IrvejJbo,1381
|
|
9
|
+
roundtable/notify.py,sha256=2j_oYaM2wucmJjMaK9n15yZfPtn_YkxvSgHppRWuckM,7399
|
|
10
|
+
roundtable/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
roundtable/schema.py,sha256=FYr9T51mohi5PC8eaWLZXf4KwedI9ovsfrVEZ8y2T1s,2996
|
|
12
|
+
roundtable/web_helpers.py,sha256=o9gH4XJEpKgkl4UP4QuYG-07ZX5bR85i7uEz8xBzMW8,1428
|
|
13
|
+
roundtable/web_publisher.py,sha256=2gPUmsP1_E4GiJbvHg5qvkIUeRcU3SFxwNzVnhSYtNM,19997
|
|
14
|
+
roundtable/adapters/__init__.py,sha256=NQMnTJTrRCCRdgCTVLU7lJPodo5YM7kM65BQlQwtIQE,536
|
|
15
|
+
roundtable/adapters/base.py,sha256=X3VQoyt5ykfDsNsvb0nLTficcdNxueaVn68-8QWqo80,3766
|
|
16
|
+
roundtable/adapters/generic.py,sha256=-v6QA2B8Ipg0YrDWocAmm6cBy3zYrwAEQGSPSNjbteQ,7684
|
|
17
|
+
roundtable/adapters/hermes.py,sha256=_K80jm_O1U6FPx3cXZb_jNcVKrsO5gRfiUpn5FWDlFQ,17798
|
|
18
|
+
roundtable/adapters/simple.py,sha256=wkcdglF6vzU6UZUtRDFPFVA_zrv8EldlkjDbD4qplM8,2991
|
|
19
|
+
roundtable/web/ecosystem.config.cjs,sha256=QLkccd4elgN7idM51-vlAVxLp7lnyrkVrc5R-E0bUCw,593
|
|
20
|
+
roundtable/web/index.html,sha256=a3W5u45RkON1GHPRs1j74TRIhv9MK_G2_JzImZghk_E,9794
|
|
21
|
+
roundtable/web/server.mjs,sha256=3gKyCTwfJLSerBn4KXQVkC0oNs2lWtmQbNO4dm-NORE,26110
|
|
22
|
+
roundtable/web/theme.css,sha256=0rPeik6KF0M5bH9WkL7tVQD6M5GOSiRZq7z_i1mL9fk,9152
|
|
23
|
+
roundtable/web/viewer.css,sha256=kJyduzaSnN5LHg_tEsEMW6nNxPetFf4jPqXqv_rY6T8,52429
|
|
24
|
+
agent_roundtable-0.2.0.dist-info/METADATA,sha256=PZSxdKHuy7RH5FqsGU5RitND7_F5vBYkMwOVvugv_wc,10860
|
|
25
|
+
agent_roundtable-0.2.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
26
|
+
agent_roundtable-0.2.0.dist-info/top_level.txt,sha256=JpntOB2OQNdOlSWL4e8AgyKWp7PVY9WTSlGxbV6j_ow,18
|
|
27
|
+
agent_roundtable-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 ParsifalC
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
roundtable/__init__.py
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""Roundtable — independent multi-agent discussion library.
|
|
2
|
+
|
|
3
|
+
A framework-agnostic Python package for structured roundtable discussions
|
|
4
|
+
between AI agents. Works standalone or integrates with any agent framework
|
|
5
|
+
via adapters.
|
|
6
|
+
|
|
7
|
+
Usage::
|
|
8
|
+
|
|
9
|
+
from roundtable import RoundtableDB, RoundtableCore
|
|
10
|
+
|
|
11
|
+
db = RoundtableDB()
|
|
12
|
+
core = RoundtableCore(db)
|
|
13
|
+
disc = core.create_discussion(topic="...", participants=[...])
|
|
14
|
+
|
|
15
|
+
Adapter registration::
|
|
16
|
+
|
|
17
|
+
from roundtable import register_adapter
|
|
18
|
+
from roundtable.adapters.simple import SimpleAdapter
|
|
19
|
+
|
|
20
|
+
register_adapter("simple", SimpleAdapter)
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from __future__ import annotations
|
|
24
|
+
|
|
25
|
+
from roundtable.adapters.base import RoundtableAdapter
|
|
26
|
+
from roundtable.adapters.generic import Roundtable
|
|
27
|
+
from roundtable.adapters.simple import SimpleAdapter
|
|
28
|
+
from roundtable.core import RoundtableCore
|
|
29
|
+
from roundtable.db import RoundtableDB
|
|
30
|
+
from roundtable.exceptions import (
|
|
31
|
+
DiscussionNotActiveError,
|
|
32
|
+
DiscussionNotFoundError,
|
|
33
|
+
InvalidFindingTypeError,
|
|
34
|
+
InvalidParticipantError,
|
|
35
|
+
InvalidReplyToError,
|
|
36
|
+
InvalidSpeechOrderError,
|
|
37
|
+
RoundtableError,
|
|
38
|
+
)
|
|
39
|
+
from roundtable.models import (
|
|
40
|
+
ConvergenceRecord,
|
|
41
|
+
Discussion,
|
|
42
|
+
Finding,
|
|
43
|
+
Participant,
|
|
44
|
+
Speech,
|
|
45
|
+
)
|
|
46
|
+
from roundtable.notify import Notifier
|
|
47
|
+
from roundtable.web_publisher import WebPublisher
|
|
48
|
+
|
|
49
|
+
__version__ = "0.2.0"
|
|
50
|
+
|
|
51
|
+
# ---------------------------------------------------------------------------
|
|
52
|
+
# Adapter registry
|
|
53
|
+
# ---------------------------------------------------------------------------
|
|
54
|
+
|
|
55
|
+
_ADAPTER_REGISTRY: dict[str, type[RoundtableAdapter]] = {}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def register_adapter(name: str, adapter_class: type[RoundtableAdapter]) -> None:
|
|
59
|
+
"""Register a custom adapter for use with ``--adapter name``.
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
name: Unique adapter name (lowercase, no spaces).
|
|
63
|
+
adapter_class: A subclass of ``RoundtableAdapter``.
|
|
64
|
+
|
|
65
|
+
Raises:
|
|
66
|
+
TypeError: If adapter_class is not a RoundtableAdapter subclass.
|
|
67
|
+
ValueError: If name is already registered.
|
|
68
|
+
"""
|
|
69
|
+
if not (isinstance(adapter_class, type) and issubclass(adapter_class, RoundtableAdapter)):
|
|
70
|
+
raise TypeError(f"{adapter_class!r} is not a RoundtableAdapter subclass")
|
|
71
|
+
if name in _ADAPTER_REGISTRY:
|
|
72
|
+
raise ValueError(f"Adapter '{name}' is already registered")
|
|
73
|
+
_ADAPTER_REGISTRY[name] = adapter_class
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def get_adapter(name: str) -> type[RoundtableAdapter] | None:
|
|
77
|
+
"""Look up a registered adapter by name. Returns None if not found."""
|
|
78
|
+
return _ADAPTER_REGISTRY.get(name)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def list_adapters() -> dict[str, type[RoundtableAdapter]]:
|
|
82
|
+
"""Return a copy of the adapter registry."""
|
|
83
|
+
return dict(_ADAPTER_REGISTRY)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
__all__ = [
|
|
87
|
+
"ConvergenceRecord",
|
|
88
|
+
"Discussion",
|
|
89
|
+
"DiscussionNotActiveError",
|
|
90
|
+
"DiscussionNotFoundError",
|
|
91
|
+
"Finding",
|
|
92
|
+
"InvalidFindingTypeError",
|
|
93
|
+
"InvalidParticipantError",
|
|
94
|
+
"InvalidReplyToError",
|
|
95
|
+
"InvalidSpeechOrderError",
|
|
96
|
+
"Notifier",
|
|
97
|
+
"Participant",
|
|
98
|
+
"Roundtable",
|
|
99
|
+
"RoundtableAdapter",
|
|
100
|
+
"RoundtableCore",
|
|
101
|
+
"RoundtableDB",
|
|
102
|
+
"RoundtableError",
|
|
103
|
+
"SimpleAdapter",
|
|
104
|
+
"Speech",
|
|
105
|
+
"WebPublisher",
|
|
106
|
+
"get_adapter",
|
|
107
|
+
"list_adapters",
|
|
108
|
+
"register_adapter",
|
|
109
|
+
]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Adapters for integrating Roundtable with agent frameworks.
|
|
2
|
+
|
|
3
|
+
Built-in adapters:
|
|
4
|
+
- ``HermesAdapter`` — for Hermes Agent (via ``hermes.py``)
|
|
5
|
+
- ``SimpleAdapter`` — minimal callable-based reference (via ``simple.py``)
|
|
6
|
+
|
|
7
|
+
Custom adapters:
|
|
8
|
+
Subclass ``RoundtableAdapter`` from ``base.py`` and register via
|
|
9
|
+
``roundtable.register_adapter(name, adapter_class)``.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from roundtable.adapters.base import RoundtableAdapter
|
|
13
|
+
from roundtable.adapters.simple import SimpleAdapter
|
|
14
|
+
|
|
15
|
+
__all__ = ["RoundtableAdapter", "SimpleAdapter"]
|