Skip to main content

guardrail_retry_count

Method
This is a method of the Agent class in the agent module.
How many times output validation has sent the model back for a retry. Cumulative over the agent’s lifetime, incremented once per rejected answer that was handed back to the model (see _apply_guardrail_with_retry). Read it to confirm a run converged in one correction rather than burning max_guardrail_retries.

Signature

Returns

int
The result of the operation.

Source

View on GitHub

praisonaiagents/agent/agent.py at line 7006

Guardrails Concept

Guardrails Feature

Approval