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:
| Type | Fires When | Example |
|---|---|---|
| Time-based | Specific time or schedule | "Every Monday at 9AM" |
| Context-based | Context matches pattern | "When location is Office" |
| Query-based | Query matches pattern | "When user asks about pricing" |
| Event-based | System event occurs | "When memory is accessed" |
| Goal-based | Progress milestone reached | "When goal is 50% complete" |
Trigger Structure
Each trigger contains:
| Field | Description |
|---|---|
| Type | Category (time, context, event, etc.) |
| Condition | Rule that must be satisfied |
| Action | What to do when triggered |
| Parameters | Action-specific configuration |
| Active | Whether 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
- Start simple - Begin with time-based triggers before complex conditions
- Set expiration - Use
max_triggersto limit one-time reminders - Test conditions - Use the check endpoint to verify trigger logic
- Monitor firing - Track
trigger_countto ensure triggers work as expected