[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-copilotkit-copilotkit-setup":3,"mdc-3chus1-key":51,"related-org-copilotkit-copilotkit-setup":5619,"related-repo-copilotkit-copilotkit-setup":5791},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":46,"sourceUrl":49,"mdContent":50},"copilotkit-setup","set up CopilotKit in projects","Use when adding CopilotKit to an existing project or bootstrapping a new CopilotKit project from scratch. Covers framework detection, package installation, runtime wiring, provider setup, and first working chat integration.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"copilotkit","CopilotKit","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fcopilotkit.png",[12,14,17],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"Onboarding","onboarding",{"name":18,"slug":19,"type":13},"Frontend","frontend",35928,"https:\u002F\u002Fgithub.com\u002FCopilotKit\u002FCopilotKit","2026-07-12T08:06:25.534415",null,4434,[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"agent","agent-native","agentic-ai","agents","ai","ai-agent","ai-assistant","assistant","assistant-chat-bots","copilot","copilot-chat","generative-ui","js","llm","nextjs","open-source","react","reactjs","ts","typescript",{"repoUrl":21,"stars":20,"forks":24,"topics":47,"description":48},[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"The Frontend Stack for Agents & Generative UI. React, Angular, Mobile, Slack, and more.  Makers of the AG-UI Protocol","https:\u002F\u002Fgithub.com\u002FCopilotKit\u002FCopilotKit\u002Ftree\u002FHEAD\u002Fskills\u002Fcopilotkit-setup","---\nname: copilotkit-setup\ndescription: >\n  Use when adding CopilotKit to an existing project or bootstrapping a new CopilotKit\n  project from scratch. Covers framework detection, package installation, runtime wiring,\n  provider setup, and first working chat integration.\nversion: 1.1.2\n---\n\n# CopilotKit Setup\n\n## Prerequisites\n\n### Live Documentation (MCP)\n\nThis plugin includes an MCP server (`copilotkit-docs`) that provides `search-docs` and `search-code` tools for querying live CopilotKit documentation and source code.\n\n- **Claude Code:** Auto-configured by the plugin's `.mcp.json` -- no setup needed.\n- **Codex:** Requires manual configuration. See the [copilotkit-debug skill](..\u002Fcopilotkit-debug\u002FSKILL.md#mcp-setup) for setup instructions.\n\n### Environment\n\nBefore starting setup, verify:\n\n1. **Node.js >= 18** (required for `fetch` globals used by the runtime)\n2. **An AI provider API key** (one of: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`)\n3. **A React-based frontend** (Next.js App Router, Next.js Pages Router, Vite + React, or Angular)\n4. **A backend capable of running the runtime** (same Next.js app via API routes, or a standalone Express\u002FHono server)\n\n## Framework Detection\n\nBefore generating any code, detect the project's framework by checking files in the project root. See `references\u002Fframework-detection.md` for the full decision tree.\n\n**Quick summary:**\n\n| Signal File                                        | Framework            |\n| -------------------------------------------------- | -------------------- |\n| `next.config.{js,ts,mjs}` + `app\u002F` directory       | Next.js App Router   |\n| `next.config.{js,ts,mjs}` + `pages\u002F` directory     | Next.js Pages Router |\n| `angular.json`                                     | Angular              |\n| `vite.config.{js,ts}` + React deps in package.json | Vite + React         |\n\n## Setup Workflow\n\n### Step 1: Install packages\n\nAll packages use the `@copilotkit` namespace. The v2 API lives as subpath exports on the published packages.\n\n**Frontend + backend in the same Next.js app:**\n\n```bash\nnpm install @copilotkit\u002Freact-core @copilotkit\u002Fruntime hono\n```\n\n**Frontend only:**\n\n```bash\nnpm install @copilotkit\u002Freact-core\n```\n\n**Backend runtime only:**\n\n```bash\nnpm install @copilotkit\u002Fruntime hono\n```\n\nFor standalone Express backends, install Express adapter dependencies instead of `hono`:\n\n```bash\nnpm install @copilotkit\u002Fruntime express dotenv zod\nnpm install -D @types\u002Fexpress tsx typescript\n```\n\n(`createCopilotExpressHandler` enables CORS internally, so you do not need to\ninstall `cors` yourself. `dotenv` and `zod` are used by the example asset.)\n\n### Step 2: Configure the runtime\n\nThe runtime is the server-side component that manages agent execution. See `references\u002Fruntime-architecture.md` for details.\n\nThere are two endpoint styles:\n\n1. **Multi-route (Hono)** -- uses `createCopilotHonoHandler`. Requires a catch-all route (`[[...slug]]` in Next.js). Each operation (run, connect, stop, info, transcribe, threads) gets its own HTTP path.\n2. **Single-route (Hono or Express)** -- uses `createCopilotHonoHandler({ ..., mode: \"single-route\" })` or `createCopilotExpressHandler({ ..., mode: \"single-route\" })`. All operations go through a single POST endpoint with method multiplexing.\n\n#### Next.js App Router (recommended: multi-route with Hono)\n\nCreate `src\u002Fapp\u002Fapi\u002Fcopilotkit\u002F[[...slug]]\u002Froute.ts`:\n\n```typescript\nimport {\n  CopilotRuntime,\n  createCopilotHonoHandler,\n  InMemoryAgentRunner,\n  BuiltInAgent,\n} from \"@copilotkit\u002Fruntime\u002Fv2\";\nimport { handle } from \"hono\u002Fvercel\";\n\nconst agent = new BuiltInAgent({\n  model: \"openai\u002Fgpt-4o\",\n  prompt: \"You are a helpful AI assistant.\",\n});\n\nconst runtime = new CopilotRuntime({\n  agents: {\n    default: agent,\n  },\n  runner: new InMemoryAgentRunner(),\n});\n\nconst app = createCopilotHonoHandler({\n  runtime,\n  basePath: \"\u002Fapi\u002Fcopilotkit\",\n});\n\nexport const GET = handle(app);\nexport const POST = handle(app);\n\u002F\u002F PATCH\u002FDELETE are used by thread operations (useThreads); export them too\n\u002F\u002F so the multi-route handler can serve them when you enable Intelligence\u002Fthreads.\nexport const PATCH = handle(app);\nexport const DELETE = handle(app);\n```\n\n#### Next.js App Router (alternative: single-route)\n\nCreate `src\u002Fapp\u002Fapi\u002Fcopilotkit\u002Froute.ts`:\n\n```typescript\nimport {\n  CopilotRuntime,\n  createCopilotHonoHandler,\n  InMemoryAgentRunner,\n  BuiltInAgent,\n} from \"@copilotkit\u002Fruntime\u002Fv2\";\nimport { handle } from \"hono\u002Fvercel\";\n\nconst agent = new BuiltInAgent({\n  model: \"openai\u002Fgpt-4o\",\n  prompt: \"You are a helpful AI assistant.\",\n});\n\nconst runtime = new CopilotRuntime({\n  agents: {\n    default: agent,\n  },\n  runner: new InMemoryAgentRunner(),\n});\n\nconst app = createCopilotHonoHandler({\n  runtime,\n  basePath: \"\u002Fapi\u002Fcopilotkit\",\n  mode: \"single-route\",\n});\n\nexport const POST = handle(app);\n```\n\nWhen using single-route, the frontend must set `useSingleEndpoint` on the provider (see Step 3).\n\n#### Standalone Express Server\n\nCreate `src\u002Findex.ts`:\n\n```typescript\nimport express from \"express\";\nimport { CopilotRuntime, BuiltInAgent } from \"@copilotkit\u002Fruntime\u002Fv2\";\nimport { createCopilotExpressHandler } from \"@copilotkit\u002Fruntime\u002Fv2\u002Fexpress\";\n\nconst agent = new BuiltInAgent({\n  model: \"openai\u002Fgpt-4o\",\n});\n\nconst runtime = new CopilotRuntime({\n  agents: {\n    default: agent,\n  },\n});\n\nconst app = express();\n\napp.use(\n  \"\u002Fapi\u002Fcopilotkit\",\n  createCopilotExpressHandler({\n    runtime,\n    basePath: \"\u002F\",\n    mode: \"single-route\",\n  }),\n);\n\nconst port = Number(process.env.PORT ?? 4000);\napp.listen(port, () => {\n  console.log(\n    `CopilotKit runtime listening at http:\u002F\u002Flocalhost:${port}\u002Fapi\u002Fcopilotkit`,\n  );\n});\n```\n\nFor multi-route Express, omit the `mode` option (multi-route is the default) -- `createCopilotExpressHandler` is the same factory for both styles (imported from `@copilotkit\u002Fruntime\u002Fv2\u002Fexpress`).\n\n#### Standalone Hono Server (non-Vercel)\n\n```typescript\nimport {\n  CopilotRuntime,\n  createCopilotHonoHandler,\n  BuiltInAgent,\n} from \"@copilotkit\u002Fruntime\u002Fv2\";\nimport { serve } from \"@hono\u002Fnode-server\";\n\nconst runtime = new CopilotRuntime({\n  agents: {\n    default: new BuiltInAgent({ model: \"openai\u002Fgpt-4o\" }),\n  },\n});\n\nconst app = createCopilotHonoHandler({\n  runtime,\n  basePath: \"\u002Fapi\u002Fcopilotkit\",\n});\n\nserve({ fetch: app.fetch, port: 8787 });\n```\n\nRequires `@hono\u002Fnode-server`:\n\n```bash\nnpm install hono @hono\u002Fnode-server\n```\n\n### Step 3: Set up the frontend provider\n\nWrap your application with `CopilotKit` from `@copilotkit\u002Freact-core\u002Fv2`.\n\n> **Which provider component?** Always use `CopilotKit` imported from `@copilotkit\u002Freact-core\u002Fv2`. It is the compatibility bridge across v1 and v2 and a strict superset of the other provider APIs. Do **not** use `CopilotKit` from the package root (`@copilotkit\u002Freact-core`, legacy v1) or `CopilotKitProvider` from `\u002Fv2` (a subset of the functionality).\n\n**Important:** Import the stylesheet in your root layout:\n\n```typescript\nimport \"@copilotkit\u002Freact-core\u002Fv2\u002Fstyles.css\";\n```\n\n#### Next.js App Router\n\nIn `src\u002Fapp\u002Fpage.tsx` (or a client component):\n\n```tsx\n\"use client\";\n\nimport { CopilotKit, CopilotChat } from \"@copilotkit\u002Freact-core\u002Fv2\";\n\nexport default function Home() {\n  return (\n    \u002F\u002F useSingleEndpoint={false} matches the multi-route backend above.\n    \u002F\u002F The v1-compat CopilotKit bridge defaults useSingleEndpoint to true,\n    \u002F\u002F which would 404 against multi-route endpoints.\n    \u003CCopilotKit runtimeUrl=\"\u002Fapi\u002Fcopilotkit\" useSingleEndpoint={false}>\n      \u003Cdiv style={{ height: \"100vh\" }}>\n        \u003CCopilotChat \u002F>\n      \u003C\u002Fdiv>\n    \u003C\u002FCopilotKit>\n  );\n}\n```\n\n#### Connecting to an external runtime\n\nWhen the runtime runs on a separate server (e.g., Express on port 4000):\n\n```tsx\n\u003CCopilotKit runtimeUrl=\"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fcopilotkit\" useSingleEndpoint>\n  {children}\n\u003C\u002FCopilotKit>\n```\n\nSet `useSingleEndpoint` when the backend uses single-route endpoints (`createCopilotHonoHandler` or `createCopilotExpressHandler` with `mode: \"single-route\"`).\n\n#### CopilotKit key props\n\n| Prop                | Type                                                       | Description                                                                                                          |\n| ------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |\n| `runtimeUrl`        | `string`                                                   | URL of the CopilotKit runtime endpoint                                                                               |\n| `useSingleEndpoint` | `boolean`                                                  | Set to `true` when using single-route endpoints                                                                      |\n| `headers`           | `Record\u003Cstring, string> \\| (() => Record\u003Cstring, string>)` | Custom headers sent with every request. The function form is evaluated per-request (useful for dynamic auth tokens). |\n| `credentials`       | `RequestCredentials`                                       | Fetch credentials mode (e.g., `\"include\"` for cookies)                                                               |\n| `publicLicenseKey`  | `string`                                                   | CopilotKit Intelligence public license key (`publicApiKey` is a deprecated alias)                                    |\n| `showDevConsole`    | `boolean`                                                  | Show the dev console. Omit it to get the default behavior (shown on `localhost` only)                                |\n| `renderToolCalls`   | `ReactToolCallRenderer[]`                                  | Custom renderers for tool call UI                                                                                    |\n| `frontendTools`     | `ReactFrontendTool[]`                                      | Frontend-defined tools (declarative alternative to `useFrontendTool`)                                                |\n| `onError`           | `(event) => void`                                          | Global error handler                                                                                                 |\n\n### Step 4: Add a chat UI component\n\nCopilotKit provides three pre-built chat layouts (all imported from `@copilotkit\u002Freact-core\u002Fv2`):\n\n| Component        | Usage                            |\n| ---------------- | -------------------------------- |\n| `CopilotChat`    | Inline chat, fills its container |\n| `CopilotSidebar` | Collapsible sidebar panel        |\n| `CopilotPopup`   | Floating popup widget            |\n\nExample with sidebar:\n\n```tsx\nimport { CopilotKit, CopilotSidebar } from \"@copilotkit\u002Freact-core\u002Fv2\";\n\n\u003CCopilotKit runtimeUrl=\"\u002Fapi\u002Fcopilotkit\" useSingleEndpoint={false}>\n  \u003CYourApp \u002F>\n  \u003CCopilotSidebar\n    defaultOpen\n    width=\"420px\"\n    labels={{\n      modalHeaderTitle: \"AI Assistant\",\n      chatInputPlaceholder: \"Ask me anything...\",\n    }}\n  \u002F>\n\u003C\u002FCopilotKit>;\n```\n\n### Step 5: Set environment variables\n\nProvider API keys are secrets. Store them in environment variables -- never hardcode them in source or commit them to version control. Create a `.env.local` (Next.js) or `.env` file:\n\n```\nOPENAI_API_KEY=\u003Cyour-openai-api-key>\n```\n\nMake sure your `.gitignore` excludes env files (`.env`, `.env.local`, `.env*.local`) so keys are never committed. In production, supply keys through your platform's secret manager (Vercel\u002FNetlify environment variables, AWS Secrets Manager, etc.) rather than a checked-in file.\n\nThe `BuiltInAgent` automatically resolves API keys from these environment variables based on the model prefix:\n\n- `openai\u002F*` models read `OPENAI_API_KEY`\n- `anthropic\u002F*` models read `ANTHROPIC_API_KEY`\n- `google\u002F*` models read `GOOGLE_API_KEY`\n\nIf you need to pass `apiKey` explicitly, always source it from the environment (`apiKey: process.env.OPENAI_API_KEY`) -- never inline a literal key.\n\n### Step 6: Connect to CopilotKit Intelligence (telemetry)\n\nCopilotKit uses telemetry to understand adoption, improve the product, and provide better support. Connecting to CopilotKit Intelligence gives you access to analytics and optional premium features.\n\n1. Ask the user if they'd like to connect to CopilotKit Intelligence (default: yes).\n2. If yes, run the CopilotKit CLI authentication flow (verify the exact command with `npx copilotkit --help` as it may vary by version):\n   ```bash\n   npx copilotkit auth\n   ```\n3. Guide the user through the browser-based authentication that opens.\n4. Once authentication completes, the CLI outputs a license key (a public, client-side project identifier -- not a secret).\n5. Store the license key in an environment variable and reference it from the `CopilotKit` provider -- this keeps it out of source and easy to rotate per environment:\n   ```\n   # .env.local (Next.js)\n   NEXT_PUBLIC_COPILOTKIT_LICENSE_KEY=\u003Cyour-license-key>\n   ```\n   ```tsx\n   \u003CCopilotKit\n     runtimeUrl=\"\u002Fapi\u002Fcopilotkit\"\n     publicLicenseKey={process.env.NEXT_PUBLIC_COPILOTKIT_LICENSE_KEY}\n   >\n   ```\n   The `NEXT_PUBLIC_`\u002F`VITE_` prefix is required because the key is read on the client.\n\nSee `references\u002Ftelemetry-setup.md` for full details on what the license key enables and how to opt out.\n\n### Step 7: Verify the setup\n\n1. Start the dev server\n2. Open the app in a browser\n3. The chat UI should render and connect to the runtime\n4. Send a test message -- you should receive an AI response\n5. Check the runtime's info endpoint to confirm it reports available agents. For multi-route handlers this is `GET \u002Fapi\u002Fcopilotkit\u002Finfo`; for single-route handlers (`mode: \"single-route\"`, e.g. the Express example) it is a `POST` to the base path with body `{ \"method\": \"info\" }` (a plain `GET` will not return agent info — the Hono single-route handler answers `405`, and the Express single-route router has no `GET` route so it falls through to a `404`)\n\n## Security notes\n\nKeep these in mind as you wire up a real deployment:\n\n- **Secrets stay server-side and in env vars.** Provider API keys (`OPENAI_API_KEY`, etc.) are read by the runtime\u002Fagent on the server. Never expose them to the browser, hardcode them, or commit them -- store them in environment variables or a secret manager (see Step 5). The CopilotKit license key is the one client-side value, and it is a public project identifier, not a secret.\n- **Treat all chat input as untrusted.** Chat messages flow from the frontend through the `CopilotRuntime` endpoint into the agent's LLM context. They are user-controlled and can attempt prompt injection -- including indirect injection via content the agent fetches (web pages, documents, tool results). Do not assume the model will only do what your system prompt intends.\n- **Give server-side tools least privilege.** A `defineTool`'s `execute` function runs with your server's authority. Validate every argument (the `zod` `parameters` schema is your first gate), scope each tool to the narrowest action it needs, and enforce your own authorization inside the `execute` function for anything sensitive (database writes, payments, file access) rather than trusting that the model called it correctly.\n- **Authenticate the runtime endpoint.** The runtime route is a public HTTP endpoint by default. Put your app's auth in front of it so only authorized users can drive the agent and consume provider credits.\n\n## Quick Reference\n\n### Package map\n\n| Package                  | Purpose                                                                                                         |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------- |\n| `@copilotkit\u002Freact-core` | React components, hooks, provider (import from `@copilotkit\u002Freact-core\u002Fv2`)                                     |\n| `@copilotkit\u002Fruntime`    | Runtime, endpoint factories, agent runners, `BuiltInAgent`, `defineTool` (import from `@copilotkit\u002Fruntime\u002Fv2`) |\n| `@copilotkit\u002Fshared`     | Shared utilities, logger, types                                                                                 |\n\n### Endpoint factory functions\n\n| Function                      | Import                           | Framework                           | Mode                                                |\n| ----------------------------- | -------------------------------- | ----------------------------------- | --------------------------------------------------- |\n| `createCopilotHonoHandler`    | `@copilotkit\u002Fruntime\u002Fv2`         | Next.js App Router, Hono standalone | `\"multi-route\"` (default) or `mode: \"single-route\"` |\n| `createCopilotExpressHandler` | `@copilotkit\u002Fruntime\u002Fv2\u002Fexpress` | Express standalone                  | `\"multi-route\"` (default) or `mode: \"single-route\"` |\n\n> The `createCopilotEndpoint`, `createCopilotEndpointSingleRoute`, `createCopilotEndpointExpress`, and `createCopilotEndpointSingleRouteExpress` names are deprecated aliases of the two factories above. Prefer the handler factories with the `mode` option.\n\n### Runtime classes\n\n| Class                        | Use case                                                  |\n| ---------------------------- | --------------------------------------------------------- |\n| `CopilotRuntime`             | Compatibility shim; auto-selects SSE or Intelligence mode |\n| `CopilotSseRuntime`          | Explicit SSE mode (default, in-memory threads)            |\n| `CopilotIntelligenceRuntime` | Intelligence mode (durable threads, realtime events)      |\n\n### Agent runners\n\n| Runner                    | Description                                                                                                       |\n| ------------------------- | ----------------------------------------------------------------------------------------------------------------- |\n| `InMemoryAgentRunner`     | Default. Stores thread state in process memory. Suitable for development and single-instance deployments.         |\n| `IntelligenceAgentRunner` | Used automatically with `CopilotIntelligenceRuntime`. Connects to CopilotKit Intelligence Platform via WebSocket. |\n\n### Supported models (BuiltInAgent)\n\nFormat: `\"provider\u002Fmodel-name\"` string or a Vercel AI SDK `LanguageModel` instance.\n\n**OpenAI:** `openai\u002Fgpt-5`, `openai\u002Fgpt-5-mini`, `openai\u002Fgpt-4.1`, `openai\u002Fgpt-4.1-mini`, `openai\u002Fgpt-4.1-nano`, `openai\u002Fgpt-4o`, `openai\u002Fgpt-4o-mini`, `openai\u002Fo3`, `openai\u002Fo3-mini`, `openai\u002Fo4-mini`\n\n**Anthropic:** `anthropic\u002Fclaude-sonnet-4.5`, `anthropic\u002Fclaude-sonnet-4`, `anthropic\u002Fclaude-3.7-sonnet`, `anthropic\u002Fclaude-opus-4.1`, `anthropic\u002Fclaude-opus-4`, `anthropic\u002Fclaude-3.5-haiku`\n\n**Google:** `google\u002Fgemini-2.5-pro`, `google\u002Fgemini-2.5-flash`, `google\u002Fgemini-2.5-flash-lite`\n\nAny `string` is accepted (for custom\u002Funlisted models); the provider is parsed from the prefix before `\u002F`.\n",{"data":52,"body":54},{"name":4,"description":6,"version":53},"1.1.2",{"type":55,"children":56},"root",[57,65,72,79,110,153,159,164,239,245,258,266,381,387,393,406,414,458,466,489,497,523,536,605,641,647,660,665,719,726,738,1415,1421,1432,1942,1955,1961,1972,2669,2696,2702,3119,3130,3158,3164,3183,3248,3258,3289,3294,3307,3640,3646,3651,3732,3764,3770,4067,4073,4085,4157,4162,4437,4443,4464,4474,4507,4520,4569,4590,4596,4601,4783,4796,4802,4891,4897,4902,4998,5004,5010,5107,5113,5222,5266,5272,5344,5350,5412,5418,5439,5516,5566,5595,5613],{"type":58,"tag":59,"props":60,"children":61},"element","h1",{"id":4},[62],{"type":63,"value":64},"text","CopilotKit Setup",{"type":58,"tag":66,"props":67,"children":69},"h2",{"id":68},"prerequisites",[70],{"type":63,"value":71},"Prerequisites",{"type":58,"tag":73,"props":74,"children":76},"h3",{"id":75},"live-documentation-mcp",[77],{"type":63,"value":78},"Live Documentation (MCP)",{"type":58,"tag":80,"props":81,"children":82},"p",{},[83,85,92,94,100,102,108],{"type":63,"value":84},"This plugin includes an MCP server (",{"type":58,"tag":86,"props":87,"children":89},"code",{"className":88},[],[90],{"type":63,"value":91},"copilotkit-docs",{"type":63,"value":93},") that provides ",{"type":58,"tag":86,"props":95,"children":97},{"className":96},[],[98],{"type":63,"value":99},"search-docs",{"type":63,"value":101}," and ",{"type":58,"tag":86,"props":103,"children":105},{"className":104},[],[106],{"type":63,"value":107},"search-code",{"type":63,"value":109}," tools for querying live CopilotKit documentation and source code.",{"type":58,"tag":111,"props":112,"children":113},"ul",{},[114,134],{"type":58,"tag":115,"props":116,"children":117},"li",{},[118,124,126,132],{"type":58,"tag":119,"props":120,"children":121},"strong",{},[122],{"type":63,"value":123},"Claude Code:",{"type":63,"value":125}," Auto-configured by the plugin's ",{"type":58,"tag":86,"props":127,"children":129},{"className":128},[],[130],{"type":63,"value":131},".mcp.json",{"type":63,"value":133}," -- no setup needed.",{"type":58,"tag":115,"props":135,"children":136},{},[137,142,144,151],{"type":58,"tag":119,"props":138,"children":139},{},[140],{"type":63,"value":141},"Codex:",{"type":63,"value":143}," Requires manual configuration. See the ",{"type":58,"tag":145,"props":146,"children":148},"a",{"href":147},"..\u002Fcopilotkit-debug\u002FSKILL.md#mcp-setup",[149],{"type":63,"value":150},"copilotkit-debug skill",{"type":63,"value":152}," for setup instructions.",{"type":58,"tag":73,"props":154,"children":156},{"id":155},"environment",[157],{"type":63,"value":158},"Environment",{"type":58,"tag":80,"props":160,"children":161},{},[162],{"type":63,"value":163},"Before starting setup, verify:",{"type":58,"tag":165,"props":166,"children":167},"ol",{},[168,186,219,229],{"type":58,"tag":115,"props":169,"children":170},{},[171,176,178,184],{"type":58,"tag":119,"props":172,"children":173},{},[174],{"type":63,"value":175},"Node.js >= 18",{"type":63,"value":177}," (required for ",{"type":58,"tag":86,"props":179,"children":181},{"className":180},[],[182],{"type":63,"value":183},"fetch",{"type":63,"value":185}," globals used by the runtime)",{"type":58,"tag":115,"props":187,"children":188},{},[189,194,196,202,204,210,211,217],{"type":58,"tag":119,"props":190,"children":191},{},[192],{"type":63,"value":193},"An AI provider API key",{"type":63,"value":195}," (one of: ",{"type":58,"tag":86,"props":197,"children":199},{"className":198},[],[200],{"type":63,"value":201},"OPENAI_API_KEY",{"type":63,"value":203},", ",{"type":58,"tag":86,"props":205,"children":207},{"className":206},[],[208],{"type":63,"value":209},"ANTHROPIC_API_KEY",{"type":63,"value":203},{"type":58,"tag":86,"props":212,"children":214},{"className":213},[],[215],{"type":63,"value":216},"GOOGLE_API_KEY",{"type":63,"value":218},")",{"type":58,"tag":115,"props":220,"children":221},{},[222,227],{"type":58,"tag":119,"props":223,"children":224},{},[225],{"type":63,"value":226},"A React-based frontend",{"type":63,"value":228}," (Next.js App Router, Next.js Pages Router, Vite + React, or Angular)",{"type":58,"tag":115,"props":230,"children":231},{},[232,237],{"type":58,"tag":119,"props":233,"children":234},{},[235],{"type":63,"value":236},"A backend capable of running the runtime",{"type":63,"value":238}," (same Next.js app via API routes, or a standalone Express\u002FHono server)",{"type":58,"tag":66,"props":240,"children":242},{"id":241},"framework-detection",[243],{"type":63,"value":244},"Framework Detection",{"type":58,"tag":80,"props":246,"children":247},{},[248,250,256],{"type":63,"value":249},"Before generating any code, detect the project's framework by checking files in the project root. See ",{"type":58,"tag":86,"props":251,"children":253},{"className":252},[],[254],{"type":63,"value":255},"references\u002Fframework-detection.md",{"type":63,"value":257}," for the full decision tree.",{"type":58,"tag":80,"props":259,"children":260},{},[261],{"type":58,"tag":119,"props":262,"children":263},{},[264],{"type":63,"value":265},"Quick summary:",{"type":58,"tag":267,"props":268,"children":269},"table",{},[270,289],{"type":58,"tag":271,"props":272,"children":273},"thead",{},[274],{"type":58,"tag":275,"props":276,"children":277},"tr",{},[278,284],{"type":58,"tag":279,"props":280,"children":281},"th",{},[282],{"type":63,"value":283},"Signal File",{"type":58,"tag":279,"props":285,"children":286},{},[287],{"type":63,"value":288},"Framework",{"type":58,"tag":290,"props":291,"children":292},"tbody",{},[293,321,345,362],{"type":58,"tag":275,"props":294,"children":295},{},[296,316],{"type":58,"tag":297,"props":298,"children":299},"td",{},[300,306,308,314],{"type":58,"tag":86,"props":301,"children":303},{"className":302},[],[304],{"type":63,"value":305},"next.config.{js,ts,mjs}",{"type":63,"value":307}," + ",{"type":58,"tag":86,"props":309,"children":311},{"className":310},[],[312],{"type":63,"value":313},"app\u002F",{"type":63,"value":315}," directory",{"type":58,"tag":297,"props":317,"children":318},{},[319],{"type":63,"value":320},"Next.js App Router",{"type":58,"tag":275,"props":322,"children":323},{},[324,340],{"type":58,"tag":297,"props":325,"children":326},{},[327,332,333,339],{"type":58,"tag":86,"props":328,"children":330},{"className":329},[],[331],{"type":63,"value":305},{"type":63,"value":307},{"type":58,"tag":86,"props":334,"children":336},{"className":335},[],[337],{"type":63,"value":338},"pages\u002F",{"type":63,"value":315},{"type":58,"tag":297,"props":341,"children":342},{},[343],{"type":63,"value":344},"Next.js Pages Router",{"type":58,"tag":275,"props":346,"children":347},{},[348,357],{"type":58,"tag":297,"props":349,"children":350},{},[351],{"type":58,"tag":86,"props":352,"children":354},{"className":353},[],[355],{"type":63,"value":356},"angular.json",{"type":58,"tag":297,"props":358,"children":359},{},[360],{"type":63,"value":361},"Angular",{"type":58,"tag":275,"props":363,"children":364},{},[365,376],{"type":58,"tag":297,"props":366,"children":367},{},[368,374],{"type":58,"tag":86,"props":369,"children":371},{"className":370},[],[372],{"type":63,"value":373},"vite.config.{js,ts}",{"type":63,"value":375}," + React deps in package.json",{"type":58,"tag":297,"props":377,"children":378},{},[379],{"type":63,"value":380},"Vite + React",{"type":58,"tag":66,"props":382,"children":384},{"id":383},"setup-workflow",[385],{"type":63,"value":386},"Setup Workflow",{"type":58,"tag":73,"props":388,"children":390},{"id":389},"step-1-install-packages",[391],{"type":63,"value":392},"Step 1: Install packages",{"type":58,"tag":80,"props":394,"children":395},{},[396,398,404],{"type":63,"value":397},"All packages use the ",{"type":58,"tag":86,"props":399,"children":401},{"className":400},[],[402],{"type":63,"value":403},"@copilotkit",{"type":63,"value":405}," namespace. The v2 API lives as subpath exports on the published packages.",{"type":58,"tag":80,"props":407,"children":408},{},[409],{"type":58,"tag":119,"props":410,"children":411},{},[412],{"type":63,"value":413},"Frontend + backend in the same Next.js app:",{"type":58,"tag":415,"props":416,"children":421},"pre",{"className":417,"code":418,"language":419,"meta":420,"style":420},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @copilotkit\u002Freact-core @copilotkit\u002Fruntime hono\n","bash","",[422],{"type":58,"tag":86,"props":423,"children":424},{"__ignoreMap":420},[425],{"type":58,"tag":426,"props":427,"children":430},"span",{"class":428,"line":429},"line",1,[431,437,443,448,453],{"type":58,"tag":426,"props":432,"children":434},{"style":433},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[435],{"type":63,"value":436},"npm",{"type":58,"tag":426,"props":438,"children":440},{"style":439},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[441],{"type":63,"value":442}," install",{"type":58,"tag":426,"props":444,"children":445},{"style":439},[446],{"type":63,"value":447}," @copilotkit\u002Freact-core",{"type":58,"tag":426,"props":449,"children":450},{"style":439},[451],{"type":63,"value":452}," @copilotkit\u002Fruntime",{"type":58,"tag":426,"props":454,"children":455},{"style":439},[456],{"type":63,"value":457}," hono\n",{"type":58,"tag":80,"props":459,"children":460},{},[461],{"type":58,"tag":119,"props":462,"children":463},{},[464],{"type":63,"value":465},"Frontend only:",{"type":58,"tag":415,"props":467,"children":469},{"className":417,"code":468,"language":419,"meta":420,"style":420},"npm install @copilotkit\u002Freact-core\n",[470],{"type":58,"tag":86,"props":471,"children":472},{"__ignoreMap":420},[473],{"type":58,"tag":426,"props":474,"children":475},{"class":428,"line":429},[476,480,484],{"type":58,"tag":426,"props":477,"children":478},{"style":433},[479],{"type":63,"value":436},{"type":58,"tag":426,"props":481,"children":482},{"style":439},[483],{"type":63,"value":442},{"type":58,"tag":426,"props":485,"children":486},{"style":439},[487],{"type":63,"value":488}," @copilotkit\u002Freact-core\n",{"type":58,"tag":80,"props":490,"children":491},{},[492],{"type":58,"tag":119,"props":493,"children":494},{},[495],{"type":63,"value":496},"Backend runtime only:",{"type":58,"tag":415,"props":498,"children":500},{"className":417,"code":499,"language":419,"meta":420,"style":420},"npm install @copilotkit\u002Fruntime hono\n",[501],{"type":58,"tag":86,"props":502,"children":503},{"__ignoreMap":420},[504],{"type":58,"tag":426,"props":505,"children":506},{"class":428,"line":429},[507,511,515,519],{"type":58,"tag":426,"props":508,"children":509},{"style":433},[510],{"type":63,"value":436},{"type":58,"tag":426,"props":512,"children":513},{"style":439},[514],{"type":63,"value":442},{"type":58,"tag":426,"props":516,"children":517},{"style":439},[518],{"type":63,"value":452},{"type":58,"tag":426,"props":520,"children":521},{"style":439},[522],{"type":63,"value":457},{"type":58,"tag":80,"props":524,"children":525},{},[526,528,534],{"type":63,"value":527},"For standalone Express backends, install Express adapter dependencies instead of ",{"type":58,"tag":86,"props":529,"children":531},{"className":530},[],[532],{"type":63,"value":533},"hono",{"type":63,"value":535},":",{"type":58,"tag":415,"props":537,"children":539},{"className":417,"code":538,"language":419,"meta":420,"style":420},"npm install @copilotkit\u002Fruntime express dotenv zod\nnpm install -D @types\u002Fexpress tsx typescript\n",[540],{"type":58,"tag":86,"props":541,"children":542},{"__ignoreMap":420},[543,573],{"type":58,"tag":426,"props":544,"children":545},{"class":428,"line":429},[546,550,554,558,563,568],{"type":58,"tag":426,"props":547,"children":548},{"style":433},[549],{"type":63,"value":436},{"type":58,"tag":426,"props":551,"children":552},{"style":439},[553],{"type":63,"value":442},{"type":58,"tag":426,"props":555,"children":556},{"style":439},[557],{"type":63,"value":452},{"type":58,"tag":426,"props":559,"children":560},{"style":439},[561],{"type":63,"value":562}," express",{"type":58,"tag":426,"props":564,"children":565},{"style":439},[566],{"type":63,"value":567}," dotenv",{"type":58,"tag":426,"props":569,"children":570},{"style":439},[571],{"type":63,"value":572}," zod\n",{"type":58,"tag":426,"props":574,"children":576},{"class":428,"line":575},2,[577,581,585,590,595,600],{"type":58,"tag":426,"props":578,"children":579},{"style":433},[580],{"type":63,"value":436},{"type":58,"tag":426,"props":582,"children":583},{"style":439},[584],{"type":63,"value":442},{"type":58,"tag":426,"props":586,"children":587},{"style":439},[588],{"type":63,"value":589}," -D",{"type":58,"tag":426,"props":591,"children":592},{"style":439},[593],{"type":63,"value":594}," @types\u002Fexpress",{"type":58,"tag":426,"props":596,"children":597},{"style":439},[598],{"type":63,"value":599}," tsx",{"type":58,"tag":426,"props":601,"children":602},{"style":439},[603],{"type":63,"value":604}," typescript\n",{"type":58,"tag":80,"props":606,"children":607},{},[608,610,616,618,624,626,632,633,639],{"type":63,"value":609},"(",{"type":58,"tag":86,"props":611,"children":613},{"className":612},[],[614],{"type":63,"value":615},"createCopilotExpressHandler",{"type":63,"value":617}," enables CORS internally, so you do not need to\ninstall ",{"type":58,"tag":86,"props":619,"children":621},{"className":620},[],[622],{"type":63,"value":623},"cors",{"type":63,"value":625}," yourself. ",{"type":58,"tag":86,"props":627,"children":629},{"className":628},[],[630],{"type":63,"value":631},"dotenv",{"type":63,"value":101},{"type":58,"tag":86,"props":634,"children":636},{"className":635},[],[637],{"type":63,"value":638},"zod",{"type":63,"value":640}," are used by the example asset.)",{"type":58,"tag":73,"props":642,"children":644},{"id":643},"step-2-configure-the-runtime",[645],{"type":63,"value":646},"Step 2: Configure the runtime",{"type":58,"tag":80,"props":648,"children":649},{},[650,652,658],{"type":63,"value":651},"The runtime is the server-side component that manages agent execution. See ",{"type":58,"tag":86,"props":653,"children":655},{"className":654},[],[656],{"type":63,"value":657},"references\u002Fruntime-architecture.md",{"type":63,"value":659}," for details.",{"type":58,"tag":80,"props":661,"children":662},{},[663],{"type":63,"value":664},"There are two endpoint styles:",{"type":58,"tag":165,"props":666,"children":667},{},[668,694],{"type":58,"tag":115,"props":669,"children":670},{},[671,676,678,684,686,692],{"type":58,"tag":119,"props":672,"children":673},{},[674],{"type":63,"value":675},"Multi-route (Hono)",{"type":63,"value":677}," -- uses ",{"type":58,"tag":86,"props":679,"children":681},{"className":680},[],[682],{"type":63,"value":683},"createCopilotHonoHandler",{"type":63,"value":685},". Requires a catch-all route (",{"type":58,"tag":86,"props":687,"children":689},{"className":688},[],[690],{"type":63,"value":691},"[[...slug]]",{"type":63,"value":693}," in Next.js). Each operation (run, connect, stop, info, transcribe, threads) gets its own HTTP path.",{"type":58,"tag":115,"props":695,"children":696},{},[697,702,703,709,711,717],{"type":58,"tag":119,"props":698,"children":699},{},[700],{"type":63,"value":701},"Single-route (Hono or Express)",{"type":63,"value":677},{"type":58,"tag":86,"props":704,"children":706},{"className":705},[],[707],{"type":63,"value":708},"createCopilotHonoHandler({ ..., mode: \"single-route\" })",{"type":63,"value":710}," or ",{"type":58,"tag":86,"props":712,"children":714},{"className":713},[],[715],{"type":63,"value":716},"createCopilotExpressHandler({ ..., mode: \"single-route\" })",{"type":63,"value":718},". All operations go through a single POST endpoint with method multiplexing.",{"type":58,"tag":720,"props":721,"children":723},"h4",{"id":722},"nextjs-app-router-recommended-multi-route-with-hono",[724],{"type":63,"value":725},"Next.js App Router (recommended: multi-route with Hono)",{"type":58,"tag":80,"props":727,"children":728},{},[729,731,737],{"type":63,"value":730},"Create ",{"type":58,"tag":86,"props":732,"children":734},{"className":733},[],[735],{"type":63,"value":736},"src\u002Fapp\u002Fapi\u002Fcopilotkit\u002F[[...slug]]\u002Froute.ts",{"type":63,"value":535},{"type":58,"tag":415,"props":739,"children":742},{"className":740,"code":741,"language":45,"meta":420,"style":420},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import {\n  CopilotRuntime,\n  createCopilotHonoHandler,\n  InMemoryAgentRunner,\n  BuiltInAgent,\n} from \"@copilotkit\u002Fruntime\u002Fv2\";\nimport { handle } from \"hono\u002Fvercel\";\n\nconst agent = new BuiltInAgent({\n  model: \"openai\u002Fgpt-4o\",\n  prompt: \"You are a helpful AI assistant.\",\n});\n\nconst runtime = new CopilotRuntime({\n  agents: {\n    default: agent,\n  },\n  runner: new InMemoryAgentRunner(),\n});\n\nconst app = createCopilotHonoHandler({\n  runtime,\n  basePath: \"\u002Fapi\u002Fcopilotkit\",\n});\n\nexport const GET = handle(app);\nexport const POST = handle(app);\n\u002F\u002F PATCH\u002FDELETE are used by thread operations (useThreads); export them too\n\u002F\u002F so the multi-route handler can serve them when you enable Intelligence\u002Fthreads.\nexport const PATCH = handle(app);\nexport const DELETE = handle(app);\n",[743],{"type":58,"tag":86,"props":744,"children":745},{"__ignoreMap":420},[746,761,775,788,801,814,848,892,902,942,973,1003,1019,1027,1061,1078,1100,1109,1140,1156,1164,1194,1207,1237,1253,1261,1297,1330,1340,1349,1382],{"type":58,"tag":426,"props":747,"children":748},{"class":428,"line":429},[749,755],{"type":58,"tag":426,"props":750,"children":752},{"style":751},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[753],{"type":63,"value":754},"import",{"type":58,"tag":426,"props":756,"children":758},{"style":757},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[759],{"type":63,"value":760}," {\n",{"type":58,"tag":426,"props":762,"children":763},{"class":428,"line":575},[764,770],{"type":58,"tag":426,"props":765,"children":767},{"style":766},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[768],{"type":63,"value":769},"  CopilotRuntime",{"type":58,"tag":426,"props":771,"children":772},{"style":757},[773],{"type":63,"value":774},",\n",{"type":58,"tag":426,"props":776,"children":778},{"class":428,"line":777},3,[779,784],{"type":58,"tag":426,"props":780,"children":781},{"style":766},[782],{"type":63,"value":783},"  createCopilotHonoHandler",{"type":58,"tag":426,"props":785,"children":786},{"style":757},[787],{"type":63,"value":774},{"type":58,"tag":426,"props":789,"children":791},{"class":428,"line":790},4,[792,797],{"type":58,"tag":426,"props":793,"children":794},{"style":766},[795],{"type":63,"value":796},"  InMemoryAgentRunner",{"type":58,"tag":426,"props":798,"children":799},{"style":757},[800],{"type":63,"value":774},{"type":58,"tag":426,"props":802,"children":804},{"class":428,"line":803},5,[805,810],{"type":58,"tag":426,"props":806,"children":807},{"style":766},[808],{"type":63,"value":809},"  BuiltInAgent",{"type":58,"tag":426,"props":811,"children":812},{"style":757},[813],{"type":63,"value":774},{"type":58,"tag":426,"props":815,"children":817},{"class":428,"line":816},6,[818,823,828,833,838,843],{"type":58,"tag":426,"props":819,"children":820},{"style":757},[821],{"type":63,"value":822},"}",{"type":58,"tag":426,"props":824,"children":825},{"style":751},[826],{"type":63,"value":827}," from",{"type":58,"tag":426,"props":829,"children":830},{"style":757},[831],{"type":63,"value":832}," \"",{"type":58,"tag":426,"props":834,"children":835},{"style":439},[836],{"type":63,"value":837},"@copilotkit\u002Fruntime\u002Fv2",{"type":58,"tag":426,"props":839,"children":840},{"style":757},[841],{"type":63,"value":842},"\"",{"type":58,"tag":426,"props":844,"children":845},{"style":757},[846],{"type":63,"value":847},";\n",{"type":58,"tag":426,"props":849,"children":851},{"class":428,"line":850},7,[852,856,861,866,871,875,879,884,888],{"type":58,"tag":426,"props":853,"children":854},{"style":751},[855],{"type":63,"value":754},{"type":58,"tag":426,"props":857,"children":858},{"style":757},[859],{"type":63,"value":860}," {",{"type":58,"tag":426,"props":862,"children":863},{"style":766},[864],{"type":63,"value":865}," handle",{"type":58,"tag":426,"props":867,"children":868},{"style":757},[869],{"type":63,"value":870}," }",{"type":58,"tag":426,"props":872,"children":873},{"style":751},[874],{"type":63,"value":827},{"type":58,"tag":426,"props":876,"children":877},{"style":757},[878],{"type":63,"value":832},{"type":58,"tag":426,"props":880,"children":881},{"style":439},[882],{"type":63,"value":883},"hono\u002Fvercel",{"type":58,"tag":426,"props":885,"children":886},{"style":757},[887],{"type":63,"value":842},{"type":58,"tag":426,"props":889,"children":890},{"style":757},[891],{"type":63,"value":847},{"type":58,"tag":426,"props":893,"children":895},{"class":428,"line":894},8,[896],{"type":58,"tag":426,"props":897,"children":899},{"emptyLinePlaceholder":898},true,[900],{"type":63,"value":901},"\n",{"type":58,"tag":426,"props":903,"children":905},{"class":428,"line":904},9,[906,912,917,922,927,933,937],{"type":58,"tag":426,"props":907,"children":909},{"style":908},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[910],{"type":63,"value":911},"const",{"type":58,"tag":426,"props":913,"children":914},{"style":766},[915],{"type":63,"value":916}," agent ",{"type":58,"tag":426,"props":918,"children":919},{"style":757},[920],{"type":63,"value":921},"=",{"type":58,"tag":426,"props":923,"children":924},{"style":757},[925],{"type":63,"value":926}," new",{"type":58,"tag":426,"props":928,"children":930},{"style":929},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[931],{"type":63,"value":932}," BuiltInAgent",{"type":58,"tag":426,"props":934,"children":935},{"style":766},[936],{"type":63,"value":609},{"type":58,"tag":426,"props":938,"children":939},{"style":757},[940],{"type":63,"value":941},"{\n",{"type":58,"tag":426,"props":943,"children":945},{"class":428,"line":944},10,[946,952,956,960,965,969],{"type":58,"tag":426,"props":947,"children":949},{"style":948},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[950],{"type":63,"value":951},"  model",{"type":58,"tag":426,"props":953,"children":954},{"style":757},[955],{"type":63,"value":535},{"type":58,"tag":426,"props":957,"children":958},{"style":757},[959],{"type":63,"value":832},{"type":58,"tag":426,"props":961,"children":962},{"style":439},[963],{"type":63,"value":964},"openai\u002Fgpt-4o",{"type":58,"tag":426,"props":966,"children":967},{"style":757},[968],{"type":63,"value":842},{"type":58,"tag":426,"props":970,"children":971},{"style":757},[972],{"type":63,"value":774},{"type":58,"tag":426,"props":974,"children":976},{"class":428,"line":975},11,[977,982,986,990,995,999],{"type":58,"tag":426,"props":978,"children":979},{"style":948},[980],{"type":63,"value":981},"  prompt",{"type":58,"tag":426,"props":983,"children":984},{"style":757},[985],{"type":63,"value":535},{"type":58,"tag":426,"props":987,"children":988},{"style":757},[989],{"type":63,"value":832},{"type":58,"tag":426,"props":991,"children":992},{"style":439},[993],{"type":63,"value":994},"You are a helpful AI assistant.",{"type":58,"tag":426,"props":996,"children":997},{"style":757},[998],{"type":63,"value":842},{"type":58,"tag":426,"props":1000,"children":1001},{"style":757},[1002],{"type":63,"value":774},{"type":58,"tag":426,"props":1004,"children":1006},{"class":428,"line":1005},12,[1007,1011,1015],{"type":58,"tag":426,"props":1008,"children":1009},{"style":757},[1010],{"type":63,"value":822},{"type":58,"tag":426,"props":1012,"children":1013},{"style":766},[1014],{"type":63,"value":218},{"type":58,"tag":426,"props":1016,"children":1017},{"style":757},[1018],{"type":63,"value":847},{"type":58,"tag":426,"props":1020,"children":1022},{"class":428,"line":1021},13,[1023],{"type":58,"tag":426,"props":1024,"children":1025},{"emptyLinePlaceholder":898},[1026],{"type":63,"value":901},{"type":58,"tag":426,"props":1028,"children":1030},{"class":428,"line":1029},14,[1031,1035,1040,1044,1048,1053,1057],{"type":58,"tag":426,"props":1032,"children":1033},{"style":908},[1034],{"type":63,"value":911},{"type":58,"tag":426,"props":1036,"children":1037},{"style":766},[1038],{"type":63,"value":1039}," runtime ",{"type":58,"tag":426,"props":1041,"children":1042},{"style":757},[1043],{"type":63,"value":921},{"type":58,"tag":426,"props":1045,"children":1046},{"style":757},[1047],{"type":63,"value":926},{"type":58,"tag":426,"props":1049,"children":1050},{"style":929},[1051],{"type":63,"value":1052}," CopilotRuntime",{"type":58,"tag":426,"props":1054,"children":1055},{"style":766},[1056],{"type":63,"value":609},{"type":58,"tag":426,"props":1058,"children":1059},{"style":757},[1060],{"type":63,"value":941},{"type":58,"tag":426,"props":1062,"children":1064},{"class":428,"line":1063},15,[1065,1070,1074],{"type":58,"tag":426,"props":1066,"children":1067},{"style":948},[1068],{"type":63,"value":1069},"  agents",{"type":58,"tag":426,"props":1071,"children":1072},{"style":757},[1073],{"type":63,"value":535},{"type":58,"tag":426,"props":1075,"children":1076},{"style":757},[1077],{"type":63,"value":760},{"type":58,"tag":426,"props":1079,"children":1081},{"class":428,"line":1080},16,[1082,1087,1091,1096],{"type":58,"tag":426,"props":1083,"children":1084},{"style":948},[1085],{"type":63,"value":1086},"    default",{"type":58,"tag":426,"props":1088,"children":1089},{"style":757},[1090],{"type":63,"value":535},{"type":58,"tag":426,"props":1092,"children":1093},{"style":766},[1094],{"type":63,"value":1095}," agent",{"type":58,"tag":426,"props":1097,"children":1098},{"style":757},[1099],{"type":63,"value":774},{"type":58,"tag":426,"props":1101,"children":1103},{"class":428,"line":1102},17,[1104],{"type":58,"tag":426,"props":1105,"children":1106},{"style":757},[1107],{"type":63,"value":1108},"  },\n",{"type":58,"tag":426,"props":1110,"children":1112},{"class":428,"line":1111},18,[1113,1118,1122,1126,1131,1136],{"type":58,"tag":426,"props":1114,"children":1115},{"style":948},[1116],{"type":63,"value":1117},"  runner",{"type":58,"tag":426,"props":1119,"children":1120},{"style":757},[1121],{"type":63,"value":535},{"type":58,"tag":426,"props":1123,"children":1124},{"style":757},[1125],{"type":63,"value":926},{"type":58,"tag":426,"props":1127,"children":1128},{"style":929},[1129],{"type":63,"value":1130}," InMemoryAgentRunner",{"type":58,"tag":426,"props":1132,"children":1133},{"style":766},[1134],{"type":63,"value":1135},"()",{"type":58,"tag":426,"props":1137,"children":1138},{"style":757},[1139],{"type":63,"value":774},{"type":58,"tag":426,"props":1141,"children":1143},{"class":428,"line":1142},19,[1144,1148,1152],{"type":58,"tag":426,"props":1145,"children":1146},{"style":757},[1147],{"type":63,"value":822},{"type":58,"tag":426,"props":1149,"children":1150},{"style":766},[1151],{"type":63,"value":218},{"type":58,"tag":426,"props":1153,"children":1154},{"style":757},[1155],{"type":63,"value":847},{"type":58,"tag":426,"props":1157,"children":1159},{"class":428,"line":1158},20,[1160],{"type":58,"tag":426,"props":1161,"children":1162},{"emptyLinePlaceholder":898},[1163],{"type":63,"value":901},{"type":58,"tag":426,"props":1165,"children":1167},{"class":428,"line":1166},21,[1168,1172,1177,1181,1186,1190],{"type":58,"tag":426,"props":1169,"children":1170},{"style":908},[1171],{"type":63,"value":911},{"type":58,"tag":426,"props":1173,"children":1174},{"style":766},[1175],{"type":63,"value":1176}," app ",{"type":58,"tag":426,"props":1178,"children":1179},{"style":757},[1180],{"type":63,"value":921},{"type":58,"tag":426,"props":1182,"children":1183},{"style":929},[1184],{"type":63,"value":1185}," createCopilotHonoHandler",{"type":58,"tag":426,"props":1187,"children":1188},{"style":766},[1189],{"type":63,"value":609},{"type":58,"tag":426,"props":1191,"children":1192},{"style":757},[1193],{"type":63,"value":941},{"type":58,"tag":426,"props":1195,"children":1197},{"class":428,"line":1196},22,[1198,1203],{"type":58,"tag":426,"props":1199,"children":1200},{"style":766},[1201],{"type":63,"value":1202},"  runtime",{"type":58,"tag":426,"props":1204,"children":1205},{"style":757},[1206],{"type":63,"value":774},{"type":58,"tag":426,"props":1208,"children":1210},{"class":428,"line":1209},23,[1211,1216,1220,1224,1229,1233],{"type":58,"tag":426,"props":1212,"children":1213},{"style":948},[1214],{"type":63,"value":1215},"  basePath",{"type":58,"tag":426,"props":1217,"children":1218},{"style":757},[1219],{"type":63,"value":535},{"type":58,"tag":426,"props":1221,"children":1222},{"style":757},[1223],{"type":63,"value":832},{"type":58,"tag":426,"props":1225,"children":1226},{"style":439},[1227],{"type":63,"value":1228},"\u002Fapi\u002Fcopilotkit",{"type":58,"tag":426,"props":1230,"children":1231},{"style":757},[1232],{"type":63,"value":842},{"type":58,"tag":426,"props":1234,"children":1235},{"style":757},[1236],{"type":63,"value":774},{"type":58,"tag":426,"props":1238,"children":1240},{"class":428,"line":1239},24,[1241,1245,1249],{"type":58,"tag":426,"props":1242,"children":1243},{"style":757},[1244],{"type":63,"value":822},{"type":58,"tag":426,"props":1246,"children":1247},{"style":766},[1248],{"type":63,"value":218},{"type":58,"tag":426,"props":1250,"children":1251},{"style":757},[1252],{"type":63,"value":847},{"type":58,"tag":426,"props":1254,"children":1256},{"class":428,"line":1255},25,[1257],{"type":58,"tag":426,"props":1258,"children":1259},{"emptyLinePlaceholder":898},[1260],{"type":63,"value":901},{"type":58,"tag":426,"props":1262,"children":1264},{"class":428,"line":1263},26,[1265,1270,1275,1280,1284,1288,1293],{"type":58,"tag":426,"props":1266,"children":1267},{"style":751},[1268],{"type":63,"value":1269},"export",{"type":58,"tag":426,"props":1271,"children":1272},{"style":908},[1273],{"type":63,"value":1274}," const",{"type":58,"tag":426,"props":1276,"children":1277},{"style":766},[1278],{"type":63,"value":1279}," GET ",{"type":58,"tag":426,"props":1281,"children":1282},{"style":757},[1283],{"type":63,"value":921},{"type":58,"tag":426,"props":1285,"children":1286},{"style":929},[1287],{"type":63,"value":865},{"type":58,"tag":426,"props":1289,"children":1290},{"style":766},[1291],{"type":63,"value":1292},"(app)",{"type":58,"tag":426,"props":1294,"children":1295},{"style":757},[1296],{"type":63,"value":847},{"type":58,"tag":426,"props":1298,"children":1300},{"class":428,"line":1299},27,[1301,1305,1309,1314,1318,1322,1326],{"type":58,"tag":426,"props":1302,"children":1303},{"style":751},[1304],{"type":63,"value":1269},{"type":58,"tag":426,"props":1306,"children":1307},{"style":908},[1308],{"type":63,"value":1274},{"type":58,"tag":426,"props":1310,"children":1311},{"style":766},[1312],{"type":63,"value":1313}," POST ",{"type":58,"tag":426,"props":1315,"children":1316},{"style":757},[1317],{"type":63,"value":921},{"type":58,"tag":426,"props":1319,"children":1320},{"style":929},[1321],{"type":63,"value":865},{"type":58,"tag":426,"props":1323,"children":1324},{"style":766},[1325],{"type":63,"value":1292},{"type":58,"tag":426,"props":1327,"children":1328},{"style":757},[1329],{"type":63,"value":847},{"type":58,"tag":426,"props":1331,"children":1333},{"class":428,"line":1332},28,[1334],{"type":58,"tag":426,"props":1335,"children":1337},{"style":1336},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1338],{"type":63,"value":1339},"\u002F\u002F PATCH\u002FDELETE are used by thread operations (useThreads); export them too\n",{"type":58,"tag":426,"props":1341,"children":1343},{"class":428,"line":1342},29,[1344],{"type":58,"tag":426,"props":1345,"children":1346},{"style":1336},[1347],{"type":63,"value":1348},"\u002F\u002F so the multi-route handler can serve them when you enable Intelligence\u002Fthreads.\n",{"type":58,"tag":426,"props":1350,"children":1352},{"class":428,"line":1351},30,[1353,1357,1361,1366,1370,1374,1378],{"type":58,"tag":426,"props":1354,"children":1355},{"style":751},[1356],{"type":63,"value":1269},{"type":58,"tag":426,"props":1358,"children":1359},{"style":908},[1360],{"type":63,"value":1274},{"type":58,"tag":426,"props":1362,"children":1363},{"style":766},[1364],{"type":63,"value":1365}," PATCH ",{"type":58,"tag":426,"props":1367,"children":1368},{"style":757},[1369],{"type":63,"value":921},{"type":58,"tag":426,"props":1371,"children":1372},{"style":929},[1373],{"type":63,"value":865},{"type":58,"tag":426,"props":1375,"children":1376},{"style":766},[1377],{"type":63,"value":1292},{"type":58,"tag":426,"props":1379,"children":1380},{"style":757},[1381],{"type":63,"value":847},{"type":58,"tag":426,"props":1383,"children":1385},{"class":428,"line":1384},31,[1386,1390,1394,1399,1403,1407,1411],{"type":58,"tag":426,"props":1387,"children":1388},{"style":751},[1389],{"type":63,"value":1269},{"type":58,"tag":426,"props":1391,"children":1392},{"style":908},[1393],{"type":63,"value":1274},{"type":58,"tag":426,"props":1395,"children":1396},{"style":766},[1397],{"type":63,"value":1398}," DELETE ",{"type":58,"tag":426,"props":1400,"children":1401},{"style":757},[1402],{"type":63,"value":921},{"type":58,"tag":426,"props":1404,"children":1405},{"style":929},[1406],{"type":63,"value":865},{"type":58,"tag":426,"props":1408,"children":1409},{"style":766},[1410],{"type":63,"value":1292},{"type":58,"tag":426,"props":1412,"children":1413},{"style":757},[1414],{"type":63,"value":847},{"type":58,"tag":720,"props":1416,"children":1418},{"id":1417},"nextjs-app-router-alternative-single-route",[1419],{"type":63,"value":1420},"Next.js App Router (alternative: single-route)",{"type":58,"tag":80,"props":1422,"children":1423},{},[1424,1425,1431],{"type":63,"value":730},{"type":58,"tag":86,"props":1426,"children":1428},{"className":1427},[],[1429],{"type":63,"value":1430},"src\u002Fapp\u002Fapi\u002Fcopilotkit\u002Froute.ts",{"type":63,"value":535},{"type":58,"tag":415,"props":1433,"children":1435},{"className":740,"code":1434,"language":45,"meta":420,"style":420},"import {\n  CopilotRuntime,\n  createCopilotHonoHandler,\n  InMemoryAgentRunner,\n  BuiltInAgent,\n} from \"@copilotkit\u002Fruntime\u002Fv2\";\nimport { handle } from \"hono\u002Fvercel\";\n\nconst agent = new BuiltInAgent({\n  model: \"openai\u002Fgpt-4o\",\n  prompt: \"You are a helpful AI assistant.\",\n});\n\nconst runtime = new CopilotRuntime({\n  agents: {\n    default: agent,\n  },\n  runner: new InMemoryAgentRunner(),\n});\n\nconst app = createCopilotHonoHandler({\n  runtime,\n  basePath: \"\u002Fapi\u002Fcopilotkit\",\n  mode: \"single-route\",\n});\n\nexport const POST = handle(app);\n",[1436],{"type":58,"tag":86,"props":1437,"children":1438},{"__ignoreMap":420},[1439,1450,1461,1472,1483,1494,1521,1560,1567,1598,1625,1652,1667,1674,1705,1720,1739,1746,1773,1788,1795,1822,1833,1860,1889,1904,1911],{"type":58,"tag":426,"props":1440,"children":1441},{"class":428,"line":429},[1442,1446],{"type":58,"tag":426,"props":1443,"children":1444},{"style":751},[1445],{"type":63,"value":754},{"type":58,"tag":426,"props":1447,"children":1448},{"style":757},[1449],{"type":63,"value":760},{"type":58,"tag":426,"props":1451,"children":1452},{"class":428,"line":575},[1453,1457],{"type":58,"tag":426,"props":1454,"children":1455},{"style":766},[1456],{"type":63,"value":769},{"type":58,"tag":426,"props":1458,"children":1459},{"style":757},[1460],{"type":63,"value":774},{"type":58,"tag":426,"props":1462,"children":1463},{"class":428,"line":777},[1464,1468],{"type":58,"tag":426,"props":1465,"children":1466},{"style":766},[1467],{"type":63,"value":783},{"type":58,"tag":426,"props":1469,"children":1470},{"style":757},[1471],{"type":63,"value":774},{"type":58,"tag":426,"props":1473,"children":1474},{"class":428,"line":790},[1475,1479],{"type":58,"tag":426,"props":1476,"children":1477},{"style":766},[1478],{"type":63,"value":796},{"type":58,"tag":426,"props":1480,"children":1481},{"style":757},[1482],{"type":63,"value":774},{"type":58,"tag":426,"props":1484,"children":1485},{"class":428,"line":803},[1486,1490],{"type":58,"tag":426,"props":1487,"children":1488},{"style":766},[1489],{"type":63,"value":809},{"type":58,"tag":426,"props":1491,"children":1492},{"style":757},[1493],{"type":63,"value":774},{"type":58,"tag":426,"props":1495,"children":1496},{"class":428,"line":816},[1497,1501,1505,1509,1513,1517],{"type":58,"tag":426,"props":1498,"children":1499},{"style":757},[1500],{"type":63,"value":822},{"type":58,"tag":426,"props":1502,"children":1503},{"style":751},[1504],{"type":63,"value":827},{"type":58,"tag":426,"props":1506,"children":1507},{"style":757},[1508],{"type":63,"value":832},{"type":58,"tag":426,"props":1510,"children":1511},{"style":439},[1512],{"type":63,"value":837},{"type":58,"tag":426,"props":1514,"children":1515},{"style":757},[1516],{"type":63,"value":842},{"type":58,"tag":426,"props":1518,"children":1519},{"style":757},[1520],{"type":63,"value":847},{"type":58,"tag":426,"props":1522,"children":1523},{"class":428,"line":850},[1524,1528,1532,1536,1540,1544,1548,1552,1556],{"type":58,"tag":426,"props":1525,"children":1526},{"style":751},[1527],{"type":63,"value":754},{"type":58,"tag":426,"props":1529,"children":1530},{"style":757},[1531],{"type":63,"value":860},{"type":58,"tag":426,"props":1533,"children":1534},{"style":766},[1535],{"type":63,"value":865},{"type":58,"tag":426,"props":1537,"children":1538},{"style":757},[1539],{"type":63,"value":870},{"type":58,"tag":426,"props":1541,"children":1542},{"style":751},[1543],{"type":63,"value":827},{"type":58,"tag":426,"props":1545,"children":1546},{"style":757},[1547],{"type":63,"value":832},{"type":58,"tag":426,"props":1549,"children":1550},{"style":439},[1551],{"type":63,"value":883},{"type":58,"tag":426,"props":1553,"children":1554},{"style":757},[1555],{"type":63,"value":842},{"type":58,"tag":426,"props":1557,"children":1558},{"style":757},[1559],{"type":63,"value":847},{"type":58,"tag":426,"props":1561,"children":1562},{"class":428,"line":894},[1563],{"type":58,"tag":426,"props":1564,"children":1565},{"emptyLinePlaceholder":898},[1566],{"type":63,"value":901},{"type":58,"tag":426,"props":1568,"children":1569},{"class":428,"line":904},[1570,1574,1578,1582,1586,1590,1594],{"type":58,"tag":426,"props":1571,"children":1572},{"style":908},[1573],{"type":63,"value":911},{"type":58,"tag":426,"props":1575,"children":1576},{"style":766},[1577],{"type":63,"value":916},{"type":58,"tag":426,"props":1579,"children":1580},{"style":757},[1581],{"type":63,"value":921},{"type":58,"tag":426,"props":1583,"children":1584},{"style":757},[1585],{"type":63,"value":926},{"type":58,"tag":426,"props":1587,"children":1588},{"style":929},[1589],{"type":63,"value":932},{"type":58,"tag":426,"props":1591,"children":1592},{"style":766},[1593],{"type":63,"value":609},{"type":58,"tag":426,"props":1595,"children":1596},{"style":757},[1597],{"type":63,"value":941},{"type":58,"tag":426,"props":1599,"children":1600},{"class":428,"line":944},[1601,1605,1609,1613,1617,1621],{"type":58,"tag":426,"props":1602,"children":1603},{"style":948},[1604],{"type":63,"value":951},{"type":58,"tag":426,"props":1606,"children":1607},{"style":757},[1608],{"type":63,"value":535},{"type":58,"tag":426,"props":1610,"children":1611},{"style":757},[1612],{"type":63,"value":832},{"type":58,"tag":426,"props":1614,"children":1615},{"style":439},[1616],{"type":63,"value":964},{"type":58,"tag":426,"props":1618,"children":1619},{"style":757},[1620],{"type":63,"value":842},{"type":58,"tag":426,"props":1622,"children":1623},{"style":757},[1624],{"type":63,"value":774},{"type":58,"tag":426,"props":1626,"children":1627},{"class":428,"line":975},[1628,1632,1636,1640,1644,1648],{"type":58,"tag":426,"props":1629,"children":1630},{"style":948},[1631],{"type":63,"value":981},{"type":58,"tag":426,"props":1633,"children":1634},{"style":757},[1635],{"type":63,"value":535},{"type":58,"tag":426,"props":1637,"children":1638},{"style":757},[1639],{"type":63,"value":832},{"type":58,"tag":426,"props":1641,"children":1642},{"style":439},[1643],{"type":63,"value":994},{"type":58,"tag":426,"props":1645,"children":1646},{"style":757},[1647],{"type":63,"value":842},{"type":58,"tag":426,"props":1649,"children":1650},{"style":757},[1651],{"type":63,"value":774},{"type":58,"tag":426,"props":1653,"children":1654},{"class":428,"line":1005},[1655,1659,1663],{"type":58,"tag":426,"props":1656,"children":1657},{"style":757},[1658],{"type":63,"value":822},{"type":58,"tag":426,"props":1660,"children":1661},{"style":766},[1662],{"type":63,"value":218},{"type":58,"tag":426,"props":1664,"children":1665},{"style":757},[1666],{"type":63,"value":847},{"type":58,"tag":426,"props":1668,"children":1669},{"class":428,"line":1021},[1670],{"type":58,"tag":426,"props":1671,"children":1672},{"emptyLinePlaceholder":898},[1673],{"type":63,"value":901},{"type":58,"tag":426,"props":1675,"children":1676},{"class":428,"line":1029},[1677,1681,1685,1689,1693,1697,1701],{"type":58,"tag":426,"props":1678,"children":1679},{"style":908},[1680],{"type":63,"value":911},{"type":58,"tag":426,"props":1682,"children":1683},{"style":766},[1684],{"type":63,"value":1039},{"type":58,"tag":426,"props":1686,"children":1687},{"style":757},[1688],{"type":63,"value":921},{"type":58,"tag":426,"props":1690,"children":1691},{"style":757},[1692],{"type":63,"value":926},{"type":58,"tag":426,"props":1694,"children":1695},{"style":929},[1696],{"type":63,"value":1052},{"type":58,"tag":426,"props":1698,"children":1699},{"style":766},[1700],{"type":63,"value":609},{"type":58,"tag":426,"props":1702,"children":1703},{"style":757},[1704],{"type":63,"value":941},{"type":58,"tag":426,"props":1706,"children":1707},{"class":428,"line":1063},[1708,1712,1716],{"type":58,"tag":426,"props":1709,"children":1710},{"style":948},[1711],{"type":63,"value":1069},{"type":58,"tag":426,"props":1713,"children":1714},{"style":757},[1715],{"type":63,"value":535},{"type":58,"tag":426,"props":1717,"children":1718},{"style":757},[1719],{"type":63,"value":760},{"type":58,"tag":426,"props":1721,"children":1722},{"class":428,"line":1080},[1723,1727,1731,1735],{"type":58,"tag":426,"props":1724,"children":1725},{"style":948},[1726],{"type":63,"value":1086},{"type":58,"tag":426,"props":1728,"children":1729},{"style":757},[1730],{"type":63,"value":535},{"type":58,"tag":426,"props":1732,"children":1733},{"style":766},[1734],{"type":63,"value":1095},{"type":58,"tag":426,"props":1736,"children":1737},{"style":757},[1738],{"type":63,"value":774},{"type":58,"tag":426,"props":1740,"children":1741},{"class":428,"line":1102},[1742],{"type":58,"tag":426,"props":1743,"children":1744},{"style":757},[1745],{"type":63,"value":1108},{"type":58,"tag":426,"props":1747,"children":1748},{"class":428,"line":1111},[1749,1753,1757,1761,1765,1769],{"type":58,"tag":426,"props":1750,"children":1751},{"style":948},[1752],{"type":63,"value":1117},{"type":58,"tag":426,"props":1754,"children":1755},{"style":757},[1756],{"type":63,"value":535},{"type":58,"tag":426,"props":1758,"children":1759},{"style":757},[1760],{"type":63,"value":926},{"type":58,"tag":426,"props":1762,"children":1763},{"style":929},[1764],{"type":63,"value":1130},{"type":58,"tag":426,"props":1766,"children":1767},{"style":766},[1768],{"type":63,"value":1135},{"type":58,"tag":426,"props":1770,"children":1771},{"style":757},[1772],{"type":63,"value":774},{"type":58,"tag":426,"props":1774,"children":1775},{"class":428,"line":1142},[1776,1780,1784],{"type":58,"tag":426,"props":1777,"children":1778},{"style":757},[1779],{"type":63,"value":822},{"type":58,"tag":426,"props":1781,"children":1782},{"style":766},[1783],{"type":63,"value":218},{"type":58,"tag":426,"props":1785,"children":1786},{"style":757},[1787],{"type":63,"value":847},{"type":58,"tag":426,"props":1789,"children":1790},{"class":428,"line":1158},[1791],{"type":58,"tag":426,"props":1792,"children":1793},{"emptyLinePlaceholder":898},[1794],{"type":63,"value":901},{"type":58,"tag":426,"props":1796,"children":1797},{"class":428,"line":1166},[1798,1802,1806,1810,1814,1818],{"type":58,"tag":426,"props":1799,"children":1800},{"style":908},[1801],{"type":63,"value":911},{"type":58,"tag":426,"props":1803,"children":1804},{"style":766},[1805],{"type":63,"value":1176},{"type":58,"tag":426,"props":1807,"children":1808},{"style":757},[1809],{"type":63,"value":921},{"type":58,"tag":426,"props":1811,"children":1812},{"style":929},[1813],{"type":63,"value":1185},{"type":58,"tag":426,"props":1815,"children":1816},{"style":766},[1817],{"type":63,"value":609},{"type":58,"tag":426,"props":1819,"children":1820},{"style":757},[1821],{"type":63,"value":941},{"type":58,"tag":426,"props":1823,"children":1824},{"class":428,"line":1196},[1825,1829],{"type":58,"tag":426,"props":1826,"children":1827},{"style":766},[1828],{"type":63,"value":1202},{"type":58,"tag":426,"props":1830,"children":1831},{"style":757},[1832],{"type":63,"value":774},{"type":58,"tag":426,"props":1834,"children":1835},{"class":428,"line":1209},[1836,1840,1844,1848,1852,1856],{"type":58,"tag":426,"props":1837,"children":1838},{"style":948},[1839],{"type":63,"value":1215},{"type":58,"tag":426,"props":1841,"children":1842},{"style":757},[1843],{"type":63,"value":535},{"type":58,"tag":426,"props":1845,"children":1846},{"style":757},[1847],{"type":63,"value":832},{"type":58,"tag":426,"props":1849,"children":1850},{"style":439},[1851],{"type":63,"value":1228},{"type":58,"tag":426,"props":1853,"children":1854},{"style":757},[1855],{"type":63,"value":842},{"type":58,"tag":426,"props":1857,"children":1858},{"style":757},[1859],{"type":63,"value":774},{"type":58,"tag":426,"props":1861,"children":1862},{"class":428,"line":1239},[1863,1868,1872,1876,1881,1885],{"type":58,"tag":426,"props":1864,"children":1865},{"style":948},[1866],{"type":63,"value":1867},"  mode",{"type":58,"tag":426,"props":1869,"children":1870},{"style":757},[1871],{"type":63,"value":535},{"type":58,"tag":426,"props":1873,"children":1874},{"style":757},[1875],{"type":63,"value":832},{"type":58,"tag":426,"props":1877,"children":1878},{"style":439},[1879],{"type":63,"value":1880},"single-route",{"type":58,"tag":426,"props":1882,"children":1883},{"style":757},[1884],{"type":63,"value":842},{"type":58,"tag":426,"props":1886,"children":1887},{"style":757},[1888],{"type":63,"value":774},{"type":58,"tag":426,"props":1890,"children":1891},{"class":428,"line":1255},[1892,1896,1900],{"type":58,"tag":426,"props":1893,"children":1894},{"style":757},[1895],{"type":63,"value":822},{"type":58,"tag":426,"props":1897,"children":1898},{"style":766},[1899],{"type":63,"value":218},{"type":58,"tag":426,"props":1901,"children":1902},{"style":757},[1903],{"type":63,"value":847},{"type":58,"tag":426,"props":1905,"children":1906},{"class":428,"line":1263},[1907],{"type":58,"tag":426,"props":1908,"children":1909},{"emptyLinePlaceholder":898},[1910],{"type":63,"value":901},{"type":58,"tag":426,"props":1912,"children":1913},{"class":428,"line":1299},[1914,1918,1922,1926,1930,1934,1938],{"type":58,"tag":426,"props":1915,"children":1916},{"style":751},[1917],{"type":63,"value":1269},{"type":58,"tag":426,"props":1919,"children":1920},{"style":908},[1921],{"type":63,"value":1274},{"type":58,"tag":426,"props":1923,"children":1924},{"style":766},[1925],{"type":63,"value":1313},{"type":58,"tag":426,"props":1927,"children":1928},{"style":757},[1929],{"type":63,"value":921},{"type":58,"tag":426,"props":1931,"children":1932},{"style":929},[1933],{"type":63,"value":865},{"type":58,"tag":426,"props":1935,"children":1936},{"style":766},[1937],{"type":63,"value":1292},{"type":58,"tag":426,"props":1939,"children":1940},{"style":757},[1941],{"type":63,"value":847},{"type":58,"tag":80,"props":1943,"children":1944},{},[1945,1947,1953],{"type":63,"value":1946},"When using single-route, the frontend must set ",{"type":58,"tag":86,"props":1948,"children":1950},{"className":1949},[],[1951],{"type":63,"value":1952},"useSingleEndpoint",{"type":63,"value":1954}," on the provider (see Step 3).",{"type":58,"tag":720,"props":1956,"children":1958},{"id":1957},"standalone-express-server",[1959],{"type":63,"value":1960},"Standalone Express Server",{"type":58,"tag":80,"props":1962,"children":1963},{},[1964,1965,1971],{"type":63,"value":730},{"type":58,"tag":86,"props":1966,"children":1968},{"className":1967},[],[1969],{"type":63,"value":1970},"src\u002Findex.ts",{"type":63,"value":535},{"type":58,"tag":415,"props":1973,"children":1975},{"className":740,"code":1974,"language":45,"meta":420,"style":420},"import express from \"express\";\nimport { CopilotRuntime, BuiltInAgent } from \"@copilotkit\u002Fruntime\u002Fv2\";\nimport { createCopilotExpressHandler } from \"@copilotkit\u002Fruntime\u002Fv2\u002Fexpress\";\n\nconst agent = new BuiltInAgent({\n  model: \"openai\u002Fgpt-4o\",\n});\n\nconst runtime = new CopilotRuntime({\n  agents: {\n    default: agent,\n  },\n});\n\nconst app = express();\n\napp.use(\n  \"\u002Fapi\u002Fcopilotkit\",\n  createCopilotExpressHandler({\n    runtime,\n    basePath: \"\u002F\",\n    mode: \"single-route\",\n  }),\n);\n\nconst port = Number(process.env.PORT ?? 4000);\napp.listen(port, () => {\n  console.log(\n    `CopilotKit runtime listening at http:\u002F\u002Flocalhost:${port}\u002Fapi\u002Fcopilotkit`,\n  );\n});\n",[1976],{"type":58,"tag":86,"props":1977,"children":1978},{"__ignoreMap":420},[1979,2013,2061,2102,2109,2140,2167,2182,2189,2220,2235,2254,2261,2276,2283,2310,2317,2340,2360,2376,2388,2417,2445,2461,2472,2479,2542,2581,2602,2642,2654],{"type":58,"tag":426,"props":1980,"children":1981},{"class":428,"line":429},[1982,1986,1991,1996,2000,2005,2009],{"type":58,"tag":426,"props":1983,"children":1984},{"style":751},[1985],{"type":63,"value":754},{"type":58,"tag":426,"props":1987,"children":1988},{"style":766},[1989],{"type":63,"value":1990}," express ",{"type":58,"tag":426,"props":1992,"children":1993},{"style":751},[1994],{"type":63,"value":1995},"from",{"type":58,"tag":426,"props":1997,"children":1998},{"style":757},[1999],{"type":63,"value":832},{"type":58,"tag":426,"props":2001,"children":2002},{"style":439},[2003],{"type":63,"value":2004},"express",{"type":58,"tag":426,"props":2006,"children":2007},{"style":757},[2008],{"type":63,"value":842},{"type":58,"tag":426,"props":2010,"children":2011},{"style":757},[2012],{"type":63,"value":847},{"type":58,"tag":426,"props":2014,"children":2015},{"class":428,"line":575},[2016,2020,2024,2028,2033,2037,2041,2045,2049,2053,2057],{"type":58,"tag":426,"props":2017,"children":2018},{"style":751},[2019],{"type":63,"value":754},{"type":58,"tag":426,"props":2021,"children":2022},{"style":757},[2023],{"type":63,"value":860},{"type":58,"tag":426,"props":2025,"children":2026},{"style":766},[2027],{"type":63,"value":1052},{"type":58,"tag":426,"props":2029,"children":2030},{"style":757},[2031],{"type":63,"value":2032},",",{"type":58,"tag":426,"props":2034,"children":2035},{"style":766},[2036],{"type":63,"value":932},{"type":58,"tag":426,"props":2038,"children":2039},{"style":757},[2040],{"type":63,"value":870},{"type":58,"tag":426,"props":2042,"children":2043},{"style":751},[2044],{"type":63,"value":827},{"type":58,"tag":426,"props":2046,"children":2047},{"style":757},[2048],{"type":63,"value":832},{"type":58,"tag":426,"props":2050,"children":2051},{"style":439},[2052],{"type":63,"value":837},{"type":58,"tag":426,"props":2054,"children":2055},{"style":757},[2056],{"type":63,"value":842},{"type":58,"tag":426,"props":2058,"children":2059},{"style":757},[2060],{"type":63,"value":847},{"type":58,"tag":426,"props":2062,"children":2063},{"class":428,"line":777},[2064,2068,2072,2077,2081,2085,2089,2094,2098],{"type":58,"tag":426,"props":2065,"children":2066},{"style":751},[2067],{"type":63,"value":754},{"type":58,"tag":426,"props":2069,"children":2070},{"style":757},[2071],{"type":63,"value":860},{"type":58,"tag":426,"props":2073,"children":2074},{"style":766},[2075],{"type":63,"value":2076}," createCopilotExpressHandler",{"type":58,"tag":426,"props":2078,"children":2079},{"style":757},[2080],{"type":63,"value":870},{"type":58,"tag":426,"props":2082,"children":2083},{"style":751},[2084],{"type":63,"value":827},{"type":58,"tag":426,"props":2086,"children":2087},{"style":757},[2088],{"type":63,"value":832},{"type":58,"tag":426,"props":2090,"children":2091},{"style":439},[2092],{"type":63,"value":2093},"@copilotkit\u002Fruntime\u002Fv2\u002Fexpress",{"type":58,"tag":426,"props":2095,"children":2096},{"style":757},[2097],{"type":63,"value":842},{"type":58,"tag":426,"props":2099,"children":2100},{"style":757},[2101],{"type":63,"value":847},{"type":58,"tag":426,"props":2103,"children":2104},{"class":428,"line":790},[2105],{"type":58,"tag":426,"props":2106,"children":2107},{"emptyLinePlaceholder":898},[2108],{"type":63,"value":901},{"type":58,"tag":426,"props":2110,"children":2111},{"class":428,"line":803},[2112,2116,2120,2124,2128,2132,2136],{"type":58,"tag":426,"props":2113,"children":2114},{"style":908},[2115],{"type":63,"value":911},{"type":58,"tag":426,"props":2117,"children":2118},{"style":766},[2119],{"type":63,"value":916},{"type":58,"tag":426,"props":2121,"children":2122},{"style":757},[2123],{"type":63,"value":921},{"type":58,"tag":426,"props":2125,"children":2126},{"style":757},[2127],{"type":63,"value":926},{"type":58,"tag":426,"props":2129,"children":2130},{"style":929},[2131],{"type":63,"value":932},{"type":58,"tag":426,"props":2133,"children":2134},{"style":766},[2135],{"type":63,"value":609},{"type":58,"tag":426,"props":2137,"children":2138},{"style":757},[2139],{"type":63,"value":941},{"type":58,"tag":426,"props":2141,"children":2142},{"class":428,"line":816},[2143,2147,2151,2155,2159,2163],{"type":58,"tag":426,"props":2144,"children":2145},{"style":948},[2146],{"type":63,"value":951},{"type":58,"tag":426,"props":2148,"children":2149},{"style":757},[2150],{"type":63,"value":535},{"type":58,"tag":426,"props":2152,"children":2153},{"style":757},[2154],{"type":63,"value":832},{"type":58,"tag":426,"props":2156,"children":2157},{"style":439},[2158],{"type":63,"value":964},{"type":58,"tag":426,"props":2160,"children":2161},{"style":757},[2162],{"type":63,"value":842},{"type":58,"tag":426,"props":2164,"children":2165},{"style":757},[2166],{"type":63,"value":774},{"type":58,"tag":426,"props":2168,"children":2169},{"class":428,"line":850},[2170,2174,2178],{"type":58,"tag":426,"props":2171,"children":2172},{"style":757},[2173],{"type":63,"value":822},{"type":58,"tag":426,"props":2175,"children":2176},{"style":766},[2177],{"type":63,"value":218},{"type":58,"tag":426,"props":2179,"children":2180},{"style":757},[2181],{"type":63,"value":847},{"type":58,"tag":426,"props":2183,"children":2184},{"class":428,"line":894},[2185],{"type":58,"tag":426,"props":2186,"children":2187},{"emptyLinePlaceholder":898},[2188],{"type":63,"value":901},{"type":58,"tag":426,"props":2190,"children":2191},{"class":428,"line":904},[2192,2196,2200,2204,2208,2212,2216],{"type":58,"tag":426,"props":2193,"children":2194},{"style":908},[2195],{"type":63,"value":911},{"type":58,"tag":426,"props":2197,"children":2198},{"style":766},[2199],{"type":63,"value":1039},{"type":58,"tag":426,"props":2201,"children":2202},{"style":757},[2203],{"type":63,"value":921},{"type":58,"tag":426,"props":2205,"children":2206},{"style":757},[2207],{"type":63,"value":926},{"type":58,"tag":426,"props":2209,"children":2210},{"style":929},[2211],{"type":63,"value":1052},{"type":58,"tag":426,"props":2213,"children":2214},{"style":766},[2215],{"type":63,"value":609},{"type":58,"tag":426,"props":2217,"children":2218},{"style":757},[2219],{"type":63,"value":941},{"type":58,"tag":426,"props":2221,"children":2222},{"class":428,"line":944},[2223,2227,2231],{"type":58,"tag":426,"props":2224,"children":2225},{"style":948},[2226],{"type":63,"value":1069},{"type":58,"tag":426,"props":2228,"children":2229},{"style":757},[2230],{"type":63,"value":535},{"type":58,"tag":426,"props":2232,"children":2233},{"style":757},[2234],{"type":63,"value":760},{"type":58,"tag":426,"props":2236,"children":2237},{"class":428,"line":975},[2238,2242,2246,2250],{"type":58,"tag":426,"props":2239,"children":2240},{"style":948},[2241],{"type":63,"value":1086},{"type":58,"tag":426,"props":2243,"children":2244},{"style":757},[2245],{"type":63,"value":535},{"type":58,"tag":426,"props":2247,"children":2248},{"style":766},[2249],{"type":63,"value":1095},{"type":58,"tag":426,"props":2251,"children":2252},{"style":757},[2253],{"type":63,"value":774},{"type":58,"tag":426,"props":2255,"children":2256},{"class":428,"line":1005},[2257],{"type":58,"tag":426,"props":2258,"children":2259},{"style":757},[2260],{"type":63,"value":1108},{"type":58,"tag":426,"props":2262,"children":2263},{"class":428,"line":1021},[2264,2268,2272],{"type":58,"tag":426,"props":2265,"children":2266},{"style":757},[2267],{"type":63,"value":822},{"type":58,"tag":426,"props":2269,"children":2270},{"style":766},[2271],{"type":63,"value":218},{"type":58,"tag":426,"props":2273,"children":2274},{"style":757},[2275],{"type":63,"value":847},{"type":58,"tag":426,"props":2277,"children":2278},{"class":428,"line":1029},[2279],{"type":58,"tag":426,"props":2280,"children":2281},{"emptyLinePlaceholder":898},[2282],{"type":63,"value":901},{"type":58,"tag":426,"props":2284,"children":2285},{"class":428,"line":1063},[2286,2290,2294,2298,2302,2306],{"type":58,"tag":426,"props":2287,"children":2288},{"style":908},[2289],{"type":63,"value":911},{"type":58,"tag":426,"props":2291,"children":2292},{"style":766},[2293],{"type":63,"value":1176},{"type":58,"tag":426,"props":2295,"children":2296},{"style":757},[2297],{"type":63,"value":921},{"type":58,"tag":426,"props":2299,"children":2300},{"style":929},[2301],{"type":63,"value":562},{"type":58,"tag":426,"props":2303,"children":2304},{"style":766},[2305],{"type":63,"value":1135},{"type":58,"tag":426,"props":2307,"children":2308},{"style":757},[2309],{"type":63,"value":847},{"type":58,"tag":426,"props":2311,"children":2312},{"class":428,"line":1080},[2313],{"type":58,"tag":426,"props":2314,"children":2315},{"emptyLinePlaceholder":898},[2316],{"type":63,"value":901},{"type":58,"tag":426,"props":2318,"children":2319},{"class":428,"line":1102},[2320,2325,2330,2335],{"type":58,"tag":426,"props":2321,"children":2322},{"style":766},[2323],{"type":63,"value":2324},"app",{"type":58,"tag":426,"props":2326,"children":2327},{"style":757},[2328],{"type":63,"value":2329},".",{"type":58,"tag":426,"props":2331,"children":2332},{"style":929},[2333],{"type":63,"value":2334},"use",{"type":58,"tag":426,"props":2336,"children":2337},{"style":766},[2338],{"type":63,"value":2339},"(\n",{"type":58,"tag":426,"props":2341,"children":2342},{"class":428,"line":1111},[2343,2348,2352,2356],{"type":58,"tag":426,"props":2344,"children":2345},{"style":757},[2346],{"type":63,"value":2347},"  \"",{"type":58,"tag":426,"props":2349,"children":2350},{"style":439},[2351],{"type":63,"value":1228},{"type":58,"tag":426,"props":2353,"children":2354},{"style":757},[2355],{"type":63,"value":842},{"type":58,"tag":426,"props":2357,"children":2358},{"style":757},[2359],{"type":63,"value":774},{"type":58,"tag":426,"props":2361,"children":2362},{"class":428,"line":1142},[2363,2368,2372],{"type":58,"tag":426,"props":2364,"children":2365},{"style":929},[2366],{"type":63,"value":2367},"  createCopilotExpressHandler",{"type":58,"tag":426,"props":2369,"children":2370},{"style":766},[2371],{"type":63,"value":609},{"type":58,"tag":426,"props":2373,"children":2374},{"style":757},[2375],{"type":63,"value":941},{"type":58,"tag":426,"props":2377,"children":2378},{"class":428,"line":1158},[2379,2384],{"type":58,"tag":426,"props":2380,"children":2381},{"style":766},[2382],{"type":63,"value":2383},"    runtime",{"type":58,"tag":426,"props":2385,"children":2386},{"style":757},[2387],{"type":63,"value":774},{"type":58,"tag":426,"props":2389,"children":2390},{"class":428,"line":1166},[2391,2396,2400,2404,2409,2413],{"type":58,"tag":426,"props":2392,"children":2393},{"style":948},[2394],{"type":63,"value":2395},"    basePath",{"type":58,"tag":426,"props":2397,"children":2398},{"style":757},[2399],{"type":63,"value":535},{"type":58,"tag":426,"props":2401,"children":2402},{"style":757},[2403],{"type":63,"value":832},{"type":58,"tag":426,"props":2405,"children":2406},{"style":439},[2407],{"type":63,"value":2408},"\u002F",{"type":58,"tag":426,"props":2410,"children":2411},{"style":757},[2412],{"type":63,"value":842},{"type":58,"tag":426,"props":2414,"children":2415},{"style":757},[2416],{"type":63,"value":774},{"type":58,"tag":426,"props":2418,"children":2419},{"class":428,"line":1196},[2420,2425,2429,2433,2437,2441],{"type":58,"tag":426,"props":2421,"children":2422},{"style":948},[2423],{"type":63,"value":2424},"    mode",{"type":58,"tag":426,"props":2426,"children":2427},{"style":757},[2428],{"type":63,"value":535},{"type":58,"tag":426,"props":2430,"children":2431},{"style":757},[2432],{"type":63,"value":832},{"type":58,"tag":426,"props":2434,"children":2435},{"style":439},[2436],{"type":63,"value":1880},{"type":58,"tag":426,"props":2438,"children":2439},{"style":757},[2440],{"type":63,"value":842},{"type":58,"tag":426,"props":2442,"children":2443},{"style":757},[2444],{"type":63,"value":774},{"type":58,"tag":426,"props":2446,"children":2447},{"class":428,"line":1209},[2448,2453,2457],{"type":58,"tag":426,"props":2449,"children":2450},{"style":757},[2451],{"type":63,"value":2452},"  }",{"type":58,"tag":426,"props":2454,"children":2455},{"style":766},[2456],{"type":63,"value":218},{"type":58,"tag":426,"props":2458,"children":2459},{"style":757},[2460],{"type":63,"value":774},{"type":58,"tag":426,"props":2462,"children":2463},{"class":428,"line":1239},[2464,2468],{"type":58,"tag":426,"props":2465,"children":2466},{"style":766},[2467],{"type":63,"value":218},{"type":58,"tag":426,"props":2469,"children":2470},{"style":757},[2471],{"type":63,"value":847},{"type":58,"tag":426,"props":2473,"children":2474},{"class":428,"line":1255},[2475],{"type":58,"tag":426,"props":2476,"children":2477},{"emptyLinePlaceholder":898},[2478],{"type":63,"value":901},{"type":58,"tag":426,"props":2480,"children":2481},{"class":428,"line":1263},[2482,2486,2491,2495,2500,2505,2509,2514,2518,2523,2528,2534,2538],{"type":58,"tag":426,"props":2483,"children":2484},{"style":908},[2485],{"type":63,"value":911},{"type":58,"tag":426,"props":2487,"children":2488},{"style":766},[2489],{"type":63,"value":2490}," port ",{"type":58,"tag":426,"props":2492,"children":2493},{"style":757},[2494],{"type":63,"value":921},{"type":58,"tag":426,"props":2496,"children":2497},{"style":929},[2498],{"type":63,"value":2499}," Number",{"type":58,"tag":426,"props":2501,"children":2502},{"style":766},[2503],{"type":63,"value":2504},"(process",{"type":58,"tag":426,"props":2506,"children":2507},{"style":757},[2508],{"type":63,"value":2329},{"type":58,"tag":426,"props":2510,"children":2511},{"style":766},[2512],{"type":63,"value":2513},"env",{"type":58,"tag":426,"props":2515,"children":2516},{"style":757},[2517],{"type":63,"value":2329},{"type":58,"tag":426,"props":2519,"children":2520},{"style":766},[2521],{"type":63,"value":2522},"PORT ",{"type":58,"tag":426,"props":2524,"children":2525},{"style":757},[2526],{"type":63,"value":2527},"??",{"type":58,"tag":426,"props":2529,"children":2531},{"style":2530},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2532],{"type":63,"value":2533}," 4000",{"type":58,"tag":426,"props":2535,"children":2536},{"style":766},[2537],{"type":63,"value":218},{"type":58,"tag":426,"props":2539,"children":2540},{"style":757},[2541],{"type":63,"value":847},{"type":58,"tag":426,"props":2543,"children":2544},{"class":428,"line":1299},[2545,2549,2553,2558,2563,2567,2572,2577],{"type":58,"tag":426,"props":2546,"children":2547},{"style":766},[2548],{"type":63,"value":2324},{"type":58,"tag":426,"props":2550,"children":2551},{"style":757},[2552],{"type":63,"value":2329},{"type":58,"tag":426,"props":2554,"children":2555},{"style":929},[2556],{"type":63,"value":2557},"listen",{"type":58,"tag":426,"props":2559,"children":2560},{"style":766},[2561],{"type":63,"value":2562},"(port",{"type":58,"tag":426,"props":2564,"children":2565},{"style":757},[2566],{"type":63,"value":2032},{"type":58,"tag":426,"props":2568,"children":2569},{"style":757},[2570],{"type":63,"value":2571}," ()",{"type":58,"tag":426,"props":2573,"children":2574},{"style":908},[2575],{"type":63,"value":2576}," =>",{"type":58,"tag":426,"props":2578,"children":2579},{"style":757},[2580],{"type":63,"value":760},{"type":58,"tag":426,"props":2582,"children":2583},{"class":428,"line":1332},[2584,2589,2593,2598],{"type":58,"tag":426,"props":2585,"children":2586},{"style":766},[2587],{"type":63,"value":2588},"  console",{"type":58,"tag":426,"props":2590,"children":2591},{"style":757},[2592],{"type":63,"value":2329},{"type":58,"tag":426,"props":2594,"children":2595},{"style":929},[2596],{"type":63,"value":2597},"log",{"type":58,"tag":426,"props":2599,"children":2600},{"style":948},[2601],{"type":63,"value":2339},{"type":58,"tag":426,"props":2603,"children":2604},{"class":428,"line":1342},[2605,2610,2615,2620,2625,2629,2633,2638],{"type":58,"tag":426,"props":2606,"children":2607},{"style":757},[2608],{"type":63,"value":2609},"    `",{"type":58,"tag":426,"props":2611,"children":2612},{"style":439},[2613],{"type":63,"value":2614},"CopilotKit runtime listening at http:\u002F\u002Flocalhost:",{"type":58,"tag":426,"props":2616,"children":2617},{"style":757},[2618],{"type":63,"value":2619},"${",{"type":58,"tag":426,"props":2621,"children":2622},{"style":766},[2623],{"type":63,"value":2624},"port",{"type":58,"tag":426,"props":2626,"children":2627},{"style":757},[2628],{"type":63,"value":822},{"type":58,"tag":426,"props":2630,"children":2631},{"style":439},[2632],{"type":63,"value":1228},{"type":58,"tag":426,"props":2634,"children":2635},{"style":757},[2636],{"type":63,"value":2637},"`",{"type":58,"tag":426,"props":2639,"children":2640},{"style":757},[2641],{"type":63,"value":774},{"type":58,"tag":426,"props":2643,"children":2644},{"class":428,"line":1351},[2645,2650],{"type":58,"tag":426,"props":2646,"children":2647},{"style":948},[2648],{"type":63,"value":2649},"  )",{"type":58,"tag":426,"props":2651,"children":2652},{"style":757},[2653],{"type":63,"value":847},{"type":58,"tag":426,"props":2655,"children":2656},{"class":428,"line":1384},[2657,2661,2665],{"type":58,"tag":426,"props":2658,"children":2659},{"style":757},[2660],{"type":63,"value":822},{"type":58,"tag":426,"props":2662,"children":2663},{"style":766},[2664],{"type":63,"value":218},{"type":58,"tag":426,"props":2666,"children":2667},{"style":757},[2668],{"type":63,"value":847},{"type":58,"tag":80,"props":2670,"children":2671},{},[2672,2674,2680,2682,2687,2689,2694],{"type":63,"value":2673},"For multi-route Express, omit the ",{"type":58,"tag":86,"props":2675,"children":2677},{"className":2676},[],[2678],{"type":63,"value":2679},"mode",{"type":63,"value":2681}," option (multi-route is the default) -- ",{"type":58,"tag":86,"props":2683,"children":2685},{"className":2684},[],[2686],{"type":63,"value":615},{"type":63,"value":2688}," is the same factory for both styles (imported from ",{"type":58,"tag":86,"props":2690,"children":2692},{"className":2691},[],[2693],{"type":63,"value":2093},{"type":63,"value":2695},").",{"type":58,"tag":720,"props":2697,"children":2699},{"id":2698},"standalone-hono-server-non-vercel",[2700],{"type":63,"value":2701},"Standalone Hono Server (non-Vercel)",{"type":58,"tag":415,"props":2703,"children":2705},{"className":740,"code":2704,"language":45,"meta":420,"style":420},"import {\n  CopilotRuntime,\n  createCopilotHonoHandler,\n  BuiltInAgent,\n} from \"@copilotkit\u002Fruntime\u002Fv2\";\nimport { serve } from \"@hono\u002Fnode-server\";\n\nconst runtime = new CopilotRuntime({\n  agents: {\n    default: new BuiltInAgent({ model: \"openai\u002Fgpt-4o\" }),\n  },\n});\n\nconst app = createCopilotHonoHandler({\n  runtime,\n  basePath: \"\u002Fapi\u002Fcopilotkit\",\n});\n\nserve({ fetch: app.fetch, port: 8787 });\n",[2706],{"type":58,"tag":86,"props":2707,"children":2708},{"__ignoreMap":420},[2709,2720,2731,2742,2753,2780,2821,2828,2859,2874,2935,2942,2957,2964,2991,3002,3029,3044,3051],{"type":58,"tag":426,"props":2710,"children":2711},{"class":428,"line":429},[2712,2716],{"type":58,"tag":426,"props":2713,"children":2714},{"style":751},[2715],{"type":63,"value":754},{"type":58,"tag":426,"props":2717,"children":2718},{"style":757},[2719],{"type":63,"value":760},{"type":58,"tag":426,"props":2721,"children":2722},{"class":428,"line":575},[2723,2727],{"type":58,"tag":426,"props":2724,"children":2725},{"style":766},[2726],{"type":63,"value":769},{"type":58,"tag":426,"props":2728,"children":2729},{"style":757},[2730],{"type":63,"value":774},{"type":58,"tag":426,"props":2732,"children":2733},{"class":428,"line":777},[2734,2738],{"type":58,"tag":426,"props":2735,"children":2736},{"style":766},[2737],{"type":63,"value":783},{"type":58,"tag":426,"props":2739,"children":2740},{"style":757},[2741],{"type":63,"value":774},{"type":58,"tag":426,"props":2743,"children":2744},{"class":428,"line":790},[2745,2749],{"type":58,"tag":426,"props":2746,"children":2747},{"style":766},[2748],{"type":63,"value":809},{"type":58,"tag":426,"props":2750,"children":2751},{"style":757},[2752],{"type":63,"value":774},{"type":58,"tag":426,"props":2754,"children":2755},{"class":428,"line":803},[2756,2760,2764,2768,2772,2776],{"type":58,"tag":426,"props":2757,"children":2758},{"style":757},[2759],{"type":63,"value":822},{"type":58,"tag":426,"props":2761,"children":2762},{"style":751},[2763],{"type":63,"value":827},{"type":58,"tag":426,"props":2765,"children":2766},{"style":757},[2767],{"type":63,"value":832},{"type":58,"tag":426,"props":2769,"children":2770},{"style":439},[2771],{"type":63,"value":837},{"type":58,"tag":426,"props":2773,"children":2774},{"style":757},[2775],{"type":63,"value":842},{"type":58,"tag":426,"props":2777,"children":2778},{"style":757},[2779],{"type":63,"value":847},{"type":58,"tag":426,"props":2781,"children":2782},{"class":428,"line":816},[2783,2787,2791,2796,2800,2804,2808,2813,2817],{"type":58,"tag":426,"props":2784,"children":2785},{"style":751},[2786],{"type":63,"value":754},{"type":58,"tag":426,"props":2788,"children":2789},{"style":757},[2790],{"type":63,"value":860},{"type":58,"tag":426,"props":2792,"children":2793},{"style":766},[2794],{"type":63,"value":2795}," serve",{"type":58,"tag":426,"props":2797,"children":2798},{"style":757},[2799],{"type":63,"value":870},{"type":58,"tag":426,"props":2801,"children":2802},{"style":751},[2803],{"type":63,"value":827},{"type":58,"tag":426,"props":2805,"children":2806},{"style":757},[2807],{"type":63,"value":832},{"type":58,"tag":426,"props":2809,"children":2810},{"style":439},[2811],{"type":63,"value":2812},"@hono\u002Fnode-server",{"type":58,"tag":426,"props":2814,"children":2815},{"style":757},[2816],{"type":63,"value":842},{"type":58,"tag":426,"props":2818,"children":2819},{"style":757},[2820],{"type":63,"value":847},{"type":58,"tag":426,"props":2822,"children":2823},{"class":428,"line":850},[2824],{"type":58,"tag":426,"props":2825,"children":2826},{"emptyLinePlaceholder":898},[2827],{"type":63,"value":901},{"type":58,"tag":426,"props":2829,"children":2830},{"class":428,"line":894},[2831,2835,2839,2843,2847,2851,2855],{"type":58,"tag":426,"props":2832,"children":2833},{"style":908},[2834],{"type":63,"value":911},{"type":58,"tag":426,"props":2836,"children":2837},{"style":766},[2838],{"type":63,"value":1039},{"type":58,"tag":426,"props":2840,"children":2841},{"style":757},[2842],{"type":63,"value":921},{"type":58,"tag":426,"props":2844,"children":2845},{"style":757},[2846],{"type":63,"value":926},{"type":58,"tag":426,"props":2848,"children":2849},{"style":929},[2850],{"type":63,"value":1052},{"type":58,"tag":426,"props":2852,"children":2853},{"style":766},[2854],{"type":63,"value":609},{"type":58,"tag":426,"props":2856,"children":2857},{"style":757},[2858],{"type":63,"value":941},{"type":58,"tag":426,"props":2860,"children":2861},{"class":428,"line":904},[2862,2866,2870],{"type":58,"tag":426,"props":2863,"children":2864},{"style":948},[2865],{"type":63,"value":1069},{"type":58,"tag":426,"props":2867,"children":2868},{"style":757},[2869],{"type":63,"value":535},{"type":58,"tag":426,"props":2871,"children":2872},{"style":757},[2873],{"type":63,"value":760},{"type":58,"tag":426,"props":2875,"children":2876},{"class":428,"line":944},[2877,2881,2885,2889,2893,2897,2902,2907,2911,2915,2919,2923,2927,2931],{"type":58,"tag":426,"props":2878,"children":2879},{"style":948},[2880],{"type":63,"value":1086},{"type":58,"tag":426,"props":2882,"children":2883},{"style":757},[2884],{"type":63,"value":535},{"type":58,"tag":426,"props":2886,"children":2887},{"style":757},[2888],{"type":63,"value":926},{"type":58,"tag":426,"props":2890,"children":2891},{"style":929},[2892],{"type":63,"value":932},{"type":58,"tag":426,"props":2894,"children":2895},{"style":766},[2896],{"type":63,"value":609},{"type":58,"tag":426,"props":2898,"children":2899},{"style":757},[2900],{"type":63,"value":2901},"{",{"type":58,"tag":426,"props":2903,"children":2904},{"style":948},[2905],{"type":63,"value":2906}," model",{"type":58,"tag":426,"props":2908,"children":2909},{"style":757},[2910],{"type":63,"value":535},{"type":58,"tag":426,"props":2912,"children":2913},{"style":757},[2914],{"type":63,"value":832},{"type":58,"tag":426,"props":2916,"children":2917},{"style":439},[2918],{"type":63,"value":964},{"type":58,"tag":426,"props":2920,"children":2921},{"style":757},[2922],{"type":63,"value":842},{"type":58,"tag":426,"props":2924,"children":2925},{"style":757},[2926],{"type":63,"value":870},{"type":58,"tag":426,"props":2928,"children":2929},{"style":766},[2930],{"type":63,"value":218},{"type":58,"tag":426,"props":2932,"children":2933},{"style":757},[2934],{"type":63,"value":774},{"type":58,"tag":426,"props":2936,"children":2937},{"class":428,"line":975},[2938],{"type":58,"tag":426,"props":2939,"children":2940},{"style":757},[2941],{"type":63,"value":1108},{"type":58,"tag":426,"props":2943,"children":2944},{"class":428,"line":1005},[2945,2949,2953],{"type":58,"tag":426,"props":2946,"children":2947},{"style":757},[2948],{"type":63,"value":822},{"type":58,"tag":426,"props":2950,"children":2951},{"style":766},[2952],{"type":63,"value":218},{"type":58,"tag":426,"props":2954,"children":2955},{"style":757},[2956],{"type":63,"value":847},{"type":58,"tag":426,"props":2958,"children":2959},{"class":428,"line":1021},[2960],{"type":58,"tag":426,"props":2961,"children":2962},{"emptyLinePlaceholder":898},[2963],{"type":63,"value":901},{"type":58,"tag":426,"props":2965,"children":2966},{"class":428,"line":1029},[2967,2971,2975,2979,2983,2987],{"type":58,"tag":426,"props":2968,"children":2969},{"style":908},[2970],{"type":63,"value":911},{"type":58,"tag":426,"props":2972,"children":2973},{"style":766},[2974],{"type":63,"value":1176},{"type":58,"tag":426,"props":2976,"children":2977},{"style":757},[2978],{"type":63,"value":921},{"type":58,"tag":426,"props":2980,"children":2981},{"style":929},[2982],{"type":63,"value":1185},{"type":58,"tag":426,"props":2984,"children":2985},{"style":766},[2986],{"type":63,"value":609},{"type":58,"tag":426,"props":2988,"children":2989},{"style":757},[2990],{"type":63,"value":941},{"type":58,"tag":426,"props":2992,"children":2993},{"class":428,"line":1063},[2994,2998],{"type":58,"tag":426,"props":2995,"children":2996},{"style":766},[2997],{"type":63,"value":1202},{"type":58,"tag":426,"props":2999,"children":3000},{"style":757},[3001],{"type":63,"value":774},{"type":58,"tag":426,"props":3003,"children":3004},{"class":428,"line":1080},[3005,3009,3013,3017,3021,3025],{"type":58,"tag":426,"props":3006,"children":3007},{"style":948},[3008],{"type":63,"value":1215},{"type":58,"tag":426,"props":3010,"children":3011},{"style":757},[3012],{"type":63,"value":535},{"type":58,"tag":426,"props":3014,"children":3015},{"style":757},[3016],{"type":63,"value":832},{"type":58,"tag":426,"props":3018,"children":3019},{"style":439},[3020],{"type":63,"value":1228},{"type":58,"tag":426,"props":3022,"children":3023},{"style":757},[3024],{"type":63,"value":842},{"type":58,"tag":426,"props":3026,"children":3027},{"style":757},[3028],{"type":63,"value":774},{"type":58,"tag":426,"props":3030,"children":3031},{"class":428,"line":1102},[3032,3036,3040],{"type":58,"tag":426,"props":3033,"children":3034},{"style":757},[3035],{"type":63,"value":822},{"type":58,"tag":426,"props":3037,"children":3038},{"style":766},[3039],{"type":63,"value":218},{"type":58,"tag":426,"props":3041,"children":3042},{"style":757},[3043],{"type":63,"value":847},{"type":58,"tag":426,"props":3045,"children":3046},{"class":428,"line":1111},[3047],{"type":58,"tag":426,"props":3048,"children":3049},{"emptyLinePlaceholder":898},[3050],{"type":63,"value":901},{"type":58,"tag":426,"props":3052,"children":3053},{"class":428,"line":1142},[3054,3059,3063,3067,3072,3076,3081,3085,3089,3093,3098,3102,3107,3111,3115],{"type":58,"tag":426,"props":3055,"children":3056},{"style":929},[3057],{"type":63,"value":3058},"serve",{"type":58,"tag":426,"props":3060,"children":3061},{"style":766},[3062],{"type":63,"value":609},{"type":58,"tag":426,"props":3064,"children":3065},{"style":757},[3066],{"type":63,"value":2901},{"type":58,"tag":426,"props":3068,"children":3069},{"style":948},[3070],{"type":63,"value":3071}," fetch",{"type":58,"tag":426,"props":3073,"children":3074},{"style":757},[3075],{"type":63,"value":535},{"type":58,"tag":426,"props":3077,"children":3078},{"style":766},[3079],{"type":63,"value":3080}," app",{"type":58,"tag":426,"props":3082,"children":3083},{"style":757},[3084],{"type":63,"value":2329},{"type":58,"tag":426,"props":3086,"children":3087},{"style":766},[3088],{"type":63,"value":183},{"type":58,"tag":426,"props":3090,"children":3091},{"style":757},[3092],{"type":63,"value":2032},{"type":58,"tag":426,"props":3094,"children":3095},{"style":948},[3096],{"type":63,"value":3097}," port",{"type":58,"tag":426,"props":3099,"children":3100},{"style":757},[3101],{"type":63,"value":535},{"type":58,"tag":426,"props":3103,"children":3104},{"style":2530},[3105],{"type":63,"value":3106}," 8787",{"type":58,"tag":426,"props":3108,"children":3109},{"style":757},[3110],{"type":63,"value":870},{"type":58,"tag":426,"props":3112,"children":3113},{"style":766},[3114],{"type":63,"value":218},{"type":58,"tag":426,"props":3116,"children":3117},{"style":757},[3118],{"type":63,"value":847},{"type":58,"tag":80,"props":3120,"children":3121},{},[3122,3124,3129],{"type":63,"value":3123},"Requires ",{"type":58,"tag":86,"props":3125,"children":3127},{"className":3126},[],[3128],{"type":63,"value":2812},{"type":63,"value":535},{"type":58,"tag":415,"props":3131,"children":3133},{"className":417,"code":3132,"language":419,"meta":420,"style":420},"npm install hono @hono\u002Fnode-server\n",[3134],{"type":58,"tag":86,"props":3135,"children":3136},{"__ignoreMap":420},[3137],{"type":58,"tag":426,"props":3138,"children":3139},{"class":428,"line":429},[3140,3144,3148,3153],{"type":58,"tag":426,"props":3141,"children":3142},{"style":433},[3143],{"type":63,"value":436},{"type":58,"tag":426,"props":3145,"children":3146},{"style":439},[3147],{"type":63,"value":442},{"type":58,"tag":426,"props":3149,"children":3150},{"style":439},[3151],{"type":63,"value":3152}," hono",{"type":58,"tag":426,"props":3154,"children":3155},{"style":439},[3156],{"type":63,"value":3157}," @hono\u002Fnode-server\n",{"type":58,"tag":73,"props":3159,"children":3161},{"id":3160},"step-3-set-up-the-frontend-provider",[3162],{"type":63,"value":3163},"Step 3: Set up the frontend provider",{"type":58,"tag":80,"props":3165,"children":3166},{},[3167,3169,3174,3176,3182],{"type":63,"value":3168},"Wrap your application with ",{"type":58,"tag":86,"props":3170,"children":3172},{"className":3171},[],[3173],{"type":63,"value":9},{"type":63,"value":3175}," from ",{"type":58,"tag":86,"props":3177,"children":3179},{"className":3178},[],[3180],{"type":63,"value":3181},"@copilotkit\u002Freact-core\u002Fv2",{"type":63,"value":2329},{"type":58,"tag":3184,"props":3185,"children":3186},"blockquote",{},[3187],{"type":58,"tag":80,"props":3188,"children":3189},{},[3190,3195,3197,3202,3204,3209,3211,3216,3218,3223,3225,3231,3233,3239,3240,3246],{"type":58,"tag":119,"props":3191,"children":3192},{},[3193],{"type":63,"value":3194},"Which provider component?",{"type":63,"value":3196}," Always use ",{"type":58,"tag":86,"props":3198,"children":3200},{"className":3199},[],[3201],{"type":63,"value":9},{"type":63,"value":3203}," imported from ",{"type":58,"tag":86,"props":3205,"children":3207},{"className":3206},[],[3208],{"type":63,"value":3181},{"type":63,"value":3210},". It is the compatibility bridge across v1 and v2 and a strict superset of the other provider APIs. Do ",{"type":58,"tag":119,"props":3212,"children":3213},{},[3214],{"type":63,"value":3215},"not",{"type":63,"value":3217}," use ",{"type":58,"tag":86,"props":3219,"children":3221},{"className":3220},[],[3222],{"type":63,"value":9},{"type":63,"value":3224}," from the package root (",{"type":58,"tag":86,"props":3226,"children":3228},{"className":3227},[],[3229],{"type":63,"value":3230},"@copilotkit\u002Freact-core",{"type":63,"value":3232},", legacy v1) or ",{"type":58,"tag":86,"props":3234,"children":3236},{"className":3235},[],[3237],{"type":63,"value":3238},"CopilotKitProvider",{"type":63,"value":3175},{"type":58,"tag":86,"props":3241,"children":3243},{"className":3242},[],[3244],{"type":63,"value":3245},"\u002Fv2",{"type":63,"value":3247}," (a subset of the functionality).",{"type":58,"tag":80,"props":3249,"children":3250},{},[3251,3256],{"type":58,"tag":119,"props":3252,"children":3253},{},[3254],{"type":63,"value":3255},"Important:",{"type":63,"value":3257}," Import the stylesheet in your root layout:",{"type":58,"tag":415,"props":3259,"children":3261},{"className":740,"code":3260,"language":45,"meta":420,"style":420},"import \"@copilotkit\u002Freact-core\u002Fv2\u002Fstyles.css\";\n",[3262],{"type":58,"tag":86,"props":3263,"children":3264},{"__ignoreMap":420},[3265],{"type":58,"tag":426,"props":3266,"children":3267},{"class":428,"line":429},[3268,3272,3276,3281,3285],{"type":58,"tag":426,"props":3269,"children":3270},{"style":751},[3271],{"type":63,"value":754},{"type":58,"tag":426,"props":3273,"children":3274},{"style":757},[3275],{"type":63,"value":832},{"type":58,"tag":426,"props":3277,"children":3278},{"style":439},[3279],{"type":63,"value":3280},"@copilotkit\u002Freact-core\u002Fv2\u002Fstyles.css",{"type":58,"tag":426,"props":3282,"children":3283},{"style":757},[3284],{"type":63,"value":842},{"type":58,"tag":426,"props":3286,"children":3287},{"style":757},[3288],{"type":63,"value":847},{"type":58,"tag":720,"props":3290,"children":3292},{"id":3291},"nextjs-app-router",[3293],{"type":63,"value":320},{"type":58,"tag":80,"props":3295,"children":3296},{},[3297,3299,3305],{"type":63,"value":3298},"In ",{"type":58,"tag":86,"props":3300,"children":3302},{"className":3301},[],[3303],{"type":63,"value":3304},"src\u002Fapp\u002Fpage.tsx",{"type":63,"value":3306}," (or a client component):",{"type":58,"tag":415,"props":3308,"children":3312},{"className":3309,"code":3310,"language":3311,"meta":420,"style":420},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\"use client\";\n\nimport { CopilotKit, CopilotChat } from \"@copilotkit\u002Freact-core\u002Fv2\";\n\nexport default function Home() {\n  return (\n    \u002F\u002F useSingleEndpoint={false} matches the multi-route backend above.\n    \u002F\u002F The v1-compat CopilotKit bridge defaults useSingleEndpoint to true,\n    \u002F\u002F which would 404 against multi-route endpoints.\n    \u003CCopilotKit runtimeUrl=\"\u002Fapi\u002Fcopilotkit\" useSingleEndpoint={false}>\n      \u003Cdiv style={{ height: \"100vh\" }}>\n        \u003CCopilotChat \u002F>\n      \u003C\u002Fdiv>\n    \u003C\u002FCopilotKit>\n  );\n}\n","tsx",[3313],{"type":58,"tag":86,"props":3314,"children":3315},{"__ignoreMap":420},[3316,3336,3343,3392,3399,3429,3442,3450,3458,3466,3520,3570,3588,3605,3621,3632],{"type":58,"tag":426,"props":3317,"children":3318},{"class":428,"line":429},[3319,3323,3328,3332],{"type":58,"tag":426,"props":3320,"children":3321},{"style":757},[3322],{"type":63,"value":842},{"type":58,"tag":426,"props":3324,"children":3325},{"style":439},[3326],{"type":63,"value":3327},"use client",{"type":58,"tag":426,"props":3329,"children":3330},{"style":757},[3331],{"type":63,"value":842},{"type":58,"tag":426,"props":3333,"children":3334},{"style":757},[3335],{"type":63,"value":847},{"type":58,"tag":426,"props":3337,"children":3338},{"class":428,"line":575},[3339],{"type":58,"tag":426,"props":3340,"children":3341},{"emptyLinePlaceholder":898},[3342],{"type":63,"value":901},{"type":58,"tag":426,"props":3344,"children":3345},{"class":428,"line":777},[3346,3350,3354,3359,3363,3368,3372,3376,3380,3384,3388],{"type":58,"tag":426,"props":3347,"children":3348},{"style":751},[3349],{"type":63,"value":754},{"type":58,"tag":426,"props":3351,"children":3352},{"style":757},[3353],{"type":63,"value":860},{"type":58,"tag":426,"props":3355,"children":3356},{"style":766},[3357],{"type":63,"value":3358}," CopilotKit",{"type":58,"tag":426,"props":3360,"children":3361},{"style":757},[3362],{"type":63,"value":2032},{"type":58,"tag":426,"props":3364,"children":3365},{"style":766},[3366],{"type":63,"value":3367}," CopilotChat",{"type":58,"tag":426,"props":3369,"children":3370},{"style":757},[3371],{"type":63,"value":870},{"type":58,"tag":426,"props":3373,"children":3374},{"style":751},[3375],{"type":63,"value":827},{"type":58,"tag":426,"props":3377,"children":3378},{"style":757},[3379],{"type":63,"value":832},{"type":58,"tag":426,"props":3381,"children":3382},{"style":439},[3383],{"type":63,"value":3181},{"type":58,"tag":426,"props":3385,"children":3386},{"style":757},[3387],{"type":63,"value":842},{"type":58,"tag":426,"props":3389,"children":3390},{"style":757},[3391],{"type":63,"value":847},{"type":58,"tag":426,"props":3393,"children":3394},{"class":428,"line":790},[3395],{"type":58,"tag":426,"props":3396,"children":3397},{"emptyLinePlaceholder":898},[3398],{"type":63,"value":901},{"type":58,"tag":426,"props":3400,"children":3401},{"class":428,"line":803},[3402,3406,3411,3416,3421,3425],{"type":58,"tag":426,"props":3403,"children":3404},{"style":751},[3405],{"type":63,"value":1269},{"type":58,"tag":426,"props":3407,"children":3408},{"style":751},[3409],{"type":63,"value":3410}," default",{"type":58,"tag":426,"props":3412,"children":3413},{"style":908},[3414],{"type":63,"value":3415}," function",{"type":58,"tag":426,"props":3417,"children":3418},{"style":929},[3419],{"type":63,"value":3420}," Home",{"type":58,"tag":426,"props":3422,"children":3423},{"style":757},[3424],{"type":63,"value":1135},{"type":58,"tag":426,"props":3426,"children":3427},{"style":757},[3428],{"type":63,"value":760},{"type":58,"tag":426,"props":3430,"children":3431},{"class":428,"line":816},[3432,3437],{"type":58,"tag":426,"props":3433,"children":3434},{"style":751},[3435],{"type":63,"value":3436},"  return",{"type":58,"tag":426,"props":3438,"children":3439},{"style":948},[3440],{"type":63,"value":3441}," (\n",{"type":58,"tag":426,"props":3443,"children":3444},{"class":428,"line":850},[3445],{"type":58,"tag":426,"props":3446,"children":3447},{"style":1336},[3448],{"type":63,"value":3449},"    \u002F\u002F useSingleEndpoint={false} matches the multi-route backend above.\n",{"type":58,"tag":426,"props":3451,"children":3452},{"class":428,"line":894},[3453],{"type":58,"tag":426,"props":3454,"children":3455},{"style":1336},[3456],{"type":63,"value":3457},"    \u002F\u002F The v1-compat CopilotKit bridge defaults useSingleEndpoint to true,\n",{"type":58,"tag":426,"props":3459,"children":3460},{"class":428,"line":904},[3461],{"type":58,"tag":426,"props":3462,"children":3463},{"style":1336},[3464],{"type":63,"value":3465},"    \u002F\u002F which would 404 against multi-route endpoints.\n",{"type":58,"tag":426,"props":3467,"children":3468},{"class":428,"line":944},[3469,3474,3478,3483,3487,3491,3495,3499,3504,3509,3515],{"type":58,"tag":426,"props":3470,"children":3471},{"style":757},[3472],{"type":63,"value":3473},"    \u003C",{"type":58,"tag":426,"props":3475,"children":3476},{"style":433},[3477],{"type":63,"value":9},{"type":58,"tag":426,"props":3479,"children":3480},{"style":908},[3481],{"type":63,"value":3482}," runtimeUrl",{"type":58,"tag":426,"props":3484,"children":3485},{"style":757},[3486],{"type":63,"value":921},{"type":58,"tag":426,"props":3488,"children":3489},{"style":757},[3490],{"type":63,"value":842},{"type":58,"tag":426,"props":3492,"children":3493},{"style":439},[3494],{"type":63,"value":1228},{"type":58,"tag":426,"props":3496,"children":3497},{"style":757},[3498],{"type":63,"value":842},{"type":58,"tag":426,"props":3500,"children":3501},{"style":908},[3502],{"type":63,"value":3503}," useSingleEndpoint",{"type":58,"tag":426,"props":3505,"children":3506},{"style":757},[3507],{"type":63,"value":3508},"={",{"type":58,"tag":426,"props":3510,"children":3512},{"style":3511},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[3513],{"type":63,"value":3514},"false",{"type":58,"tag":426,"props":3516,"children":3517},{"style":757},[3518],{"type":63,"value":3519},"}>\n",{"type":58,"tag":426,"props":3521,"children":3522},{"class":428,"line":975},[3523,3528,3533,3538,3543,3548,3552,3556,3561,3565],{"type":58,"tag":426,"props":3524,"children":3525},{"style":757},[3526],{"type":63,"value":3527},"      \u003C",{"type":58,"tag":426,"props":3529,"children":3530},{"style":948},[3531],{"type":63,"value":3532},"div",{"type":58,"tag":426,"props":3534,"children":3535},{"style":908},[3536],{"type":63,"value":3537}," style",{"type":58,"tag":426,"props":3539,"children":3540},{"style":757},[3541],{"type":63,"value":3542},"={{",{"type":58,"tag":426,"props":3544,"children":3545},{"style":948},[3546],{"type":63,"value":3547}," height",{"type":58,"tag":426,"props":3549,"children":3550},{"style":757},[3551],{"type":63,"value":535},{"type":58,"tag":426,"props":3553,"children":3554},{"style":757},[3555],{"type":63,"value":832},{"type":58,"tag":426,"props":3557,"children":3558},{"style":439},[3559],{"type":63,"value":3560},"100vh",{"type":58,"tag":426,"props":3562,"children":3563},{"style":757},[3564],{"type":63,"value":842},{"type":58,"tag":426,"props":3566,"children":3567},{"style":757},[3568],{"type":63,"value":3569}," }}>\n",{"type":58,"tag":426,"props":3571,"children":3572},{"class":428,"line":1005},[3573,3578,3583],{"type":58,"tag":426,"props":3574,"children":3575},{"style":757},[3576],{"type":63,"value":3577},"        \u003C",{"type":58,"tag":426,"props":3579,"children":3580},{"style":433},[3581],{"type":63,"value":3582},"CopilotChat",{"type":58,"tag":426,"props":3584,"children":3585},{"style":757},[3586],{"type":63,"value":3587}," \u002F>\n",{"type":58,"tag":426,"props":3589,"children":3590},{"class":428,"line":1021},[3591,3596,3600],{"type":58,"tag":426,"props":3592,"children":3593},{"style":757},[3594],{"type":63,"value":3595},"      \u003C\u002F",{"type":58,"tag":426,"props":3597,"children":3598},{"style":948},[3599],{"type":63,"value":3532},{"type":58,"tag":426,"props":3601,"children":3602},{"style":757},[3603],{"type":63,"value":3604},">\n",{"type":58,"tag":426,"props":3606,"children":3607},{"class":428,"line":1029},[3608,3613,3617],{"type":58,"tag":426,"props":3609,"children":3610},{"style":757},[3611],{"type":63,"value":3612},"    \u003C\u002F",{"type":58,"tag":426,"props":3614,"children":3615},{"style":433},[3616],{"type":63,"value":9},{"type":58,"tag":426,"props":3618,"children":3619},{"style":757},[3620],{"type":63,"value":3604},{"type":58,"tag":426,"props":3622,"children":3623},{"class":428,"line":1063},[3624,3628],{"type":58,"tag":426,"props":3625,"children":3626},{"style":948},[3627],{"type":63,"value":2649},{"type":58,"tag":426,"props":3629,"children":3630},{"style":757},[3631],{"type":63,"value":847},{"type":58,"tag":426,"props":3633,"children":3634},{"class":428,"line":1080},[3635],{"type":58,"tag":426,"props":3636,"children":3637},{"style":757},[3638],{"type":63,"value":3639},"}\n",{"type":58,"tag":720,"props":3641,"children":3643},{"id":3642},"connecting-to-an-external-runtime",[3644],{"type":63,"value":3645},"Connecting to an external runtime",{"type":58,"tag":80,"props":3647,"children":3648},{},[3649],{"type":63,"value":3650},"When the runtime runs on a separate server (e.g., Express on port 4000):",{"type":58,"tag":415,"props":3652,"children":3654},{"className":3309,"code":3653,"language":3311,"meta":420,"style":420},"\u003CCopilotKit runtimeUrl=\"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fcopilotkit\" useSingleEndpoint>\n  {children}\n\u003C\u002FCopilotKit>\n",[3655],{"type":58,"tag":86,"props":3656,"children":3657},{"__ignoreMap":420},[3658,3699,3716],{"type":58,"tag":426,"props":3659,"children":3660},{"class":428,"line":429},[3661,3666,3670,3674,3678,3682,3687,3691,3695],{"type":58,"tag":426,"props":3662,"children":3663},{"style":757},[3664],{"type":63,"value":3665},"\u003C",{"type":58,"tag":426,"props":3667,"children":3668},{"style":433},[3669],{"type":63,"value":9},{"type":58,"tag":426,"props":3671,"children":3672},{"style":908},[3673],{"type":63,"value":3482},{"type":58,"tag":426,"props":3675,"children":3676},{"style":757},[3677],{"type":63,"value":921},{"type":58,"tag":426,"props":3679,"children":3680},{"style":757},[3681],{"type":63,"value":842},{"type":58,"tag":426,"props":3683,"children":3684},{"style":439},[3685],{"type":63,"value":3686},"http:\u002F\u002Flocalhost:4000\u002Fapi\u002Fcopilotkit",{"type":58,"tag":426,"props":3688,"children":3689},{"style":757},[3690],{"type":63,"value":842},{"type":58,"tag":426,"props":3692,"children":3693},{"style":908},[3694],{"type":63,"value":3503},{"type":58,"tag":426,"props":3696,"children":3697},{"style":757},[3698],{"type":63,"value":3604},{"type":58,"tag":426,"props":3700,"children":3701},{"class":428,"line":575},[3702,3707,3712],{"type":58,"tag":426,"props":3703,"children":3704},{"style":757},[3705],{"type":63,"value":3706},"  {",{"type":58,"tag":426,"props":3708,"children":3709},{"style":766},[3710],{"type":63,"value":3711},"children",{"type":58,"tag":426,"props":3713,"children":3714},{"style":757},[3715],{"type":63,"value":3639},{"type":58,"tag":426,"props":3717,"children":3718},{"class":428,"line":777},[3719,3724,3728],{"type":58,"tag":426,"props":3720,"children":3721},{"style":757},[3722],{"type":63,"value":3723},"\u003C\u002F",{"type":58,"tag":426,"props":3725,"children":3726},{"style":433},[3727],{"type":63,"value":9},{"type":58,"tag":426,"props":3729,"children":3730},{"style":757},[3731],{"type":63,"value":3604},{"type":58,"tag":80,"props":3733,"children":3734},{},[3735,3737,3742,3744,3749,3750,3755,3757,3763],{"type":63,"value":3736},"Set ",{"type":58,"tag":86,"props":3738,"children":3740},{"className":3739},[],[3741],{"type":63,"value":1952},{"type":63,"value":3743}," when the backend uses single-route endpoints (",{"type":58,"tag":86,"props":3745,"children":3747},{"className":3746},[],[3748],{"type":63,"value":683},{"type":63,"value":710},{"type":58,"tag":86,"props":3751,"children":3753},{"className":3752},[],[3754],{"type":63,"value":615},{"type":63,"value":3756}," with ",{"type":58,"tag":86,"props":3758,"children":3760},{"className":3759},[],[3761],{"type":63,"value":3762},"mode: \"single-route\"",{"type":63,"value":2695},{"type":58,"tag":720,"props":3765,"children":3767},{"id":3766},"copilotkit-key-props",[3768],{"type":63,"value":3769},"CopilotKit key props",{"type":58,"tag":267,"props":3771,"children":3772},{},[3773,3794],{"type":58,"tag":271,"props":3774,"children":3775},{},[3776],{"type":58,"tag":275,"props":3777,"children":3778},{},[3779,3784,3789],{"type":58,"tag":279,"props":3780,"children":3781},{},[3782],{"type":63,"value":3783},"Prop",{"type":58,"tag":279,"props":3785,"children":3786},{},[3787],{"type":63,"value":3788},"Type",{"type":58,"tag":279,"props":3790,"children":3791},{},[3792],{"type":63,"value":3793},"Description",{"type":58,"tag":290,"props":3795,"children":3796},{},[3797,3823,3856,3882,3916,3949,3982,4008,4041],{"type":58,"tag":275,"props":3798,"children":3799},{},[3800,3809,3818],{"type":58,"tag":297,"props":3801,"children":3802},{},[3803],{"type":58,"tag":86,"props":3804,"children":3806},{"className":3805},[],[3807],{"type":63,"value":3808},"runtimeUrl",{"type":58,"tag":297,"props":3810,"children":3811},{},[3812],{"type":58,"tag":86,"props":3813,"children":3815},{"className":3814},[],[3816],{"type":63,"value":3817},"string",{"type":58,"tag":297,"props":3819,"children":3820},{},[3821],{"type":63,"value":3822},"URL of the CopilotKit runtime endpoint",{"type":58,"tag":275,"props":3824,"children":3825},{},[3826,3834,3843],{"type":58,"tag":297,"props":3827,"children":3828},{},[3829],{"type":58,"tag":86,"props":3830,"children":3832},{"className":3831},[],[3833],{"type":63,"value":1952},{"type":58,"tag":297,"props":3835,"children":3836},{},[3837],{"type":58,"tag":86,"props":3838,"children":3840},{"className":3839},[],[3841],{"type":63,"value":3842},"boolean",{"type":58,"tag":297,"props":3844,"children":3845},{},[3846,3848,3854],{"type":63,"value":3847},"Set to ",{"type":58,"tag":86,"props":3849,"children":3851},{"className":3850},[],[3852],{"type":63,"value":3853},"true",{"type":63,"value":3855}," when using single-route endpoints",{"type":58,"tag":275,"props":3857,"children":3858},{},[3859,3868,3877],{"type":58,"tag":297,"props":3860,"children":3861},{},[3862],{"type":58,"tag":86,"props":3863,"children":3865},{"className":3864},[],[3866],{"type":63,"value":3867},"headers",{"type":58,"tag":297,"props":3869,"children":3870},{},[3871],{"type":58,"tag":86,"props":3872,"children":3874},{"className":3873},[],[3875],{"type":63,"value":3876},"Record\u003Cstring, string> | (() => Record\u003Cstring, string>)",{"type":58,"tag":297,"props":3878,"children":3879},{},[3880],{"type":63,"value":3881},"Custom headers sent with every request. The function form is evaluated per-request (useful for dynamic auth tokens).",{"type":58,"tag":275,"props":3883,"children":3884},{},[3885,3894,3903],{"type":58,"tag":297,"props":3886,"children":3887},{},[3888],{"type":58,"tag":86,"props":3889,"children":3891},{"className":3890},[],[3892],{"type":63,"value":3893},"credentials",{"type":58,"tag":297,"props":3895,"children":3896},{},[3897],{"type":58,"tag":86,"props":3898,"children":3900},{"className":3899},[],[3901],{"type":63,"value":3902},"RequestCredentials",{"type":58,"tag":297,"props":3904,"children":3905},{},[3906,3908,3914],{"type":63,"value":3907},"Fetch credentials mode (e.g., ",{"type":58,"tag":86,"props":3909,"children":3911},{"className":3910},[],[3912],{"type":63,"value":3913},"\"include\"",{"type":63,"value":3915}," for cookies)",{"type":58,"tag":275,"props":3917,"children":3918},{},[3919,3928,3936],{"type":58,"tag":297,"props":3920,"children":3921},{},[3922],{"type":58,"tag":86,"props":3923,"children":3925},{"className":3924},[],[3926],{"type":63,"value":3927},"publicLicenseKey",{"type":58,"tag":297,"props":3929,"children":3930},{},[3931],{"type":58,"tag":86,"props":3932,"children":3934},{"className":3933},[],[3935],{"type":63,"value":3817},{"type":58,"tag":297,"props":3937,"children":3938},{},[3939,3941,3947],{"type":63,"value":3940},"CopilotKit Intelligence public license key (",{"type":58,"tag":86,"props":3942,"children":3944},{"className":3943},[],[3945],{"type":63,"value":3946},"publicApiKey",{"type":63,"value":3948}," is a deprecated alias)",{"type":58,"tag":275,"props":3950,"children":3951},{},[3952,3961,3969],{"type":58,"tag":297,"props":3953,"children":3954},{},[3955],{"type":58,"tag":86,"props":3956,"children":3958},{"className":3957},[],[3959],{"type":63,"value":3960},"showDevConsole",{"type":58,"tag":297,"props":3962,"children":3963},{},[3964],{"type":58,"tag":86,"props":3965,"children":3967},{"className":3966},[],[3968],{"type":63,"value":3842},{"type":58,"tag":297,"props":3970,"children":3971},{},[3972,3974,3980],{"type":63,"value":3973},"Show the dev console. Omit it to get the default behavior (shown on ",{"type":58,"tag":86,"props":3975,"children":3977},{"className":3976},[],[3978],{"type":63,"value":3979},"localhost",{"type":63,"value":3981}," only)",{"type":58,"tag":275,"props":3983,"children":3984},{},[3985,3994,4003],{"type":58,"tag":297,"props":3986,"children":3987},{},[3988],{"type":58,"tag":86,"props":3989,"children":3991},{"className":3990},[],[3992],{"type":63,"value":3993},"renderToolCalls",{"type":58,"tag":297,"props":3995,"children":3996},{},[3997],{"type":58,"tag":86,"props":3998,"children":4000},{"className":3999},[],[4001],{"type":63,"value":4002},"ReactToolCallRenderer[]",{"type":58,"tag":297,"props":4004,"children":4005},{},[4006],{"type":63,"value":4007},"Custom renderers for tool call UI",{"type":58,"tag":275,"props":4009,"children":4010},{},[4011,4020,4029],{"type":58,"tag":297,"props":4012,"children":4013},{},[4014],{"type":58,"tag":86,"props":4015,"children":4017},{"className":4016},[],[4018],{"type":63,"value":4019},"frontendTools",{"type":58,"tag":297,"props":4021,"children":4022},{},[4023],{"type":58,"tag":86,"props":4024,"children":4026},{"className":4025},[],[4027],{"type":63,"value":4028},"ReactFrontendTool[]",{"type":58,"tag":297,"props":4030,"children":4031},{},[4032,4034,4040],{"type":63,"value":4033},"Frontend-defined tools (declarative alternative to ",{"type":58,"tag":86,"props":4035,"children":4037},{"className":4036},[],[4038],{"type":63,"value":4039},"useFrontendTool",{"type":63,"value":218},{"type":58,"tag":275,"props":4042,"children":4043},{},[4044,4053,4062],{"type":58,"tag":297,"props":4045,"children":4046},{},[4047],{"type":58,"tag":86,"props":4048,"children":4050},{"className":4049},[],[4051],{"type":63,"value":4052},"onError",{"type":58,"tag":297,"props":4054,"children":4055},{},[4056],{"type":58,"tag":86,"props":4057,"children":4059},{"className":4058},[],[4060],{"type":63,"value":4061},"(event) => void",{"type":58,"tag":297,"props":4063,"children":4064},{},[4065],{"type":63,"value":4066},"Global error handler",{"type":58,"tag":73,"props":4068,"children":4070},{"id":4069},"step-4-add-a-chat-ui-component",[4071],{"type":63,"value":4072},"Step 4: Add a chat UI component",{"type":58,"tag":80,"props":4074,"children":4075},{},[4076,4078,4083],{"type":63,"value":4077},"CopilotKit provides three pre-built chat layouts (all imported from ",{"type":58,"tag":86,"props":4079,"children":4081},{"className":4080},[],[4082],{"type":63,"value":3181},{"type":63,"value":4084},"):",{"type":58,"tag":267,"props":4086,"children":4087},{},[4088,4104],{"type":58,"tag":271,"props":4089,"children":4090},{},[4091],{"type":58,"tag":275,"props":4092,"children":4093},{},[4094,4099],{"type":58,"tag":279,"props":4095,"children":4096},{},[4097],{"type":63,"value":4098},"Component",{"type":58,"tag":279,"props":4100,"children":4101},{},[4102],{"type":63,"value":4103},"Usage",{"type":58,"tag":290,"props":4105,"children":4106},{},[4107,4123,4140],{"type":58,"tag":275,"props":4108,"children":4109},{},[4110,4118],{"type":58,"tag":297,"props":4111,"children":4112},{},[4113],{"type":58,"tag":86,"props":4114,"children":4116},{"className":4115},[],[4117],{"type":63,"value":3582},{"type":58,"tag":297,"props":4119,"children":4120},{},[4121],{"type":63,"value":4122},"Inline chat, fills its container",{"type":58,"tag":275,"props":4124,"children":4125},{},[4126,4135],{"type":58,"tag":297,"props":4127,"children":4128},{},[4129],{"type":58,"tag":86,"props":4130,"children":4132},{"className":4131},[],[4133],{"type":63,"value":4134},"CopilotSidebar",{"type":58,"tag":297,"props":4136,"children":4137},{},[4138],{"type":63,"value":4139},"Collapsible sidebar panel",{"type":58,"tag":275,"props":4141,"children":4142},{},[4143,4152],{"type":58,"tag":297,"props":4144,"children":4145},{},[4146],{"type":58,"tag":86,"props":4147,"children":4149},{"className":4148},[],[4150],{"type":63,"value":4151},"CopilotPopup",{"type":58,"tag":297,"props":4153,"children":4154},{},[4155],{"type":63,"value":4156},"Floating popup widget",{"type":58,"tag":80,"props":4158,"children":4159},{},[4160],{"type":63,"value":4161},"Example with sidebar:",{"type":58,"tag":415,"props":4163,"children":4165},{"className":3309,"code":4164,"language":3311,"meta":420,"style":420},"import { CopilotKit, CopilotSidebar } from \"@copilotkit\u002Freact-core\u002Fv2\";\n\n\u003CCopilotKit runtimeUrl=\"\u002Fapi\u002Fcopilotkit\" useSingleEndpoint={false}>\n  \u003CYourApp \u002F>\n  \u003CCopilotSidebar\n    defaultOpen\n    width=\"420px\"\n    labels={{\n      modalHeaderTitle: \"AI Assistant\",\n      chatInputPlaceholder: \"Ask me anything...\",\n    }}\n  \u002F>\n\u003C\u002FCopilotKit>;\n",[4166],{"type":58,"tag":86,"props":4167,"children":4168},{"__ignoreMap":420},[4169,4217,4224,4271,4288,4300,4308,4334,4347,4376,4405,4413,4421],{"type":58,"tag":426,"props":4170,"children":4171},{"class":428,"line":429},[4172,4176,4180,4184,4188,4193,4197,4201,4205,4209,4213],{"type":58,"tag":426,"props":4173,"children":4174},{"style":751},[4175],{"type":63,"value":754},{"type":58,"tag":426,"props":4177,"children":4178},{"style":757},[4179],{"type":63,"value":860},{"type":58,"tag":426,"props":4181,"children":4182},{"style":766},[4183],{"type":63,"value":3358},{"type":58,"tag":426,"props":4185,"children":4186},{"style":757},[4187],{"type":63,"value":2032},{"type":58,"tag":426,"props":4189,"children":4190},{"style":766},[4191],{"type":63,"value":4192}," CopilotSidebar",{"type":58,"tag":426,"props":4194,"children":4195},{"style":757},[4196],{"type":63,"value":870},{"type":58,"tag":426,"props":4198,"children":4199},{"style":751},[4200],{"type":63,"value":827},{"type":58,"tag":426,"props":4202,"children":4203},{"style":757},[4204],{"type":63,"value":832},{"type":58,"tag":426,"props":4206,"children":4207},{"style":439},[4208],{"type":63,"value":3181},{"type":58,"tag":426,"props":4210,"children":4211},{"style":757},[4212],{"type":63,"value":842},{"type":58,"tag":426,"props":4214,"children":4215},{"style":757},[4216],{"type":63,"value":847},{"type":58,"tag":426,"props":4218,"children":4219},{"class":428,"line":575},[4220],{"type":58,"tag":426,"props":4221,"children":4222},{"emptyLinePlaceholder":898},[4223],{"type":63,"value":901},{"type":58,"tag":426,"props":4225,"children":4226},{"class":428,"line":777},[4227,4231,4235,4239,4243,4247,4251,4255,4259,4263,4267],{"type":58,"tag":426,"props":4228,"children":4229},{"style":757},[4230],{"type":63,"value":3665},{"type":58,"tag":426,"props":4232,"children":4233},{"style":433},[4234],{"type":63,"value":9},{"type":58,"tag":426,"props":4236,"children":4237},{"style":908},[4238],{"type":63,"value":3482},{"type":58,"tag":426,"props":4240,"children":4241},{"style":757},[4242],{"type":63,"value":921},{"type":58,"tag":426,"props":4244,"children":4245},{"style":757},[4246],{"type":63,"value":842},{"type":58,"tag":426,"props":4248,"children":4249},{"style":439},[4250],{"type":63,"value":1228},{"type":58,"tag":426,"props":4252,"children":4253},{"style":757},[4254],{"type":63,"value":842},{"type":58,"tag":426,"props":4256,"children":4257},{"style":908},[4258],{"type":63,"value":3503},{"type":58,"tag":426,"props":4260,"children":4261},{"style":757},[4262],{"type":63,"value":3508},{"type":58,"tag":426,"props":4264,"children":4265},{"style":3511},[4266],{"type":63,"value":3514},{"type":58,"tag":426,"props":4268,"children":4269},{"style":757},[4270],{"type":63,"value":3519},{"type":58,"tag":426,"props":4272,"children":4273},{"class":428,"line":790},[4274,4279,4284],{"type":58,"tag":426,"props":4275,"children":4276},{"style":757},[4277],{"type":63,"value":4278},"  \u003C",{"type":58,"tag":426,"props":4280,"children":4281},{"style":433},[4282],{"type":63,"value":4283},"YourApp",{"type":58,"tag":426,"props":4285,"children":4286},{"style":757},[4287],{"type":63,"value":3587},{"type":58,"tag":426,"props":4289,"children":4290},{"class":428,"line":803},[4291,4295],{"type":58,"tag":426,"props":4292,"children":4293},{"style":757},[4294],{"type":63,"value":4278},{"type":58,"tag":426,"props":4296,"children":4297},{"style":433},[4298],{"type":63,"value":4299},"CopilotSidebar\n",{"type":58,"tag":426,"props":4301,"children":4302},{"class":428,"line":816},[4303],{"type":58,"tag":426,"props":4304,"children":4305},{"style":908},[4306],{"type":63,"value":4307},"    defaultOpen\n",{"type":58,"tag":426,"props":4309,"children":4310},{"class":428,"line":850},[4311,4316,4320,4324,4329],{"type":58,"tag":426,"props":4312,"children":4313},{"style":908},[4314],{"type":63,"value":4315},"    width",{"type":58,"tag":426,"props":4317,"children":4318},{"style":757},[4319],{"type":63,"value":921},{"type":58,"tag":426,"props":4321,"children":4322},{"style":757},[4323],{"type":63,"value":842},{"type":58,"tag":426,"props":4325,"children":4326},{"style":439},[4327],{"type":63,"value":4328},"420px",{"type":58,"tag":426,"props":4330,"children":4331},{"style":757},[4332],{"type":63,"value":4333},"\"\n",{"type":58,"tag":426,"props":4335,"children":4336},{"class":428,"line":894},[4337,4342],{"type":58,"tag":426,"props":4338,"children":4339},{"style":908},[4340],{"type":63,"value":4341},"    labels",{"type":58,"tag":426,"props":4343,"children":4344},{"style":757},[4345],{"type":63,"value":4346},"={{\n",{"type":58,"tag":426,"props":4348,"children":4349},{"class":428,"line":904},[4350,4355,4359,4363,4368,4372],{"type":58,"tag":426,"props":4351,"children":4352},{"style":948},[4353],{"type":63,"value":4354},"      modalHeaderTitle",{"type":58,"tag":426,"props":4356,"children":4357},{"style":757},[4358],{"type":63,"value":535},{"type":58,"tag":426,"props":4360,"children":4361},{"style":757},[4362],{"type":63,"value":832},{"type":58,"tag":426,"props":4364,"children":4365},{"style":439},[4366],{"type":63,"value":4367},"AI Assistant",{"type":58,"tag":426,"props":4369,"children":4370},{"style":757},[4371],{"type":63,"value":842},{"type":58,"tag":426,"props":4373,"children":4374},{"style":757},[4375],{"type":63,"value":774},{"type":58,"tag":426,"props":4377,"children":4378},{"class":428,"line":944},[4379,4384,4388,4392,4397,4401],{"type":58,"tag":426,"props":4380,"children":4381},{"style":948},[4382],{"type":63,"value":4383},"      chatInputPlaceholder",{"type":58,"tag":426,"props":4385,"children":4386},{"style":757},[4387],{"type":63,"value":535},{"type":58,"tag":426,"props":4389,"children":4390},{"style":757},[4391],{"type":63,"value":832},{"type":58,"tag":426,"props":4393,"children":4394},{"style":439},[4395],{"type":63,"value":4396},"Ask me anything...",{"type":58,"tag":426,"props":4398,"children":4399},{"style":757},[4400],{"type":63,"value":842},{"type":58,"tag":426,"props":4402,"children":4403},{"style":757},[4404],{"type":63,"value":774},{"type":58,"tag":426,"props":4406,"children":4407},{"class":428,"line":975},[4408],{"type":58,"tag":426,"props":4409,"children":4410},{"style":757},[4411],{"type":63,"value":4412},"    }}\n",{"type":58,"tag":426,"props":4414,"children":4415},{"class":428,"line":1005},[4416],{"type":58,"tag":426,"props":4417,"children":4418},{"style":757},[4419],{"type":63,"value":4420},"  \u002F>\n",{"type":58,"tag":426,"props":4422,"children":4423},{"class":428,"line":1021},[4424,4428,4432],{"type":58,"tag":426,"props":4425,"children":4426},{"style":757},[4427],{"type":63,"value":3723},{"type":58,"tag":426,"props":4429,"children":4430},{"style":433},[4431],{"type":63,"value":9},{"type":58,"tag":426,"props":4433,"children":4434},{"style":757},[4435],{"type":63,"value":4436},">;\n",{"type":58,"tag":73,"props":4438,"children":4440},{"id":4439},"step-5-set-environment-variables",[4441],{"type":63,"value":4442},"Step 5: Set environment variables",{"type":58,"tag":80,"props":4444,"children":4445},{},[4446,4448,4454,4456,4462],{"type":63,"value":4447},"Provider API keys are secrets. Store them in environment variables -- never hardcode them in source or commit them to version control. Create a ",{"type":58,"tag":86,"props":4449,"children":4451},{"className":4450},[],[4452],{"type":63,"value":4453},".env.local",{"type":63,"value":4455}," (Next.js) or ",{"type":58,"tag":86,"props":4457,"children":4459},{"className":4458},[],[4460],{"type":63,"value":4461},".env",{"type":63,"value":4463}," file:",{"type":58,"tag":415,"props":4465,"children":4469},{"className":4466,"code":4468,"language":63},[4467],"language-text","OPENAI_API_KEY=\u003Cyour-openai-api-key>\n",[4470],{"type":58,"tag":86,"props":4471,"children":4472},{"__ignoreMap":420},[4473],{"type":63,"value":4468},{"type":58,"tag":80,"props":4475,"children":4476},{},[4477,4479,4485,4487,4492,4493,4498,4499,4505],{"type":63,"value":4478},"Make sure your ",{"type":58,"tag":86,"props":4480,"children":4482},{"className":4481},[],[4483],{"type":63,"value":4484},".gitignore",{"type":63,"value":4486}," excludes env files (",{"type":58,"tag":86,"props":4488,"children":4490},{"className":4489},[],[4491],{"type":63,"value":4461},{"type":63,"value":203},{"type":58,"tag":86,"props":4494,"children":4496},{"className":4495},[],[4497],{"type":63,"value":4453},{"type":63,"value":203},{"type":58,"tag":86,"props":4500,"children":4502},{"className":4501},[],[4503],{"type":63,"value":4504},".env*.local",{"type":63,"value":4506},") so keys are never committed. In production, supply keys through your platform's secret manager (Vercel\u002FNetlify environment variables, AWS Secrets Manager, etc.) rather than a checked-in file.",{"type":58,"tag":80,"props":4508,"children":4509},{},[4510,4512,4518],{"type":63,"value":4511},"The ",{"type":58,"tag":86,"props":4513,"children":4515},{"className":4514},[],[4516],{"type":63,"value":4517},"BuiltInAgent",{"type":63,"value":4519}," automatically resolves API keys from these environment variables based on the model prefix:",{"type":58,"tag":111,"props":4521,"children":4522},{},[4523,4539,4554],{"type":58,"tag":115,"props":4524,"children":4525},{},[4526,4532,4534],{"type":58,"tag":86,"props":4527,"children":4529},{"className":4528},[],[4530],{"type":63,"value":4531},"openai\u002F*",{"type":63,"value":4533}," models read ",{"type":58,"tag":86,"props":4535,"children":4537},{"className":4536},[],[4538],{"type":63,"value":201},{"type":58,"tag":115,"props":4540,"children":4541},{},[4542,4548,4549],{"type":58,"tag":86,"props":4543,"children":4545},{"className":4544},[],[4546],{"type":63,"value":4547},"anthropic\u002F*",{"type":63,"value":4533},{"type":58,"tag":86,"props":4550,"children":4552},{"className":4551},[],[4553],{"type":63,"value":209},{"type":58,"tag":115,"props":4555,"children":4556},{},[4557,4563,4564],{"type":58,"tag":86,"props":4558,"children":4560},{"className":4559},[],[4561],{"type":63,"value":4562},"google\u002F*",{"type":63,"value":4533},{"type":58,"tag":86,"props":4565,"children":4567},{"className":4566},[],[4568],{"type":63,"value":216},{"type":58,"tag":80,"props":4570,"children":4571},{},[4572,4574,4580,4582,4588],{"type":63,"value":4573},"If you need to pass ",{"type":58,"tag":86,"props":4575,"children":4577},{"className":4576},[],[4578],{"type":63,"value":4579},"apiKey",{"type":63,"value":4581}," explicitly, always source it from the environment (",{"type":58,"tag":86,"props":4583,"children":4585},{"className":4584},[],[4586],{"type":63,"value":4587},"apiKey: process.env.OPENAI_API_KEY",{"type":63,"value":4589},") -- never inline a literal key.",{"type":58,"tag":73,"props":4591,"children":4593},{"id":4592},"step-6-connect-to-copilotkit-intelligence-telemetry",[4594],{"type":63,"value":4595},"Step 6: Connect to CopilotKit Intelligence (telemetry)",{"type":58,"tag":80,"props":4597,"children":4598},{},[4599],{"type":63,"value":4600},"CopilotKit uses telemetry to understand adoption, improve the product, and provide better support. Connecting to CopilotKit Intelligence gives you access to analytics and optional premium features.",{"type":58,"tag":165,"props":4602,"children":4603},{},[4604,4609,4647,4652,4657],{"type":58,"tag":115,"props":4605,"children":4606},{},[4607],{"type":63,"value":4608},"Ask the user if they'd like to connect to CopilotKit Intelligence (default: yes).",{"type":58,"tag":115,"props":4610,"children":4611},{},[4612,4614,4620,4622],{"type":63,"value":4613},"If yes, run the CopilotKit CLI authentication flow (verify the exact command with ",{"type":58,"tag":86,"props":4615,"children":4617},{"className":4616},[],[4618],{"type":63,"value":4619},"npx copilotkit --help",{"type":63,"value":4621}," as it may vary by version):\n",{"type":58,"tag":415,"props":4623,"children":4625},{"className":417,"code":4624,"language":419,"meta":420,"style":420},"npx copilotkit auth\n",[4626],{"type":58,"tag":86,"props":4627,"children":4628},{"__ignoreMap":420},[4629],{"type":58,"tag":426,"props":4630,"children":4631},{"class":428,"line":429},[4632,4637,4642],{"type":58,"tag":426,"props":4633,"children":4634},{"style":433},[4635],{"type":63,"value":4636},"npx",{"type":58,"tag":426,"props":4638,"children":4639},{"style":439},[4640],{"type":63,"value":4641}," copilotkit",{"type":58,"tag":426,"props":4643,"children":4644},{"style":439},[4645],{"type":63,"value":4646}," auth\n",{"type":58,"tag":115,"props":4648,"children":4649},{},[4650],{"type":63,"value":4651},"Guide the user through the browser-based authentication that opens.",{"type":58,"tag":115,"props":4653,"children":4654},{},[4655],{"type":63,"value":4656},"Once authentication completes, the CLI outputs a license key (a public, client-side project identifier -- not a secret).",{"type":58,"tag":115,"props":4658,"children":4659},{},[4660,4662,4667,4669,4678,4766,4768,4774,4775,4781],{"type":63,"value":4661},"Store the license key in an environment variable and reference it from the ",{"type":58,"tag":86,"props":4663,"children":4665},{"className":4664},[],[4666],{"type":63,"value":9},{"type":63,"value":4668}," provider -- this keeps it out of source and easy to rotate per environment:\n",{"type":58,"tag":415,"props":4670,"children":4673},{"className":4671,"code":4672,"language":63},[4467],"# .env.local (Next.js)\nNEXT_PUBLIC_COPILOTKIT_LICENSE_KEY=\u003Cyour-license-key>\n",[4674],{"type":58,"tag":86,"props":4675,"children":4676},{"__ignoreMap":420},[4677],{"type":63,"value":4672},{"type":58,"tag":415,"props":4679,"children":4681},{"className":3309,"code":4680,"language":3311,"meta":420,"style":420},"\u003CCopilotKit\n  runtimeUrl=\"\u002Fapi\u002Fcopilotkit\"\n  publicLicenseKey={process.env.NEXT_PUBLIC_COPILOTKIT_LICENSE_KEY}\n>\n",[4682],{"type":58,"tag":86,"props":4683,"children":4684},{"__ignoreMap":420},[4685,4697,4721,4759],{"type":58,"tag":426,"props":4686,"children":4687},{"class":428,"line":429},[4688,4692],{"type":58,"tag":426,"props":4689,"children":4690},{"style":757},[4691],{"type":63,"value":3665},{"type":58,"tag":426,"props":4693,"children":4694},{"style":433},[4695],{"type":63,"value":4696},"CopilotKit\n",{"type":58,"tag":426,"props":4698,"children":4699},{"class":428,"line":575},[4700,4705,4709,4713,4717],{"type":58,"tag":426,"props":4701,"children":4702},{"style":908},[4703],{"type":63,"value":4704},"  runtimeUrl",{"type":58,"tag":426,"props":4706,"children":4707},{"style":757},[4708],{"type":63,"value":921},{"type":58,"tag":426,"props":4710,"children":4711},{"style":757},[4712],{"type":63,"value":842},{"type":58,"tag":426,"props":4714,"children":4715},{"style":439},[4716],{"type":63,"value":1228},{"type":58,"tag":426,"props":4718,"children":4719},{"style":757},[4720],{"type":63,"value":4333},{"type":58,"tag":426,"props":4722,"children":4723},{"class":428,"line":777},[4724,4729,4733,4738,4742,4746,4750,4755],{"type":58,"tag":426,"props":4725,"children":4726},{"style":908},[4727],{"type":63,"value":4728},"  publicLicenseKey",{"type":58,"tag":426,"props":4730,"children":4731},{"style":757},[4732],{"type":63,"value":3508},{"type":58,"tag":426,"props":4734,"children":4735},{"style":766},[4736],{"type":63,"value":4737},"process",{"type":58,"tag":426,"props":4739,"children":4740},{"style":757},[4741],{"type":63,"value":2329},{"type":58,"tag":426,"props":4743,"children":4744},{"style":766},[4745],{"type":63,"value":2513},{"type":58,"tag":426,"props":4747,"children":4748},{"style":757},[4749],{"type":63,"value":2329},{"type":58,"tag":426,"props":4751,"children":4752},{"style":766},[4753],{"type":63,"value":4754},"NEXT_PUBLIC_COPILOTKIT_LICENSE_KEY",{"type":58,"tag":426,"props":4756,"children":4757},{"style":757},[4758],{"type":63,"value":3639},{"type":58,"tag":426,"props":4760,"children":4761},{"class":428,"line":790},[4762],{"type":58,"tag":426,"props":4763,"children":4764},{"style":757},[4765],{"type":63,"value":3604},{"type":63,"value":4767},"\nThe ",{"type":58,"tag":86,"props":4769,"children":4771},{"className":4770},[],[4772],{"type":63,"value":4773},"NEXT_PUBLIC_",{"type":63,"value":2408},{"type":58,"tag":86,"props":4776,"children":4778},{"className":4777},[],[4779],{"type":63,"value":4780},"VITE_",{"type":63,"value":4782}," prefix is required because the key is read on the client.",{"type":58,"tag":80,"props":4784,"children":4785},{},[4786,4788,4794],{"type":63,"value":4787},"See ",{"type":58,"tag":86,"props":4789,"children":4791},{"className":4790},[],[4792],{"type":63,"value":4793},"references\u002Ftelemetry-setup.md",{"type":63,"value":4795}," for full details on what the license key enables and how to opt out.",{"type":58,"tag":73,"props":4797,"children":4799},{"id":4798},"step-7-verify-the-setup",[4800],{"type":63,"value":4801},"Step 7: Verify the setup",{"type":58,"tag":165,"props":4803,"children":4804},{},[4805,4810,4815,4820,4825],{"type":58,"tag":115,"props":4806,"children":4807},{},[4808],{"type":63,"value":4809},"Start the dev server",{"type":58,"tag":115,"props":4811,"children":4812},{},[4813],{"type":63,"value":4814},"Open the app in a browser",{"type":58,"tag":115,"props":4816,"children":4817},{},[4818],{"type":63,"value":4819},"The chat UI should render and connect to the runtime",{"type":58,"tag":115,"props":4821,"children":4822},{},[4823],{"type":63,"value":4824},"Send a test message -- you should receive an AI response",{"type":58,"tag":115,"props":4826,"children":4827},{},[4828,4830,4836,4838,4843,4845,4851,4853,4859,4861,4867,4869,4875,4877,4882,4884,4890],{"type":63,"value":4829},"Check the runtime's info endpoint to confirm it reports available agents. For multi-route handlers this is ",{"type":58,"tag":86,"props":4831,"children":4833},{"className":4832},[],[4834],{"type":63,"value":4835},"GET \u002Fapi\u002Fcopilotkit\u002Finfo",{"type":63,"value":4837},"; for single-route handlers (",{"type":58,"tag":86,"props":4839,"children":4841},{"className":4840},[],[4842],{"type":63,"value":3762},{"type":63,"value":4844},", e.g. the Express example) it is a ",{"type":58,"tag":86,"props":4846,"children":4848},{"className":4847},[],[4849],{"type":63,"value":4850},"POST",{"type":63,"value":4852}," to the base path with body ",{"type":58,"tag":86,"props":4854,"children":4856},{"className":4855},[],[4857],{"type":63,"value":4858},"{ \"method\": \"info\" }",{"type":63,"value":4860}," (a plain ",{"type":58,"tag":86,"props":4862,"children":4864},{"className":4863},[],[4865],{"type":63,"value":4866},"GET",{"type":63,"value":4868}," will not return agent info — the Hono single-route handler answers ",{"type":58,"tag":86,"props":4870,"children":4872},{"className":4871},[],[4873],{"type":63,"value":4874},"405",{"type":63,"value":4876},", and the Express single-route router has no ",{"type":58,"tag":86,"props":4878,"children":4880},{"className":4879},[],[4881],{"type":63,"value":4866},{"type":63,"value":4883}," route so it falls through to a ",{"type":58,"tag":86,"props":4885,"children":4887},{"className":4886},[],[4888],{"type":63,"value":4889},"404",{"type":63,"value":218},{"type":58,"tag":66,"props":4892,"children":4894},{"id":4893},"security-notes",[4895],{"type":63,"value":4896},"Security notes",{"type":58,"tag":80,"props":4898,"children":4899},{},[4900],{"type":63,"value":4901},"Keep these in mind as you wire up a real deployment:",{"type":58,"tag":111,"props":4903,"children":4904},{},[4905,4922,4940,4988],{"type":58,"tag":115,"props":4906,"children":4907},{},[4908,4913,4915,4920],{"type":58,"tag":119,"props":4909,"children":4910},{},[4911],{"type":63,"value":4912},"Secrets stay server-side and in env vars.",{"type":63,"value":4914}," Provider API keys (",{"type":58,"tag":86,"props":4916,"children":4918},{"className":4917},[],[4919],{"type":63,"value":201},{"type":63,"value":4921},", etc.) are read by the runtime\u002Fagent on the server. Never expose them to the browser, hardcode them, or commit them -- store them in environment variables or a secret manager (see Step 5). The CopilotKit license key is the one client-side value, and it is a public project identifier, not a secret.",{"type":58,"tag":115,"props":4923,"children":4924},{},[4925,4930,4932,4938],{"type":58,"tag":119,"props":4926,"children":4927},{},[4928],{"type":63,"value":4929},"Treat all chat input as untrusted.",{"type":63,"value":4931}," Chat messages flow from the frontend through the ",{"type":58,"tag":86,"props":4933,"children":4935},{"className":4934},[],[4936],{"type":63,"value":4937},"CopilotRuntime",{"type":63,"value":4939}," endpoint into the agent's LLM context. They are user-controlled and can attempt prompt injection -- including indirect injection via content the agent fetches (web pages, documents, tool results). Do not assume the model will only do what your system prompt intends.",{"type":58,"tag":115,"props":4941,"children":4942},{},[4943,4948,4950,4956,4958,4964,4966,4971,4973,4979,4981,4986],{"type":58,"tag":119,"props":4944,"children":4945},{},[4946],{"type":63,"value":4947},"Give server-side tools least privilege.",{"type":63,"value":4949}," A ",{"type":58,"tag":86,"props":4951,"children":4953},{"className":4952},[],[4954],{"type":63,"value":4955},"defineTool",{"type":63,"value":4957},"'s ",{"type":58,"tag":86,"props":4959,"children":4961},{"className":4960},[],[4962],{"type":63,"value":4963},"execute",{"type":63,"value":4965}," function runs with your server's authority. Validate every argument (the ",{"type":58,"tag":86,"props":4967,"children":4969},{"className":4968},[],[4970],{"type":63,"value":638},{"type":63,"value":4972}," ",{"type":58,"tag":86,"props":4974,"children":4976},{"className":4975},[],[4977],{"type":63,"value":4978},"parameters",{"type":63,"value":4980}," schema is your first gate), scope each tool to the narrowest action it needs, and enforce your own authorization inside the ",{"type":58,"tag":86,"props":4982,"children":4984},{"className":4983},[],[4985],{"type":63,"value":4963},{"type":63,"value":4987}," function for anything sensitive (database writes, payments, file access) rather than trusting that the model called it correctly.",{"type":58,"tag":115,"props":4989,"children":4990},{},[4991,4996],{"type":58,"tag":119,"props":4992,"children":4993},{},[4994],{"type":63,"value":4995},"Authenticate the runtime endpoint.",{"type":63,"value":4997}," The runtime route is a public HTTP endpoint by default. Put your app's auth in front of it so only authorized users can drive the agent and consume provider credits.",{"type":58,"tag":66,"props":4999,"children":5001},{"id":5000},"quick-reference",[5002],{"type":63,"value":5003},"Quick Reference",{"type":58,"tag":73,"props":5005,"children":5007},{"id":5006},"package-map",[5008],{"type":63,"value":5009},"Package map",{"type":58,"tag":267,"props":5011,"children":5012},{},[5013,5029],{"type":58,"tag":271,"props":5014,"children":5015},{},[5016],{"type":58,"tag":275,"props":5017,"children":5018},{},[5019,5024],{"type":58,"tag":279,"props":5020,"children":5021},{},[5022],{"type":63,"value":5023},"Package",{"type":58,"tag":279,"props":5025,"children":5026},{},[5027],{"type":63,"value":5028},"Purpose",{"type":58,"tag":290,"props":5030,"children":5031},{},[5032,5054,5090],{"type":58,"tag":275,"props":5033,"children":5034},{},[5035,5043],{"type":58,"tag":297,"props":5036,"children":5037},{},[5038],{"type":58,"tag":86,"props":5039,"children":5041},{"className":5040},[],[5042],{"type":63,"value":3230},{"type":58,"tag":297,"props":5044,"children":5045},{},[5046,5048,5053],{"type":63,"value":5047},"React components, hooks, provider (import from ",{"type":58,"tag":86,"props":5049,"children":5051},{"className":5050},[],[5052],{"type":63,"value":3181},{"type":63,"value":218},{"type":58,"tag":275,"props":5055,"children":5056},{},[5057,5066],{"type":58,"tag":297,"props":5058,"children":5059},{},[5060],{"type":58,"tag":86,"props":5061,"children":5063},{"className":5062},[],[5064],{"type":63,"value":5065},"@copilotkit\u002Fruntime",{"type":58,"tag":297,"props":5067,"children":5068},{},[5069,5071,5076,5077,5082,5084,5089],{"type":63,"value":5070},"Runtime, endpoint factories, agent runners, ",{"type":58,"tag":86,"props":5072,"children":5074},{"className":5073},[],[5075],{"type":63,"value":4517},{"type":63,"value":203},{"type":58,"tag":86,"props":5078,"children":5080},{"className":5079},[],[5081],{"type":63,"value":4955},{"type":63,"value":5083}," (import from ",{"type":58,"tag":86,"props":5085,"children":5087},{"className":5086},[],[5088],{"type":63,"value":837},{"type":63,"value":218},{"type":58,"tag":275,"props":5091,"children":5092},{},[5093,5102],{"type":58,"tag":297,"props":5094,"children":5095},{},[5096],{"type":58,"tag":86,"props":5097,"children":5099},{"className":5098},[],[5100],{"type":63,"value":5101},"@copilotkit\u002Fshared",{"type":58,"tag":297,"props":5103,"children":5104},{},[5105],{"type":63,"value":5106},"Shared utilities, logger, types",{"type":58,"tag":73,"props":5108,"children":5110},{"id":5109},"endpoint-factory-functions",[5111],{"type":63,"value":5112},"Endpoint factory functions",{"type":58,"tag":267,"props":5114,"children":5115},{},[5116,5141],{"type":58,"tag":271,"props":5117,"children":5118},{},[5119],{"type":58,"tag":275,"props":5120,"children":5121},{},[5122,5127,5132,5136],{"type":58,"tag":279,"props":5123,"children":5124},{},[5125],{"type":63,"value":5126},"Function",{"type":58,"tag":279,"props":5128,"children":5129},{},[5130],{"type":63,"value":5131},"Import",{"type":58,"tag":279,"props":5133,"children":5134},{},[5135],{"type":63,"value":288},{"type":58,"tag":279,"props":5137,"children":5138},{},[5139],{"type":63,"value":5140},"Mode",{"type":58,"tag":290,"props":5142,"children":5143},{},[5144,5184],{"type":58,"tag":275,"props":5145,"children":5146},{},[5147,5155,5163,5168],{"type":58,"tag":297,"props":5148,"children":5149},{},[5150],{"type":58,"tag":86,"props":5151,"children":5153},{"className":5152},[],[5154],{"type":63,"value":683},{"type":58,"tag":297,"props":5156,"children":5157},{},[5158],{"type":58,"tag":86,"props":5159,"children":5161},{"className":5160},[],[5162],{"type":63,"value":837},{"type":58,"tag":297,"props":5164,"children":5165},{},[5166],{"type":63,"value":5167},"Next.js App Router, Hono standalone",{"type":58,"tag":297,"props":5169,"children":5170},{},[5171,5177,5179],{"type":58,"tag":86,"props":5172,"children":5174},{"className":5173},[],[5175],{"type":63,"value":5176},"\"multi-route\"",{"type":63,"value":5178}," (default) or ",{"type":58,"tag":86,"props":5180,"children":5182},{"className":5181},[],[5183],{"type":63,"value":3762},{"type":58,"tag":275,"props":5185,"children":5186},{},[5187,5195,5203,5208],{"type":58,"tag":297,"props":5188,"children":5189},{},[5190],{"type":58,"tag":86,"props":5191,"children":5193},{"className":5192},[],[5194],{"type":63,"value":615},{"type":58,"tag":297,"props":5196,"children":5197},{},[5198],{"type":58,"tag":86,"props":5199,"children":5201},{"className":5200},[],[5202],{"type":63,"value":2093},{"type":58,"tag":297,"props":5204,"children":5205},{},[5206],{"type":63,"value":5207},"Express standalone",{"type":58,"tag":297,"props":5209,"children":5210},{},[5211,5216,5217],{"type":58,"tag":86,"props":5212,"children":5214},{"className":5213},[],[5215],{"type":63,"value":5176},{"type":63,"value":5178},{"type":58,"tag":86,"props":5218,"children":5220},{"className":5219},[],[5221],{"type":63,"value":3762},{"type":58,"tag":3184,"props":5223,"children":5224},{},[5225],{"type":58,"tag":80,"props":5226,"children":5227},{},[5228,5229,5235,5236,5242,5243,5249,5251,5257,5259,5264],{"type":63,"value":4511},{"type":58,"tag":86,"props":5230,"children":5232},{"className":5231},[],[5233],{"type":63,"value":5234},"createCopilotEndpoint",{"type":63,"value":203},{"type":58,"tag":86,"props":5237,"children":5239},{"className":5238},[],[5240],{"type":63,"value":5241},"createCopilotEndpointSingleRoute",{"type":63,"value":203},{"type":58,"tag":86,"props":5244,"children":5246},{"className":5245},[],[5247],{"type":63,"value":5248},"createCopilotEndpointExpress",{"type":63,"value":5250},", and ",{"type":58,"tag":86,"props":5252,"children":5254},{"className":5253},[],[5255],{"type":63,"value":5256},"createCopilotEndpointSingleRouteExpress",{"type":63,"value":5258}," names are deprecated aliases of the two factories above. Prefer the handler factories with the ",{"type":58,"tag":86,"props":5260,"children":5262},{"className":5261},[],[5263],{"type":63,"value":2679},{"type":63,"value":5265}," option.",{"type":58,"tag":73,"props":5267,"children":5269},{"id":5268},"runtime-classes",[5270],{"type":63,"value":5271},"Runtime classes",{"type":58,"tag":267,"props":5273,"children":5274},{},[5275,5291],{"type":58,"tag":271,"props":5276,"children":5277},{},[5278],{"type":58,"tag":275,"props":5279,"children":5280},{},[5281,5286],{"type":58,"tag":279,"props":5282,"children":5283},{},[5284],{"type":63,"value":5285},"Class",{"type":58,"tag":279,"props":5287,"children":5288},{},[5289],{"type":63,"value":5290},"Use case",{"type":58,"tag":290,"props":5292,"children":5293},{},[5294,5310,5327],{"type":58,"tag":275,"props":5295,"children":5296},{},[5297,5305],{"type":58,"tag":297,"props":5298,"children":5299},{},[5300],{"type":58,"tag":86,"props":5301,"children":5303},{"className":5302},[],[5304],{"type":63,"value":4937},{"type":58,"tag":297,"props":5306,"children":5307},{},[5308],{"type":63,"value":5309},"Compatibility shim; auto-selects SSE or Intelligence mode",{"type":58,"tag":275,"props":5311,"children":5312},{},[5313,5322],{"type":58,"tag":297,"props":5314,"children":5315},{},[5316],{"type":58,"tag":86,"props":5317,"children":5319},{"className":5318},[],[5320],{"type":63,"value":5321},"CopilotSseRuntime",{"type":58,"tag":297,"props":5323,"children":5324},{},[5325],{"type":63,"value":5326},"Explicit SSE mode (default, in-memory threads)",{"type":58,"tag":275,"props":5328,"children":5329},{},[5330,5339],{"type":58,"tag":297,"props":5331,"children":5332},{},[5333],{"type":58,"tag":86,"props":5334,"children":5336},{"className":5335},[],[5337],{"type":63,"value":5338},"CopilotIntelligenceRuntime",{"type":58,"tag":297,"props":5340,"children":5341},{},[5342],{"type":63,"value":5343},"Intelligence mode (durable threads, realtime events)",{"type":58,"tag":73,"props":5345,"children":5347},{"id":5346},"agent-runners",[5348],{"type":63,"value":5349},"Agent runners",{"type":58,"tag":267,"props":5351,"children":5352},{},[5353,5368],{"type":58,"tag":271,"props":5354,"children":5355},{},[5356],{"type":58,"tag":275,"props":5357,"children":5358},{},[5359,5364],{"type":58,"tag":279,"props":5360,"children":5361},{},[5362],{"type":63,"value":5363},"Runner",{"type":58,"tag":279,"props":5365,"children":5366},{},[5367],{"type":63,"value":3793},{"type":58,"tag":290,"props":5369,"children":5370},{},[5371,5388],{"type":58,"tag":275,"props":5372,"children":5373},{},[5374,5383],{"type":58,"tag":297,"props":5375,"children":5376},{},[5377],{"type":58,"tag":86,"props":5378,"children":5380},{"className":5379},[],[5381],{"type":63,"value":5382},"InMemoryAgentRunner",{"type":58,"tag":297,"props":5384,"children":5385},{},[5386],{"type":63,"value":5387},"Default. Stores thread state in process memory. Suitable for development and single-instance deployments.",{"type":58,"tag":275,"props":5389,"children":5390},{},[5391,5400],{"type":58,"tag":297,"props":5392,"children":5393},{},[5394],{"type":58,"tag":86,"props":5395,"children":5397},{"className":5396},[],[5398],{"type":63,"value":5399},"IntelligenceAgentRunner",{"type":58,"tag":297,"props":5401,"children":5402},{},[5403,5405,5410],{"type":63,"value":5404},"Used automatically with ",{"type":58,"tag":86,"props":5406,"children":5408},{"className":5407},[],[5409],{"type":63,"value":5338},{"type":63,"value":5411},". Connects to CopilotKit Intelligence Platform via WebSocket.",{"type":58,"tag":73,"props":5413,"children":5415},{"id":5414},"supported-models-builtinagent",[5416],{"type":63,"value":5417},"Supported models (BuiltInAgent)",{"type":58,"tag":80,"props":5419,"children":5420},{},[5421,5423,5429,5431,5437],{"type":63,"value":5422},"Format: ",{"type":58,"tag":86,"props":5424,"children":5426},{"className":5425},[],[5427],{"type":63,"value":5428},"\"provider\u002Fmodel-name\"",{"type":63,"value":5430}," string or a Vercel AI SDK ",{"type":58,"tag":86,"props":5432,"children":5434},{"className":5433},[],[5435],{"type":63,"value":5436},"LanguageModel",{"type":63,"value":5438}," instance.",{"type":58,"tag":80,"props":5440,"children":5441},{},[5442,5447,5448,5454,5455,5461,5462,5468,5469,5475,5476,5482,5483,5488,5489,5495,5496,5502,5503,5509,5510],{"type":58,"tag":119,"props":5443,"children":5444},{},[5445],{"type":63,"value":5446},"OpenAI:",{"type":63,"value":4972},{"type":58,"tag":86,"props":5449,"children":5451},{"className":5450},[],[5452],{"type":63,"value":5453},"openai\u002Fgpt-5",{"type":63,"value":203},{"type":58,"tag":86,"props":5456,"children":5458},{"className":5457},[],[5459],{"type":63,"value":5460},"openai\u002Fgpt-5-mini",{"type":63,"value":203},{"type":58,"tag":86,"props":5463,"children":5465},{"className":5464},[],[5466],{"type":63,"value":5467},"openai\u002Fgpt-4.1",{"type":63,"value":203},{"type":58,"tag":86,"props":5470,"children":5472},{"className":5471},[],[5473],{"type":63,"value":5474},"openai\u002Fgpt-4.1-mini",{"type":63,"value":203},{"type":58,"tag":86,"props":5477,"children":5479},{"className":5478},[],[5480],{"type":63,"value":5481},"openai\u002Fgpt-4.1-nano",{"type":63,"value":203},{"type":58,"tag":86,"props":5484,"children":5486},{"className":5485},[],[5487],{"type":63,"value":964},{"type":63,"value":203},{"type":58,"tag":86,"props":5490,"children":5492},{"className":5491},[],[5493],{"type":63,"value":5494},"openai\u002Fgpt-4o-mini",{"type":63,"value":203},{"type":58,"tag":86,"props":5497,"children":5499},{"className":5498},[],[5500],{"type":63,"value":5501},"openai\u002Fo3",{"type":63,"value":203},{"type":58,"tag":86,"props":5504,"children":5506},{"className":5505},[],[5507],{"type":63,"value":5508},"openai\u002Fo3-mini",{"type":63,"value":203},{"type":58,"tag":86,"props":5511,"children":5513},{"className":5512},[],[5514],{"type":63,"value":5515},"openai\u002Fo4-mini",{"type":58,"tag":80,"props":5517,"children":5518},{},[5519,5524,5525,5531,5532,5538,5539,5545,5546,5552,5553,5559,5560],{"type":58,"tag":119,"props":5520,"children":5521},{},[5522],{"type":63,"value":5523},"Anthropic:",{"type":63,"value":4972},{"type":58,"tag":86,"props":5526,"children":5528},{"className":5527},[],[5529],{"type":63,"value":5530},"anthropic\u002Fclaude-sonnet-4.5",{"type":63,"value":203},{"type":58,"tag":86,"props":5533,"children":5535},{"className":5534},[],[5536],{"type":63,"value":5537},"anthropic\u002Fclaude-sonnet-4",{"type":63,"value":203},{"type":58,"tag":86,"props":5540,"children":5542},{"className":5541},[],[5543],{"type":63,"value":5544},"anthropic\u002Fclaude-3.7-sonnet",{"type":63,"value":203},{"type":58,"tag":86,"props":5547,"children":5549},{"className":5548},[],[5550],{"type":63,"value":5551},"anthropic\u002Fclaude-opus-4.1",{"type":63,"value":203},{"type":58,"tag":86,"props":5554,"children":5556},{"className":5555},[],[5557],{"type":63,"value":5558},"anthropic\u002Fclaude-opus-4",{"type":63,"value":203},{"type":58,"tag":86,"props":5561,"children":5563},{"className":5562},[],[5564],{"type":63,"value":5565},"anthropic\u002Fclaude-3.5-haiku",{"type":58,"tag":80,"props":5567,"children":5568},{},[5569,5574,5575,5581,5582,5588,5589],{"type":58,"tag":119,"props":5570,"children":5571},{},[5572],{"type":63,"value":5573},"Google:",{"type":63,"value":4972},{"type":58,"tag":86,"props":5576,"children":5578},{"className":5577},[],[5579],{"type":63,"value":5580},"google\u002Fgemini-2.5-pro",{"type":63,"value":203},{"type":58,"tag":86,"props":5583,"children":5585},{"className":5584},[],[5586],{"type":63,"value":5587},"google\u002Fgemini-2.5-flash",{"type":63,"value":203},{"type":58,"tag":86,"props":5590,"children":5592},{"className":5591},[],[5593],{"type":63,"value":5594},"google\u002Fgemini-2.5-flash-lite",{"type":58,"tag":80,"props":5596,"children":5597},{},[5598,5600,5605,5607,5612],{"type":63,"value":5599},"Any ",{"type":58,"tag":86,"props":5601,"children":5603},{"className":5602},[],[5604],{"type":63,"value":3817},{"type":63,"value":5606}," is accepted (for custom\u002Funlisted models); the provider is parsed from the prefix before ",{"type":58,"tag":86,"props":5608,"children":5610},{"className":5609},[],[5611],{"type":63,"value":2408},{"type":63,"value":2329},{"type":58,"tag":5614,"props":5615,"children":5616},"style",{},[5617],{"type":63,"value":5618},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":5620,"total":1029},[5621,5636,5655,5672,5684,5697,5710,5724,5730,5742,5757,5772],{"slug":5622,"name":5622,"fn":5623,"description":5624,"org":5625,"tags":5626,"stars":20,"repoUrl":21,"updatedAt":5635},"a2ui-renderer","render declarative agent UI surfaces","Render A2UI (Agent-to-UI declarative surfaces) in CopilotKit v2. Enable the runtime via CopilotRuntime({ a2ui: {...} }), then enable the provider via \u003CCopilotKit a2ui={{ theme }}>. Auto-activates via \u002Finfo — do NOT manually pass renderActivityMessages. createA2UIMessageRenderer ships from @copilotkit\u002Freact-core\u002Fv2; low-level primitives (A2UIProvider, A2UIRenderer, createCatalog) ship from @copilotkit\u002Fa2ui-renderer. Covers theme customization, createSurface dedup, action-bridge try\u002Ffinally cleanup. Load when an agent emits A2UI operations (createSurface \u002F updateComponents \u002F updateDataModel), when wiring a2ui on CopilotRuntime, or when styling A2UI surfaces.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5627,5628,5631,5632],{"name":9,"slug":8,"type":13},{"name":5629,"slug":5630,"type":13},"Design","design",{"name":18,"slug":19,"type":13},{"name":5633,"slug":5634,"type":13},"UI Components","ui-components","2026-07-12T08:06:36.722091",{"slug":5637,"name":5637,"fn":5638,"description":5639,"org":5640,"tags":5641,"stars":20,"repoUrl":21,"updatedAt":5654},"copilotkit-agui","build and debug CopilotKit agent backends","Use when building custom agent backends, implementing the AG-UI protocol, debugging streaming issues, or understanding how agents communicate with frontends. Covers event types, SSE transport, AbstractAgent\u002FHttpAgent patterns, state synchronization, tool calls, and human-in-the-loop flows.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5642,5644,5647,5650,5651],{"name":5643,"slug":29,"type":13},"Agents",{"name":5645,"slug":5646,"type":13},"API Development","api-development",{"name":5648,"slug":5649,"type":13},"Backend","backend",{"name":9,"slug":8,"type":13},{"name":5652,"slug":5653,"type":13},"Debugging","debugging","2026-07-12T08:06:22.179755",{"slug":5656,"name":5656,"fn":5657,"description":5658,"org":5659,"tags":5660,"stars":20,"repoUrl":21,"updatedAt":5671},"copilotkit-contribute","contribute to CopilotKit open-source project","Use when contributing to the CopilotKit open-source project — forking, cloning, setting up the monorepo, creating branches, running tests, and submitting pull requests against CopilotKit\u002FCopilotKit.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5661,5662,5665,5668],{"name":9,"slug":8,"type":13},{"name":5663,"slug":5664,"type":13},"Engineering","engineering",{"name":5666,"slug":5667,"type":13},"GitHub","github",{"name":5669,"slug":5670,"type":13},"Pull Requests","pull-requests","2026-07-12T08:06:30.102192",{"slug":5673,"name":5673,"fn":5674,"description":5675,"org":5676,"tags":5677,"stars":20,"repoUrl":21,"updatedAt":5683},"copilotkit-debug","diagnose and debug CopilotKit issues","Use when diagnosing CopilotKit issues -- runtime connectivity failures, agent not responding, streaming errors, tool execution problems, transcription failures, version mismatches, and AG-UI event tracing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5678,5679,5680],{"name":9,"slug":8,"type":13},{"name":5652,"slug":5653,"type":13},{"name":5681,"slug":5682,"type":13},"Observability","observability","2026-07-12T08:06:23.407872",{"slug":5685,"name":5685,"fn":5686,"description":5687,"org":5688,"tags":5689,"stars":20,"repoUrl":21,"updatedAt":5696},"copilotkit-develop","build AI features with CopilotKit","Use when building AI-powered features with CopilotKit v2 -- adding chat interfaces, registering frontend tools, sharing application context with agents, handling agent interrupts, and working with the CopilotKit runtime.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5690,5691,5694,5695],{"name":5643,"slug":29,"type":13},{"name":5692,"slug":5693,"type":13},"AI Context","ai-context",{"name":9,"slug":8,"type":13},{"name":18,"slug":19,"type":13},"2026-07-12T08:06:28.856644",{"slug":5698,"name":5698,"fn":5699,"description":5700,"org":5701,"tags":5702,"stars":20,"repoUrl":21,"updatedAt":5709},"copilotkit-integrations","integrate agent frameworks into CopilotKit applications","Use when wiring an external agent framework (LangGraph, CrewAI, PydanticAI, Mastra, ADK, LlamaIndex, Agno, Strands, Microsoft Agent Framework, or others) into a CopilotKit application via the AG-UI protocol.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5703,5704,5705,5706],{"name":5643,"slug":29,"type":13},{"name":5645,"slug":5646,"type":13},{"name":9,"slug":8,"type":13},{"name":5707,"slug":5708,"type":13},"Integrations","integrations","2026-07-12T08:06:32.560054",{"slug":5711,"name":5711,"fn":5712,"description":5713,"org":5714,"tags":5715,"stars":20,"repoUrl":21,"updatedAt":5723},"copilotkit-self-update","update CopilotKit agent skills","Use when the user wants to update, refresh, or reinstall the CopilotKit agent SKILLS (the SKILL.md files that teach this agent about CopilotKit). NOT for updating the CopilotKit codebase or project — this is specifically about refreshing the skills\u002Fknowledge this agent has loaded. Triggers on \"update copilotkit skills\", \"update skills\", \"refresh skills\", \"skills are stale\", \"skills are outdated\", \"get latest skills\", \"my copilotkit knowledge is wrong\", \"copilotkit APIs changed\", \"skills seem old\", \"wrong API names\", \"reinstall skills\", \"skills not working right\", \"update your copilotkit knowledge\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5716,5717,5720],{"name":9,"slug":8,"type":13},{"name":5718,"slug":5719,"type":13},"Documentation","documentation",{"name":5721,"slug":5722,"type":13},"Productivity","productivity","2026-07-12T08:06:31.345052",{"slug":4,"name":4,"fn":5,"description":6,"org":5725,"tags":5726,"stars":20,"repoUrl":21,"updatedAt":22},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5727,5728,5729],{"name":9,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"name":15,"slug":16,"type":13},{"slug":5731,"name":5731,"fn":5732,"description":5733,"org":5734,"tags":5735,"stars":20,"repoUrl":21,"updatedAt":5741},"copilotkit-upgrade","migrate CopilotKit applications to v2","Use when migrating a CopilotKit v1 application to v2 -- updating package imports, replacing deprecated hooks and components, switching from GraphQL runtime to AG-UI protocol runtime, and resolving breaking API changes.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5736,5737,5738],{"name":9,"slug":8,"type":13},{"name":5663,"slug":5664,"type":13},{"name":5739,"slug":5740,"type":13},"Migration","migration","2026-07-12T08:06:26.949801",{"slug":5743,"name":5743,"fn":5744,"description":5745,"org":5746,"tags":5747,"stars":20,"repoUrl":21,"updatedAt":5756},"react-core","integrate CopilotKit into React applications","@copilotkit\u002Freact-core — mount the CopilotKit provider (from @copilotkit\u002Freact-core\u002Fv2) in a Next.js App Router \u002F React Router v7 \u002F TanStack Start \u002F SPA app, drop in CopilotChat\u002FCopilotPopup\u002FCopilotSidebar (v2 chat components ship from react-core\u002Fv2 — NOT react-ui, which is CSS-only in v2), access and subscribe to agents with useAgent \u002F useAgentContext \u002F useCapabilities, switch between multiple agents, manage durable Intelligence threads with useThreads, register browser-side tools via useFrontendTool, render tool calls with useRenderTool \u002F useComponent \u002F useDefaultRenderTool, gate execution with useHumanInTheLoop, wire file attachments with useAttachments, configure suggestion pills, and register activity- and custom-message renderers. publicLicenseKey is canonical (publicApiKey is deprecated alias). Load the reference under references\u002F that matches your task.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5748,5749,5750,5753,5755],{"name":9,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"name":5751,"slug":5752,"type":13},"Next.js","next-js",{"name":5754,"slug":42,"type":13},"React",{"name":5633,"slug":5634,"type":13},"2026-07-12T08:06:15.72619",{"slug":5758,"name":5758,"fn":5759,"description":5760,"org":5761,"tags":5762,"stars":20,"repoUrl":21,"updatedAt":5771},"runtime","mount and configure CopilotRuntime servers","@copilotkit\u002Fruntime — mount a fetch-native CopilotRuntime on any JS server, wire middleware, pick an AgentRunner, instantiate BuiltInAgent (Factory Mode with TanStack AI is the preferred default) or plug in any of 12 external agent frameworks (Mastra, LangGraph, CrewAI Crews\u002FFlows, PydanticAI, ADK, LlamaIndex, Agno, AWS Strands, MS Agent Framework, AG2, A2A), enable Intelligence mode for durable threads + websocket, register server-side tools via defineTool, and wire voice transcription. Uses the fetch-based createCopilotRuntimeHandler primitive — the Express\u002FHono adapters are discouraged. Load the reference under references\u002F that matches your task.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5763,5764,5765,5768],{"name":5648,"slug":5649,"type":13},{"name":9,"slug":8,"type":13},{"name":5766,"slug":5767,"type":13},"JavaScript","javascript",{"name":5769,"slug":5770,"type":13},"Middleware","middleware","2026-07-12T08:06:10.034875",{"slug":5773,"name":5774,"fn":5775,"description":5776,"org":5777,"tags":5778,"stars":5788,"repoUrl":5789,"updatedAt":5790},"advanced-visualization-techniques","Advanced Visualization Techniques","create advanced generative UI visualizations","UI mockups, dashboards, advanced interactivity, generative art, simulations, math visualizations, and design system rules for producing rich generateSandboxedUi output.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5779,5782,5783,5784,5787],{"name":5780,"slug":5781,"type":13},"Dashboards","dashboards",{"name":5629,"slug":5630,"type":13},{"name":18,"slug":19,"type":13},{"name":5785,"slug":5786,"type":13},"Generative Art","generative-art",{"name":5633,"slug":5634,"type":13},1440,"https:\u002F\u002Fgithub.com\u002FCopilotKit\u002FOpenGenerativeUI","2026-07-12T08:06:40.712754",{"items":5792,"total":975},[5793,5800,5808,5815,5821,5828,5835],{"slug":5622,"name":5622,"fn":5623,"description":5624,"org":5794,"tags":5795,"stars":20,"repoUrl":21,"updatedAt":5635},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5796,5797,5798,5799],{"name":9,"slug":8,"type":13},{"name":5629,"slug":5630,"type":13},{"name":18,"slug":19,"type":13},{"name":5633,"slug":5634,"type":13},{"slug":5637,"name":5637,"fn":5638,"description":5639,"org":5801,"tags":5802,"stars":20,"repoUrl":21,"updatedAt":5654},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5803,5804,5805,5806,5807],{"name":5643,"slug":29,"type":13},{"name":5645,"slug":5646,"type":13},{"name":5648,"slug":5649,"type":13},{"name":9,"slug":8,"type":13},{"name":5652,"slug":5653,"type":13},{"slug":5656,"name":5656,"fn":5657,"description":5658,"org":5809,"tags":5810,"stars":20,"repoUrl":21,"updatedAt":5671},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5811,5812,5813,5814],{"name":9,"slug":8,"type":13},{"name":5663,"slug":5664,"type":13},{"name":5666,"slug":5667,"type":13},{"name":5669,"slug":5670,"type":13},{"slug":5673,"name":5673,"fn":5674,"description":5675,"org":5816,"tags":5817,"stars":20,"repoUrl":21,"updatedAt":5683},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5818,5819,5820],{"name":9,"slug":8,"type":13},{"name":5652,"slug":5653,"type":13},{"name":5681,"slug":5682,"type":13},{"slug":5685,"name":5685,"fn":5686,"description":5687,"org":5822,"tags":5823,"stars":20,"repoUrl":21,"updatedAt":5696},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5824,5825,5826,5827],{"name":5643,"slug":29,"type":13},{"name":5692,"slug":5693,"type":13},{"name":9,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"slug":5698,"name":5698,"fn":5699,"description":5700,"org":5829,"tags":5830,"stars":20,"repoUrl":21,"updatedAt":5709},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5831,5832,5833,5834],{"name":5643,"slug":29,"type":13},{"name":5645,"slug":5646,"type":13},{"name":9,"slug":8,"type":13},{"name":5707,"slug":5708,"type":13},{"slug":5711,"name":5711,"fn":5712,"description":5713,"org":5836,"tags":5837,"stars":20,"repoUrl":21,"updatedAt":5723},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5838,5839,5840],{"name":9,"slug":8,"type":13},{"name":5718,"slug":5719,"type":13},{"name":5721,"slug":5722,"type":13}]