Rulebook Oracle — a TTRPG agent that answers only from its Sanity Knowledge Base
说明与用途
Rulebook Oracle 使用 Sanity 作为结构化知识库,提供即时的桌面 RPG 规则答案,自动处理冲突规则并指示哪条规则生效。
问题
Homebrew tabletop RPG players need accurate rule answers without flipping the rulebook, especially when rules conflict due to errata.
结果
The agent delivers accurate, citation‑rich answers, resolves rule conflicts by displaying both claims, and indicates the effective rule with an Override badge.
工作流
- Seed 57 documents into Sanity using a transactional createOrReplace script.
- Index ruleSection, errataItem, faqItem in a Knowledge Base, linking errata and FAQs to their rule sections via ruleRef.
- Expose the Knowledge Base through a Context MCP endpoint (rulebook-oracle).
- Build an Astro chat UI on Vercel AI SDK that calls the MCP endpoint.
- In the agent loop, search the Knowledge Base for relevant entries, read them, and generate answers only from retrieved content.
- If errata changeType is "override", display an Override badge and cite both the original rule and the errata.
证据
Rulebook Oracle — a chat agent that answers tabletop‑TTRPG rules questions only from a Sanity Context Knowledge Base
I wrote and seeded the rulebook into Sanity: 37 rule sections, 10 errata, 10 FAQs
When newer errata overrides the core rulebook, the agent surfaces both claims side by side, cites every source, and the UI stamps the answer with an Override badge
The agent reasons across related entries (rule + errata + FAQ that reference each other) and only answers from what it retrieved
- 记录日期: 2026-10-02T08:55:49.611Z