Browser SDK

If you're building a chatbot app on the web, we provide a browser SDK to help you record conversations and track user feedback.


Install the package

Install the package from NPM:

npm install llmonitor

In your frontend code, initialize the SDK with your app ID:

import monitor from "llmonitor/browser"
appId: "YOUR APP ID",

Track a user message and bot reply

Next, you can use the monitor object to track user messages and bot replies:

const id = monitor.trackUserMessage("Hello")
monitor.trackBotMessage(id, "Hi there, how can I help you?")

Track a user feedback

Finally, you can track user feedback on the bot replies:

The ID is the same as the one returned by trackUserMessage.

monitor.trackFeedback(id, { thumbs: up })


Questions? We're here to help.