Skip to content

Architecture

Where model-composed interfaces fit today: the case for ‘Latebound UI’

Haaris Mohammed5 Dec 20268 min read

Since long before language models, stakeholders, product owners and even backend engineers have asked why the frontend can't be generated at run time from rules and a component library, by nothing more than a thin, dumb rendering engine. It is a seemingly innocuous question, because the data contracts, validations and business rules in their own backend systems already decide what a user may see and do. The frontend's state flows translate that logic and its constraints, if not sometimes mirror them outright, so to some the UI looks trivial, something that can simply be derived.

Section 01: Latebound UI

Earlier rule-based UI rendering systems still needed people to write the rules, design the screens and build the layout engines, and some enterprises ended up hard coding business logic into those engines. Then React and web components championed componentisation, and frontends split further into micro frontends.1 For over a decade, frontend engineering has kept abstracting, moving shared behaviour into reusable units (for example, React hooks)2 and flows such as checkout into declarative statecharts, maps of states and transitions (for example, XState).3

In many applications I see, a model can already draft much of that work, and many of the parts already exist. Yet many screens are still designed and purpose built case by case, from plain-language behaviour-driven development (BDD) scenarios.4 Those scenarios map onto data contracts that already live outside the frontend, often as create, read, update and delete (CRUD) and other application programming interfaces (APIs). So a new process, market or device means new screens even when the rules behind them already exist, which is why the question of a model-composed UI matters.

If a model composed them, the work would move from building each screen to supplying the parts and proving the compositions safe. The creative team would approve the component catalog (tools such as json-render already limit a model to the components in its catalog5, try it at json-render.dev), the composition rules and the brand tokens, so brand and legal checks would shift mostly to the parts and the rules, with designers reviewing a sample of real compositions.

In what I call ‘Latebound UI’, the frontend stays agnostic of how its screens are composed. A model composes each screen at run time, for one person at one moment, and sends it as A2UI JSON,6 which can differ each time even when the request stays the same (stochastic output7). It composes from parts the business supplies:

  1. Components, the UI as atoms and molecules8
  2. Brand, as design tokens and identity
  3. Behaviours, the state flows across screens, such as checkout, with critical steps declared
  4. Content, the approved copy or the rules for writing it (brands and businesses have their own way of saying things, and a model can be taught to follow rules, but today it needs many examples and rules, if not the entire copy)
  5. Actions and transactions the user may take, each describing itself so the model can find and bind it (only minimal pointers to actions are declared, so that each is mapped against context and policy, assuming a backend for frontend (BFF) aggregates or splits each transaction's parts into what the user needs)
  6. Composition rules, which component hierarchies and layouts are sane, mostly shared across products, with rules added where the scenario at hand needs them (house rules such as no more than two levels of call to action, or no card inside a table cell, are not obvious to a model)
  7. Use cases, BDD scenarios that are not obvious from the exposed data and middleware contracts, each mapped to a policy or constraint, including cases only the browser can see (such as masking a revealed account number again once the tab goes to the background)
  8. Security guardrails, such as which context the model may use and what the user has consented to

But a model can be wrong and adds time, while a step that moves money or records consent must be exact and a first screen fast, so the question is where its mistakes and its delay are affordable.

Section 02: Speed of the first screen

Small delays measurably cost revenue,9,10 whether the response is a page today or a model's answer tomorrow. That response also has to be relevant, so the data behind it is gathered first (a backend for frontend aggregating several sources), and that already takes time.

A model could compose while the data streams in from each source. Often, though, the model cannot tell the right composition until most or all of the data/context has arrived, so composing waits. Each composition must then be validated, and if it is unsafe the model composes again before the user sees anything, so its time adds to the wait.

Stored compositionNetworkContextParsePaintServer processingClient processingModel compositionIn the browser instead?11if unsafeNetworkContextComposeValidateRecomposeParsePaintServer processingClient processing
What a screen waits on, in order. Scale is illustrative. Composing and validating could move into the browser as browsers ship their own models, such as Gemini Nano in Chrome on desktop.11

A ‘back office’ application, or any place where the system already has its users’ trust, can afford that time, because its users will wait. Staff stay because finishing the task is their job, while a consumer who is kept waiting loses interest or gets distracted. It can afford a generic, less contextual first screen from a stored composition, which sets expectations with some useful information before the model composes anything. From there, what matters is interaction to next paint (INP), which has gained even more importance since it replaced First Input Delay as a Core Web Vital in March 2024.12 A runtime can show a pending state at once while the model composes the answer.

Section 03: Error rate at scale

The same request can compose a different screen on each run, so the error rate applies to every run. Frontier models (as of December 2026) still go wrong on a few percent of agent tasks, and far more in edge cases,13,14 so even at an assumed 1 in 30, about 33,000 of every million decisions (not users) go wrong. A second model checking each one would cut that to about 1,100 if their mistakes were independent, but models tend to make the same mistakes,15 so the real figure is higher. Even a model right 9,999 times in 10,000 would leave about 100. Each of those is a misleading screen or a wasted action for someone, and if the model composed a consent or payment step, one could be a compliance breach.

1 in 30about 33,000Two models, 1 in 30 eachabout 1,100 at best1 in 10,000about 100
Wrong decisions per million at each error rate.

Section 04: How mistakes are contained

Wherever a mistake would cost money, break compliance or lose the customer, the step is declared up front and owned by a trusted runtime, and the model never composes it. The runtime renders the amount, payee and terms from their declared definitions, the submission carries those values, and the backend, which makes the final check, refuses any that differ from its own record (What You See Is What You Sign).16 These validations reuse the records and contracts the backend already has, because they follow the declared actions, which stay the same whatever the model composes. Checking that this holds across the scenarios that matter takes heavy smoke testing, quick checks that the main paths still work, ideally run by a swarm of independent agents, each trying a different scenario against the live system and reporting what breaks. This looks like a case that would benefit from chaos testing, as is common in infrastructure.17,18

Section 05: Trade-offs of a model-composed frontend

A model can be manipulated.19 A user, or content the model reads, can steer it into a screen that misrepresents the transaction, such as Cancel bound to Pay or the terms pushed out of view, and the backend accepts it because the request itself is valid. So every composition is validated before it renders against rules for what must stay visible, such as the price and terms.

Because each person can see a different screen, every composition has to be logged, so a support team or a regulator can see exactly what a user was shown. Each entry also records the versions of the model, catalog and rules behind it, so the visual or widget an action came from can be traced, and any of those versions rolled back on its own.

People also learn where things are. A screen that rearranges itself on each visit wastes that learning, most of all where users type or give consent, and for people who rely on a screen reader or keyboard. So compositions have to stay relatively stable and not vary drastically for a returning user unless the context has changed in a way that matters. Each composition also needs its own accessibility check, because accessible components can still combine into a screen with broken focus order, headings or contrast.

Whether total engineering effort falls is still unproven. Not all abstractions pay off, and in UI much is deliberately left WET (the opposite of DRY), with the same code written more than once.20,21,22,23 Each degree of freedom the composer gets multiplies the combinations that must work and so the chances to be wrong.

Section 06: Current state of open standards

Measured against what a hypothetical, maximally agnostic frontend (Latebound UI) would need, few of today's standards cover a module or layer fully, and most only come close.

Module or layerNearest standardOpen
Modules
ComponentsNone. A2UI (Agent to User Interface) catalogs list components only6The same molecule is composed differently across applications and business domains, so a shared definition of molecules stays open. Atoms and generic patterns such as menus and dialogs are often well known and shared, which is where headless libraries stop24,25
BehavioursPartial. State Chart XML (SCXML)26, with XState statecharts as an example, not a standard3No generative UI specification adopts SCXML, so attaching a state flow to a generated interface stays open
BrandPartial. Design tokens, stable since 202527No format yet reduces imagery and tone to values, so identity beyond tokens stays open
ContentPartial. Unicode MessageFormat 2.028A brand's voice lives in examples, which a message format cannot hold, so rules for copy the model writes stay open
Actions and transactionsPartial. Model Context Protocol (MCP) tools29, UCP (Universal Commerce Protocol) for commerce30Each host adds its own policy and approval checks to an action the user triggers,31,32 and UCP covers consent only for payments,30 so checking such actions outside commerce stays open
Composition rulesNoneWhat is sane depends on the product and scenario, so the rules stay inside each team's design system
Use casesPartial. BDD scenarios4A model can reach the same flow by different paths, so mapping scenarios to compositions and state flows stays open
Security guardrailsPartial. Content security policy33Browser security standards govern where code and content come from, so which policies bind what a model composes at run time stays open
Architecture layers
Context contract (user, session, device, business context, consent)Partial. OpenID Connect claims, MCP's consent rule29,34Each host handles consent its own way, so no one standard combines that context with the consent and security policies that apply to it
UI description, the format a generated screen travels in to the rendererFull. A2UI 1.06Nothing in the format itself, which has been stable since November 2026
Middleware between agent and frontendPartial. AG-UI (Agent User Interaction protocol)35,36Vendors adopt it one by one,35,36 so consensus is needed
Render path performancePartial. Web Vitals37, with server renderers such as React Server Components38What counts as meaningful content that must arrive in the critical rendering path, what renders before the model takes over, how it is cached, and so on
Code sandboxPartial. Sandboxed iframes, content security policy33,39Checking generated code against state flows, brand and tests, and which browser features it may use beyond the few that MCP Apps let an app request, such as camera and microphone

Section 07: Where Latebound UI fits

The benefit grows with how many distinct situations a product handles, and the cost grows with how fast it must answer and how much a mistake costs. Consumer apps such as food delivery or consumer banking have far fewer screens than back office applications, must answer fast, and show a wrong screen straight to a customer, so they are better kept deterministic. For marketing pages and simple flows, the swarm testing costs more than it returns.

Back office applications, such as a bank's staff application, handle many distinct situations across their flows and processes. Their backend already enforces most of the rules, so an invalid action from a badly composed screen is refused. A valid action on a misleading screen still gets through, which is why the runtime owns the critical steps here too. Staff ask for what they need from thousands of records, get it composed and filtered, and act on it through a few boring prebuilt components in a sandbox. The model composing those screens runs inside the institution's own boundary and receives only the fields each screen needs, masked where it can.

Even in the back office, some aspects make it unsuitable. Staff often handle frequent exceptions that no process or regulation covers yet, moving data quickly across several steps. There, efficiency and productivity come first, and staff who already know the action to take gain nothing from waiting on a model.

For the rest of the back office cases, and for interactive parts of any experience where these trade-offs are acceptable, Latebound UI can start small today, sandboxed in an iframe as MCP Apps require39 and smoke tested by a swarm of agents. Compositions that pass validation can be cached and reused for the same situation, so the model composes only what it has not seen before. A first pilot could be one staff screen for finding records and acting on them, judged by how much sooner staff finish the task, how many unsafe compositions validation catches before anyone sees them, and what each composition costs to run.

References

  1. Micro Frontends, Cam Jackson, martinfowler.com, June 2019. "Independently deliverable frontend applications are composed into a greater whole." ↩
  2. Built-in React Hooks, React. "Hooks let you use different React features from your components." ↩
  3. XState, Stately. "It uses event-driven programming, state machines, statecharts, and the actor model." ↩
  4. Gherkin reference, Cucumber. Gherkin gives "structure and meaning to executable specifications." ↩
  5. json-render, Vercel Labs, January 2026. The model "can only use components in your catalog." ↩
  6. A2UI 1.0, Google Developers Blog, 11 November 2026, which calls it "the first stable version of our open protocol for generative UI." ↩
  7. Defeating Nondeterminism in LLM Inference, Thinking Machines Lab, September 2025. Language models give different outputs for the same prompt, even at temperature 0. ↩
  8. Atomic Design Methodology, Brad Frost, Atomic Design, chapter 2. "Molecules are relatively simple groups of UI elements functioning together as a unit." ↩
  9. Milliseconds Make Millions, Deloitte Ireland, commissioned by Google, March 2020. "Investing in mobile site speed will help unlock revenue and brand loyalty." ↩
  10. Online Retail Performance Report: Milliseconds Are Critical, Akamai, 2017. "Even 100-Millisecond Delays Can Impact Customer Engagement and Online Revenue." ↩
  11. The Prompt API, Chrome for Developers. "The Prompt API uses the Gemini Nano model in Chrome." ↩
  12. Advancing Interaction to Next Paint, web.dev. Interaction to Next Paint replaced First Input Delay as a Core Web Vital in March 2024. ↩
  13. GPT-6.2 System Card, OpenAI Deployment Safety Hub, November 2026. "4.96 percent of GPT-6.2 Astra turns had a confirmed misalignment flag." ↩
  14. τ-Knowledge: Evaluating Conversational Agents over Unstructured Knowledge, Shi and others, March 2026. "Even frontier models with high reasoning budgets achieve only ∼25.5% pass^1." ↩
  15. Correlated Errors in Large Language Models, Kim and others, ICML 2025. Models "agree on the wrong answer far more than they would at random." ↩
  16. WYSIWYS, Wikipedia. Ensures "the semantic content of signed messages can not be changed." ↩
  17. Chaos Monkey, Netflix. "Chaos Monkey randomly terminates virtual machine instances and containers" in production. ↩
  18. REL12-BP04 Test resilience using chaos engineering, AWS Well-Architected Framework. Chaos engineering "injects controlled faults into a system." ↩
  19. LLM01: Prompt Injection, OWASP GenAI Security Project. Occurs when prompts "alter the LLM's behavior or output in unintended ways." ↩
  20. The Wrong Abstraction, Sandi Metz, January 2016. "Duplication is far cheaper than the wrong abstraction." ↩
  21. The WET Codebase, Dan Abramov. Code kept strictly "free of duplication inevitably leads to software we can't understand." ↩
  22. AHA Programming, Kent C. Dodds, June 2020. AHA stands for "Avoid Hasty Abstractions." ↩
  23. Don't build the reusable component yet, Stack Overflow Blog, November 2026. "A wrong abstraction can be expensive to undo." ↩
  24. Headless UI, Tailwind Labs. "Completely unstyled, fully accessible UI components." ↩
  25. Radix Primitives, Radix UI. Described as "a low-level UI component library." ↩
  26. State Chart XML (SCXML), W3C Recommendation, 2015. "A generic state-machine based execution environment." ↩
  27. Design Tokens specification reaches first stable version, W3C Design Tokens Community Group, October 2025. ↩
  28. Unicode CLDR 47: MessageFormat 2.0 Stable, Unicode. The specification "has advanced from Final Candidate to Stable." ↩
  29. Model Context Protocol specification, 2025-11-25. "Hosts must obtain explicit user consent before exposing user data to servers." ↩
  30. Under the Hood: Universal Commerce Protocol (UCP), Google Developers Blog. "Every authorization is backed by cryptographic proof of user consent." ↩
  31. MCP Apps, Model Context Protocol Blog, November 2025. "Hosts can require explicit approval for UI-initiated tool calls." ↩
  32. MCP Apps, AI SDK documentation. "Add any policy and user approval checks your app needs." ↩
  33. Content Security Policy, MDN. It "helps to prevent or minimize the risk of certain types of security threats." ↩
  34. OpenID Connect Core 1.0, OpenID Foundation, section 5.1. "This specification defines a set of standard Claims." ↩
  35. Amazon Bedrock AgentCore Runtime now supports the AG-UI protocol, AWS, March 2026. AG-UI is "an open, event-based protocol." ↩
  36. Microsoft Agent Framework: human in the loop with AG-UI. "AG-UI transports the approval request to the client." ↩
  37. Web Vitals, web.dev. Sets good thresholds for loading, interactivity and visual stability "at the 75th percentile of page loads." ↩
  38. Server Components, React. They render "ahead of time, before bundling, in an environment separate from your client app." ↩
  39. MCP Apps overview, Model Context Protocol. "MCP Apps run in a sandboxed iframe." ↩

‘Latebound UI’ is a term introduced by Haaris Mohammed. Please credit and link to this article when using it.