Skip to main content
bash TV

Generative UI... in Python? — Jeremiah Lowin, Prefect

AI Engineer

658 views10 Sept 2026

YouTube

Because only the agent can reach an MCP server, a naive file upload tool makes the agent retype the file into the server character by character. Jeremiah Lowin calls it the world's most expensive copy paste operation, and it is the problem MCP apps exist to remove. Lowin is founder and CEO of Prefect and the author of FastMCP. MCP apps, a protocol extension added this year, let a tool result skip the agent and arrive at the user as HTML, CSS, and JavaScript: a real interface a person can click. That solves one problem and creates another, because FastMCP's users are overwhelmingly Python engineers inside enterprises, and shipping React from Python is not something he would pretend to do. The way out was constraining the problem. His users are not building consumer facing branded products; they share and collect information, which means tables, forms, and charts. Prefab is the result, a Python DSL where nesting context managers builds the interface structure and every component is a class that renders as a polished one. Reactive variables give client side interactivity with no JavaScript. The pipeline runs Python to a declarative representation to a JSON protocol to a React app, and Lowin is blunt that the JSON is the actual point: a serializable UI is one an agent can generate, receive, or edit. The Python DSL, he says, was an accident he noticed later. Two details land. The Prefab documentation is rendered entirely in Prefab, editable in place. And a UI streamed as Python turned out roughly seventy percent smaller than the same UI as JSON, so they now send Python over the wire and convert it in a sandbox. Speaker info: - https://x.com/jlowin - https://www.linkedin.com/in/jlowin/ - https://jlowin.dev Timestamps: 0:00 - MCP apps, and bypassing the agent 3:20 - Shipping UIs to an audience of Python engineers 4:45 - Constraining the problem to tables, forms, charts 5:43 - Composing a front end rather than building one 6:37 - The DSL, and the JSON in the middle 8:54 - Docs rendered in the thing they document 10:13 - Interactive tools, and a chart beside a table 12:56 - Full apps and the expensive copy paste problem 15:15 - Generative UI, and Python beating JSON on the wire

Join the discussion

Sign in to join the discussion

Sign in