Home

Foundry

Guardrails

Guardrails are the safety layer built into 

every agent run

Guardrails intercept every LLM input and output in real-time checking for prompt injection, PII, toxicity and policy violations. Essential for every elsai workflow.

Book a demo →

Home

Foundry

Guardrails

Guardrails are the safety layer 

built into every agent run

Guardrails intercept every LLM input and output in real-time checking for prompt injection, PII, toxicity and policy violations. Essential for every elsai workflow.

Book a demo →

Home

Foundry

Guardrails

Guardrails are the safety layer built into every agent run

Guardrails intercept every LLM input and output in real-time checking for prompt injection, PII, toxicity and policy violations. Essential for every elsai workflow.

Book a demo →

Home

Foundry

Guardrails

Guardrails are the safety layer built into 

every agent run

Guardrails intercept every LLM input and output in real-time checking for prompt injection, PII, toxicity and policy violations. Essential for every elsai workflow.

Book a demo →

Enterprise-grade AI safety

Enterprise-grade AI safety

Comprehensive guardrails to protect your AI applications from security threats, compliance violations and quality issues.

Comprehensive guardrails to protect your AI applications from security threats, compliance violations and quality issues.

Toxicity detection

Toxicity detection

Automatically identify and filter harmful, offensive or inappropriate content in AI responses before they reach your users.

Automatically identify and filter harmful, offensive or inappropriate content in AI responses before they reach your users.

Hallucination detection

Hallucination detection

Detect when AI generates false or misleading information not grounded in factual data or provided context.

Detect when AI generates false or misleading information not grounded in factual data or provided context.

PHI / PII detection

PHI / PII detection

Protect sensitive personal health information and personally identifiable information from being exposed or processed.

Protect sensitive personal health information and personally identifiable information from being exposed or processed.

Sensitive data detection

Sensitive data detection

Identify and redact financial data, credentials, API keys and other sensitive information in AI interactions.

Identify and redact financial data, credentials, API keys and other sensitive information in AI interactions.

Jailbreak detection

Jailbreak detection

Prevent attempts to bypass AI safety measures and manipulate your models into generating harmful outputs.

Prevent attempts to bypass AI safety measures and manipulate your models into generating harmful outputs.

Prompt injection

Prompt injection

Block malicious prompts designed to hijack your AI system's behaviour or extract sensitive information.

Block malicious prompts designed to hijack your AI system's behaviour or extract sensitive information.

Talk to an elsai expert →

Production-ready validators

Production-ready validators

Deploy enterprise-grade AI validation in minutes battle-tested, highly performant and designed for scale.

Deploy enterprise-grade AI validation in minutes battle-tested, highly performant and designed for scale.

Real-time validation with sub-100ms latency

Real-time validation with sub-100ms latency

Easy API integration with any LLM provider

Easy API integration with any LLM provider

Comprehensive logging and analytics

Comprehensive logging and analytics

Customizable thresholds and rules

Customizable thresholds and rules

SOC2 compliant infrastructure

SOC2 compliant infrastructure

Book a demo →

guardrails.py

from elsai_guardrails.guardrails import LLMRails, RailsConfig


yaml_content = """llm:

engine: "openai"

model: "gpt-4o-mini"

api_key: "sk-..."


guardrails:

input_checks: true

check_toxicity: true

check_sensitive_data: true

check_semantic: true"""


config = RailsConfig.from_content(yaml_content=yaml_content)

rails = LLMRails(config=config)


# Input will be automatically checked

result = rails.generate(

messages=[{"role": "user", "content": "user input"}],

return_details=True

)


if result.get('input_check'):

print(f"Input passed: {result['input_check'].passed}")

More validators on the way

More validators on the way

We're constantly expanding our guardrail capabilities. Stay tuned for these upcoming features.

We're constantly expanding our guardrail capabilities. Stay tuned for these upcoming features.

Coming soon

Coming soon

Off-topic detection

Off-topic detection

Automatically detect when conversations drift from intended topics and keep your AI focused on relevant discussions.

Automatically detect when conversations drift from intended topics and keep your AI focused on relevant discussions.

Coming soon

Coming soon

Valid SQL validation

Valid SQL validation

Ensure AI-generated SQL queries are syntactically correct and safe before execution preventing database errors and injection attacks.

Ensure AI-generated SQL queries are syntactically correct and safe before execution preventing database errors and injection attacks.

Ready to secure your AI?

Ready to secure your AI?

We're constantly expanding our guardrail capabilities. Stay tuned for these upcoming features.

We're constantly expanding our guardrail capabilities. Stay tuned for these upcoming features.

Start free trial →

We use cookies to personalize content and ads, to provide social media features, and to analyze our traffic. We also share information about your use of our site with our social media, advertising, and analytics partners. You can choose which types of cookies to accept. Read our cookies policy ↗

Necessary

Enables security and basic functionality.

Preferences

Enables personalized content and settings.

Analytics

Enables tracking of performance.

Marketing

Enables ads personalization and tracking.