Streaming Demo

Real-time Chat Streaming

Experience AI Kit's streaming capabilities with real-time message rendering, markdown support, and code highlighting.

Start a Conversation

Try one of the example prompts or type your own message to see streaming in action.

AI Kit Features Used

useAIStream

Hook for managing stream state

Hook

StreamingMessage

Real-time message rendering

Component

MarkdownRenderer

Rich text formatting

Component

CodeBlock

Syntax highlighting

Component

Quick Start

import { useAIStream } from '@ainative/ai-kit';

const { stream, isStreaming } = useAIStream({
  url: '/api/chat',
  onChunk: (chunk) => {
    setContent(prev => prev + chunk);
  },
});