šŸ”„ Agentic Engineer Course — October cohort registration is now open →

← Back to Blog

Agentic UI - Building the UI from an Event Model

The backend is a solved problem. The UI is more fun - here's how the first UI-Build-Kit turns your Event Model directly into a real, well-structured frontend.

Agentic UI - building the UI from an Event Model

If I had to rate it, that’s one of the biggest ā€œmythsā€ and questions holding people back from just giving Event Modeling a try.

I consider the backend to be a solved problem. There’s a clear path from Event Model to event-sourced backend code - straightforward, and typically no surprises.

The UI is more fun.

In the next few days I’ll publish the first UI-Build-Kit, to build the UI directly from the Event Model.

Why a Build-Kit for the UI?

We had a short discussion in the Event Modeling Community recently. First comment - ā€œI gave the Event Model to Claude and it did a decent job.ā€

I know! Event Models are like candy for AI. They love it. I’m doing this a lot myself - there’s even a direct #lovable integration in the platform to build a quick UI (look for the heart symbol).

So why the UI-Build-Kit then?

In a real world project, you need more control over how everything is structured. Claude tends to give you a monolith-like UI - beautiful, but with limited control over structure.

In Event Modeling, we work with Slices - and Slices include the UI. So we need to clearly map out how components are structured and cut, how they are organized and orchestrated, and how UI state is managed.

But we go a very different route than most tools with this. Most tools provide tons of configuration you have to provide for the UI - basically some kind of ā€œlow codeā€ experience. Which isn’t wrong, but it’s not how I work.

Examples First

We integrate UX into Event Modeling for a reason. You design the user flow along one single timeline - oftentimes starting with the screens, showing the user flow. Let’s take advantage of that. The EM-Studio integrates HTML-Screens (next to Figma previews and sketched images), but with some superpowers.

Multiple HTML Screens in an Event Model, showing a product list, a highlighted product detail page, and a room summary screen

First, you can typically use your styleguides directly to generate the HTML-Screens. You don’t do this manually - 99% of them are just generated by AI, using the MCP or just ChatGPT to quickly generate something.

An HTML Screen with a highlighted focus area around the product details component

Within an HTML-Screen, you can highlight certain areas - and blur the rest if you want. This allows you to define focus areas for each Slice in the timeline. Those focus areas are also available to any connected agent.

The last piece is the component placement - each Screen in the Event Model has a name (ā€œProduct detailsā€ in the example above). The name of the screen defines the page shown. Two screens in the Event Model with the same name reference the same page. Different highlights on the same page indicate component placement.

Information Completeness

Have you ever received a UI mockup that looks beautiful, but you simply couldn’t build it because the information displayed isn’t available?

This is one of the most expensive handovers - you need to go back, discuss what information is available, adjust all the mockups (which UX typically hates), and so on.

Event Modeling rules this out from the beginning. For each screen, you define exactly where information is coming from to display it. And you can only use information that’s actually available.

UX sees it, you see it, everybody sees it.

A Product Details interaction node showing exactly which fields - productId, price, selectedColor - feed the component

This prevents all those dangerous assumptions. In Event Modeling, that’s called ā€œInformation Completenessā€ - already while modeling, we are very specific about which information is used.

Build Kits

The idea of Build-Kits is simple, and many are already available for the backend: provide well-structured, opinionated ways to build systems from an Event Model. Spec-Driven Development, using Event Modeling as the ā€œspec.ā€

Now how will the UI-Build-Kit use all the aforementioned building blocks?

The first UI-Build-Kit (many will follow) defines a React UI. Want to use something else? Use another UI-Build-Kit, or just define your own.

The UI-Kit is initialized with your own styleguides - from Storybook, PDFs, design kits, whatever you have.

The ā€œBackend-Agent,ā€ using a Backend-Build-Kit, will build the Slice from the Event Model, including the API for write and read access. It’ll then hand over the instructions to the ā€œFrontend-Agent,ā€ using the UI-Build-Kit.

Using the integrated screens, highlighted areas, and instructions allows very fine-grained control - without having to configure a ton of stuff for it. Just using examples.

My new program ā€œAgentic Engineerā€ starts on Sep. 7 - teaching you in 3 weeks how to become the Agentic Engineer, working with the Triplet Architecture of Event Modeling, Event Sourcing, and Vertical Slices. There are only 7 seats left.

Join the Agentic Engineer Program

Apply Spec-Driven Development Hands-On - Event Modeling, Event Sourcing, and AI Engineering with autonomous agents.

Learn More →

Book a Call Today

Want to talk through how Event Modeling could work for your team or project? Let’s have a quick, no-pressure conversation.

Book a Call Today →