mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
ac66995bf8
24 examples bumped from various 15.0-15.4 versions to 15.5.15. chat-with-your-data bumped from 15.6.0-canary to 16.1.7. next-openai: moved OpenAI client init into handlers (15.5 evaluates edge routes at build time). Remaining on 14.x: next-pages-router(v1), state-machine, travel, banking, enterprise-brex, presentation, todo — require major rewrite.
CopilotKit v2 Client Example
This is a minimal Next.js client that connects to the v2 Express runtime.
Setup
pnpm -C ../../ install
Create a local env file:
cp .env.example .env.local
Optionally edit NEXT_PUBLIC_COPILOTKIT_RUNTIME_URL in .env.local.
Run
pnpm -C ../../ --filter next-pages-router example-dev
Then open:
http://localhost:3000
Build
pnpm -C ../../ --filter next-pages-router example-build
Notes
- This example uses the Next.js App Router (
app/directory). - The client sets
useSingleEndpointto match the Express runtime.