What problem does it solve? Building a custom agent backend that streams structured output to a frontend requires implementing the AG-UI event protocol correctly — event ordering, SSE encoding, state synchronization, and tool call lifecycles are easy to get wrong, resulting in malformed streams or lost events. ## Core Features & Use Cases - Protocol Reference: Complete event type schemas covering lifecycle, text, tool call, state, reasoning, and activity events with JSON examples. - Backend Implementation Guide: Step-by-step patterns for extending AbstractAgent, exposing HTTP SSE endpoints, emitting state snapshots and JSON Patch deltas, and handling tool results. - Client SDK Reference: API documentation for HttpAgent, middleware, subscribers, and event application pipelines. - Use Case: You are building a LangGraph agent that must drive a live canvas UI. Use this Skill to emit STATE_SNAPSHOT and TOOL_CALL events in the correct order so the frontend re-renders reactively. ## Quick Start Use the copilotkit-agui skill to build an Express endpoint that streams AG-UI events for my agent.