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

python
def to_policy() -> Any

Returns

ResponseField Any

The result of the operation.

Uses

  • LivenessPolicy

Source

View on GitHub

praisonaiagents/gateway/config.py at line 758