Multi-agent demos you can actually reproduce
说明与用途
在 Séance 模板中将角色、运行逻辑和 UI 分离,实现了确定性、可测试的多代理演示。基于属性的测试发现并修复了评分错误,模板可在多领域使用而无需更改引擎。
问题
Multi-agent demos often entangle persona definition, run logic, and UI rendering, making testing, replaying, and updates difficult.
结果
By separating personas, run logic, and UI, the author achieved deterministic, testable multi-agent demos. Property-based testing uncovered a scoring bug, which was fixed by adjusting the formula. The template supports multiple domains without engine changes.
工作流
- Define personas in YAML files.
- Implement runRoom({artifact, personas, seed}) as a pure function that returns a Transcript.
- Render the Transcript in the UI.
- Use a seed to control wording without randomness or I/O.
- Run property-based tests with fast-check to validate invariants.
- Fix scoring bug by using a capacity independent of findings.
- Deploy the template with two demo apps without modifying the engine.
- Re-run demos with a new seed to see voice changes without changing evidence.
证据
Séance splits them: personas are YAML, the run is a pure function, the UI takes a transcript.
No Math.random(), no Date.now(), no crypto.randomUUID() inside seance-core.
The score could go down when you pointed at a new risk.
- 记录日期: 2026-11-02T04:58:59.663Z