a2ui-project / a2ui-project/a2ui

Agent is biased towards updating existing UIs rather than generating new UIs

Open
#1,858 0 comments 0 reactions 0 assignees View on GitHub
component: genui P2
Dominant language
TypeScript
Stars
16.4k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
134

Description

_↴ Ported from [flutter/genui#715](https://github.com/flutter/genui/issues/715) — originally opened by [jacobsimionato](https://github.com/jacobsimionato) on 2026-02-13._
_Original labels: P1_

---

**Describe the bug**
The agent is updating existing surfaces in cases where it should create new surfaces in some instances. This makes the conversation flow feel weird and the layout look wrong, because sometimes a message ends with a colon, e.g. "Here are some ideas: ", but then the ideas don't follow.

**To Reproduce**
Steps to reproduce the behavior:
0. Run the travel app locally
1. Type "Where should I go next"
2. Agent shows some ideas in a travel carousel
3. Click on an idea like "Cultural excursion"

Expected: Agent adds new travel carousel with a range of cultural excursion destinations

Actual: Agent updates the existing carousel above with a range of excursion destinations

Image

---

### 2 comment(s) from the original issue

**[gspencergoog](https://github.com/gspencergoog)** commented on 2026-02-25:

This is true for the `travel_app` example, but for the other chat examples, the prompt includes a statement to not delete previous surfaces, and to create new ones, so it doesn't seem to favor updating existing UIs in that case. Is this bias just the result of prompt engineering?

---

**[brianegan](https://github.com/brianegan)** commented on 2026-03-18:

My two cents: Working on the demo for Google Cloud Next using A2UI 0.9.0, we ran into the same thing. However, we wanted a specific flow from the LLM, updated the prompt, and it now flows much more the way we intend it do with fewer updates. IMO, this is a prompting issues, but could be a good candidate for documentation.

Contributor guide

Open the contributing guide

Research direction

The issue is in the travel app example. Start by running the travel app locally and reproducing the steps. Examine the prompt engineering for the agent, particularly comparing the travel app prompt to other chat examples. Look for logic that decides between updating an existing UI surface or creating a new one. 'Done' is when the agent correctly generates a new carousel for the excursion destinations.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter, typescript
Domain
ai, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.