---
title: "Building generative UI with an AI agent | Snowplow Signals"
description: "An AI agent can assemble a generated interface at request time, choosing components from live state, as long as it is grounded in current data."
source: https://signals.snowplow.io/learning/generative-ui/building-generative-ui-with-an-ai-agent
---

[Learning](https://signals.snowplow.io/learning) / [Generative UI](https://signals.snowplow.io/learning/generative-ui) 

# Building generative UI with an AI agent

One way to drive generative UI is to let an AI agent choose what to render from live state. The agent reads a current picture of the visit and returns a layout; the quality of that layout depends on the quality of the context it is given.

## The agent as the decision

In this pattern the server hands an agent a description of the visit and a set of components, and the agent returns the interface to render. It is generative UI where the rules are replaced by a model that reasons over the context on each request.

## Context is the constraint

An agent with no grounding guesses. Given a current, structured picture of the visit, what the person has looked at, what they did last, and how long ago, it can compose a screen that fits. The interesting work is less the model than the context you feed it.

## Keeping it fast and safe

Two practical limits: the decision has to return within the request, and the output has to stay inside the components the client can render. A typed contract for the response keeps the agent within what the app supports, and a current context store keeps the decision grounded in the visit.

## Put it to work

* [Generative UI on Signals →](https://signals.snowplow.io/lp/generative-ui)
* [Behavioral memory for AI agents →](https://signals.snowplow.io/use-cases/customer-aware-agents)

## See it on your own traffic 

Add the SDK, define one attribute, and see an attribute updating against your own traffic in the first session. The free tier runs on the real engine: no card, no sales call.

[Start free](https://signals.snowplow.io/start) [Talk to an engineer](https://signals.snowplow.io/start?intent=engineer) 

More explainers in the [Learning Center →](https://signals.snowplow.io/learning)
