In ProgressMulti-AgentLangChainLangGraphFastAPI

NextRole — 7-Agent Job Search Copilot

Designing a 7-agent AI pipeline that parses your CV, matches roles semantically, writes tailored cover letters, and quizzes you on company-specific interview questions — in under 30 seconds.

7
Autonomous Agents
85%+
Job Match Precision
90%+
Feedback Accuracy
help_outline

The Problem

Job searching is broken for engineers. You spend hours tailoring your CV to each role, writing cover letters that sound generic, and prepping for interviews with no real feedback loop. The tooling is either too manual or too generic. I wanted to build a system that does what a well-connected recruiter friend would do: understand your background deeply, find the right roles, write a real cover letter, and quiz you on exactly what that company asks in interviews.
warning

Why It Was Hard

The naive approach — one LLM prompt that does everything — fails because each task requires different context, different tools, and different accuracy guarantees. CV parsing needs structured extraction. Job matching needs semantic similarity scoring, not keyword matching. Cover letter generation needs the job description AND your CV AND a tone calibration. Interview prep needs company-specific question banks. Stringing these together in a single prompt produces mediocre output across all tasks. The solution is decomposition: 7 specialized agents, each doing one thing well, passing typed outputs to the next. The engineering challenge is state management across agents — how do you pass CV data, matched job data, and cover letter drafts through a pipeline without losing context or hitting token limits?
architecture

Architecture

7-agent pipeline built on LangChain + LangGraph with FastAPI as the orchestration layer: → Agent 1 — CV Parser: Extracts structured data from PDF/DOCX resumes. Skills, experience, education, and accomplishments into a typed schema. Uses Groq LLaMA 3.3 with a constrained output format. → Agent 2 — Job Scraper: Pulls listings from configured sources. Each listing is normalized into a standard Job schema regardless of source format. → Agent 3 — Semantic Matcher: Embeds both the user CV and each job description using sentence-transformers. Cosine similarity scoring with a configurable threshold. Returns ranked matches with a confidence score. → Agent 4 — Role Analyst: For each top match, extracts key requirements, company culture signals, and implicit expectations from the job description. This feeds both the cover letter and interview prep agents. → Agent 5 — Cover Letter Generator: Takes CV structured data + role analysis + a tone parameter (formal/conversational). Produces a 250-word letter that references specific CV achievements relevant to the role. → Agent 6 — Interview Prep: Queries a vector store of company-specific interview patterns (scraped from Glassdoor + LeetCode discussions). Returns the top 10 likely questions with answer frameworks based on the user's CV. → Agent 7 — Feedback Scorer: After mock answers, scores responses on STAR method compliance, relevance, and conciseness. Returns structured feedback with specific improvements. State flows through LangGraph's StateGraph — each agent reads from and writes to a shared typed state object. No agent can read a field that hasn't been populated by an upstream agent.
bug_report

What Failed First

First attempt used a simple LangChain sequential chain. It worked for the happy path but had no error recovery — if Job Scraper returned 0 results, the entire pipeline crashed rather than gracefully asking the user to widen their search. Second failure: I initially had the Semantic Matcher use keyword overlap instead of embedding similarity. It returned 90%+ matches for "Python developer" roles when the user was a "Python AI engineer" — technically overlapping but semantically wrong. Switching to embedding-based matching fixed this. Third issue: The Cover Letter Generator was producing generic output because it was receiving too much CV context. The token budget for the prompt was consumed by experience entries the model wasn't using. Fixed by pre-filtering CV sections to only include the top 3 most relevant experiences (as scored by the Semantic Matcher). LangGraph's state management has a learning curve. My first state schema was too loosely typed (using Dict everywhere) which made debugging agent handoffs nearly impossible. Switching to Pydantic models for all state fields made errors explicit and traceable.
insights

Results (Current Status: Beta)

NextRole is currently in active development with core agents working: • 90%+ feedback accuracy on STAR method scoring (tested against 50 manually rated sample answers) • 85%+ job match precision (tested against 200 LinkedIn listings, rated manually for relevance) • CV parsing handles 95%+ of standard resume formats including multi-column PDFs Still in progress: Job Scraper (building ethical scraping with rate limits and ToS compliance), Interview question bank (need more data before the vector store is useful), and the Next.js frontend. The system is functionally complete for the core pipeline — it can take a CV, match it to jobs, and generate a cover letter end-to-end in under 30 seconds.
lightbulb

Key Learnings

1. Multi-agent systems need typed state contracts between agents. Duck typing across agent boundaries makes debugging nearly impossible. Use Pydantic everywhere. 2. LangGraph is the right abstraction for pipelines with branching and error recovery. A simple sequential chain hits its limits quickly. 3. Pre-filtering context before LLM calls is more important than prompt engineering. Reducing the cover letter prompt from 8K tokens to 3K tokens improved output quality more than any prompt rewrite. 4. Ship the pipeline before the UI. I wasted two weeks on the Next.js frontend before the backend was stable. The agents should work end-to-end via API before any UI exists. 5. Evaluation is not optional. Without the 200-listing benchmark, I wouldn't have caught the keyword-vs-embedding matching issue. Build your eval set before you build your features.