thcThought Control

Vercel AI SDK generative UI (RSC streamUI, AI SDK UI, @ai-sdk/tui)

Model tool calls render React components; plus a canned agent TUI.

ai-sdk.dev ↗repo ↗docs ↗runAgentTUI reference ↗Migrating from RSC to AI SDK UI ↗

license
Apache-2.0 · LICENSE file is Apache-2.0 (Copyright Vercel); GitHub API reports NOASSERTION.
language
TypeScript
backing
Vercel
stars
27,211 (as of 2026-10-09)
downloads
ai 29,092,186/week; @ai-sdk/react 9,563,237/week; @ai-sdk/rsc 113,633/week; @ai-sdk/tui 27,329/week (npm, week ending 2026-10-07)
latest release
ai@7.0.137; @ai-sdk/rsc 3.0.137; @ai-sdk/tui 1.0.138, 2026-10-09
first release
2023-06
ignore

Code-first generative UI and a fixed chat TUI; json-render is Vercel's data-first answer and the better comparison.

Ignore it for this purpose.

the steelman: the best honest case for it

The AI SDK is where most TypeScript LLM apps start (29M weekly downloads), and its generative-UI story is the simplest one there is: let the model call a tool, render a real component for the result, stream it. No new UI language for the model to learn, no catalog DSL, full React and design-system fidelity, type-safe tool parts in useChat, and with @ai-sdk/tui the same agent runs in a polished terminal chat in three lines. For teams that just need 'show a weather card when the model calls getWeather', it is hard to beat.

scores
datadriveseeedittimeratetermpxteachmatureopen
UI as data1 scene 5Components are React code; only tool args/results are data.
Agent can drive it2 scene 5
Agent can see it1 scene 5
Small, targeted edits1 scene 5
Time travel0 scene 0
Live data rate2 scene 5
Terminal native2 scene 5runAgentTUI renders a fixed chat UI in the terminal; no general terminal renderer.
Pixel graphics3 scene 4Whatever React on the web draws.
Teaching0 scene 3
Maturity3 scene 1AI SDK is an ecosystem standard, but RSC generative UI is experimental and discouraged for production.
Openness4 scene 4

Vercel AI SDK generative UI (RSC streamUI, AI SDK UI, @ai-sdk/tui) scene now scene planned

how agents use it

How

The model chooses tools; the app maps tool results to components. runAgentTUI hosts an agent in a terminal chat.

Wiring it in

Low for Next.js/React apps.

Seeing the result

AI state/messages only; the model never sees the rendered UI.

Small edits

createStreamableUI .update/.append/.done on one streamed node; coarse.

History

Message history only.

In short

Agent picks components via tools; no live control of the UI.

architecture

AI SDK RSC (@ai-sdk/rsc): streamUI calls a model and lets tools return React Server Components that stream to the client; createStreamableUI/createStreamableValue push UI or values; useUIState/useAIState separate visual state from model context. The docs say RSC is experimental and recommend AI SDK UI (useChat with typed tool parts rendered by client components) for production. @ai-sdk/tui's runAgentTUI runs a ToolLoopAgent (or a remote ChatTransport) in a ready-made terminal chat UI with collapsible tool/reasoning sections and token statistics.

performance

No published generative-UI performance numbers.

adoption and upkeep

Adoption

The AI SDK is the TypeScript standard for LLM apps; its RSC generative-UI API is a small, experimental corner.

Used by: json-render (uses AI SDK streaming), Vercel templates

Maintainability

Very well maintained SDK; RSC module kept but officially experimental.

Releases: Multiple releases per day across packages · Contributors: ~730 (GitHub contributors API incl. anonymous) · Recent: 1,477 commits on main since 2026-07-11 · Bus factor: high

weaknesses
and thc-scene

Overlap

Agents surfacing UI to users; a terminal front end for agents (runAgentTUI).

What scene would be reinventing

Nothing substantive.

The gap it leaves

Everything scene is about: UI as data, live agent control, readback, patches, data streams, pixels, time travel.

What to borrow

  • runAgentTUI's display modes (full/collapsed/auto-collapsed/hidden) for tool and reasoning sections
  • ChatTransport abstraction: run local agent or attach to remote one
sources
  1. AI SDK RSC overview ai-sdk.dev
  2. runAgentTUI reference ai-sdk.dev
  3. vercel/ai LICENSE github.com
  4. npm downloads API api.npmjs.org