Skip to main content

Triggers

Triggers define when a capability activates. The platform routes user messages deterministically based on goals, examples, and requirements.

Trigger Structure

trigger:
goal: string # What the user wants to accomplish
examples: string[] # Example phrases (3 to 10 recommended)
priority: number # Higher wins on ties (default: 0)
requires: string[] # Context paths that must exist

Properties

PropertyTypeRequiredDescription
goalstringYesWhat the user is trying to accomplish
examplesstring[]YesExample user messages
prioritynumberNoTiebreaker when multiple match
requiresstring[]NoContext paths that must exist

Examples

Basic Trigger

trigger:
goal: Check the status of an existing order
examples:
- "Where is my order?"
- "Track my package"
- "Order status"

With Priority

trigger:
goal: Process an urgent refund request
examples:
- "I need an urgent refund"
- "Refund immediately"
priority: 10

With Context Requirements

trigger:
goal: Troubleshoot device connectivity
examples:
- "My device will not connect"
requires:
- customAttributes.device_id

How Routing Works

  1. Score all capabilities
  2. Match against goal and examples
  3. Filter by requires
  4. Choose the best match (priority breaks ties)