observe and enforce modes, but only applied in enforce mode.
Actions
allow
Proceed normally. No constraints are violated.
switch_model
Route to a different model. Triggered when:
- The current model is not in the compliance allowlist
- KPI scoring indicates a better model choice
- Budget pressure suggests a cheaper alternative
enforce mode, the harness substitutes the model. In observe mode, the original model is used and the trace records what would have happened.
deny_tool
Block a tool/function call. Triggered when max_tool_calls is reached.
enforce mode, the tool call is blocked. The agent receives a signal that the tool was denied.
stop
Halt agent execution. Triggered when:
- Budget is exceeded
- Latency cap is exceeded
- Energy cap is exceeded
enforce mode, the agent loop is stopped. In observe mode, execution continues and the trace records the violation.
Decision Priority
When multiple constraints are violated simultaneously, the harness applies this priority:- Compliance — check first (switch_model or stop)
- Budget — check second (stop)
- Tool calls — check third (deny_tool)
- Latency — check fourth (stop)
- Energy — check fifth (stop)
- KPI scoring — soft optimization (switch_model or allow)
Hard vs Soft Controls
Hard controls triggerstop or deny_tool when limits are exceeded:
budget— max USDmax_tool_calls— max tool/function callsmax_latency_ms— max wall-clock ms per callmax_energy— max energy unitscompliance— model allowlist
kpi_weights— relative importance of quality, cost, latency, energykpi_targets— target values for KPI dimensions