render_ui displays Enfors data as a branded, interactive view. Whenever a client
shows agents, sessions, decisions, metrics, or anything computed during analysis, it
should call render_ui rather than putting HTML in the text reply.
html— HTML for the document body. The shell wraps it with the Enfors brand (background, fonts, colors).title— optional short title for the preview tab.
html, title, and preview_html (a fully self-contained branded
document).
Compose with brand classes
The shell provides the brand — compose with these classes instead of hand-picking colors:
Raw brand tokens if needed: clay
#b96a3a (primary), moss #5b6b3f (success),
ink-blue #2a3a52, ink #1a1815, paper #faf6ec, line #d8d1bd, mute #6f6a5e,
background #f1ece0. Fonts: Fraunces (headings), Inter Tight (body), JetBrains Mono (IDs).
Charts & tables
Example
Rendering paths
- MCP-app hosts (claude.ai web): the host renders a sandboxed iframe automatically.
- Claude Code Desktop: write the result’s
preview_htmlto.claude/ui/index.html, then open it in the preview panel — do this on every render so the panel stays current. - Other hosts: also give a one-line plain-text summary of the key numbers as a fallback.