Replace custom widgetRenderer with CopilotKit Open Generative UI
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
Research direction
Start with apps/app/src/app/api/copilotkit/route.ts and verify whether openGenerativeUI supports the current LangGraphHttpAgent runtime; compare this with the linked CopilotKit documentation. Then inspect use-generative-ui-examples.tsx, widget-renderer.tsx, idiomorph-inline.ts, export-overlay.tsx, and export-utils.ts, including the CopilotKit provider's sandboxFunctions. Done means generated calculator and binary-search UIs work, theme toggling remains functional, custom helpers are removed, and README/CLAUDE.md no longer reference widgetRenderer.
Written by the indexing model from the issue text.
Description
Background
We currently ship a hand-rolled open generative UI implementation:
WidgetRenderer— ~730-line component that renders agent-authored HTML/CSS/JS inside a sandboxed iframe, with our own theme CSS, idiomorph streaming, and export overlay.- Registered as a
useComponent({ name: "widgetRenderer", ... })inuse-generative-ui-examples.tsx.
CopilotKit now ships this as a first-class feature: Open Generative UI. It covers the same use case (live-streamed sandboxed HTML/CSS/JS, CDN libraries, two-way host bridges) without per-app widget code.
Goal
Delete the custom widget pipeline and use CopilotKit's built-in Open Generative UI instead.
Scope
- Enable
openGenerativeUI: truein the runtime (route.ts). - Remove the
widgetRendereruseComponentregistration and its supporting files (widget-renderer.tsx,idiomorph-inline.ts,export-overlay.tsx,export-utils.ts) once parity is confirmed. - Port any host-side hooks we relied on (e.g. theme toggling) to
sandboxFunctionson theCopilotKitprovider. - Keep the other declarative components (
pieChart,barChart,plan_visualization, HITLscheduleTime) as-is. - Update CLAUDE.md and any demo prompts/suggestions referencing "widgetRenderer".
Open question
The current runtime is v1 CopilotRuntime + LangGraphHttpAgent pointing at the Python LangGraph agent. The docs example for openGenerativeUI: true uses the v2 runtime with BuiltInAgent + InMemoryAgentRunner. We need to verify whether the flag is supported alongside LangGraphHttpAgent, or whether this upgrade also requires migrating the runtime wiring (and what that means for the Python agent in apps/agent/).
Acceptance criteria
- "Build me a calculator" / "Visualize binary search" prompts produce a streamed, sandboxed UI in chat with no custom widget code in this repo.
- Theme toggle still works from generated UI (via
sandboxFunctions). - Custom
widget-renderer.tsxand helpers are deleted. - README/CLAUDE.md reflect the new approach.
Docs: https://docs.copilotkit.ai/generative-ui/open-generative-ui
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CopilotKit/OpenGenerativeUI
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
CopilotKit/OpenGenerativeUI#87 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
All issues in CopilotKit/OpenGenerativeUI
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·