Files
Jordan Ritter b957f955e0 chore(showcase): align @copilotkit/* + @ag-ui/* deps across integrations
Aligns dependency versions across all 19 showcase integrations to current
released minor versions for the 1.60.2 release cycle.

Package families:
- @copilotkit/{a2ui-renderer, react-core, react-ui, runtime, shared, sdk-js, voice}
  1.59.4 -> 1.60.2 (18 integrations already staged; ms-agent-harness-dotnet
  catches up from 1.57.2)
- @ag-ui/{client, core, encoder} 0.0.55 -> 0.0.57
- @ag-ui/mastra 0.2.1-beta.2 -> 0.2.4 (stable on 0.x; 1.0.x major held back)

Includes the previously-missed ms-agent-harness-dotnet integration in the
@copilotkit/* bump, plus the @copilotkit/web-inspector override pin.

Lockfile-only reconciliation via npm install --package-lock-only
--legacy-peer-deps (cmdk@0.2.1 pre-existing react^18 peer-dep is unaffected).
2026-06-17 11:33:43 -07:00
..

Built-in Agent (TanStack AI) Showcase

CopilotKit's BuiltInAgent in factory mode with TanStack AI as the LLM backend.

The agent runs in-process inside the Next.js API route — there is no separate agent server process to start (unlike the LangGraph TypeScript variant which spawns langgraph-cli on port 8123).

Quick Start

Prerequisites

  • Node.js 18+
  • An OpenAI API key

Setup

  1. Clone & install dependencies
npm install
  1. Set environment variables

Create a .env.local file from .env.example:

cp .env.example .env.local

Then fill in your OPENAI_API_KEY:

OPENAI_API_KEY=sk-...
NEXT_PUBLIC_COPILOTKIT_AGENT=default
  1. Start the dev server
npm run dev

Open http://localhost:3000 to see the demo index.

Build

npm run build

Architecture

  • Agent Factory: See src/lib/factory/tanstack-factory.ts for the BuiltInAgent wiring and TanStack AI integration.
  • Tools: Defined in:
    • src/lib/factory/state-tools.ts — state management tools
    • src/lib/factory/server-tools.ts — server-side tools
    • src/lib/factory/subagent-tools.ts — sub-agent tools
  • API Route: src/app/api/copilotkit/[[...slug]]/route.ts handles the AG-UI protocol.

Next Steps

Phase 3+ will add individual demo pages under src/app/demos/.