Skip to main content

Prerequisites

Add the chat page

Replace app/page.tsx with a client page:
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.