An agentic AI recruiting assistant that shortlists candidates, explains rankings, designs interview panels, schedules interviews, nudges pipeline owners, and exports audits.
- Frontend: Next.js 14 (App Router) + TypeScript + Tailwind CSS + shadcn/ui
- Backend: Next.js API Routes + Vercel AI SDK (agents & tools)
- Database: Supabase (Postgres + pgvector + Storage)
- AI: OpenAI GPT-4 (configurable for other providers)
- Deployment: Vercel (with cron jobs)
- Recruiter AI Chat: Single-page chat interface for end-to-end recruitment
- Job Description Architect: Transform hiring ideas into structured JDs
- Resume Parser: Extract structured data from resume text
- Vector Search: Find best-matching candidates using embeddings
- Candidate Explanations: AI-generated fit analysis with evidence
- Interview Panel Design: Optimal interviewer selection and question generation
- Automated Nudges: Smart pipeline health monitoring
- Full Audit Trail: Complete transparency of AI decisions and actions
- Jobs Management: Create, edit, and manage job openings
- Candidate Database: Upload, parse, and search candidate profiles
- AI Shortlisting: Rank candidates with detailed explanations
- Interview Scheduling: Design panels and find available slots
- Pipeline Operations: Monitor SLAs and automated notifications
- Audit & Export: Complete data export with audit trails
recruiting-copilot/
โโ app/ # Next.js App Router
โ โโ api/hr-agent/ # Main orchestrator
โ โโ api/tools/ # Individual AI tools
โ โโ [pages]/ # UI pages
โโ lib/ # Core utilities
โ โโ ai.ts # Vercel AI SDK setup
โ โโ schemas.ts # Zod validation schemas
โ โโ vector.ts # pgvector operations
โ โโ [adapters]/ # External service adapters
โโ components/ # React components
โโ supabase/ # Database schema & migrations
- Node.js 18+ and npm/yarn/pnpm
- Supabase account
- OpenAI API key
- Create a new Supabase project
- Enable the
vectorextension in the SQL editor:create extension vector;
- Run the migration:
# Copy and run the SQL from supabase/migrations/001_init.sql - (Optional) Load sample data:
# Run supabase/seed/sample_data.sql
- Copy
.env.exampleto.env.local:cp .env.example .env.local
- Fill in your environment variables:
# Supabase NEXT_PUBLIC_SUPABASE_URL="https://YOUR_PROJECT.supabase.co" NEXT_PUBLIC_SUPABASE_ANON_KEY="your-anon-key" SUPABASE_SERVICE_ROLE_KEY="your-service-role-key" # OpenAI OPENAI_API_KEY="your-openai-api-key"
# Install dependencies
npm install
# Run development server
npm run devVisit http://localhost:3000 to see the application.
- Chat with Recruiter AI: Visit
/recruiterand describe your hiring needs - AI Generates JD: System creates job description with embedding
- AI Sources Candidates: Semantic search finds best matches
- AI Ranks & Screens: Rule-based scoring with AI explanations
- Review Results: JobCard and CandidateCards with transparency
- Create Jobs: Use
/jobs/newto generate professional job descriptions - Add Candidates: Upload resumes via
/candidates/upload - Generate Shortlists: Use
/shortlistto find and rank top matches - Schedule Interviews: Design panels and book slots via
/schedule - Monitor Pipeline: Track health and send nudges via
/ops - Export Data: Download audit trails via
/audit
The application includes these AI-powered tools:
| Tool | Purpose | Input | Output |
|---|---|---|---|
create-or-update-job |
Create job with embedding | Job data | Job record + ID |
parse-resume |
Extract structured data | Resume text | Candidate profile |
vector-search |
Find matching candidates | Job ID | Ranked candidates |
explain-candidate |
Generate fit analysis | Job + Candidate | Detailed explanation |
design-panel |
Create interview panel | Job + Candidate | Optimal panel |
find-slot |
Calendar availability | Attendees + duration | Available slots |
export-audit |
Data export | Date range | Audit logs |
The app uses OpenAI by default but supports other providers via Vercel AI SDK:
// lib/ai.ts
import { anthropic } from '@ai-sdk/anthropic'
import { google } from '@ai-sdk/google'
export const models = {
small: openai('gpt-4o-mini'),
normal: anthropic('claude-3-sonnet-20240229'), // Alternative
}Powered by pgvector with cosine similarity:
- Embeddings: OpenAI
text-embedding-3-large(3072 dimensions) - Index: IVFFlat with 100 lists
- Search function:
search_candidates(job_uuid, limit)
- PII Redaction: Automatic masking via
lib/redact.ts - Audit Logging: All actions logged to
audit_logstable - Service Keys: Server-side only, never exposed to client
- Connect your GitHub repo to Vercel
- Add environment variables in Vercel dashboard
- Deploy! The cron job will be automatically configured.
- Build the application:
npm run build
- Set up cron jobs for automated nudges (see
vercel.json)
The app includes comprehensive logging:
- Audit Logs: All user actions and system events
- Prompt Logs: AI usage, token counts, and costs
- Pipeline Metrics: Candidate flow and bottlenecks
Export data via the /audit page for analysis.
- ATS Integration: Connect to Lever, Greenhouse, or other ATS
- Calendar Integration: Real Google/Outlook calendar booking
- Email Automation: Automated candidate communications
- Video Interviews: Integration with Zoom/Teams
- Background Checks: Automated verification workflows
- Analytics Dashboard: Advanced pipeline insights
MIT License - feel free to use this as a starting point for your own recruiting tools!
This is a demo/starter project, but contributions are welcome:
- Fork the repo
- Create a feature branch
- Submit a pull request
For questions or issues:
- Check the GitHub Issues
- Review the
.cursorrulesfor development guidelines - Ensure your Supabase setup matches the schema in
supabase/migrations/
Happy hiring! ๐