Note Fleet State • AI Agent SDK
note_fleet_state: Trip the breaker when too large a fraction of the fleet is failing.
note_fleet_state
Method
</div>
This is a method of the FleetSupervisionPolicy class in the protocols module.
Trip the breaker when too large a fraction of the fleet is failing.
A systemic fault often shows up as many channels simultaneously in a failing/parked state rather than as a raw restart rate. When at least `failing_channel_fraction` of the fleet is failing, trip and start the cooldown.
Signature
def note_fleet_state(failing_channels: int, total_channels: int, now: float) -> boolParameters
ParamField
intNumber of channels currently failing/parked.
ParamField
intTotal number of supervised channels.
ParamField
floatA monotonic timestamp for this evaluation.
Returns
ResponseField
bool`True` when the breaker is tripped (now or still cooling down).
Uses
tripped
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 6476