Architecture
Visual overview of AgentHire's multi-agent MCP infrastructure
System Overview
How data flows through the multi-agent pipeline
User Input
User provides career goals, uploads resume, or asks questions
Orchestrator
LangGraph state graph routes to appropriate agents via conditional edges
Profile Analysis
Resume Parser MCP extracts structured profile data
Job Search
Job Search MCP finds relevant opportunities
Match Scoring
Match Scorer MCP calculates fit across 4 dimensions
Resume Tailoring
Resume Tailor MCP optimizes for target role
Interview Prep
Interview Coach MCP generates personalized prep
MCP Servers
Each agent runs as an independent Model Context Protocol server
Resume Parser
MCP Server · stdio
Parses resumes into structured profiles with skills, experience, and education extraction
Tools
Job Search
MCP Server · stdio
Searches and filters job postings from multiple sources with intelligent ranking
Tools
Match Scorer
MCP Server · stdio
Scores profile-job matches across skills, experience, education, and culture fit
Tools
Resume Tailor
MCP Server · stdio
Tailors resumes for specific job postings, optimizing keywords and structure for ATS
Tools
Interview Coach
MCP Server · stdio
Generates interview questions, provides STAR method coaching, evaluates answers
Tools
LangGraph Orchestrator
State graph with conditional routing between agents
State Graph Design
Built with LangGraph's Annotation.Root with typed reducers. Nodes are agent functions, edges are conditional routing functions. The router examines state.currentAgent to dispatch to the correct node.
SSE Streaming
Real-time event streaming via Server-Sent Events. createSSEStream() returns a ReadableStream with push/close controls. Events follow the agent:type naming pattern.
Human-in-the-Loop
Supports approval workflows via humanApprovalNeeded and humanApprovalResponse state fields. Critical decisions can be routed to the user before proceeding.
Local LLM Support
Ollama integration with qwen2.5-coder:14b model for local inference. Falls back to demo simulation when API is unavailable.
Infrastructure
Supporting systems for observability, evaluation, and data management
MCP Protocol
- Each agent is a standalone MCP server
- Communicates over stdio transport
- Tools registered via ListTools/CallTool schemas
- Input validation with Zod schemas
- BaseMcpAgent abstract class for common patterns
Observability
- OpenTelemetry tracing across all agents
- Metrics: llm.requests, llm.tokens, llm.cost
- Histograms: llm.latency, agent.tool.latency
- Structured logging with pino
- Agent metrics stored in Supabase
Eval Framework
- JSON fixtures for test cases
- 5 scorer types: llm-judge, heuristic, exact-match, regex, schema-validation
- Pass threshold: 70% by default
- CLI reporter with detailed output
- Results stored as JSON in eval-results/
Data Layer
- Supabase with pgvector for semantic search
- vector(1536) columns on profiles & jobs
- Row Level Security on all tables
- Unique constraint on (profile_id, job_id)
- Agent metrics table for performance tracking
Monorepo Structure
11 packages organized in a Turborepo monorepo
@agenthire/shared
Types, Zod schemas, LLM client, BaseMcpAgent
@agenthire/observability
OpenTelemetry tracing, metrics, pino logging
@agenthire/orchestrator
LangGraph state graph, routing, SSE streaming
@agenthire/evals
Eval runner, scorers, fixtures, CLI reporter
mcp/resume-parser
Parse resumes into structured profiles
mcp/job-search
Search and filter job postings
mcp/match-scorer
Score profile-job matches, identify gaps
mcp/resume-tailor
Tailor resumes for specific jobs
mcp/interview-coach
Generate questions, evaluate answers
apps/web
Next.js 15 frontend with Tailwind CSS 4
supabase/migrations
SQL migrations for all database tables
Tech Stack
Key technologies powering the platform