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