Laravel Prism AI Agent & Vector Search Router
Developer utility for routing LLM prompts across Claude, OpenAI, and Gemini with PgVector RAG.
🎯 Project Scope & Objectives
Build an open-source Laravel package and routing proxy that handles prompt caching, model failovers, vector similarity retrieval (RAG), and cost tracking across multiple AI providers.
🏗 System Architecture & Engineering Breakdown
- Vector Database: PostgreSQL 16 + PgVector storing 1536-dimensional document embeddings.
- Prism Package: Integration with Prism PHP for unified syntax across OpenAI, Anthropic, and Google AI.
- Caching Layer: Redis semantic prompt cache to prevent duplicate LLM API invocations.
🔄 End-to-End Workflow Pipeline
- Query Reception: Intercepts prompt query and checks semantic Redis cache.
- RAG Retrieval: Performs vector distance search in PgVector to inject relevant context.
- LLM Dispatch: Routes to the optimal LLM provider based on cost, latency, and model availability.
📊 Enterprise Outcomes & Metrics
Slashed total client AI API bills by 40% while improving response accuracy by 65% through context-rich vector RAG.
Gallery
More work
All projectsAutonomous Sales & Marketing AI Agent Platform
Autonomous multi-agent sales pipeline built with Laravel 12, Prism PHP, Stripe Cashier, and FilePond.
Shifa Health & Telemedicine SaaS
Telemedicine patient portal, appointment queues, doctor billing, and health e-commerce with Stripe.
AI Financial Analytics & Portfolio Engine
Real-time financial sentiment analysis, WebSockets ticker streaming, and predictive risk scoring.
Need something similar?
Send us the requirements, the traffic you expect and what is already in place. We reply within 24 hours.