CopilotKit is an open-source framework for putting AI agents inside React apps: a chat sidebar or popup, tools the agent can call in the browser or on the server, app state shared with the agent, and human-in-the-loop approvals. Use when a user asks to add an AI assistant or chat sidebar to a React or Next.js app, let an agent read app state or trigger UI actions, connect a LangGraph or other AG-UI agent to a frontend, or migrate CopilotKit v1 code (useCopilotAction, useCopilotReadable, OpenAIAdapter) to the v2 API.