Skip to main content
Compose stop helpers in AgentDefinition.StopWhen:
HasToolCall(...) and FinishReasonIs(...) provide event-based limits. Keep a step or duration bound even when using token or cost limits, because those depend on reported usage.
Last modified on July 26, 2026