intentlm-sdk
v0.1.3
Published
intentLM browser SDK — real-time behavioral intent classification
Maintainers
Readme
intentlm-sdk
Browser SDK for intentLM — real-time behavioral intent classification. Only integer token IDs leave the browser; raw URLs and PII stay on the client.
Install
npm install intentlm-sdkQuick start
import { intentLM } from 'intentlm-sdk'
intentLM.init({
apiKey: 'ilm_live_...',
useRemoteConfig: true,
configBaseUrl: '/api/intentlm',
consentCheck: () => window.ConsentManager?.hasGranted('analytics') ?? false,
patterns: {
'/': 101,
'/pricing*': 102,
'/checkout/**': 203,
},
})Production apps should proxy /api/intentlm to the intentLM Config API (see dashboard Setup).
Subpath exports
| Import | Use |
|--------|-----|
| intentlm-sdk | Core SDK |
| intentlm-sdk/react | React view helpers |
| intentlm-sdk/actions | Intent-driven UI actions |
Onboarding
Use the CLI to scan routes and generate config:
npx @intentlm/cli init --pushDocs
- intentlm.ai
- Dashboard Setup → Install / URL patterns
