create_trigger
Creates a condition over one or more sources that Tares evaluates continuously and, when it trips, wakes subscribed agents with the correlated timeline.
Instructions
Create a trigger: a condition Tares evaluates continuously over one or more sources; when
it trips, subscribed agents are woken with the correlated timeline. sources names the
sources it watches (at least one). filters [{field, op, value}] (ops: eq, neq, in (a list), contains, gt,
lt, gte, lte) narrows them. key_field is the entity label (default: the primary label of the
first source). condition is {aggregate: any|avg|count|max|min|sum, field: numeric label to
aggregate (omit for count), predicate: e.g. '> 1.0' / '>= 5' / '== 0', window: detection
window e.g. '1m'}. emit is {kind: what a firing is called e.g. error_spike, context_window:
timeline the woken agent receives e.g. '15m'}. project is the project id the trigger belongs
to (default: the default project); its sources join that project. description (optional)
says in one plain line what wakes it, phrased to follow "When", e.g. "an alert fires in the
checkout service"; the project page uses it instead of the rule's own wording (at most 160
characters, one line). catalog_describe a source to confirm its labels first. Wire agents
to it with subscribe().
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": {
"name": "<name>",
"sources": "<sources>",
"condition": "<condition>"
},
"name": "create_trigger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emit | No | ||
| name | Yes | ||
| filters | No | ||
| project | No | ||
| sources | Yes | ||
| cooldown | No | 5m | |
| condition | Yes | ||
| key_field | No | ||
| description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |