Skip to main content
Use stop conditions to give every agent a clear execution budget. Conditions are checked against completed steps and cumulative usage.

Combine built-in limits

The first matching condition records its reason and returns a run with status: "stopped".

Available helpers

Add a custom condition

A condition can return false, true, or a reason string:
Prefer a reason string when operators or product interfaces need to explain why a run ended.
Last modified on July 26, 2026