scaffold-react-vite-agui

Adds an AG-UI agent host with zustand store and SSE endpoint to Vite React projects.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/GQAdonis/artifact-refiner-skill --skill scaffold-react-vite-agui-gqadonis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-react-vite-agui
Source: https://github.com/GQAdonis/artifact-refiner-skill/tree/main/skills/scaffold-react-vite-agui
Command: npx skills add https://github.com/GQAdonis/artifact-refiner-skill --skill scaffold-react-vite-agui-gqadonis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @ag-ui/client, @ag-ui/encoder, and includes scripts (resource) and references (resource) components.

What problem does it solve? Wiring a live agent event stream into a React frontend requires manually building a store, hooks, UI components, and a streaming endpoint. This Skill layers a complete AG-UI protocol agent host onto an existing scaffolded Vite/React project so the app streams agent responses under pnpm dev with no second process. ## Core Features & Use Cases - AG-UI Event Stream Integration: Generates a zustand store that consumes the AG-UI event stream, a use-agent hook, and an agent-panel component that renders streamed messages. - Dev-Server SSE Endpoint: Adds a Vite plugin exposing a mock agent over Server-Sent Events, so streaming works during development without a separate backend process. - Architecture Enforcement: Follows a layered state architecture where stores own all I/O, hooks read stores, and components read hooks, with exact pinning of @ag-ui/client and @ag-ui/encoder at 0.0.59. - Use Case: You have a scaffolded Vite/React app and want a working chat-style agent panel streaming protocol events during development; run the script against the project and get the full store, hook, panel, and mock endpoint wired into the Vite config. ## Quick Start Run the scaffold-react-vite-agui script with --target pointing at my existing scaffold-react-vite project to add the AG-UI agent host.

Frequently Asked Questions about scaffold-react-vite-agui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an AG-UI agent stream to a Vite React app?

Run the scaffold-react-vite-agui script with --target pointing at an existing scaffold-react-vite project. It generates a zustand store, a use-agent hook, an agent-panel component, and a Vite dev-server SSE endpoint backed by a mock agent.

How to stream agent responses in React without a separate backend?

The generated Vite plugin registers a dev-server middleware that replays a canned mock agent response as AG-UI protocol events over SSE. Running pnpm dev streams responses directly, with no second process required.

Does the AG-UI mock endpoint work in production builds?

No, the mock agent and Vite middleware are development-only and excluded from vite build output. Production requires a real backend accepting RunAgentInput as JSON and responding with text/event-stream frames.

Why are @ag-ui/client and @ag-ui/encoder pinned to exact versions?

The AG-UI packages are pre-1.0 at version 0.0.59, so a caret range could admit breaking changes in a patch bump. Exact pinning prevents unexpected breakage in every generated app.

Can I use this scaffolder on a project not built with scaffold-react-vite?

No, the --target must already be a scaffold-react-vite project. This skill is a thin wrapper in the same shape as scaffold-react-vite-tauri, not a standalone project generator.