Skip to main content

What Are Events?

Events represent friction points in your application where users might need help. Each event has:
  • Name: A unique identifier (e.g., checkout_abandoned, signup_stuck)
  • Label: A human-readable display name
  • Description: What this event represents
  • Prompt Template: Instructions for your agent with context placeholders

The Trigger Flow

  1. Your code detects a friction point and calls boostgpt.trigger()
  2. The API finds the event, builds a message using the template and context
  3. Your agent receives the message and generates a helpful response
  4. The user sees the trigger UI, clicks, and starts a conversation

Context Variables

Context is the data you pass with each trigger. It gets injected into the prompt template.

Auto-Created Events

If you trigger an event that doesn’t exist, it’s automatically created with:
  • Name: The event name you provided
  • Label: Auto-generated from name (e.g., checkout_abandoned → “Checkout Abandoned”)
  • Prompt Template: Default template that includes all context
This lets you start triggering immediately without pre-configuring events.

Event Properties

Plan Mode Progress Events

When using chat_mode: 'plan', the following progress events are emitted during processing: These events only fire during plan mode requests. Once a plan is approved and execution begins, standard agent tool execution events are emitted instead.

Best Practices

Names should clearly indicate the friction point:
  • checkout_payment_failed
  • onboarding_step3_stuck
  • event1
  • help_needed
Pass information that helps your agent provide better assistance:
  • Current page or step
  • Error messages (if applicable)
  • User’s progress or history
  • Product/cart details
Templates should give your agent enough context to help immediately:

Event Lifecycle

  1. Created: Event is defined in dashboard or auto-created on first trigger
  2. Triggered: User hits friction point, your code calls boostgpt.trigger()
  3. Logged: Trigger is recorded for analytics (timestamp, context, IP, etc.)
  4. Chat Created: New conversation starts with context-aware first message
  5. Resolved: User gets help, friction point addressed

Next Steps

Creating Events

Step-by-step guide to creating events

Prompt Templates

Master context variables and templates