# Policy rules (/docs/python/guides/policy-rules)



Every scan method accepts `policy_overrides` — additive rules evaluated on
top of your app's saved policy, not a replacement for it. A matched rule
contributes **directives** to the result's `policy` field; your
application decides what to actually do with them, the same way it
decides what to do with `action`.

```python
result = client.analyze(
    user_input,
    policy_overrides=[
        PolicyRuleOverride(
            id="block-finance-tool-for-guests",
            when={"tool_name": "transfer_funds", "caller_role": "guest"},
            directives=["block"],
        )
    ],
)

print(result.policy.directives)       # e.g. ["block"]
print(result.policy.matched_rule_ids)  # ["block-finance-tool-for-guests"]
```

<Callout type="info">
  See [Policy rules](/docs/api/policy-rules) in the API Reference for the
  full rule schema, every matchable key, and directives with built-in
  meaning — this page only covers the Python override syntax.
</Callout>

## Acting on the verdict [#acting-on-the-verdict]

A matched rule's `directives` are a signal, not an automatic decision — see
[Enforcing a policy](/docs/python/guides/enforcing-policy) for the exact
pattern in the raw SDK and the OpenAI Agents SDK.

Your own vocabulary of directive strings (`"strip_system_prompt"`,
`"require_human_review"`, ...) is branched on wherever you enforce the
policy, the same way the
[agent protection cookbook](/docs/python/cookbook/agent-protection) does
for `"disable_tools:"`.
