Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Rulebook Oracle — a TTRPG agent that answers only from its Sanity Knowledge Base

Description and use

Rulebook Oracle uses Sanity as a structured knowledge base to provide instant answers to tabletop RPG rule questions, automatically handling conflicting rules and indicating which one is in effect.

Problem

Homebrew tabletop RPG players need accurate rule answers without flipping the rulebook, especially when rules conflict due to errata.

Outcome

The agent delivers accurate, citation‑rich answers, resolves rule conflicts by displaying both claims, and indicates the effective rule with an Override badge.

Workflow

  • 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.

Evidence

Rulebook Oracle — a chat agent that answers tabletop‑TTRPG rules questions only from a Sanity Context Knowledge Base

Source

I wrote and seeded the rulebook into Sanity: 37 rule sections, 10 errata, 10 FAQs

Source

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

Source

The agent reasons across related entries (rule + errata + FAQ that reference each other) and only answers from what it retrieved

Source

  • Record date: 2026-10-02T08:55:49.611Z