Examples
Nemo Guardrails Response
Evaluates upstream responses against a NeMo Guardrails service
Switching projects opens that project’s default documentation release.
Category: Setup-dependent integration
Task: Evaluates upstream responses against a NeMo Guardrails service
Prerequisites: The external service, credentials, or certificates referenced by this configuration.
Run it: Use ghcr.io/praxis-proxy/ai:0.11.0 and follow the container quickstart to mount and start the configuration.
This configuration comes from the selected release. The example has not been run here; external services are not bundled.
Download the source file.
Companion resources from the same snapshot:
# Guardrails (NeMo) - Response Phase Only
#
# Evaluates upstream responses against a NeMo Guardrails service.
# Request-side guardrails are disabled. Non-streaming requests reach the upstream.
# Requests with `stream: true` are rejected before forwarding because response
# guardrails cannot evaluate SSE responses.
# This config is used by integration tests to verify response-phase behavior in isolation.
#
# NeMo is called with no credentials. When kube-rbac-proxy protects NeMo,
# use nemo-guardrails-service-account.yaml.
#
# Response phase:
# passed - response forwarded to the client unchanged
# blocked - response body replaced with a JSON error payload
# (status remains 200 because headers are already committed)
# modified - Chat Completions response can be rewritten when its structure
# is safe to preserve; other protocol formats fail closed
# provider HTTP error - response body replaced with a JSON error payload
# (same as blocked; headers are already committed)
#
# Visible Responses reasoning summaries/content and Anthropic thinking blocks
# are rejected with an evaluation_failed body until reasoning screening is supported.
# Opaque Responses reasoning state with no visible text may accompany text output.
listeners:
- name: gateway
address: "0.0.0.0:8080"
filter_chains:
- nemo-guardrails-response
filter_chains:
- name: nemo-guardrails-response
filters:
# Publishes the trusted operation identity used to select the response
# message extractor. It must run before ai_guardrails.
- filter: ai_operation
- filter: ai_guardrails
outbound_chain: nemo-outbound
provider:
type: nemo
# Requires NeMo Guardrails 0.24.0 or newer.
endpoint: "http://127.0.0.1:3001/v1/checks"
guardrails:
config_ids: ["your-config"] # replace with a configuration deployed in NeMo
timeout_ms: 5000
max_message_checks: 32
phase:
request: false
response: true
- filter: router
routes:
- path_prefix: "/"
cluster: provider
- filter: load_balancer
clusters:
- name: provider
endpoints:
- "127.0.0.1:3000"
# Observability for NeMo callouts. This chain carries no credentials.
- name: nemo-outbound
filters:
- filter: request_id
insecure_options:
allow_private_endpoints: true # example proxies to local backends
allow_private_upstreams: true # example calls the local NeMo service