Guardrails Reference
This reference covers all fields of the Guard and GuardrailProvider custom resources in the runtime.agentic-layer.ai API group.
For a conceptual overview, see Guardrails: Guard and GuardrailProvider.
GuardrailProvider
A GuardrailProvider describes where and how to reach a guardrail backend.
Per-policy tuning (which entities to catch, at which confidence, what to do with them) lives on the Guard, not on the provider.
Spec
| Field | Type | Description |
|---|---|---|
|
|
API contract implemented by this provider. One of |
|
object |
Configuration for |
|
object |
Configuration for |
|
object |
Configuration for |
presidio config
| Field | Type | Description |
|---|---|---|
|
URI (required) |
HTTP endpoint of the Presidio Analyzer service. Must be reachable from the gateway’s namespace. |
|
|
Optional API key for authenticated Presidio deployments. |
openaiModeration config
| Field | Type | Description |
|---|---|---|
|
URI |
Override the default |
|
|
Reference to the Secret key that contains the API key. |
Guard
A Guard binds a provider to a concrete policy and defines when the policy runs relative to the LLM or tool call.
Spec
| Field | Type | Description |
|---|---|---|
|
|
When the guard is applied. Each entry is one of |
|
|
Human-readable description. Documentation only; has no runtime effect. |
|
|
Reference to the |
|
object |
Guard-level configuration for OpenAI Moderation. |
|
object |
Guard-level configuration for AWS Bedrock Guardrails. |
|
object |
Guard-level configuration for Presidio. |
Guard modes
| Mode | What it inspects |
|---|---|
|
The outgoing payload before it reaches the LLM or tool server (prompt, tool call arguments). |
|
The payload returned from the LLM or tool server (response text, tool results) before it reaches the caller. |
|
Both the request and response. For protocols without a streaming body (for example MCP), this is equivalent to |
presidio guard config
| Field | Type | Description |
|---|---|---|
|
|
ISO language code for the content under inspection (for example |
|
|
Per-entity confidence cutoffs in the range |
|
|
Maps entity types to actions. |
Presidio entity types are documented at https://microsoft.github.io/presidio/supported_entities/.
Common examples: PERSON, EMAIL_ADDRESS, PHONE_NUMBER, CREDIT_CARD, IP_ADDRESS, IBAN_CODE, US_SSN.
Attaching Guards to Gateways
Gateway CRDs expose a uniform guardrails field — an ordered list of ObjectReference entries pointing at Guard resources. The gateway’s operator resolves each reference, loads the referenced GuardrailProvider, and configures the underlying gateway accordingly.
spec:
guardrails:
- name: pii-guard
namespace: guards
- name: toxic-language-guard
namespace: guards
The field is present on:
-
AiGateway.spec.guardrails -
AgentGateway.spec.guardrails -
ToolGateway.spec.guardrails
Gateway Support Matrix
| Gateway | Implementing operator | Supported provider types | Notes |
|---|---|---|---|
|
|
Generates LiteLLM |
|
|
agent-gateway-krakend-operator |
— |
Not yet implemented. The |
|
|
For each referenced |