<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/portkey-open-sources-guardrails-for-secure-and-reliable-llm-operations-etwdk6afn" -->

---
title: Portkey Open-Sources Guardrails for Secure and Reliable...
description: Portkey has enhanced AI safety and reliability by adding guardrails to their open-source AI Gateway. This framework allows developers to enforce specific...
canonical: https://daily.dev/posts/portkey-open-sources-guardrails-for-secure-and-reliable-llm-operations-etwdk6afn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Portkey Open-Sources Guardrails for Secure and Reliable LLM Operations | daily.dev
og:description: Portkey has enhanced AI safety and reliability by adding guardrails to their open-source AI Gateway. This framework allows developers to enforce specific...
og:url: https://daily.dev/posts/portkey-open-sources-guardrails-for-secure-and-reliable-llm-operations-etwdk6afn
og:image: https://api.daily.dev/og/posts/eTwdk6AfN.png
og:image:alt: Portkey Open-Sources Guardrails for Secure and Reliable LLM Operations
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Portkey Open-Sources Guardrails for Secure and Reliable LLM Operations

**[Collections](https://daily.dev/sources/collections)** · 2 min read · 2 upvotes · 0 comments

## Summary

Portkey has enhanced AI safety and reliability by adding guardrails to their open-source AI Gateway. This framework allows developers to enforce specific behaviors on large language models (LLMs), validating inputs and outputs through regex, JSON schema validation, and code detection. Key integrations with Patronus AI and others offer real-time checks for sensitive information and bias, making AI operations more secure and compliant. The guardrails framework is available in both open-source and hosted versions, providing broad access to improved AI application deployment.

## Content

# Portkey Open-Sources Guardrails for Secure and Reliable LLM Operations

Portkey has taken a significant step towards improving the safety and reliability of AI applications by integrating advanced guardrails into their open-source AI Gateway. Addressing a crucial gap in the production of AI, this addition allows developers to enforce behavior on large language models (LLMs) and route requests with unmatched precision.

## Overview

The new guardrails framework, now part of the AI Gateway, empowers developers to validate inputs and outputs based on predefined checks. These checks include regex matching, JSON schema validation, and code detection in various languages such as SQL, Python, and TypeScript. Additionally, it supports LLM-based guardrails designed to detect issues like gibberish or prompt injections, contributing to a more secure, compliant, and reliable AI operation.

## Key Partnerships and Integrations

Portkey has partnered with leading platforms like Patronus AI, Aporia, and Pillar Security to bring a robust guardrail system to the framework. For example, Patronus AI's suite of evaluators can now perform real-time checks on LLM outputs for sensitive information, bias, toxicity, and other critical factors. This integration requires setting up the Patronus API key in Portkey, creating Guardrail Checks, and configuring corresponding actions for real-time validation.

## Benefits

The novel guardrails framework enhances Portkey's Gateway and Observability suite, offering developers faster debugging, iteration cycles, and efficient handling of API failures. This setup is particularly beneficial for securing production environments and ensuring reliable AI application deployment.

Key features include:

- **Validation of inputs and outputs**: Using regex, JSON schema, and multiple code languages.
- **LLM-based Guardrails**: To detect gibberish, prompt injections, and other issues.
- **Custom actions for failed checks**: Enhancing security and compliance protocols.
- **Collaborative integrations**: Open-source flexibility allows custom integrations with other platforms.

## Accessibility

The Guardrails framework is available both in the open-source project and on Portkey's hosted app, which they are offering for free. This inclusive approach enables a wide range of developers to adopt and benefit from enhanced protection and reliability in their AI applications.

By open-sourcing this Guardrails framework, Portkey is setting a new standard in the AI community, providing a toolset that enhances the security, compliance, and operational reliability of LLMs in production environments.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#ai](https://daily.dev/tags/ai), [#machine-learning](https://daily.dev/tags/machine-learning), [#open-source](https://daily.dev/tags/open-source), [#devops](https://daily.dev/tags/devops)

[View this post on daily.dev](https://daily.dev/posts/portkey-open-sources-guardrails-for-secure-and-reliable-llm-operations-etwdk6afn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Portkey Open-Sources Guardrails for Secure and Reliable LLM Operations","url":"https://daily.dev/posts/portkey-open-sources-guardrails-for-secure-and-reliable-llm-operations-etwdk6afn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/portkey-open-sources-guardrails-for-secure-and-reliable-llm-operations-etwdk6afn"},"datePublished":"2024-08-16T09:52:06.427Z","dateModified":"2024-08-16T09:52:26.244Z","description":"Portkey has enhanced AI safety and reliability by adding guardrails to their open-source AI Gateway. This framework allows developers to enforce specific...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/aeeff980b15bcacb4b23d8d198f6c402?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/aeeff980b15bcacb4b23d8d198f6c402?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Collections","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collections","logo":"https://media.daily.dev/image/upload/s--fk_6ycEi--/f_auto,q_auto/v1780996001/logos/collections?_a=BAMAMiWQ0","url":"https://daily.dev/sources/collections"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/portkey-open-sources-guardrails-for-secure-and-reliable-llm-operations-etwdk6afn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,ai,machine-learning,open-source,devops","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collections","item":"https://daily.dev/sources/collections"},{"@type":"ListItem","position":3,"name":"Portkey Open-Sources Guardrails for Secure and Reliable LLM Operations"}]}
```

