The Best LLM Guardrails Tools in 2026, by Where They Actually Run
Guardrails split into three jobs - block bad output at runtime, red-team the app before you ship, and catch violations in production monitoring. Three tools, one for each job, and why picking the wrong layer leaves a gap.
Published:
“Guardrails” gets used for three different jobs, and teams buy one tool expecting all three. It does not work. A gateway that blocks a toxic response at runtime does nothing to find the jailbreak in your prompt before you ship. A red-teaming framework that hammers your app in CI is not watching production at 2am. And an observability tool that flags a hallucination after it happened did not stop it reaching the user.
So I split this by where the guardrail actually runs:
- Runtime, in the request path. Blocks or filters a response inline, before it reaches the user.
- Pre-deployment red-teaming. Attacks your app to find the holes before real users do.
- Production monitoring. Scores live outputs to catch violations that slipped through.
One tool for each layer, and why you probably need more than one.
The short version
| Tool | Guardrail layer | How it works | Free tier | License |
|---|---|---|---|---|
| Portkey | Runtime, in the request path | 50+ guardrails at the gateway | OSS gateway free | Apache 2.0 |
| DeepEval | Pre-deployment red-teaming | DeepTeam - 50+ vulnerabilities, OWASP | OSS free | Apache-2.0 |
| Langfuse | Production monitoring | LLM-as-judge scorers, annotation | 50k units/mo cloud | MIT |
1. Portkey - guardrails at runtime, in the gateway
If you want a guardrail that actually blocks a bad response before it reaches the user, it has to sit in the request path - and Portkey already does. It is an LLM gateway that routes your calls to 1,600+ models, and it ships 50+ integrated guardrails that run inline as traffic passes through. Because Portkey is the proxy handling your calls anyway, adding a guardrail does not mean standing up a separate service - you configure it in the control plane and it enforces on the live path.
The budget story is good too. The open-source gateway is Apache 2.0 and self-hosts free via Docker, and guardrails are part of the free gateway along with routing, fallbacks and load balancing. So the runtime enforcement layer costs nothing to run yourself.
The gotcha is not the guardrails - it is the observability around them. The open-source gateway gives you routing, guardrails and a basic dashboard, but real logging, traces, analytics and retention live on the managed Production tier at $49/mo for 100k logs. So you can enforce guardrails for free self-hosted, but seeing which ones fired and how often is a paid feature unless you build your own logging. Know that split before you plan a deployment. The Portkey alternatives post covers the gateway field if runtime routing is your priority.
2. DeepEval - red-team the app before you ship
Runtime blocking is only as good as your knowledge of what to block. That is what red-teaming is for, and DeepEval is the strongest open pick here through its sibling framework, DeepTeam - 50+ vulnerabilities, 20+ attack vectors, mapped to the OWASP Top 10 for LLMs and NIST AI RMF. You point it at your app and it generates adversarial attacks - prompt injection, jailbreaks, data-leak probes - to find the holes before real users do.
It is genuinely free to run: DeepEval and DeepTeam are both Apache-2.0 and fully usable with no Confident AI account. And because DeepEval is pytest-shaped, you can run red-team suites in CI the same way you run functional tests, with deepeval test run. For a Python team that already writes tests, this is the natural home for pre-deployment safety checks.
The honest gotcha: this is a test, not a runtime blocker. DeepTeam tells you your app is vulnerable to a jailbreak; it does not stop that jailbreak in production - that is Portkey’s job. And DeepEval’s metrics are nearly all LLM-as-judge, so large red-team suites fire many inferences and get slow and expensive, with runs measured in minutes. Cost-model the judge calls before you scale the suite. Pair red-teaming with a runtime guardrail for real coverage.
3. Langfuse - catch what slips through in production
Even with runtime guardrails and pre-ship red-teaming, things get through - and you need to know when. That is the monitoring layer, and Langfuse is the pick. It does not block a response in the request path, but its LLM-as-judge scorers, custom scorers and human annotation queues let you score live outputs and flag violations for review, on top of full tracing so you can open the exact request that went wrong.
It is the cheapest way to run that layer at scale: self-hosting is free under MIT with only three features enterprise-gated, and even managed it is dramatically cheaper than closed alternatives - roughly $101/mo at 1M events versus LangSmith’s ~$2,514/mo per its pricing. If you want the monitoring layer of guardrails without a per-trace bill, self-host it.
Two catches. This is detection after the fact, not prevention - Langfuse tells you a hallucination reached a user, it does not stop the next one, so it complements Portkey rather than replacing it. And self-hosting means the v3 four-service stack (Postgres, ClickHouse, Redis, S3-compatible storage), where the migration bites. The wider observability field is in the best LLM observability tools ranking.
So which one?
- You need to block bad output at runtime - Portkey. 50+ guardrails inline at the gateway, free to self-host, but budget for the paid tier if you want to see what they caught.
- You need to find vulnerabilities before you ship - DeepEval with DeepTeam. Apache-2.0, OWASP-mapped red-teaming that runs in CI. Cost-model the judge calls.
- You need to catch violations in production - Langfuse. LLM-as-judge scoring plus tracing, cheapest at scale when self-hosted under MIT.
The real answer for a serious app is not one of these - it is layers. Red-team with DeepEval before you ship, enforce at runtime with Portkey, and monitor with Langfuse. Picking one and calling it “guardrails” leaves a gap in the other two. Every fact here was read from each vendor’s own materials on 23 July 2026, and this category ships breaking changes monthly - we re-verify every 30 days.
Frequently Asked Questions
What are LLM guardrails?
Guardrails are the checks that keep an LLM app from producing or acting on bad output - blocking prompt injection, filtering unsafe content, catching hallucinations, and enforcing format or policy rules. They run at three different points - at runtime in the request path (a gateway that blocks a response before it reaches the user), before you ship (red-teaming that attacks the app to find holes), and in production monitoring (scoring live outputs to flag violations after the fact). Most teams need more than one.
What is the best runtime guardrails tool?
For guardrails that run in the live request path, Portkey is the strongest pick here. It is an LLM gateway with 50+ integrated guardrails that sit inline as your traffic routes through, and the open-source gateway self-hosts free under Apache 2.0 with guardrails included. Because it is already the proxy handling your calls, adding a guardrail does not need a separate service.
How do I test an LLM app for vulnerabilities before shipping?
Red-teaming. DeepEval's DeepTeam framework is Apache-2.0 and covers 50+ vulnerabilities and 20+ attack vectors, mapped to the OWASP Top 10 for LLMs and NIST AI RMF. You run it against your app to find prompt-injection, jailbreak and data-leak holes before real users do. It is a pre-deployment test, not a runtime blocker - pair it with a runtime guardrail for full coverage.
Can observability tools act as guardrails?
Partly. A tool like Langfuse does not block a bad response in the request path, but its LLM-as-judge scorers and human annotation queues let you catch violations in production and flag them for review. That is the monitoring layer of guardrails - detection after the fact, not prevention. It is essential for knowing your runtime guardrails are working, but it is not a substitute for them.
Explore More
Tool Reviews
Related Articles
- The Best LLM Eval Frameworks in 2026, Ranked for How You Actually Test
- The Best LLM Eval Tools for Chatbots in 2026, by Use Case
- The Best LLM Eval Tools for Python in 2026, Judged by a Python Team
- The Best LLM Eval Tools for Startups in 2026, by Use Case
- The Best LLM Monitoring Tools in 2026, Ranked for Production Cost and Reliability
Free Newsletter
Get the LLM Evals Newsletter
Platform comparisons, pricing changes and eval technique deep-dives. No spam.
Related Articles
How to Benchmark AI Agents in 2026 - The Tools and the Method
Benchmarking an agent is not benchmarking a model. Public leaderboards tell you about the LLM, not your agent on your task. Here is how to build a real agent benchmark, and the five tools that actually run one - simulation, datasets, trajectory scoring and repeatable eval sets, ranked.
July 26, 2026
best-ofThe Best AI Agent Observability Tools in 2026, Ranked for Multi-Step and Browser Agents
Four platforms for tracing agents that loop, call tools, and click around browsers - judged on agent-native tracing, self-host reality, pricing you can forecast, and pre-release testing. One purpose-built winner, and where each meter bites.
July 26, 2026
best-ofThe Cheapest LLM Observability Tools in 2026, Ranked by Real Cost
The three lowest-cost ways to get production LLM tracing - the cheapest managed cloud, the cheapest self-host, and the free tier that looks great until you read the fine print. Priced at the tiers you will actually hit.
July 26, 2026
Portkey Review
Confident AI (DeepEval) Review
Langfuse Review