Skip to main content

Prerequisites

Add the chat page

Replace app/page.tsx with a client page:
// app/page.tsx
"use client";

import { Chat, useChat } from "veryfront/chat";

export default function Home() {
  const chat = useChat();

  return <Chat {...chat} placeholder="Ask me anything..." />;
}
useChat() uses /api/ag-ui by default. Chat renders the composer, messages, loading state, and streamed assistant response.

Verify it worked

Open http://localhost:3000, send a message, and ensure the assistant response streams into the chat. For custom layouts, see Chat UI.