Guardrails do not apply globally as a single blanket check across your entire workflow.
Instead, OpenController by Lyzr, the governance layer for production AI agents, checks them at specific interception points.
It inspects the data right before a prompt goes to the model and right before the response returns to the user.
This gives you precise control over inputs and outputs without interrupting your application logic.
Intercepting prompts and responses
The application flow requires explicit calls to the guardrail system.

Your application makes a request to POST /v2/guardrails/inference.
This happens exactly twice per interaction.
The first check occurs right before your app sends a prompt to the model.
This stage is defined as llm_input.
The second check happens right before your application shows the generated answer.
This stage is defined as llm_output.
OpenController evaluates these payloads against your active Content Rules.
If a policy triggers, the system knows exactly which stage caused the violation.
The rest of your workflow executes normally between these two precise checkpoints.
Blocking and redacting content
When a payload triggers an active rule during these checks, the system returns a specific response to your application.
An instruction hidden in a retrieved page was refused before any tool was reached. Demo environment, sample data.
- If the content violates a hard constraint, the response returns
"blocked": trueto halt the completion. - Your application receives a
block_reasonthat explains exactly why the check failed. - This response also includes the specific
policy_idthat triggered the restriction. - Instead of blocking entirely, a rule can also return specific redactions for sensitive data.
- Your application replaces these matched values before the workflow proceeds to the next step.
Configuring rules in the gateway
You define these specific interception points inside the LLM Gateway.
The Content Rules menu controls exactly what goes to a model and what comes back.
You create a new boundary by selecting the Guardrails or PII tab.
Setting up a new guardrail requires a clear name like block-attacks-and-pii.
These rules execute in strict priority order during the input and output checks.
In the cloud, these checks rely on your existing infrastructure.
An Azure deployment uses a Content Safety resource key to process the evaluation.
This architecture keeps your agents secure before they ever reach production.
More answers about governing AI agents: the OpenController blog.
Want to see how it fits your stack? Talk to us about OpenController by Lyzr.
Got a use case in mind?
8 weeks from use case to agents running in production.
Platform, people and FDEs, all in. Bring your environment. We'll co-build and stay until it's live.
Talk to UsFree resource
101 AI Agents Use Cases
100+ production-ready AI agent use cases across Marketing, Sales, HR, Banking, Insurance, Operations and a lot more
Download now