useChat hook.
Prerequisites
- A running Agent service exposing a
send-messageendpoint (SSE) - React app with
@ag-kit/ui-reactinstalled
Quick start (React)
typescript
What this includes
- Rendering user and assistant text messages from
uiMessages - Streaming UX: disable input and show a simple “typing” indicator via
streaming - Headless approach: you fully control layout and styling
What’s next
- Client Side Tools: see Client Side Tools
- Human-in-the-Loop (approvals & inputs): see Human in the Loop
- Generative UI (agent-rendered UI blocks): see Generative UI