Logo
Docs

CopilotKit

The CopilotKit provider component, wrapping your application.

This component will typically wrap your entire application (or a sub-tree of your application where you want to have a copilot). It provides the copilot context to all other components and hooks.

Example

You can find more information about self-hosting CopilotKit here.

import { CopilotKit } from "@copilotkit/react-core";
 
<CopilotKit runtimeUrl="<your-runtime-url>">
  // ... your app ...
</CopilotKit>

Properties

publicApiKeystring

Your Copilot Cloud API key. Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.

cloudRestrictToTopic{ validTopics?: string[]; invalidTopics?: string[]; }

Restrict input to a specific topic.

runtimeUrlstring

The endpoint for the Copilot Runtime instance. Click here for more information.

transcribeAudioUrlstring

The endpoint for the Copilot transcribe audio service.

textToSpeechUrlstring

The endpoint for the Copilot text to speech service.

headersRecord<string, string>

Additional headers to be sent with the request.

For example:

{
  "Authorization": "Bearer X"
}
childrenReactNoderequired

The children to be rendered within the CopilotKit.

propertiesRecord<string, any>

Custom properties to be sent with the request For example:

{
  'user_id': 'users_id',
}
credentialsRequestCredentials

Indicates whether the user agent should send or receive cookies from the other domain in the case of cross-origin requests.

showDevConsoleboolean | 'auto'

Whether to show the dev console.

If set to "auto", the dev console will be show on localhost only.

agentstring

The name of the agent to use.

On this page

Edit on GitHub