Offline-verified
Gateway policies
Policies run at the gateway, not in your agent. DDK does not evaluate them. It makes the outcome visible in code: a typed exception, a field on the response, a span attribute. Each surface has its own page, because the policies, the captured refusals and what your code sees differ.
Three things are called “policy” in these docs. Gateway policies are
what the gateway enforces on each surface, covered by the pages in this
section. Custom policies teach classify() the refusal
shape your own gateway policy returns. The policy handshake is a
planned, advisory read of the policies in force; the gateway always wins.
One page per surface
- Models: policies on an LLM proxy instance, the typed exception or field each gives your code, and how to rehearse it offline.
- MCP tools: policies on an MCP server instance, including what they do to the tool catalog.
- A2A agents: policies on an A2A agent instance, per protocol version.
Policy families across surfaces
This matrix lines up the policy families the gateway enforces on each surface. A link goes to the section that documents that policy on the surface’s page; — means that surface’s policies page has no section for the family. The status badges live on the linked pages, so this table makes no status claims of its own.
| Policy family | Models | MCP tools | A2A agents |
|---|---|---|---|
| Who may call | Client ID enforcement | Global access, attribute-based access | — |
| Token and request limits | Token rate limiting, request rate limiting | — | Token rate limit |
| Personal data | PII detection | MCP PII detector | PII detector |
| Prompt injection and content safety | Injection protection, content safety | — | Azure content guardrails |
| Schema and tool poisoning | — | Schema validation and tool poisoning | Schema validation |
| Approval and step-up | OAuth2 OBO and CIBA | Approval on invoke_tool | Challenges and replay |
| Kill switch | Agent kill switch | — | — |
| Routing and caching | Model-based routing, semantic caching | — | — |
| Tool discovery and payload size | — | Progressive disclosure, payload optimization | — |
| Protocol version | — | — | Protocol versions |
Related
- Typed refusals: the exception each refusal becomes.
- Refusal handlers: react to a refusal once, for every call.
- Human-in-the-loop: the approval and step-up policies from your code.