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
| Property | Type | Required | Description |
|---|---|---|---|
goal | string | Yes | What the user is trying to accomplish |
examples | string[] | Yes | Example user messages |
priority | number | No | Tiebreaker when multiple match |
requires | string[] | No | Context 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
- Score all capabilities
- Match against goal and examples
- Filter by
requires - Choose the best match (priority breaks ties)