react-brain
Menu · Topics

Generative UI & in-app AI

our pick

Vercel AI SDK for streaming chat + tool-calling on React and React Native; assistant-ui for prebuilt chat UI, or shadcn/ui's AI Elements on the web when you want to own the component code (Tambo is self-host only since its cloud shut down 2026-10-31); Streamdown to render streaming markdown on the web. TanStack AI (stable 1.0 since 2026-10-22) is the type-safe alternative: re-weighed at 1.0 and the default held — the AI SDK still has ~11× the weekly downloads and the surrounding UI layer (AI Elements, assistant-ui, json-render) is built on its message parts. Fast-moving (confidence: low): treat picks as current-best, not settled.

unless your situation is different

  • render model output as live components : use json-render
  • agent-style UI : use Cedar
  • web app already on shadcn/ui wanting agentic chat UI (reasoning, tool calls, plans, subagents) : use shadcn/ui AI Elements (copy-in; replaces AI SDK Elements)
  • app still pointed at Tambo Cloud : use it stopped 2026-10-31 (data deleted 2026-11-30): self-host the MIT Tambo backend or migrate to assistant-ui / AI Elements
  • already TanStack-stack (Query/Router/Start), or need image/speech/video generation hooks, subagents or a provider-neutral wire protocol : use TanStack AI (1.x stable; upgrade every @tanstack/ai* package together — a 1.0 client needs a 1.0 server — and keep the experimental harness packages pinned)
  • on TanStack AI 0.x : use read the v1 migration guide first: 1.0 removes every deprecated 0.x API, makes threadId REQUIRED on useChat/ChatClient/chat() (pass a stable id per conversation), drops addToolApprovalResponse (→ resolveInterrupt) and the old SSE wire formats
  • streaming LLM markdown in React Native : use native markdown parsing off the JS thread (the Margelo reading; react-native-streamdown is the early SWM Labs option, spike before adopting)

Low confidence — fast-moving or lightly-vetted domain: treat the pick as a vetted lead and prototype before committing.

Save this choice as a decision record → · Check my app against it

How sure are we?
confidence
low — fast-moving or lightly vetted — prototype before committing
track record at this confidence
64% held up, 7 of 14 graded
this pick, graded
held
depth
drafted — internally consistent and cited
evidence
20 sources · 5 readings
last checked
on build day · re-checked 8×

how we check →

#Options compared

what else we looked at, and the tradeoff of each · compare side by side →

optiontradeoffevidence
Vercel AI SDK / json-render · our pickstreaming chat + tool-calling, the default SDK (ai 7.0.x, verified vs npm 2026-09-24); json-render renders model output as components (now RN too).ships in 4/34
assistant-ui / Tamboprebuilt chat/generative-UI components; Tambo 1.0 adds state persistence + streaming. TAMBO CLOUD SHUT DOWN 2026-10-31 (hosted API stopped; remaining data deleted 2026-11-30); Tambo is now SELF-HOST ONLY — the SDK + backend stay MIT, but the team has moved to another product, so it is not a pick for new work. See note: TAMBO WIND-DOWN.
shadcn/ui AI Elements (copy-in)21 copy-in patterns for agentic UIs (Chat, Prompt Input, Reasoning, Tool, Plan, Subagent …) built from shadcn/ui components and rendered from AI SDK message parts; no package to install, the code is yours. Replaces AI SDK Elements, which will be deprecated (2026-10, verified vs the shadcn/ui changelog). See note: TAMBO WIND-DOWN.
Cedar / StreamdownCedar = agent-UI toolkit; Streamdown = streaming-markdown renderer for LLM output on the WEB. The React Native sibling is a separate package; see note: RN STREAMING MARKDOWN.
TanStack AI (@tanstack/ai + ai-react)type-safe TS AI SDK: streaming chat, tool calling, agents and subagents, host-side MCP client, generation hooks beyond chat (image, speech, video, 3D); the first real Vercel-AI-SDK alternative. STABLE since 1.0.0 (2026-10-22; blog 2026-10-23): core APIs committed, the new agent harness experimental and still 0.x; 23 provider adapters, eight UI frameworks. 1.8.0 (2026-11-20) / ai-react 1.1.1 latest (verified vs npm + the GitHub releases 2026-11-25). See note: TANSTACK AI 1.0.265k/wk

evidence: npm weekly downloads (signals snapshot) · “ships in n/D” = adoption across the production-app census, honest denominators

npm weekly downloads (last signals run): ai 34.5M · @tanstack/ai 265k · @tanstack/ai-react 90k

#Key facts

This entry is cloud-LLM app UI; on-device inference belongs to RB-E-ONDEVICE-AI. The category has three layers: the SDK that streams tokens and runs tools (Vercel AI SDK, TanStack AI), the chat components (assistant-ui, Tambo, Cedar), and the renderers for model output (json-render, Streamdown). The default picks one library per layer; the live contest is the SDK layer, where TanStack AI reached 1.0 on 2026-10-22; the default was re-weighed then and held (see TANSTACK AI 1.0). Across all three, the interoperable spec layer (A2UI/AG-UI/MCP) is where the category is standardizing (see reading: Architectural Patterns for Generative UI in React) — A2UI reached 1.0, its first stable spec, on 2026-11-11 (Google; renderer SDKs for web, Android and iOS; agent SDKs for Python/TypeScript/Dart; Atlassian, Bloomberg and ByteDance named as building on it), while the React renderer @a2ui/react is still 0.16.x on npm (verified 2026-11-25) → the spec is stable and the React binding is not yet.

TANSTACK AI 1.0 (2026-10-22 on npm, "TanStack AI 1.0: Still Your AI, Still Your Way" 2026-10-23; verified vs the blog, the @tanstack/ai@1.0.0 GitHub release and npm 2026-11-25)
a formal commitment to the CORE APIs; the new agent harness ships alongside as experimental and stays on 0.x. "No new concepts": 1.0 removes every API 0.x had deprecated, but that removal is breaking in practice — threadId is now required on every chat hook, ChatClient, chat() and the generation functions (TanStack no longer invents one), addToolApprovalResponse is gone (resolve the tool-approval interrupt with resolveInterrupt), the old wire formats ([DONE] SSE line, CUSTOM approval events) are removed, so a 1.0 client needs a 1.0 server. Scale at 1.0: 23 provider adapters plus openaiCompatible, eight UI frameworks (React, Vue, Solid, Svelte, Preact, Angular, Octane, Remix + vanilla), coding-agent and 11 sandbox integrations; since the RC it added portable SKILL.md agent skills, compaction, computer use, a cross-provider reasoning option and automatic prompt caching; 1.0.1 took video generation out of experimental. RE-WEIGH (the tripwire's job): the default stays on the Vercel AI SDK — ai 48.2M vs @tanstack/ai 4.2M weekly downloads and @ai-sdk/react 14.1M vs @tanstack/ai-react 3.6M (npm, week to 2026-11-23); the AI-SDK-native UI layer (AI Elements, json-render, assistant-ui's adapters) and the documented React Native path are on the AI SDK side, and the 1.0 post never mentions React Native. TanStack AI is now a STABLE choice rather than an RC bet: pick it for TanStack-stack apps, multi-modal generation hooks or when a provider-neutral protocol (AG-UI) matters more than ecosystem breadth.

TANSTACK AI (2026-09-24, verified vs the GitHub release + npm)
RC PHASE since 2026-08-21 (0.48), with 24 tree-shakable provider adapters and AG-UI (20+ agent frameworks) as its official protocol, plus generation hooks (useGenerateImage/Speech/Video, useTranscription). 0.59 (ai-react 0.28.0, same train) adds FIRST-CLASS SUBAGENTS: chat({ subagents }) starts named child agents (router-spawned, or a synthetic tool when there is no router), the stream emits AG-UI SUBAGENT_* events keyed by subagentRunId, the client stores nested type:'subagent' parts, and useChat().subagents / part.subagent are the same live handle with stop(); in the React chat UI kit the same defineAgent list goes to options.subagents and a subagent card can style its own child's parts. 0.54 was 2026-09-10. Vercel became a GOLD TanStack partner 2026-09-08 and shipped two first-party adapters: @tanstack/ai-vercel-gateway (route chat/embeddings/image/summarization across providers behind one AI-Gateway key, with per-request provider preferences and fallbacks) and @tanstack/ai-sandbox-vercel (Vercel microVMs as the execution environment for TanStack AI's sandbox system, resumable by ID with files intact and a dev-server port for previews) → the "which agent" and "where it runs" choices are now separable. Competitive read: TanStack AI's main alternative is Vercel's own AI SDK. SINCE 0.59 (verified vs the 0.61.0/0.63.0 GitHub release notes, 2026-09-30): 0.61 added `@tanstack/ai-worldlabs` (`worldlabsWorld()` via `generateWorld()`, World Labs/Marble 3D world generation — a viewer URL plus splat/mesh assets), a fifth generation modality beyond image/speech/video/transcription. 0.63 added an optional `inputSchema` to `defineAgent`: the parent model writes the child subagent's input against that schema (typed `ctx.input` inside `run`, a bad input bounces back to the model as a tool error without starting the child) — requires tool-mode subagents (`chat()` throws if `subagents.router` meets an agent carrying `inputSchema`).

RN STREAMING MARKDOWN (2026-09-24, verified vs npm + the repo)
the "Streamdown" option row is the WEB renderer. A distinct React Native sibling, react-native-streamdown, lives under the software-mansion-LABS org (not the main software-mansion org the rest of that family ships from): ~406★, npm 0.3.0 published 2026-09-04 — early, so spike it before adopting. The problem it targets is real and RN-specific: streaming incomplete Markdown token-by-token flickers (raw ** / * briefly visible) when you re-render JS-side per token, and native parsing avoids that. Do not conflate the two packages when reading newsletter rows.

TAMBO WIND-DOWN (2026-10-15; the 2026-10-31 cloud shutdown has now passed — re-stated 2026-11-25, verified vs Tambo's shutdown post, the tambo-ai/tambo README and the web-v0.136.0 release)
Tambo Cloud closed new signups and keeps running until 2026-10-31, after which the hosted API stops; user data is deleted 2026-11-30. Tambo stays open source (MIT SDK + backend) and self-hostable, but the founder states the team has pivoted to a different product (Charming) after 11k GitHub stars did not turn into adoption → self-hosters own maintenance from here; treat Tambo as a wind-down, not a pick for new work. The same week shadcn/ui released AI Elements (October 2026 changelog): 21 agentic-interface patterns (Chat, Prompt Input, Reasoning, Tool, Plan, Subagent …) composed from its new Trace and Code Block components plus the June chat components (Message Scroller, Message, Questionnaire), available for Base UI, React Aria and Radix. There is no package: each pattern is copied in, renders from AI SDK message parts, and ships as Markdown for coding agents. It replaces AI SDK Elements, which shadcn says it will deprecate; copies already installed keep working because they live in your repo.

ADJACENT
Vercel's Eve is a file-based agent framework (an agent = a folder of tools/connections/channels/schedules; MCP connections, human-approval gates, sandboxed subagents). It is the agent BACKEND you would surface through these UI libs, not a React UI library.

What changed on this page (10)
  1. retired Tambo Cloud rows moved to past tense (shut down 2026-10-31; self-host only). A2UI 1.0 stable spec (2026-11-11) noted; @a2ui/react still 0.16.x. 2026-11-25 CHALLENGED → SURVIVES (tripwire fired): TanStack AI 1.0 stable (2026-10-22) re-weighed against the Vercel AI SDK; default held on adoption (~11× downloads) and the AI-SDK-native UI layer; option row + when-clauses repinned, v1 breaking list recorded; tripwire @tanstack/ai ≥2.0.0 wired.
  2. reopened Tambo Cloud shuts down 2026-10-31 (signups closed; self-host only) — default and option row updated; shadcn/ui AI Elements (copy-in agentic UI patterns, replaces AI SDK Elements) added as an option row.
  3. reopened TanStack AI 0.63 (ai-worldlabs 3D-world generation, typed subagent inputSchema); added the thoughtbot just-in-time-AI-consent reading.
  4. corrected react-native-streamdown 0.3.0 was published 2026-09-04 (the note gave its 2026-09-10 check date as the version date).
  5. gap closed TanStack AI 0.59 / ai-react 0.28 first-class subagents.
  6. gap closed TanStack AI 0.54 + Vercel Gold partnership adapters; react-native-streamdown lead, distinct from the web Streamdown row (reconciled from harvest/2026-08-27).
  7. gap closed TanStack AI enters RC (0.48, 24 providers, AG-UI official protocol).
  8. gap closed boda.sh generative-UI architecture taxonomy.
  9. gap closed Margelo RN chat-stack reading + TanStack AI 0.41.
  10. gap closed TanStack AI added (three independent React Weekly signals, verified vs npm).

#Read more

why each piece is worth your time — the links go to the originals

Respecting your users' dread of the clankersthoughtbot

A consent-design argument for AI features: opt-in and JUST-IN-TIME, not blanket — show the specific problem the AI solves, then ask contextually ('stuck on this form?'), with granular per-capability checkboxes ('book appointments' vs 'share all health data') rather than one all-or-nothing toggle, an easy no-friction fallback to the manual workflow, guards that warn before accepting sensitive input and reject PII before it reaches the LLM, and a revocation UI showing what the AI currently can access.

Generative User Interfaces — rendering UI with language modelsVercel (AI SDK)

The core generative-UI mental model: tools return structured JSON that maps to React component props; the client-side switch-statement scaling problem; and the server-side createStreamableUI/RSC solution for streaming components during generation.

Architectural Patterns for Generative UI in Reactboda.sh (Pixelmatters Show & Tell talk, 2026-07-29)

The field map above the Vercel reading's single pattern — three generative-UI architectures with working demos: (1) tool-constrained JSON mapped onto an existing component registry (Mastra + AI SDK), (2) declarative component-tree specs (A2UI v0.9) transported over the AG-UI protocol (CopilotKit demo) — native rendering with a safe payload, no arbitrary code execution, (3) open-ended LLM-emitted HTML/CSS/JS sandboxed in iframes via MCP Apps. Argues the interoperable spec layer (A2UI/AG-UI/MCP) is where the category is standardizing, over any one framework.

How to Build a Performant AI Markdown RendererTiger Abrodi

The architecture behind streaming-markdown rendering (the Streamdown problem): repairing incomplete markdown before parsing, block-level memoization to avoid re-parsing every token, processor caching, and startTransition for smooth streaming.

Building a ChatGPT-Style AI Chat App in React Native with RAG & StreamingDave Mkpa-Eke (Margelo)

A production RN chat-app architecture (MargeloChat): stream OpenAI over WebSocket with UTF-8 decoding off the JS thread (react-native-nitro-websockets), native markdown parsing (Software Mansion's react-native-enriched-markdown), Legend List v3 for the transcript, keyboard-controller for composer tracking, true-sheet + liquid-glass for chrome, Pinecone RAG over nitro-fetch — 57-60fps by keeping every expensive step native or UI-thread. Margelo self-promotes its Nitro ecosystem throughout; the architectural principle stands independent of the vendor picks.