> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Policy • AI Agent SDK

> SendPolicy: A lightweight allow/deny send-policy with an optional default-deny posture.

# SendPolicy

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

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::

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# 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

<ParamField query="default" type="str" required={false} default="'allow'">
  No description available.
</ParamField>

<ParamField query="allow" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="deny" type="Optional" required={false}>
  No description available.
</ParamField>

## Methods

<CardGroup cols={2}>
  <Card title="evaluate()" icon="function" href="../functions/SendPolicy-evaluate">
    Instance method.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L2838">
  `praisonaiagents/gateway/protocols.py` at line 2838
</Card>
