showcase/shell-docs/src/content/docs/tutorials/ai-powered-textarea/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-textarea: The textarea component for CopilotKit, which enables you to get instant context-aware autocompletions in your app.To install the CopilotKit dependencies, run the following:
npm install @copilotkit/react-core @copilotkit/react-textarea
"use client";
export default function Home() {
return (
<CopilotKit runtimeUrl="/api/copilotkit">
{" "}
// [!code highlight]
<EmailsProvider>
<EmailThread />
</EmailsProvider>
</CopilotKit>
);
}
Let's break this down:
CopilotKit provider from @copilotkit/react-core.<CopilotKit> provider.@copilotkit/react-textarea.