Product

Varun Cherukuri
July 24, 2025
Enterprises that want to use AI agents in business-critical applications need assurance of reliability, security, and safety. Traditional security mechanisms that have historically worked well at the infrastructure layer, like firewalls, authentication, and access control, fall short at the semantic layer at which large language models (LLMs) operate. Even application-level defenses can be overly defensive or easily bypassed by sophisticated attacks that target the meaning of inputs and outputs rather than the structure and syntax of the messages.
Vijil set out to bridge this gap with an agent guardrails framework built on three key principles: (1) policy-based governance – organizational policy must constrain the behavior of the agent, (2) low-latency enforcement – policy enforcement mechanism must minimize the overhead of detecting policy violations (2) framework-agnostic – must work with langchain, crew, ADK, or any other to eliminate friction in implementation.
What is Vijil Dome?
Vijil Dome is a perimeter defense mechanism around LLMs that is designed to provide policy-based guardrails over the behavior of AI agents with low latency and high customizability. We’re pleased to announce that Vijil Dome is now an open source project under the Apache Software License v2.
Vijil Dome is designed to defend AI agents against security threats and safety failures. Unlike systems with multiple layers of input and output filters, Dome offers a lightweight flexible guardrail framework that adapts to your business context. As an agent developer, you can customize the guardrails for your agent by swapping out the built-in detectors with your own.
Key Features
Comprehensive: Vijil Dome provides the most comprehensive scan of inputs and outputs to detect and block content that would violate the policies of a particular agent in your particular enterprise.
Policy-Driven: Specify policies at the level of your organization (e.g., code of conduct), the industry (e.g., OWASP Top 10 for LLMs), and regulation (e.g., EU AI Act, CCPA).
Framework-Agnostic: Supports popular frameworks including LangChain and direct API integration with providers like OpenAI or Google ADK.
Flexible Deployment: Whether you're using cloud-hosted LLMs, local deployments, or hybrid architectures, you can integrate Vijil Dome easily into your existing deployment.
Get Started with Vijil Dome
Install Vijil Dome
Getting started with Dome is straightforward. Install the base package using pip:
Dome also offers several optional extras for enhanced functionality:
Scan LLM Inputs and Outputs
Here's a simple example showing you how to use the core features of Dome to scan inputs and outputs:
This basic example shows how Dome can detect potentially harmful inputs and outputs, and rewrite them to alternatives that comply with organizational policies.
Integrate Dome with OpenAI Clients
One of the most powerful features of Dome is its ability to seamlessly wrap around LLMs within existing AI workflows. Here's how to integrate Dome with OpenAI API to create a trusted AI agent:
Create a Guarded OpenAI Client
Expected output:
Best Practices for OpenAI Integration
Security Configuration
When implementing Dome with OpenAI in production environments, consider:
Layered Defense: Use multiple guard types (security, moderation, privacy) for comprehensive protection.
Custom Policies: Tailor your guardrail configurations to your specific industry requirements and use cases.
Regular Updates: Keep your Dome installation updated to benefit from the latest threat detection models.
Monitoring and Logging: Implement comprehensive logging to track blocked requests and adjust policies as needed. Learn more about configuring observability with Dome here.
Performance Optimization
Async Operations: Use asynchronous processing for high-throughput applications.
Caching: Implement caching strategies for frequently scanned content.
Resource Management: Monitor resource usage and scale accordingly based on traffic patterns.
Integration Considerations
Error Handling: Implement robust error handling to gracefully manage guardrail failures.
Fallback Mechanisms: Design fallback responses for when guardrails are triggered.
User Experience: Balance security with user experience by providing informative feedback when requests are blocked.
Conclusion
Vijil Dome makes it easy to implement a comprehensive perimeter defense around agents without sacrificing functionality or performance. From basic wrapper functions to production-ready agent classes, you can adapt these patterns to meet your specific requirements.
Using Vijil Dome to safeguard agents that use the OpenAI client API is a good place to start building trusted AI applications. By implementing these integration patterns, you can deploy OpenAI-style applications in enterprise environments, knowing that both inputs and outputs are protected by advanced AI security measures.
Ready to explore more advanced integration patterns? Check out our companion post: "Building Secure LangChain Applications with Vijil Dome" for comprehensive examples of integrating Dome with LangChain workflows, including branched execution paths and complex agent architectures.
For more examples and advanced use cases, including how to integrate with Google Cloud ADK or create your own custom detectors, visit our comprehensive documentation and tutorials.