Hasty Briefsbeta

Bilingual

I turned Markdown into a protocol for generative UI

8 hours ago
  • #AI
  • #UI
  • #Markdown
  • Markdown is proposed as a protocol for agentic UI, combining text, executable code, and data in a single stream.
  • Three core ideas underpin the prototype: Markdown as protocol, streaming execution, and a `mount()` primitive for reactive UIs.
  • The protocol uses three block types: Text (plain markdown), Code fence (executable code), and Data fence (streams data into UI).
  • Feedback loop involves LLM generating markdown with code blocks, executing code incrementally, and feeding output back to the LLM.
  • Streaming execution allows statements to execute as they are generated, improving responsiveness.
  • Four data flow patterns are identified: Client → Server (forms), Server → Client (live updates), LLM → Client (streaming), and Client → Server (callbacks).
  • A slot mechanism enables complex UIs by mounting skeleton interfaces first and filling sections later.
  • Security considerations are noted, with the assumption that security is reasonably solved for the prototype's purposes.
  • The prototype leverages existing LLM knowledge of markdown, TypeScript, and React, optimizing for LLM ergonomics.