Agent-selected components

The agent chooses from a typed library of components and populates them; it cannot invent primitives.

Ask MilkyAccounts
Who is Northfield Dental?
M
Milky
render CustomerCard({ name: "Northfield Dental", seats: 40, renewal: "2026-10-14", owner: "Leo Martin" })
Northfield Dental
Owner: Leo Martin
Renews in 13 days
Seats
40
Renewal
14 Oct
Plan
Business
Ask:
Component library5 registered
  • CustomerCardUsed
    name, seats, renewal, owner
  • InvoiceTableUsed
    rows[]: id, date, amount, status
  • BarChartUsed
    title, bars[]: label, value, highlight
  • RefundStatusUsed
    ticket, amount, stage
  • ApprovalCardUsed
    title, facts[], expiresIn

Try it: Pick a question. Milky answers by choosing a registered component and filling its props, even when you ask for one it doesn't have.

In the wild

How one product ships this pattern. Click a screenshot to enlarge it.

Chat reply to 'What's the weather in New York City?' rendered as a weather card showing 38°F, followed by a one-line text answer
CopilotKit
A get_weather tool call is rendered with a registered React WeatherCard component instead of raw text; the agent only fills the card's typed props.
Source: CopilotKit product page ↗

When to use

The default safe shape of generative UI in a product with an existing design system.

Seen in

CopilotKit AG-UI frontend tools, Vercel AI SDK generative UI, tool-call rendered cards.

For engineers

AG-UI is supported across LangGraph, CrewAI, Google ADK, AWS Strands and more — render by tool name.

Build prompt

A neutral, component-only prompt for a coding agent. Edit the stack block or anything else to fit your project, then copy it.

Download this prompt as Markdown, or every prompt as JSON for an agent.

Critique checklist for generative ui

0 of 4 checked

These questions apply to every pattern in this family. Ticks are saved in this browser.