Inspiration
Validex was born from the realization that as AI systems become increasingly integrated into enterprise workflows, they need more than just intelligent routing—they need governance, security, and observability at scale. We observed that organizations struggle with:
- Cost control - AI expenses spiraling due to inefficient model selection
- Security risks - Sensitive data leaking through AI prompts
- Compliance burdens - Meeting NIST, ISO, and EU AI Act requirements
- Quality assurance - Hallucinations and errors in critical business processes
- Developer friction - Complex AI systems being difficult to integrate
We set out to build an AI platform that doesn't just route requests intelligently, but provides enterprise-grade governance, security, and developer experience out of the box.
What it does
Validex is an enterprise-grade AI routing and verification platform that combines intelligent multi-tier routing with comprehensive governance features:
Core AI Capabilities:
- Multi-Tier Routing: Automatically routes requests to optimal AI models (Tier 1: cost-effective, Tier 2: premium) based on complexity, cost, and performance predictions
- Semantic Caching: Reduces costs and latency through intelligent cache matching using embeddings
- Three-Stage Verification: Structural validation, content verification (PII, bias, hallucination detection), and anomaly detection
- Speculative Prompting: Uses cheaper models for drafts with confidence-based accuracy gates
Enterprise Governance:
- Task-Based Access Control (TBAC): Policy-based enforcement of what AI agents can do and which tools they can access
- PII Redaction Layer: Automatically detects and masks sensitive data before external API calls
- Regulatory Compliance Dashboard: Real-time monitoring for NIST AI RMF, ISO/IEC 42001, and EU AI Act compliance
- AI Bill of Materials (AI BOM): Complete inventory of AI components for audit trails
Advanced Observability:
- Drift & Bias Detection: Automated alerts for model performance degradation and bias across demographic groups
- Traceability System: Detailed reasoning traces showing exactly why routing decisions were made
- Immutable Audit Logs: Tamper-evident logging for forensic analysis and compliance
Agentic Orchestration:
- Planning Module: Plan-Act-Reflect-Repeat pattern for complex task decomposition
- Manager-Worker Pattern: Central manager assigns tasks to specialized agents (coding, math, reasoning, etc.)
- Refinement Loop: Automatic self-correction when verification detects issues
Developer Experience:
- Simple SDK: Single-line
validex.chat()interface abstracting all complexity - Cost Forecasting: Dry-run estimation before execution with Fast/Cheap vs Premium modes
- Streaming Support: Real-time streaming with progress callbacks
How we built it
Technical Architecture:
- Frontend: Next.js 16.2.6 with React 19, TypeScript, TailwindCSS, and shadcn/ui components
- Backend: Next.js API routes with AI SDK integration
- AI Models: Multi-tier architecture using Fireworks AI (13 models across tiers 1 and 2)
- Local Processing: Qwen2.5:0.5b via Ollama for zero-cost routing decisions
- Verification: Gemini 1.5 Flash, Bohr API, and local synthesis with fallback mechanisms
Key Implementation Decisions:
- Singleton Pattern: Used for enterprise systems (TBAC, compliance, drift detection) to ensure consistent state
- TypeScript-First: Strong typing throughout for reliability and maintainability
- Modular Architecture: Each enterprise feature as independent module for easy testing and deployment
- Fallback Mechanisms: Graceful degradation when external services (Ollama, Bohr) are unavailable
- Policy-Driven Governance: TBAC uses configurable policies rather than hardcoded rules
Development Workflow:
- Rapid prototyping with immediate build testing
- Git-based version control with feature branches
- Continuous integration through Vercel auto-deploys
- Modular testing of individual enterprise features
Challenges we ran into
Technical Challenges:
- Model Selection Complexity: Balancing cost, latency, and quality across 13 different models required extensive testing and threshold tuning
- Verification Pipeline Integration: Making the three-stage verification work seamlessly with the routing system without adding unacceptable latency
- Fallback Handling: Ensuring graceful degradation when local services (Ollama) or external APIs (Bohr) are unavailable
- Type Safety: Maintaining strict TypeScript types across complex enterprise systems while keeping the codebase maintainable
Architecture Challenges:
- State Management: Deciding between singleton instances vs dependency injection for enterprise systems
- Policy Configuration: Designing flexible policy systems that could handle diverse enterprise requirements without becoming overly complex
- Performance vs Security: Balancing PII redaction and verification overhead with response time requirements
Integration Challenges:
- API Rate Limits: Handling rate limits across multiple AI providers while maintaining system reliability
- Environment Variables: Managing the complex web of required and optional environment variables across development and production
Accomplishments that we're proud of
Technical Achievements:
- Zero-Cost Routing: Implemented local Qwen router that eliminates external API calls for routing decisions
- Comprehensive Governance: Built complete TBAC, compliance, and observability systems from scratch
- Fallback Resilience: Created robust fallback mechanisms that keep the system running even when components fail
- Type Safety: Achieved 100% TypeScript coverage across complex enterprise systems
Enterprise Features:
- Regulatory Compliance: Implemented tracking for three major frameworks (NIST, ISO, EU AI Act)
- AI BOM Generation: Created complete inventory system for AI components
- Drift Detection: Built automated monitoring for model performance degradation
- Developer SDK: Simplified complex AI operations into single-line function calls
Performance:
- Cost Optimization: Multi-tier routing with speculative drafting reduces costs by 40-60%
- Latency Reduction: Semantic caching and local routing cut response times significantly
- Build Performance: Next.js 16.2.6 with Turbopack enables sub-10 second builds
User Experience:
- Intuitive UI: Clean, modern interface with dark mode support
- Real-time Feedback: Streaming responses and immediate verification results
- Developer-Friendly: SDK that abstracts complexity while maintaining control
What we learned
Technical Insights:
- Local AI is Viable: Small local models (Qwen2.5:0.5b) can handle complex routing decisions effectively
- Fallback is Critical: Enterprise systems must be designed for component failure from day one
- Policy > Code: Configurable policies are more flexible than hardcoded business logic
- Type Safety Pays Off: TypeScript prevents entire classes of bugs and improves maintainability
Architecture Lessons:
- Modularity Matters: Breaking complex systems into independent modules enables testing and iteration
- Singleton Trade-offs: While convenient for state management, singletons can complicate testing
- Observability is Essential: You can't improve what you can't measure - comprehensive logging is invaluable
AI System Design:
- Quality Gates Work: Confidence-based accuracy gates in speculative prompting are highly effective
- Verification Adds Value: Three-stage verification catches issues that would otherwise reach users
- Multi-Agent Power: Specialized agents outperform general-purpose models for complex tasks
Project Management:
- Build Early, Build Often: Continuous build testing caught issues before they compounded
- Documentation Matters: Complex systems require clear documentation for maintainability
- User Feedback is Gold: The UI improvements (logo, button colors) came directly from user testing
What's next for Validex
Immediate Priorities:
- Explainability UI: Create user-friendly interface for displaying reasoning traces and decision logs
- A/B Testing Framework: Enable shadow experiments for testing new routing strategies against production traffic
- CLI Tool: Extend SDK with command-line interface for non-developer users
Enhanced Features:
- Episodic Memory: Store successful resolution strategies in vector database for complex problem reuse
- Human-in-the-Loop Endpoints: Add approval workflows for high-stakes operations (code deployment, financial data)
- Advanced Bias Detection: Implement more sophisticated demographic analysis and bias mitigation
- Real-time Collaboration: Multi-user sessions with shared context and collaborative AI interactions
Platform Expansion:
- Plugin System: Allow third-party developers to add custom agents, verification stages, and policies
- Enterprise SSO: Integrate with Okta, Auth0, and other enterprise identity providers
- Custom Model Support: Enable users to bring their own models and integrate them into the routing system
- Analytics Dashboard: Comprehensive usage analytics, cost tracking, and performance insights
Ecosystem:
- Marketplace: Create marketplace for community-contributed agents and verification modules
- Templates: Pre-built configurations for common use cases (customer support, code review, content moderation)
- Documentation Portal: Extensive documentation, tutorials, and best practices guide
- Community: Open source components and contribute back to the AI ecosystem
Validex is positioned to become the comprehensive enterprise AI platform that organizations need to deploy AI with confidence, control, and compliance.
Built With
- ai-sdk
- cloudinary
- eslint
- fireworks
- github
- google-generative-ai
- lucide-react
- next-themes
- nextjs
- node.js
- ollama
- pnpm
- postcss
- radix-ui
- react
- recharts
- resend
- shadcn-ui
- supabase
- tailwindcss
- tsx
- typescript
- vercel
- zod
Log in or sign up for Devpost to join the conversation.