To Policy • AI Agent SDK

to_policy: Build the policy fragment advertised in “HelloResult.policy“.

to_policy

Method

</div>

This is a method of the AttachmentConfig class in the config module.

Build the policy fragment advertised in `HelloResult.policy`.

Only advertises the attachment ceilings when enabled, so a gateway with attachments disabled advertises exactly today’s policy shape. The type allow-list is included only when configured.

Signature

python
def to_policy() -> Dict[str, Any]

Returns

ResponseField Dict[str, Any]

The result of the operation.

Source

View on GitHub

praisonaiagents/gateway/config.py at line 1017