A prototype exploring markdown as a communication protocol between LLMs and reactive UIs. The system uses three block types in a single stream — plain text, executable TypeScript/React code fences, and JSON data fences — to let an AI agent generate and control live interfaces mid-conversation. A custom `mount()` primitive enables four data-flow patterns: forms (client→server), live server mutations (server→client), streaming JSON (LLM→client), and server-side callbacks. Streaming execution is handled by a custom Bun module that runs TypeScript statements incrementally as tokens arrive. A slot mechanism allows skeleton UIs to render immediately while heavier sections fill in progressively. The design deliberately reuses patterns LLMs already know — markdown, TypeScript, React, Zod — rather than introducing new abstractions.

8m read timeFrom fabian-kuebler.com
Post cover image
Table of contents
The Protocol #Agentic UI #On Security #Why It Works #
1 Comment

Sort: