Implement ChatKit widget embed in Docusaurus sites and define secure token/session flow between UI and FastAPI backend. Use when building RAG chatbots for textbooks, implementing chat interfaces in documentation sites, adding selected text capture functionality, setting up token-based authentication for chat widgets, or deploying chat features to GitHub Pages. Handles both normal (full-book query) and selection-only (query selected text) modes.