To Policy • AI Agent SDK
to_policy: Build the pure core “LivenessPolicy“ this config describes.
to_policy
Method
</div>
This is a method of the LivenessConfig class in the config module.
Build the pure core `LivenessPolicy` this config describes.
When `enabled is False the policy is constructed with interval_ms=0 so its evaluate always returns KEEP` — reaping is a no-op, preserving today’s behaviour.
Signature
def to_policy() -> AnyReturns
ResponseField
AnyThe result of the operation.
Uses
LivenessPolicy
Source
View on GitHubpraisonaiagents/gateway/config.py at line 758