Documentation Index
Fetch the complete documentation index at: https://onlook.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Properties
Current attention score (0–100). Read-only.
session.status
'active' | 'idle' | 'dropped' | 'stopped'
Current session status.
Unique session ID (e.g. sess_8xK2mP9q).
Methods
session.on(event, handler)
Subscribe to a session event. See Events for all event types.
session.on('score', ({ score }) => console.log(score))
session.on('drop', ({ score }) => showNudge())
session.on('stopped', () => cleanup())
session.stop()
Stop the session, flush the final score to the ingest layer, and remove all event listeners.
// On page unload
window.addEventListener('beforeunload', () => session.stop())
session.pause() / session.resume()
Temporarily suspend signal collection without ending the session.
session.pause() // stop collecting signals
session.resume() // restart signal collection