← Back to Glossary
Termination Condition
Phase 04 · Agentstechnique

Explicit rules that break an agent execution loop to prevent runaway API costs or infinite execution cycles.

Why it exists

Without stopping rules, an agent encountering tool errors will loop endlessly until API credits deplete.

How it works

Evaluates rules after each loop turn: max_iterations >= 10, goal_completed == true, error_count >= 3, or timeout_sec >= 60.

Where you'll use this