Skip to Content
DocumentationProactive Triggers

Proactive Triggers

GuideKit can proactively reach out to users based on behavioral signals, helping them before they ask.

Overview

The Proactive Trigger Engine observes user behavior through the User Awareness System and fires triggers when conditions are met. Each trigger has a cooldown to prevent overwhelming the user.

Awareness Signals

SignalDescription
viewportVisible area and scroll position
scrollScroll depth and direction
dwellTime spent on a specific element
idleUser has been inactive for a threshold
rage_clickRapid repeated clicks on the same area

Configuring Triggers

<GuideKitProvider tokenEndpoint="/api/guidekit/token" agent={{ name: 'Guide' }} options={{ proactive: { enabled: true, triggers: [ { signal: 'idle', threshold: 30000, // 30 seconds message: 'Need help finding something?', cooldown: 300000, // 5 minutes }, { signal: 'rage_click', threshold: 3, message: 'It looks like something is not working. Can I help?', cooldown: 60000, // 1 minute }, { signal: 'dwell', selector: '#pricing-table', threshold: 10000, // 10 seconds message: 'Have questions about our pricing plans?', cooldown: 600000, // 10 minutes }, ], }, }} > {children} </GuideKitProvider>

Cooldowns

Each trigger tracks its own cooldown timer. After a trigger fires, it will not fire again until the cooldown period elapses. Cooldowns are stored in memory and reset on page reload.

Events

Proactive triggers emit events through the EventBus. Listen via core.bus.on('llm:response-start', ...) to track when proactive messages are sent.

Last updated on