What is Open Generative UI?
Open Generative UI is CopilotKit's open-source showcase for agents that stream live, sandboxed HTML/SVG UIs into chat. It sits in the Generative UI SDKs category of the App UIs & Builders tools and is open-source, written in TypeScript and licensed MIT. To get started: clone and install.
Overview
Open Generative UI is an open-source showcase and template from the CopilotKit team for building AI-generated, interactive UI. Instead of answering only in text, the agent can visualize an algorithm, build a 3D animation, draw a chart or produce an interactive diagram, and each result is rendered as live HTML/SVG inside a sandboxed iframe with automatic light/dark theming, progressive reveal animations and responsive sizing.
The repo is a Turborepo monorepo with three apps: a Next.js 16 frontend built on CopilotKit v2, React 19 and Tailwind 4; a Python agent built with LangChain Deep Agents (`create_deep_agent`) plus CopilotKit middleware; and a standalone Model Context Protocol server. Rather than stuffing every visualization instruction into the system prompt, the agent loads `SKILL.md` files from `apps/agent/skills/` on demand — an advanced-visualization skill, a master playbook and an SVG-diagrams skill.
Under the hood, the CopilotKit runtime exposes a `generateSandboxedUi` tool when `openGenerativeUI` is enabled. Its parameters stream in order (`initialHeight`, `placeholderMessages`, `css`, `html`, `jsFunctions`, `jsExpressions`), `OpenGenerativeUIMiddleware` turns the tool call into activity events, and the frontend morphs each update into a preview iframe with Idiomorph before booting the final sandbox. The generated UI can call back into the host through Zod-validated `sendPrompt` and `openLink` functions. The agent runs on Anthropic Claude by default; the README warns that smaller or weaker models produce broken layouts or incomplete visualizations.
What it does
- Agent-generated visuals: algorithm walkthroughs, WebGL/CSS3D scenes, charts, network diagrams, forms, simulations and math plots
- Streaming render path: HTML streams into a flicker-free preview iframe, then boots a sandbox with the shared design-system CSS and a CDN importmap
- Skills-based Deep Agent that loads SKILL.md instructions on demand instead of one giant system prompt, with built-in planning and sub-agent support
- Two-way sandbox bridge (Zod-validated `sendPrompt` / `openLink`) plus a ResizeObserver that auto-sizes each iframe to its content
- Standalone MCP server with an `assemble_document` tool, skill resources and prompt templates for Claude Desktop, Claude Code, Cursor and other MCP clients
- Reference examples of other CopilotKit patterns: `useComponent` charts, `useFrontendTool`, `useHumanInTheLoop` and `useDefaultRenderTool`
Getting started
The project's docs list Node.js 22+, Python 3.12+, pnpm 9+ and uv as prerequisites. The agent needs an Anthropic API key; setting `LLM_MODEL` to a `gpt-*` name routes to OpenAI instead (with `OPENAI_API_KEY`).
Clone and install
`make setup` runs `pnpm install` and creates `apps/agent/.env` if it does not exist.
git clone https://github.com/CopilotKit/OpenIntelligentUI.git
cd OpenIntelligentUI
make setupAdd your API key
Put your Anthropic key in `apps/agent/.env`. Optional variables in the root `.env` include `LLM_MODEL`, rate-limit settings and `MCP_SERVER_URL`.
ANTHROPIC_API_KEY=sk-ant-...Start everything
`make dev` starts the Next.js app at http://localhost:3000 and the agent at http://localhost:8123. Use `make dev-app`, `make dev-agent` or `make dev-mcp` to run one service at a time.
make devTry a prompt
Open http://localhost:3000, type something like "Create a todo list for a weekend project" or click one of the demo suggestions, and the agent answers with generative UI rendered in the chat.
Optional: use the MCP server from Claude Code
Start the HTTP server, then point your client at it in `.mcp.json`. Claude Desktop can use the stdio build (`node dist/stdio.js`) instead.
cd apps/mcp && pnpm dev
# .mcp.json
{
"openGenerativeUI": {
"url": "http://localhost:3100/mcp"
}
}Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Studying a working reference for streaming agent-written HTML/SVG into a sandboxed iframe before adding generative UI to your own CopilotKit app
- Building explainer or tutoring assistants that answer with interactive diagrams, charts and simulations instead of paragraphs
- Giving Claude Desktop, Claude Code or Cursor a shared design system and visualization skills through the bundled MCP server
- Starting a Next.js + LangChain Deep Agents project from a template that already wires up CopilotKit, skills and human-in-the-loop
How Open Generative UI compares
Open Generative UI alongside other open-source generative ui sdks tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| CopilotKit | ★ 39.1k | A frontend framework for adding in-app AI copilots and agent-driven generative UI to React and other apps, and the maker of the AG-UI protocol. |
| Vercel AI SDK | ★ 28.3k | A TypeScript toolkit for building AI apps and agents that includes streaming helpers and generative-UI features for rendering model output as React components. |
| OpenUI | ★ 22.8k | OpenUI lets you describe a UI in plain language, see it rendered live, ask for changes, and convert the result to React, Svelte, or Web Components. |
| AG-UI Protocol | ★ 22.2k | An open protocol that standardizes how AI agents stream events and UI to frontend applications, with SDKs across multiple languages and frameworks. |
| json-render | ★ 19.9k | Vercel Labs' generative UI framework: you declare a catalog of allowed components, a model emits JSON constrained to it, and renderers for React, Vue, Svelte, Solid, React Native, PDF, email and whole Next.js or TanStack Start apps draw it. |
| A2UI | ★ 19.1k | An open generative UI protocol created by Google: agents send declarative JSON built only from the client's trusted component catalog, and renderers for React, Lit, Angular and Flutter draw it with native components. |
| OpenUI (Thesys) | ★ 15.6k | An open standard and runtime for generative UI that uses a compact streaming language to let models emit interactive charts, forms, tables, and cards. |
| Open Generative UI | ★ 4.3k | CopilotKit's open-source showcase for agents that stream live, sandboxed HTML/SVG UIs into chat |
