Skip to main content

Memory Triggers

Memory Triggers enable automated actions based on conditions like time, context, or events. Use triggers for reminders, proactive memory surfacing, and goal tracking.

What are Triggers?

Triggers are rules that fire when conditions are met:

TypeFires WhenExample
Time-basedSpecific time or schedule"Every Monday at 9AM"
Context-basedContext matches pattern"When location is Office"
Query-basedQuery matches pattern"When user asks about pricing"
Event-basedSystem event occurs"When memory is accessed"
Goal-basedProgress milestone reached"When goal is 50% complete"

Trigger Structure

Each trigger contains:

FieldDescription
TypeCategory (time, context, event, etc.)
ConditionRule that must be satisfied
ActionWhat to do when triggered
ParametersAction-specific configuration
ActiveWhether trigger is enabled

Available Actions

  • Notify - Send a notification
  • Recall - Surface specific memories
  • Update - Modify memory or goal state

Using Triggers in the Visualizer

Viewing Triggers

Navigate to Triggers in the sidebar to see all configured triggers. The list shows:

  • Trigger condition (in natural language)
  • Type indicator (clock for time, location pin for context)
  • Action type
  • Active/inactive status

Managing Triggers

From the triggers view you can:

  • Toggle active status - Enable/disable with the power button
  • Delete triggers - Remove with the trash button
  • Create new triggers - Click the dashed card

API Usage

List Triggers

GET /api/v1/triggers/
Headers:
x-tenant-id: your-tenant-id

Create Trigger

POST /api/v1/triggers/
Headers:
x-tenant-id: your-tenant-id
Content-Type: application/json

{
"memory_id": "mem_abc123",
"type": "time_based",
"condition": "0 9 * * MON",
"action": "notify",
"parameters": {
"message": "Time to review weekly goals!"
}
}

Check Triggers

Evaluate triggers against current context:

POST /api/v1/triggers/check
Headers:
x-tenant-id: your-tenant-id
Content-Type: application/json

{
"location": "Office",
"time": "2024-01-15T09:00:00Z",
"user_query": "What are my tasks?"
}

Trigger Examples

Weekly Reminder

{
"type": "time_based",
"condition": "Every Monday 9AM",
"action": "notify",
"parameters": {
"message": "Review weekly goals"
}
}

Context-Aware Recall

{
"type": "context_based",
"condition": "Location == Office",
"action": "recall",
"parameters": {
"memory_ids": ["mem_work_priorities"]
}
}

Query Pattern Match

{
"type": "query_based",
"condition": "pricing|cost|budget",
"action": "recall",
"parameters": {
"tags": ["pricing", "commercial"]
}
}

Best Practices

  1. Start simple - Begin with time-based triggers before complex conditions
  2. Set expiration - Use max_triggers to limit one-time reminders
  3. Test conditions - Use the check endpoint to verify trigger logic
  4. Monitor firing - Track trigger_count to ensure triggers work as expected