AI-assisted or AI-generated software: AI doesn't need to throw your frontend away
There's a conversation showing up in a lot of companies right now: "what if we threw the frontend away and let the agent build the screens?".
Each person asks for what they need. "Build me a screen to analyze this data." "Put together a dashboard so I can track that." "Make a flow so I can configure this." And the AI delivers on the spot, personalized.
In a demo, that's amazing. The question is what happens when it goes to production.
I've been working with frontend for a long time, and I have the feeling we're mixing up two things: the potential of AI and the need to rebuild everything around it. There's a huge difference between building an AI-native product and simply replacing a product that works with agents.
To discuss this properly, I split it into three concepts.
I built an interactive page so you can see the three approaches working side by side, with the same task: open the lab. I'd open it in another tab and play with it while you read.
Three different things we call "AI in software"
| Approach | What it is | My take |
|---|---|---|
| Traditional software | Deterministic interfaces, known workflows, reusable components and predictable operations. | Still essential |
| AI-assisted software | AI helps you query data, configure things, explain results and automate tasks, inside the product that already exists. | My bet |
| AI-generated software | AI creates interfaces and applications on demand, potentially different for each person. | Worth experimenting |
The point I want to make clear from the start: all three can coexist. The mistake is assuming the third one has to replace the first two.
Traditional software
It's what we've always done. An orders screen with filters, a table, sorting and an export button. People who use it every day know where everything is. Two clicks and done.
It may sound unglamorous to talk about this in 2026, but predictability is a feature. When someone has to repeat the same operation 40 times a day, the last thing they want is an interface that keeps changing.
AI-assisted software
Here AI goes into the product, not in place of it. The screen is still there. What changes is that now there's an assistant that knows how to use that screen for you.
"Show me late orders from São Paulo above R$ 500" becomes three filters applied to the same table you already know. "Why so many delays this week?" becomes an explanation based on the data on screen. And "notify these customers" becomes an action that asks for confirmation before it runs.
AI-generated software
Here AI doesn't use the screen: it creates the screen. You describe what you want and get an interface built on demand. This is called Generative UI, and it's the part that shines the most in demos.
And it makes sense in some cases: an analysis only you will run once, a very specific report, a personalized workflow that would never justify a development sprint.
How AI-assisted works under the hood
The core idea is simple: the AI uses the same actions the interface uses.
The frontend exposes a catalog of actions (filter, sort, open details, notify customer), each with a parameter schema and a risk level. The model receives that catalog as tools (tool calling) and decides which one to call. Your code runs it, not the model.
// The actions the screen already has, described so an agent can use them too
export const actions = {
filterOrders: {
description: 'Filters the orders table',
parameters: z.object({
status: z.enum(['late', 'in_transit', 'delivered']).optional(),
city: z.string().optional(),
minValue: z.number().optional(),
}),
risk: 'read', // applied right away, the user sees the result on screen
run: (p) => store.setFilters(p),
},
notifyCustomers: {
description: 'Sends a delay notice to the selected customers',
parameters: z.object({ orders: z.array(z.string()) }),
risk: 'write', // needs confirmation + permission + audit
permission: 'orders:notify',
run: (p) => api.notify(p.orders),
},
}
Notice what this guarantees:
- The screen stays the source of truth. When the assistant filters, the filter shows up in the same place it would if you had clicked. You can check it and undo it.
- The model doesn't invent operations. It can only call what's in the catalog, with validated parameters.
- Governance is the same as the product's. Permissions, confirmation and audit logs already existed for the manual action. The AI goes through the same path.
- People who know what they want don't need to chat. The experienced operator keeps opening the screen and clicking. The assistant is a shortcut, not a toll booth.
How AI-generated works under the hood
In the serious version of this, the model does not generate loose HTML or code. It generates a specification (usually JSON) describing the screen, and the frontend renders that spec using a closed catalog of components.
{
"title": "Delays by city",
"blocks": [
{ "type": "kpi", "metric": "total_late" },
{ "type": "bars", "groupBy": "city", "filter": { "status": "late" } },
{ "type": "table", "columns": ["customer", "city", "sla_deadline"] },
{ "type": "button", "action": "cancel_orders" }
]
}
For this to work, three new pieces come in around what you already have. None of them requires rewriting the product.
1. Component catalog
A manifest of every block the model can use: its name, what it's for and what it accepts. It lives next to the component in the design system, and the model reads this manifest as context. It picks from here and nothing else.
export const barChart = {
component: 'BarChart',
use: 'compare a value across groups',
accepts: { groupBy: 'dimension', metric: 'count | value' },
states: ['loading', 'empty', 'error'],
}
A very nice side effect: generated screens don't hold a copy of the component, they hold a reference. Fixed a bug in BarChart? The fix reaches every generated screen on the next deploy. That answers a good part of the "who maintains this?" question.
2. Data catalog
This is the piece that takes the most work, and the most important one. It says which sources exist, which fields each one has and which aggregation is allowed on each field. A source is just an alias for a route your API already exposes.
{
"orders": {
"route": "GET /orders",
"dimensions": ["id", "customer", "city", "status"],
"measures": { "value": ["sum", "avg", "max"], "daysLate": ["avg", "max"] },
"permission": "inherited from the route"
}
}
The model never writes a query, never sees the database and never builds free-form filters. It only picks a source, a field and an aggregation from the list. If it tries to sum the id, the spec fails validation. It's a schema error, not a wrong number on screen.
3. Validator and renderer
The validator checks the spec against both catalogs before anything reaches the screen:
- does
sla_deadlineexist in the data catalog? (in the example above, it doesn't: the model made it up) - does
cancel_ordersexist in the action catalog? - is the requested aggregation allowed on that field?
The renderer is simpler than it sounds: a map from type to component, one data fetch per block, and the loading, empty and error states the design system already has. Nowhere is there generated HTML, eval or JSX strings.
The detail that changes everything: the model runs once
This was the point that took me longest to get, and that almost no demo shows. In a serious architecture, the model is not in the path of opening the screen:
| Moment | Model calls |
|---|---|
| Creating the screen | 1 |
| Opening the screen (every time) | 0. It just renders and fetches data |
| Refining ("add the value at risk") | 1, and it creates version v+1 of the spec |
The spec is saved, with id, version and owner. After that, opening a generated screen costs the same as opening a hand-written one. And refining doesn't overwrite: it creates a new version, and you can see what changed between them.
The spec stores the question, not the result
Another important detail: the spec says which data to show, never the data. The numbers are fetched on the spot, with the token of whoever is opening it. So the same screen, when shared, shows less to people with less access. If you store the result inside the spec, it becomes a data leak the first time someone shares the screen.
Actions follow the same logic as the assisted mode: a generated button doesn't run anything. It only opens the confirmation and audit flow that already exists.
What this doesn't solve
Schema validation guarantees the number is right. It doesn't guarantee the conclusion is right. A correlation can turn into a cause in the AI's text. That's why, if the screen has a reading written by the AI, it goes in a separate block, labeled as a hypothesis and listing where it got the information.
In other words: to generate interfaces safely, you need a well defined design system, semantic components, an explicit data catalog, validation, versioning and permission rules. That's a lot of frontend work. Not less.
You can see all of this working in the lab: click "Generate again" a few times (the screen changes on every generation), save it, open it again (zero model calls), refine it and switch "view as" between operator and manager.
What I wouldn't do
- Let the model generate JSX, HTML or chart code. It kills validation, theming and accessibility.
- Call the model every time someone opens the screen.
- Store the result inside the spec.
- Give the model direct write actions.
- Let the AI write interface labels. It breaks i18n and tone of voice: labels come from the component.
- Replace critical screens with generated ones. Day-to-day monitoring stays a deterministic dashboard.
The questions the demo doesn't answer
When the idea is "AI builds everything", some questions show up fast:
- Consistency: if each person has a different interface, how do you keep navigation, behavior and interaction patterns? How do you onboard someone new? How does support help someone stuck on a screen that only exists for them?
- Maintenance: who maintains the generated interfaces? How do you fix a bug across dozens of personalized environments?
- Usability: does the person really want to describe in natural language something they could solve in two clicks?
- Reliability: how do you guarantee the generated interface shows the right data and runs the expected operation?
- Governance: how do you guarantee permissions, audit and control over sensitive operations?
- Performance: if the model runs every time someone opens a screen, you pay latency and cost on every interaction.
Some of these questions have good answers, if the architecture is the one I described above. Maintenance is solved by referencing the component catalog. Performance is solved by saving the spec. Governance is solved by the data catalog and the token of whoever opens the screen. But consistency and usability remain open, and they're exactly the ones that matter most to people who use the product every day.
And there's a point I think is the most important one: not every interaction gets better when it goes through an AI. An experienced person may prefer to open exactly what they need, compare two numbers and run an operation without talking to anyone.
The risk of rewriting everything
Picture a company deciding to spend six months rebuilding its frontend into a fully generative architecture. During that time:
- The current product stops evolving.
- The team takes on new complexity (a runtime for generated interfaces, validation, prompt observability).
- The people who use the product have to relearn a different experience.
- The product starts depending on external models, with costs and availability you don't control.
And in the end, you might find out that 80% of people still want the same screens that already existed.
It's a huge investment to solve a problem that may not even exist. The classic name for that is a solution looking for a problem.
Where each approach makes sense
I'm not suggesting putting a chatbot on every screen. AI should come in where it reduces effort, increases productivity or enables something that used to be hard. Thinking about any internal product, I'd split it roughly like this:
| Feature | Approach |
|---|---|
| Day-to-day data entry and lookup | Traditional interface |
| Monitoring and alerts | Traditional dashboard |
| Data search and exploration | Interface + natural language |
| Complex configuration | Traditional interface + assisted setup |
| Analyzing and explaining results | AI + visualization |
| Very specific reports and workflows | Generative UI |
Notice that the right column is almost never "AI only". In most cases, AI improves an interface that already exists.
How to bring this discussion to your company
If you work with frontend and this conversation came up at your company, a tip: avoid the ideological debate. "AI doesn't replace frontend" coming from a frontend person sounds like resistance to innovation, even when the argument is good.
What works better is experimentation:
- Pick one real workflow in the product.
- Build an AI-driven experience for that workflow.
- Compare it with the traditional experience.
- Measure completion time, success rate, errors and user satisfaction.
- Expand only where the gain is proven.
If the experiment is with generative UI, I'd start small: one workflow, a few data sources, a few components, read-only and behind a feature flag. If it doesn't prove a gain, removing it means turning off the flag.
And I'd instrument it from day one, otherwise the decision becomes a matter of taste:
| Event | Answers |
|---|---|
| Screen request sent | How many people actually ask, and for what |
| Spec rejected by the validator | How often the model tries something outside the catalog |
| Time to answer | From the sentence to the number on screen, versus today's path in clicks |
| Screen saved | How many generations became something the person wanted to keep |
| Screen reopened | Whether the screen was used again or was just curiosity |
| Screen refined | Whether it got it right the first time or needed three tries |
| Screen deleted | The regret rate |
The metric that decides is reopened. A generated screen that's saved and never opened again is exactly the sprawl scenario people worry about. A screen reopened every week is the use case that justifies going on.
And above all: don't confuse an impressive demo with a better product.
What changes for frontend developers
I don't think frontend is going away. But the work is changing. Building screens is still important, and now it comes with:
- Designing interaction systems, not just pages.
- Semantic components that an agent can understand and use.
- Declarative interfaces, described by data.
- Generative UI with a closed catalog and validation.
- Application state and context exposed safely to the agent.
- Validating and confirming AI-generated actions.
- Hybrid experiences, where a person and an agent work on the same screen.
Looking at that list, frontend becomes more important, not less. Someone has to turn what agents can do into experiences that are reliable and usable. And that someone understands components, state, accessibility and UX.
In practice
If you want to see the three approaches running, the lab is here.
Has this conversation come up at your company? Did you go assisted, generated, or "let's rewrite everything"? Tell me in the comments.
