Back to Copilotkit

Self Host Configure Copilotkit Provider

showcase/shell-docs/src/content/snippets/coagents/self-host-configure-copilotkit-provider.mdx

1.57.0501 B
Original Source
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>
        <CopilotKit
          runtimeUrl="/api/copilotkit"
          agent="sample_agent" // the name of the agent you want to use
        >
          {children}
        </CopilotKit>
      </body>
    </html>
  );
}