Skip to main content

What You’ll Build

A customer support chatbot that:
  • Answers questions from your documentation
  • Maintains conversation context
  • Streams responses in real-time
  • Displays source citations
Time: 30 minutes
Prerequisites: Cuadra AI account, Node.js 18+

Step 1: Create a Model

Create an AI model via the Dashboard or API. First, pick a base model from the catalog, then create your custom model. For API access, authenticate via M2M OAuth 2.0:
Save the returned id (e.g., model_abc123).

Step 2: Create a Knowledge Base

Upload your documentation:

Create Dataset

Upload Documents

Upload files and associate them with the dataset:

Connect your knowledge base:

Step 4: Add System Prompt

Create a particle for the bot’s behavior:

Create System Prompt

Attach to Model


Step 5: Test via API

Verify everything works:
You should see a response with content from your documentation and source citations.

Step 6: Build the React UI

Install the Cuadra AI UI Kit:
Create the chat component:

Step 7: User Authentication

Users authenticate via your Stytch B2B integration. The session token from Stytch is passed to the UI Kit.

Frontend Integration

Proxy Mode (Alternative)

If you prefer backend-handled auth, route requests through your backend: Frontend:
Backend Proxy:

Next Steps

Knowledge Bases

Add more data sources

System Prompts

Customize behavior

Streaming

Real-time responses

Usage

Track usage