mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
728ed61ce8
The langgraph-python voice cell sat at D4 even when its d5-voice probe row was green. Root cause: the dashboard's CATALOG_TO_D5_KEY mirror in showcase/shell-dashboard/src/lib/live-status.ts was missing voice -> ["voice"], so computeMaxPossible capped voice at D4 regardless of probe state. The harness REGISTRY_TO_D5 already had the entry; only the dashboard mirror was out of sync. Separately, the "Play sample" button used to fetch sample.wav and POST it to /transcribe. With aimock that meant both the sample button AND the mic returned the same canned response, which made it impossible to demo the mic path locally without conflating the two affordances. Reworked the button into a synchronous static-text injector (onTranscribed(sampleText)) so: - Sample button = deterministic test/demo affordance, no runtime calls. - Mic = real Whisper transcription via /transcribe. Synced across all 18 voice-enabled integrations. Phrase stays "What is the weather in Tokyo?" so aimock's "weather in Tokyo" substring fixture still matches. Also adds the missing d5-voice.test.ts companion (every other d5-* probe script has one) and trims the langgraph-python qa/voice.md + e2e steps that depended on the now-removed async behavior.
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
- Clone & install dependencies
npm install
- 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
- 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.tsfor theBuiltInAgentwiring and TanStack AI integration. - Tools: Defined in:
src/lib/factory/state-tools.ts— state management toolssrc/lib/factory/server-tools.ts— server-side toolssrc/lib/factory/subagent-tools.ts— sub-agent tools
- API Route:
src/app/api/copilotkit/[[...slug]]/route.tshandles the AG-UI protocol.
Next Steps
Phase 3+ will add individual demo pages under src/app/demos/.