> This page is for Platform.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

## Semantic gates added to SWAIG functions

Require a yes/no check on the conversation before your AI agent can run a SWAIG function. You
attach a question, such as "Has the caller explicitly asked to cancel their ride?", and a decision
model answers it before the function runs. If the answer doesn't clear your threshold, the function
doesn't run and the agent gets a response you wrote instead.

Define gates on a function in [SWML](/docs/swml/reference/calling/ai/swaig/functions/gates), or
with `SemanticGate` in the
[Python](/docs/server-sdks/reference/python/agents/semantic-gate) and
[TypeScript](/docs/server-sdks/reference/typescript/agents/semantic-gate) Server SDKs starting
with v3.6.0. [Semantic gates](/docs/platform/ai/semantic-gates) walks through gating a function
end to end.