Security Guardrails
Inspect every prompt and every response before it causes harm.
Security Guardrails enforces AI safety policy centrally in Agent Router (EAIG). Prompts and model responses are inspected by Azure AI Content Safety, Amazon Bedrock Guardrails, or NVIDIA NeMo Guardrails, and blocked, redacted, or allowed according to your policy.
What Security Guardrails does
The plugin applies an input policy to each prompt before it reaches the model and an output policy to each response before it reaches the application. Each policy calls one or more guardrail providers and decides whether to allow, redact, or block the content.
When every team integrates safety checks separately, coverage is inconsistent: some apps check prompts but not responses, others use different providers or none at all. Security teams cannot prove that jailbreaks, PII leakage, and harmful content are controlled across the organization.
Security Guardrails runs in Agent Router on both sides of the model call. Because inspection happens at the gateway, the same policy applies to every application and every provider, and developers do not need to embed safety SDKs.
The request and response flow
- 1Request
Prompt enters Agent Router
The request is authenticated and matched to a route and its guardrail policy.
- 2Request
Input policy inspection
The prompt is checked for jailbreak attempts, prompt injection, restricted topics, and sensitive data using the configured guardrail providers.
- 3Control
Block, redact, or forward
Violations are blocked with a policy error or redacted (for example, masking PII). Clean prompts are forwarded to the model.
- 4Response
Output policy inspection
The model response is checked for harmful content, data leakage, and policy violations before it leaves the gateway.
- 5Response
Deliver and audit
The approved response is returned to the application. Every decision is logged with the rule, provider, and action taken.
Security Guardrails in Agent Router
Prompts are inspected before the model and responses after it. Only approved responses return to the application.
Built for production AI traffic
Prompt inspection
Detect jailbreaks, prompt injection, and restricted topics before the prompt reaches any model.
Response inspection
Screen model output for harmful content, sensitive data, and off-policy answers before delivery.
Multi-provider guardrails
Use Azure AI Content Safety, Amazon Bedrock Guardrails, and NVIDIA NeMo Guardrails individually or together.
Block, redact, or flag
Choose the action per rule: reject the request, mask sensitive values, or allow and log for review.
Per-route policies
Apply strict policies to customer-facing routes and lighter policies to internal tools.
Audit trail
Record every guardrail decision with route, rule, provider, and action for compliance evidence.
Guardrail providers
Azure AI Content Safety
Detects hate, sexual, violence, and self-harm content with severity levels, plus Prompt Shields for jailbreak and indirect prompt-injection detection.
Amazon Bedrock Guardrails
Applies denied topics, content filters, word filters, and sensitive-information (PII) filters to both prompts and responses.
NVIDIA NeMo Guardrails
Programmable input, output, and dialog rails for topic control, fact-checking flows, and custom safety logic.
Engineering and business outcomes
Consistent protection everywhere
One gateway policy covers every application and model, eliminating gaps from per-team implementations.
Provable controls
Centralized logs show exactly which content was blocked or redacted, and why, for audits and reviews.
Provider choice without rewrites
Switch or combine guardrail providers in configuration without changing application code.
Safety without SDKs
Developers build features while the platform team owns and evolves safety policy centrally.
Where enterprises use Security Guardrails
Customer-facing chatbots
Block jailbreak attempts and harmful output on public assistants where brand and legal risk are highest.
PII protection in regulated industries
Redact account numbers, health data, and personal identifiers before prompts leave your network.
Agents with tool access
Stop injected instructions in retrieved documents from steering agents that can call internal tools.
Topic restrictions
Keep a banking assistant from giving investment advice, or an HR bot from discussing legal disputes.
Input and output guardrails on a customer-facing route
- RouteWhich Agent Router route the guardrail policy protects.
- customer-chat
- Input checksChecks applied to prompts before they reach the model.
- Azure AI Content Safety prompt shields + harm categories
- Block thresholdHow severe detected content must be before the request is blocked.
- Medium severity and above
- PII handlingWhether sensitive data is masked, blocked, or allowed before the model call.
- Redact via Amazon Bedrock Guardrails
- Output checksChecks applied to model responses before they return to the application.
- NVIDIA NeMo output moderation + off-topic rails
- Violation responseWhat the caller receives when content is blocked.
- HTTP 400 · "Request blocked by AI safety policy"
- Audit loggingRecords rule, provider, and action for every guardrail decision.
- Enabled for all decisions
Illustrative example. Settings and values show what can be configured and are not exact configuration syntax.
How it fits your AI platform
- 01
Security team
Defines guardrail policies, chooses providers, and sets block and redact rules per risk level.
- 02
Platform team
Attaches policies to Agent Router routes for each application and environment.
- 03
Applications
Send prompts through Agent Router with no safety code of their own.
- 04
Agent Router
Runs input and output policies around every model call and enforces the decision.
- 05
Guardrail providers & models
Guardrail services evaluate content; models only see approved prompts.
Centralize AI safety at the gateway
IMESH can help you design guardrail policies and integrate Azure AI Content Safety, Amazon Bedrock Guardrails, or NVIDIA NeMo Guardrails with Agent Router (EAIG).
