AI-powered lawyer matching engine that uses 3 AI models in parallel (Claude, GPT-4o-mini, Gemini) to analyze a user's legal situation and match them with the right type of lawyer.
Live Demo: https://lawyercomassignment.vercel.app
- 3 AI Models in Parallel — Claude classifies the practice area, GPT-4o-mini extracts key entities, Gemini generates actionable guidance
- Real-time SSE Streaming — Watch each agent complete in real-time with status indicators
- Graceful Partial Failure — If 1 or 2 agents fail, results from the others still display
- 20 Practice Areas — Covers Personal Injury, Family Law, Criminal Defense, Immigration, and more
- Dark Mode — Professional legal-tech aesthetic with blue accent
- Fully Responsive — Works on desktop and mobile
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS v4, shadcn/ui
- AI Agents: Anthropic SDK (Claude), OpenAI SDK (GPT-4o-mini), Google Generative AI SDK (Gemini)
- Validation: Zod v4 for runtime validation of AI responses
- Deployment: Vercel
# Install dependencies
npm install
# Set up environment variables
cp .env.local.example .env.local
# Add your API keys to .env.local
# Run development server
npm run devANTHROPIC_API_KEY=your_anthropic_key
OPENAI_API_KEY=your_openai_key
GOOGLE_AI_API_KEY=your_google_ai_key
User Input → POST /api/analyze → SSE Stream
├── Agent 1: Claude (Classifier) → Practice Area
├── Agent 2: GPT-4o-mini (Extractor) → Key Details
└── Agent 3: Gemini (Advisor) → Guidance
→ Complete event with ensemble confidence
All 3 agents run via Promise.allSettled so partial failures are handled gracefully. Each agent has a 15-second timeout.
Pradyumn K Tendulkar