Files
copilotkit__copilotkit/docs/snippets/coagents/cloud-configure-copilotkit-provider.mdx

21 lines
625 B
Plaintext

```tsx title="layout.tsx"
import "./globals.css";
import { ReactNode } from "react";
import { CopilotKit } from "@copilotkit/react-core"; // [!code highlight]
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<body>
{/* Use the public api key you got from Copilot Platform */} // [!code highlight:5]
<CopilotKit
publicApiKey="<your-copilotkit-platform-public-api-key>"
agent="sample_agent" // the name of the agent you want to use
>
{children}
</CopilotKit>
</body>
</html>
);
}
```