Engineering·Oct 28, 2025·9 min read

Generative UI: When Chatbots Draw Interfaces

How we use Vercel AI SDK to stream React components from the server to the client in real-time.

Frontend Team
Engineering team at Bothive. Building the future of AI agent orchestration.

Generative UI

Text is great, but sometimes you need a button. Or a chart. Or a map.

Generative UI allows our agents to render native React components inside the chat interface.

How It Works

  1. Agent Logic: The agent decides it needs to show a stock chart.
  2. Tool Call: It calls the render_chart tool with JSON data.
  3. Client Hydration: The frontend receives the JSON and maps it to a Recharts component.
jsx
// The component map const componentMap = { stock_chart: (data) => <StockChart data={data} />, flight_card: (info) => <FlightCard info={info} /> };

Why It Matters

This moves the chat interface from "Q&A" to "Dashboard." The chat becomes a dynamic canvas that adapts to the task at hand.

See our GenUI Gallery for examples.

How to apply this inside Bothive

The practical move is to turn the idea into an agent contract: what the agent can see, what it can do, where it should ask for approval, and how the team will inspect the result. A good Bothive workflow is not just a prompt. It has memory, tools, channels, traces, and a clear boundary between autonomous work and human judgment.

Define the boundary

For engineering work, decide which decisions the agent can make alone and which actions need a teammate in the loop.

Attach real context

Connect docs, customer data, repositories, tickets, calendars, or APIs so the agent works from grounded information.

Ship through a channel

Expose the agent through web chat, API, Slack, WhatsApp, schedules, or internal workflows depending on where the work starts.

Watch the run

Use traces, tool-call history, usage, and failure logs to improve the agent after it meets real users.

01

Build

Turn the idea into a readable agent contract, workflow, or builder graph.

02

Deploy

Run it through Bothive channels, schedules, integrations, and API calls.

03

Observe

Use traces, usage, memory, and tool logs to improve the system over time.

Subscribe to our newsletter

Get the latest updates on AI agent orchestration, product releases, and engineering insights delivered to your inbox.

Generative UI: When Chatbots Draw Interfaces