set_agent_condition
Run a scheduled agent ONLY when there is something new, instead of purely by the clock. When the agent is due, the server first counts matching rows (cheap SQL); with no hit the run is skipped and costs nothing. Combine with a short cadence (e.g. every 5 minutes) for near event-driven behaviour. Each check: source (see get_agent_condition), plus within_minutes (hits in the last N minutes) OR since_last_run=true. match 'any' (default) or 'all'. Pass remove=true to drop the condition. preset 'takt_scharf' (instead of checks) = wake only on this agent's own new/changed open todos, handoffs to it not yet picked up, new/changed OPEN Pipedrive deals, new lab results and changed asbestos (IK) projects since the last run — the recommended condition for hourly agents. Owner of the agent or tenant admin only.
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>"
},
"name": "set_agent_condition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | any: one check must hit (default); all: every check must hit | |
| checks | No | Conditions that must find new rows before the agent runs | |
| preset | No | Predefined condition instead of checks; recommended for hourly agents | |
| remove | No | true drops the agent's condition | |
| agent_id | Yes | ID of the agent |