What it solves
CopilotKit provides frontend components, hooks, runtime integration and Generative UI patterns for agentic applications. It is also the project ecosystem from which AG-UI emerged.
Where it sits
Think of CopilotKit as an implementation platform above AG-UI. It can render predefined frontend tools, integrate A2UI, and host MCP Apps middleware while the protocol remains independently usable by other clients and runtimes.
Trade-off
The platform shortens the path to a polished React experience, but it adds framework conventions. Keep domain logic and protocol contracts separated so a frontend library migration does not rewrite the agent runtime.
Security boundary
Review every frontend tool, middleware connection and rendering adapter. Tool visibility is not authorization; privileged effects must remain enforced on the server.
Minimal example
React surface + CopilotKit frontend tool
↕ AG-UI events
Copilot runtime adapter ↔ agent framework
Start with one read-only frontend tool, then add confirmation and server authorization before enabling mutations.