showcase/shell-docs/src/content/docs/tutorials/ai-todo-app/step-2-setup-copilotkit.mdx
Now that we have our todo list app running, we're ready to integrate CopilotKit. For this tutorial, we will install the following dependencies:
@copilotkit/react-core: The core library for CopilotKit, which contains the CopilotKit provider and useful hooks.@copilotkit/react-ui: The UI library for CopilotKit, which contains the CopilotKit UI components such as the sidebar, chat popup, textarea and more.To install the CopilotKit dependencies, run the following:
npm install @copilotkit/react-core @copilotkit/react-ui
We provide several plug-and-play components for you to interact with your copilot. Some of these are <CopilotPopup/>, <CopilotSidebar/>, and <CopilotChat/>. You can of course use CopilotKit in headless mode and provide your own fully custom UI via useCopilotChat.
In this tutorial, we'll use the <CopilotPopup/> component to display the chat popup.
"use client";
export default function Home() {
return (
<>
<TasksProvider>
<TasksList />
</TasksProvider>
<CopilotPopup />
</>
);
}
Here's what we did:
<CopilotPopup /> component from @copilotkit/react-ui.<CopilotKit> provider.@copilotkit/react-ui.Now, head back to your app and you'll find a chat popup in the bottom right corner of the page. At this point, you can start interacting with your copilot! 🎉
<Cards> <Card title="← Previous: Check out the repo" href="/tutorials/ai-todo-app/step-1-checkout-repo" description="Clone the starter and install dependencies." /> <Card title="Next: Read app state →" href="/tutorials/ai-todo-app/step-3-copilot-readable-state" description="Use useCopilotReadable so the copilot can answer questions about your todos." /> </Cards>