An AI chat SDK for React and JavaScript
Add an AI assistant to your website or app. Use the React hook or a script tag for a finished interface, or go headless over WebSocket and build your own. The SDK is in developer beta.
Card required. No charge if you cancel within 14 days. Available to businesses in the UK and US.
- React, JavaScript and headless
- Voice input
- Light and dark themes
import { useMasheev } from "@masheev/embed-sdk/react";
function SupportButton() {
const masheev = useMasheev({
inboxId: "inb_123",
mode: "chat-widget", // floating bubble
position: "right",
colorScheme: "auto",
});
return (
<button onClick={() => masheev.open()}>
Need help?
</button>
);
}What is the Masheev chat SDK?
The Masheev chat SDK (@masheev/embed-sdk) embeds an AI assistant in a web or React application. It has three entry points: a React hook (/react), a vanilla JS build (a script tag or init()), and a headless package (/headless) that streams over WebSocket so you can build your own interface.
The prebuilt interface has three modes: a floating chat widget, a prompt bar and an embedded panel. Each supports theming, voice input, read-aloud, live context updates and events. The same assistant can also act in your app through custom tools.
What the SDK includes
A React hook
useMasheev returns open and close, send, events, live context updates and an isReady flag, so the assistant is a few lines of code.
Three interface modes
A floating chat-widget bubble, a prompt-input bar, or an embedded panel that fills a container you control.
A headless option
The headless package skips the iframe and streams messages over WebSocket, so you build the chat interface with your own components.
Matches your product
Light, dark or automatic color scheme, plus your own placeholder, agent name and starter questions.
Voice input and read-aloud
Speech-input and read-aloud hooks let people talk to the assistant and hear its answers, as well as type.
Live context and events
Pass user identity and context at runtime, and subscribe to ready, message, resolved and tool events to respond in your app.
Bring your own interface
When the design has to be yours, go headless. Masheev handles the AI, streaming and session; you render the conversation.
import { MasheevProvider, useMasheev } from "@masheev/embed-sdk/headless";
function Chat() {
const { messages, sendMessage, isConnected } = useMasheev();
// Render messages with your own components
return <YourChatUI messages={messages} onSend={sendMessage} />;
}
// Wrap your app: streams over WebSocket, no iframe
<MasheevProvider config={{ inboxId: "inb_123" }}>
<Chat />
</MasheevProvider>Frequently asked questions
Add the assistant to your product
Install the SDK, pass your inbox ID, and use the prebuilt interface or your own.
Card required. No charge if you cancel within 14 days. Available to businesses in the UK and US.