Install any skill in seconds. Free to start, no credit card required.
Get Started Free →You are an expert in AG-UI (Agent-User Interaction Protocol), the open standard by CopilotKit for connecting AI agents to frontend UIs. You help developers stream agent actions, tool calls, state updates, and text generation to React components in real-time — enabling rich agent UIs where users see what the agent is thinking, doing, and can intervene at any step.
.claude/skills/terminalskills-ag-ui/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 27% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -2% | 0% |
You are an expert in AG-UI (Agent-User Interaction Protocol), the open standard by CopilotKit for connecting AI agents to frontend UIs. You help developers stream agent actions, tool calls, state updates, and text generation to React components in real-time — enabling rich agent UIs where users see what the agent is thinking, doing, and can intervene at any step.
typescript// server/agent.ts — Stream agent events to UI import { AgentServer, EventStream } from "@ag-ui/server"; const server = new AgentServer(); server.onRequest(async (request, stream: EventStream) => { const { messages, context } = request; // Emit thinking state stream.emitStateUpdate({ status: "thinking", progress: 0 }); // Stream text generation stream.emitTextStart(); for (const word of "I'll analyze your data now.".split(" ")) { stream.emitTextDelta(word + " "); await sleep(50); } stream.emitTextEnd(); // Emit tool call stream.emitToolCallStart("search_database", { query: context.userQuery }); const results = await searchDatabase(context.userQuery); stream.emitToolCallEnd("search_database", results); stream.emitStateUpdate({ status: "analyzing", progress: 50 }); // Stream analysis stream.emitTextStart(); const analysis = await generateAnalysis(results); for await (const chunk of analysis) { stream.emitTextDelta(chunk); } stream.emitTextEnd(); // Custom state for UI rendering stream.emitStateUpdate({ status: "complete", progress: 100, charts: [{ type: "bar", data: results.chartData }], suggestions: ["Run deeper analysis", "Export to CSV", "Schedule report"], }); stream.end(); });
tsximport { useAgent, AgentProvider } from "@ag-ui/react"; function App() { return ( <AgentProvider url="https://api.example.com/agent"> <AgentChat /> </AgentProvider> ); } function AgentChat() { const { messages, state, sendMessage, isStreaming, toolCalls } = useAgent(); return ( <div className="flex flex-col h-screen"> {/* Agent state visualization */} {state.status === "thinking" && ( <div className="bg-blue-50 p-3 rounded-lg animate-pulse"> 🤔 Agent is thinking... ({state.progress}%) <progress value={state.progress} max={100} /> </div> )} {/* Tool calls (show what agent is doing) */} {toolCalls.map((tc) => ( <div key={tc.id} className="bg-gray-50 p-2 rounded text-sm"> 🔧 <strong>{tc.name}</strong>: {tc.status === "running" ? "Working..." : "Done"} {tc.result && <pre className="mt-1">{JSON.stringify(tc.result, null, 2)}</pre>} </div> ))} {/* Messages */} {messages.map((msg) => ( <div key={msg.id} className={msg.role === "user" ? "text-right" : "text-left"}> <p>{msg.content}</p> </div> ))} {/* Dynamic UI from agent state */} {state.charts?.map((chart, i) => ( <Chart key={i} type={chart.type} data={chart.data} /> ))} {state.suggestions && ( <div className="flex gap-2"> {state.suggestions.map((s) => ( <button key={s} onClick={() => sendMessage(s)} className="px-3 py-1 bg-blue-100 rounded"> {s} </button> ))} </div> )} {/* Input */} <form onSubmit={(e) => { e.preventDefault(); sendMessage(input); }}> <input placeholder="Ask anything..." disabled={isStreaming} /> </form> </div> ); }
bashnpm install @ag-ui/react @ag-ui/server
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | fail→pass | 13,563 | 10,614 | -22% | 1 | 1 | 0% | 2,802 | 3,702 | +32% | 0 | 0 | — |
case-01 | fail→pass | 13,991 | 10,200 | -27% | 1 | 1 | 0% | 3,068 | 3,587 | +17% | 0 | 0 | — |
case-02 | fail→pass | 27,007 | 18,768 | -31% | 1 | 1 | 0% | 4,711 | 5,995 | +27% | 0 | 0 | — |
case-03 | fail→pass | 25,190 | 18,359 | -27% | 1 | 1 | 0% | 5,575 | 5,451 | -2% | 0 | 0 | — |
case-04 | fail→pass | 17,890 | 9,320 | -48% | 1 | 1 | 0% | 3,387 | 3,318 | -2% | 0 | 0 | — |
case-06 | fail→pass | 14,040 | 9,909 | -29% | 1 | 1 | 0% | 3,105 | 3,705 | +19% | 0 | 0 | — |
case-07 | fail→pass | 8,964 | 7,748 | -14% | 1 | 1 | 0% | 1,743 | 2,416 | +39% | 0 | 0 | — |
case-08 | fail→pass | 13,303 | 6,851 | -49% | 1 | 1 | 0% | 1,974 | 2,606 | +32% | 0 | 0 | — |
case-09 | fail→fail | 11,845 | 8,838 | -25% | 1 | 1 | 0% | 2,577 | 3,111 | +21% | 0 | 0 | — |
case-10 | fail→pass | 16,077 | 10,678 | -34% | 1 | 1 | 0% | 3,362 | 3,495 | +4% | 0 | 0 | — |
case-17 | pass→pass | 11,520 | 13,574 | +18% | 1 | 1 | 0% | 1,984 | 3,920 | +98% | 0 | 0 | — |
case-11 | fail→pass | 8,495 | 3,957 | -53% | 1 | 1 | 0% | 1,642 | 2,035 | +24% | 0 | 0 | — |
case-12 | pass→pass | 8,614 | 6,982 | -19% | 1 | 1 | 0% | 1,521 | 2,646 | +74% | 0 | 0 | — |
case-13 | pass→pass | 11,048 | 10,857 | -2% | 1 | 1 | 0% | 1,847 | 3,199 | +73% | 0 | 0 | — |
case-14 | pass→pass | 14,552 | 12,908 | -11% | 1 | 1 | 0% | 2,548 | 3,995 | +57% | 0 | 0 | — |
case-15 | fail→pass | 11,769 | 8,601 | -27% | 1 | 1 | 0% | 1,981 | 3,052 | +54% | 0 | 0 | — |
case-16 | pass→pass | 10,830 | 4,867 | -55% | 1 | 1 | 0% | 1,921 | 2,074 | +8% | 0 | 0 | — |
case-18 | pass→pass | 6,840 | 2,318 | -66% | 1 | 1 | 0% | 1,213 | 1,641 | +35% | 0 | 0 | — |
case-19 | pass→pass | 10,131 | 7,021 | -31% | 1 | 1 | 0% | 1,697 | 2,579 | +52% | 0 | 0 | — |
case-20 | pass→pass | 7,810 | 8,292 | +6% | 1 | 1 | 0% | 1,290 | 2,966 | +130% | 0 | 0 | — |
case-21 | pass→pass | 11,411 | 7,757 | -32% | 1 | 1 | 0% | 2,426 | 2,878 | +19% | 0 | 0 | — |
case-22 | pass→pass | 7,733 | 7,532 | -3% | 1 | 1 | 0% | 1,317 | 2,847 | +116% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +50 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.