AttemptAndAgeDeadLetterPolicy
Defined in the protocols module.AI Agent Default dead-letter policy: require BOTH attempt-exhaustion AND age. Distinguishes a poison message (fails repeatedly over a long time) from a transient outage (fails a few times quickly, then recovers). A recoverable/transient failure is dead-lettered only once it satisfies both:
attempts >= max_attempts, andage >= min_age_seconds(wall-clock age since first receipt).
error_class is known-permanent (see
:data:PERMANENT_ERROR_CLASSES — a revoked credential or a permanently
invalid target) short-circuits to dead-letter immediately regardless of
age, since retrying can never recover it.
min_age_seconds=0 restores the legacy attempt-count-only behaviour,
keeping the knob fully backward-compatible for callers that opt in.
Example::
Constructor
int
default:"5"
No description available.
int
default:"DEFAULT_MIN_AGE_SECONDS"
No description available.
Properties
int
No description available.
Methods
should_dead_letter()
Instance method.
Source
View on GitHub
praisonaiagents/gateway/protocols.py at line 3867
