Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/vrashmanyu605-eng/Langchain_Interview_Multi_Agents_Flow/llms.txt

Use this file to discover all available pages before exploring further.

The resume parser agent is the first specialist agent the supervisor calls. It receives the raw text extracted from a candidate’s PDF resume — via PyMuPDF upstream — and asks the LLM to convert it into a structured JSON profile. Every downstream agent that needs candidate information reads from the candidate_profile field that this agent writes to state.

Source code

from llm import llm

def resume_parser_agent(state):

    resume_text = state["resume_text"]

    response = llm.invoke(
        f"""
        You are a Resume Parsing Agent.

        Extract structured candidate information from this resume.

        Resume:
        {resume_text}

        Extract:
        - candidate_name
        - email
        - phone
        - skills
        - frameworks
        - experience
        - projects
        - education
        - certifications
        - github
        - linkedin
        - current_role
        - seniority_level

        Return structured JSON only.
        """
    )

    return {
        "candidate_profile": response.content
    }

Input

The agent reads a single field from state:
resume_text
string
required
Raw text extracted from the candidate’s resume PDF. PyMuPDF handles the PDF-to-text conversion before the graph starts, and the result is stored in state under this key.

Output

The agent writes a single field to state:
candidate_profile
string
A JSON string containing the structured candidate profile. All downstream agents that need candidate information — matching, research, interview question generators, evaluation, and email — read from this field.
The JSON contains the following fields:
FieldDescription
candidate_nameFull name as it appears on the resume
emailPrimary contact email
phoneContact phone number
skillsList of technical skills
frameworksList of frameworks and libraries
experienceTotal years of professional experience
projectsNotable projects mentioned in the resume
educationHighest or most relevant qualification
certificationsProfessional certifications held
githubGitHub profile URL or handle
linkedinLinkedIn profile URL or handle
current_roleMost recent job title
seniority_levelInferred level (e.g., Junior, Mid, Senior, Staff)

LLM prompt

The prompt instructs the LLM to act as a Resume Parsing Agent and extract all thirteen fields from the raw resume_text. The prompt explicitly requests structured JSON only, which prevents the LLM from adding narrative explanation that would break downstream JSON parsing.

Example output structure

{
  "candidate_name": "Jane Smith",
  "email": "[email protected]",
  "phone": "+1-555-0100",
  "skills": ["Python", "FastAPI", "PostgreSQL", "Docker"],
  "frameworks": ["LangChain", "FastAPI", "Celery"],
  "experience": "5 years",
  "projects": ["E-commerce platform", "ML pipeline"],
  "education": "B.Tech Computer Science",
  "certifications": ["AWS Solutions Architect"],
  "github": "github.com/janesmith",
  "linkedin": "linkedin.com/in/janesmith",
  "current_role": "Senior Backend Engineer",
  "seniority_level": "Senior"
}

State diagram

Requires: resume_text

resume_parser_agent

Provides: candidate_profile

Build docs developers (and LLMs) love