← All Plugins
AI Security

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

What it 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.

The enterprise problem

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.

Where it fits in Agent Router

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.

How It Works

The request and response flow

  1. 1
    Request

    Prompt enters Agent Router

    The request is authenticated and matched to a route and its guardrail policy.

  2. 2
    Request

    Input policy inspection

    The prompt is checked for jailbreak attempts, prompt injection, restricted topics, and sensitive data using the configured guardrail providers.

  3. 3
    Control

    Block, redact, or forward

    Violations are blocked with a policy error or redacted (for example, masking PII). Clean prompts are forwarded to the model.

  4. 4
    Response

    Output policy inspection

    The model response is checked for harmful content, data leakage, and policy violations before it leaves the gateway.

  5. 5
    Response

    Deliver and audit

    The approved response is returned to the application. Every decision is logged with the rule, provider, and action taken.

Architecture

Security Guardrails in Agent Router

Security Guardrails architecture: Customer chatbots, Employee assistants, AI agents, Partner APIs send requests to Agent Router, which applies Input policy, then AI model call, then Output policy, and connects to Azure AI Content Safety, Amazon Bedrock Guardrails, NVIDIA NeMo Guardrails, Application.ApplicationChatbots · agentsAgent RouterSecurity GuardrailsInput policyPrompt inspectionBlock · Redact · AllowOutput policyResponse inspectionAI modelLLM providerPromptApproved promptResponseSafe responseGuardrail providersAzure AI Content SafetyHarm categories · prompt shieldsAmazon Bedrock GuardrailsDenied topics · PII filtersNVIDIA NeMo GuardrailsProgrammable rails
Applications
Customer chatbotsEmployee assistantsAI agentsPartner APIs
Agent Router
Security Guardrails plugin
Input policy
AI model call
Output policy
Guardrail providers
Azure AI Content SafetyHarm categories · prompt shields
Amazon Bedrock GuardrailsTopics · PII · word filters
NVIDIA NeMo GuardrailsProgrammable rails
ApplicationApproved response only

Prompts are inspected before the model and responses after it. Only approved responses return to the application.

Key Features

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.

Supported Integrations

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.

Benefits

Engineering and business outcomes

Security

Consistent protection everywhere

One gateway policy covers every application and model, eliminating gaps from per-team implementations.

Compliance

Provable controls

Centralized logs show exactly which content was blocked or redacted, and why, for audits and reviews.

Flexibility

Provider choice without rewrites

Switch or combine guardrail providers in configuration without changing application code.

Developer experience

Safety without SDKs

Developers build features while the platform team owns and evolves safety policy centrally.

Use Cases

Where enterprises use Security Guardrails

01

Customer-facing chatbots

Block jailbreak attempts and harmful output on public assistants where brand and legal risk are highest.

02

PII protection in regulated industries

Redact account numbers, health data, and personal identifiers before prompts leave your network.

03

Agents with tool access

Stop injected instructions in retrieved documents from steering agents that can call internal tools.

04

Topic restrictions

Keep a banking assistant from giving investment advice, or an HR bot from discussing legal disputes.

Configuration

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.

Enterprise Workflow

How it fits your AI platform

  1. 01

    Security team

    Defines guardrail policies, chooses providers, and sets block and redact rules per risk level.

  2. 02

    Platform team

    Attaches policies to Agent Router routes for each application and environment.

  3. 03

    Applications

    Send prompts through Agent Router with no safety code of their own.

  4. 04

    Agent Router

    Runs input and output policies around every model call and enforces the decision.

  5. 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).