Files
Ran Shem Tov 24a93672f1 feat(showcase): bump CopilotKit 1.61.1 -> 1.61.2 and adopt A2UI catalog auto-inject (#5611)
Bump the canonical CopilotKit pin across all showcase integrations + shell
to 1.61.2 (canonical-pins.json, every package.json + package-lock.json),
which carries CopilotKit#5611: passing a catalog to the provider
(`<CopilotKit a2ui={{ catalog }}>`) now auto-enables A2UI and defaults tool
injection on, so the runtime no longer needs an explicit `a2ui` config.

Demonstrate the feature on the A2UI dynamic (declarative-gen-ui) demos by
removing the now-redundant runtime `a2ui` block (`injectA2UITool: true` +
`defaultCatalogId`) from:
  - langgraph-python, langgraph-fastapi, langgraph-typescript
  - strands, strands-typescript
  - google-adk

The forwarded catalog supplies its own catalogId (sdk-js A2UI middleware
auto-derives `defaultCatalogId` from it), so the previous "Catalog not found"
fallback no longer applies.

Verified: validate-pins drift ratchet unchanged (38 / same hash);
langgraph-python D6 `gen-ui-declarative` green end-to-end (no Catalog-not-found).
2026-06-25 14:03:36 +02: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/.