kernel_agents_add_trigger
Attach event or schedule triggers to an agent so it runs when matching events occur or periodically, with optional project scoping, cron, and interval settings.
Instructions
Add an event trigger or schedule to an agent. Event triggers fire when a matching event occurs. Schedules run periodically. A schedule's runs work for project; without it they inherit the project of an office that serves exactly one, and otherwise run outside any project (and cannot draft from a project's accounts).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>",
"type": "<type>"
},
"name": "kernel_agents_add_trigger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cron | No | Cron expression for schedule type (e.g. '0 7 * * *' = daily at 7am, '0 */6 * * *' = every 6h, '0 9 * * 1' = Monday 9am). Takes precedence over interval_ms. | |
| type | Yes | Trigger type | |
| filter | No | JSON filter to match event payload (e.g. '{"module":"crm"}') | |
| project | No | Schedule type: project id or slug the scheduled runs work for. The agent's office must serve it. Omit to use the office's only project, if it has exactly one. | |
| agent_id | Yes | Agent ID | |
| event_name | No | Event name to listen for (required for event type, e.g. 'reminder.fired', 'data.changed') | |
| cooldown_ms | No | Min time between event triggers in ms (default: 60000) | |
| interval_ms | No | Interval in ms for schedule type (e.g. 3600000 = 1h). Use cron instead for time-based scheduling. | |
| goal_override | No | Optional goal override for scheduled runs |