record • AI Agent SDK
record: Record a restart at “now“ and return whether the breaker tripped.
record
Method
</div>
This is a method of the RestartLoopGuard class in the protocols module.
Record a restart at `now` and return whether the breaker tripped.
Signature
def record(now: float) -> boolParameters
ParamField
floatA monotonic timestamp for this restart event.
Returns
ResponseField
bool`True when at least max_restarts restarts have occurred within the trailing window_seconds (breaker tripped); False` otherwise.
Used By
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 6050