Guardrails
Guardrails is one of the central pillars in AI Center — a complete platform for observing, guarding, and evaluating AI-powered applications. Where Monitoring observes, and Evaluations assess quality, Guardrails acts in real time: intercepting and blocking harmful, non-compliant, or low-quality outputs before they reach users — not after.
Coralogix Guardrails enforce deterministic policy checks on model inputs and outputs. Using the Guardrails SDK — part of the LLM TraceKit SDK — you apply checks directly in your application code. Guardrails can check the user's prompt before it reaches the LLM, or the LLM's response before it reaches the user. When a policy is violated, the Guardrails SDK throws an exception and your application catches it to decide how to react.
Every guardrail invocation creates an AI span, so guardrail activity appears alongside your LLM calls in the same trace — giving you full unified observability in AI Center.
How guardrails work
Guardrails are implemented as policy checks. When a request or response triggers a policy violation, the Guardrails SDK throws an exception immediately, preventing the violating content from reaching the LLM (for prompts) or the user (for responses).
Configure guardrails
You configure guardrails in your application code using the Guardrails SDK, which is part of the LLM TraceKit SDK.
To get full observability in AI Center, instrument both the LLM TraceKit SDK and the Guardrails SDK. This is covered in detail in the Getting Started with Guardrails guide.
After setup and validation, guardrail-related metrics and UI indicators become available in AI Center. Each guardrail invocation (a call to the Guardrails SDK) creates an AI span, so all guardrail spans appear in the same trace alongside LLM spans, giving you full unified observability.
Monitor guardrails in AI Center
Use AI Center to understand where guardrails are active and what actions they took.
Guardrail actions and issues surface across the following views:
- Overview — The Key Insights panel includes Guardrail Actions as a top-level metric, showing the percentage of AI spans where a guardrail policy triggered across your entire organization. The Activity section's Issues Over Time chart breaks down total spans, evaluation issues, and guardrail issues on a single timeline.
- Application Catalog — Per-application guardrail status and issue summaries. If an application is not protected yet, the UI prompts you to integrate with the Guardrails SDK. Guarded applications display a This application is guarded status banner in the Application Drilldown.
- AI Explorer — Span-level and interaction-level guardrail action details.
Note on issues: AI Center tracks issues as a combination of evaluation issues (eval results that crossed the severity threshold) and guardrail invocations that triggered a Block action. Both types surface together in the Overview and Application Catalog views, giving you a unified signal for security and quality problems.
The AI Center Overview surfaces Guardrail Actions as a top-level metric in Key Insights, and the Issues Over Time chart shows guardrail issues as a separate series so you can distinguish policy violations from evaluation findings.
In an application's AI Explorer view, a Guardrail Action column shows the actions taken for each span. The Block action appears when a policy violation is detected. Use this column to quickly identify AI spans that triggered guardrail policies.
AI Explorer surfaces guardrail actions inline for every span — a Block badge on the first row indicates that the Guardrails SDK intercepted the interaction before it reached the LLM or the user.
Select any span to open the details panel and inspect the full context. The Activated Policies section at the right shows every evaluation result and guardrail action for that span, organized into Evals (with policy names and scores) and Guardrails (with policy names and the action taken).
The Activated Policies panel in the span details view lists every policy that evaluated or guarded the span — with evaluation scores and severity labels under Evals, and action results under Guardrails.
Guard your applications with policies
Apply one or more of the following policies to your AI applications:
- Prebuilt Policies — Apply ready-to-use policies for prompt injection, PII detection, and toxicity detection.
- Prompt Injection — Detect and block attempts to manipulate model behavior.
- PII Detection — Detect and block personally identifiable information.
- Toxicity — Detect and block harmful or offensive content.
- Custom Policies — Define domain-specific policies using natural language.
- Guard API — Advanced multi-turn conversation guardrail control.


