Web Chat is how you embed an agent inside your own app. It is an Agent Communication Infrastructure (ACI) channel, the same layer Slack and Teams use, except you own the surface: message list, composer, and layout.
The React client is useWebChat from @novu/react. There is no prebuilt <WebChat /> component. If you are not on React, use conversation() from @novu/js.
Setup#
Create an agent and keep it active. Then add the channel in the dashboard:
- Open the agent in the Novu dashboard.
- Add Web Chat. Novu creates the
novu-web-chatintegration if it is missing.
Install#
Collect these values from the dashboard, then install @novu/react:
- Application identifier from API Keys
- A subscriber id for the signed-in person
- The public agent identifier from the agent page
@novu/react requires React 18 or later (^18.0.0 or ^19.0.0).
Place NovuProvider above the chat. useWebChat gets the Novu client from that context.
NovuProvider signs the subscriber in. useWebChat selects which agent to talk to.
Replace YOUR_* placeholders with values from API Keys and Subscribers.
Add Novu Web Chat to a React app#
Install @novu/react. Wrap the app in NovuProvider. Call useWebChat and render your own message list and composer. There is no prebuilt <WebChat /> component.
Canonical example: https://docs.novu.co/agents/channels/web-chat
ALWAYS:
- Detect the project’s package manager and use it for installation
- Use
NovuProviderfrom@novu/react(not a second Novu client) - Pass the dashboard agent identifier as
agentId - Disable the composer while
isRunningorisLoadingis true - Use TypeScript, no comments, no empty props
NEVER:
- Invent a
<WebChat />component from@novu/react. It does not exist. - Use
useChatfrom@ai-sdk/react. Web Chat usesuseWebChat. - Compute HMAC hashes in the browser
- Hardcode real API keys
Send a first message#
Call useWebChat inside NovuProvider. Render text parts, then send with sendMessage.
Omit conversationId to start a new chat. The first successful send creates the conversation.
What to read next#
Render message parts in the timeline.
Tool calls, approval, and MCP connect.
Custom data parts and structured UI.
Resume chats, load history, and reconnect.
Build with the assistant-ui library.
HMAC hashes before you ship to production.
Hook props, return value, and callbacks.
Call loadWebChat(novu), then novu.webChat.conversation() in @novu/js.