Chatbot SDK Integration

Getting Started

Install the AI Tutor in your project and verify the first screen

5-minute quick start

For React and Next.js projects, we recommend the npm package.

1. Install the package

npm install @coxwave/tap-kit

2. Render the Chatbot

'use client';

import { TapKit, useTapKit } from '@coxwave/tap-kit/react';

export function CourseChatbot() {
  const tapkit = useTapKit({
    apiKey: 'your-api-key',
    userId: 'user-123',
    courseId: 'course-456',
    clipId: 'clip-789',
    mode: 'inline',
  });

  return <TapKit control={tapkit.control} style={{ height: '600px' }} />;
}

Next.js App Router

useTapKit uses browser APIs. Add 'use client' at the top of the component file.

3. Verify the installation

The basic installation is complete when:

  • The Chatbot area appears on the page.
  • The question input is enabled.
  • The browser console shows no TapKit initialization errors.
  • If course preprocessing is complete, the Chatbot answers questions about the lecture.

Common issues

SymptomCheck first
The Chatbot does not appearThe API key and Chatbot container height
The UI appears but does not answerCourse preprocessing and the courseId and clipId values
Next.js does not initializeThe 'use client' directive
The CDN script does not loadCSP script-src and network firewall rules

Open the full troubleshooting guide →

Next steps