Skip to main content
Welcome back. In this lesson we’ll build a practical multi‑agent system that helps a recruiter automate screening and interview analysis. What is a multi‑agent system? A multi‑agent system is composed of multiple specialized agents (or tools), each with a narrow role. Agents coordinate by passing tasks or data downstream, while a coordinator (or orchestrator) agent controls the overall workflow and composes a final result. Project overview We’ll assemble a recruiter-focused system that does the following:
  • Extract relevant skills and responsibilities from a job description.
  • Scan local PDF resumes for matches to those skills.
  • Transcribe an interview audio file and analyze whether the interview questions align with the job posting.
  • Produce a consolidated report with extracted keywords, resume matches, and interview relevance feedback.
This guide contains the end-to-end implementation and an example runner to execute the workflow.
Ensure your environment variables are configured (for example via a .env file). Set your OpenAI API key at a minimum. Also update RESUME_DIR and INTERVIEW_AUDIO_PATH to match your local filesystem.

Table: Tools and Responsibilities

Imports and configuration

Start by loading environment variables and importing required libraries. Adjust imports if your project uses different modules or versions.
Set the resume directory and other paths (update to suit your environment):

Tool 1 — Scan resumes for keywords

This tool opens each PDF in RESUME_DIR, searches for each keyword (case-insensitive), and returns matches containing filename, keyword, surrounding snippet, and page number.
Best practices:
  • Normalize keywords before searching to improve match quality.
  • Consider using more advanced NLP (lemmatization, fuzzy matching) for improved recall.

Tool 2 — Extract keywords from a job description

Use the LLM to extract 10–15 focused skills, tools, and responsibilities. Provide a clear system instruction and parse the model output into a clean list.
Tip: If the LLM returns multi-word phrases, keep them as-is (e.g., REST APIs, containerization) to preserve context for resume scanning.

Tool 3 — Transcribe interview audio

Transcribe interviews using OpenAI’s speech-to-text model. This function returns the transcription text extracted from the audio file.
Note: Transcription quality depends on audio clarity, sampling rate, and accents. Preprocessing (noise reduction, splitting long files) can improve results.

Tool 4 — Analyze interview relevance

Compare the transcript against the job description and return a human-readable assessment that highlights areas that were strong, missing, or overemphasized, plus actionable suggestions.
Suggestion: For more structured outputs, ask the LLM to return a JSON object with keys like strengths, gaps, and recommendations, then parse it programmatically.

Coordinator agent — The AI Recruiter Assistant

Now compose the tools into a coordinator Agent that orchestrates the full workflow. The agent pulls together keyword extraction, resume scanning, transcription, and interview analysis, and returns a consolidated report.
Design note: Keeping each @function_tool narrow and focused makes it easy to test, reuse, and replace components (for example, swapping Whisper for another transcription service).

Running the system

Create the job description and set the interview audio path. Update paths and job text to match your use case.
The Runner interface is asynchronous. Use an async entrypoint to execute the agent and print the final report. Modify this to fit your runtime or Runner API if necessary.

Example output (what to expect)

When executed, the agent should produce:
  • A list of extracted keywords from the job description (10–15 items).
  • Resume matches found in your PDF files, each with filename, keyword, snippet, and page number.
  • A transcript of the interview audio.
  • A detailed analysis explaining which interview questions aligned with the job description and which areas were under- or over-emphasized, including actionable suggestions.
Example scenario: The system might identify candidates matching “React” and “REST APIs” while noting the interview focused heavily on data-analysis topics (SQL, Excel), indicating a misalignment with the software engineering role.

Recap & next steps

  • Each @function_tool acts as a specialized sub-agent (resume scanning, keyword extraction, transcription, interview analysis).
  • The Agent object composes these tools and orchestrates the full pipeline.
  • Tools are modular and reusable—swap or extend them as needed.
Possible enhancements:
  • Improve keyword extraction (synonyms, fuzzy matching, weighted scoring).
  • Parse resumes into structured fields (name, email, experience years) for richer filtering.
  • Add automated candidate ranking and prioritization.
  • Request structured analysis output (JSON) from the LLM for programmatic post-processing.
Be mindful of API usage and costs. Transcribing long audio files and multiple LLM calls can incur charges—batch and rate-limit requests where possible. Also ensure you have consent and comply with relevant privacy requirements when processing candidate data.

Watch Video