mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
21 lines
625 B
Plaintext
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>
|
|
);
|
|
}
|
|
``` |