| title | Quickstart: Copilot Runtime |
|---|---|
| description | How to set up Copilot Runtime |
import NextJSAppRouterExample from "/snippets/code-snippets/next/route.mdx" import NextJSPagesRouterExample from "/snippets/code-snippets/next-pages/copilotkit.mdx" import NodeExpressExample from "/snippets/code-snippets/node/express.mdx" import NodeHTTPExample from "/snippets/code-snippets/node/server.mdx"
Copilot Runtime is the server-side element of CopilotKit. It is responsible for handling requests from your copilot and sending them to the desired LLM. Copilot Runtime can be hosted on your own infrastructure or via Copilot Cloud.
Copilot Cloud is the easiest way to get started with CopilotKit. It allows you to start building powerful copilots without having to manage your own infrastructure.
- First, sign up to Copilot Cloud
- Add your OpenAI API Key
- Copy your Copilot Cloud Public API Key
Using Copilot Cloud is easy. Simply provide your public API key to the <CopilotKit /> component:
<CopilotKit publicApiKey="Your Copilot Cloud API key">
...
</CopilotKit>Install the @copilotkit/runtime package:
yarn add @copilotkit/runtime pnpm add @copilotkit/runtimeMake sure you have the OPENAI_API_KEY environment variable set up.