Send Policy • AI Agent SDK
SendPolicy: A lightweight allow/deny send-policy with an optional default-deny posture.
SendPolicy
Defined in the protocols module.
AI Agent
A lightweight allow/deny send-policy with an optional default-deny posture.
This is the config-driven default referenced by `send_policy blocks in gateway.yaml and the Bot(..., send_policy=...) Python surface. It is intentionally minimal (no heavy dependencies) and lives in core so the built-in send_message` path is always interceptable.
Matching is exact against the symbolic target token (e.g. `"origin", "slack:#ops", or a friendly alias). With default="deny" only listed targets are permitted; with default="allow" all targets are permitted except those in deny`.
Example::
# default-deny: only the conversation origin and an ops alias allowed
SendPolicy(default="deny", allow=["origin", "ops-alerts"])
# default-allow: everything permitted except an exec channel
SendPolicy(default="allow", deny=["slack:#exec"])Constructor
strNo description available.
OptionalNo description available.
OptionalNo description available.
Methods
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 4070