Building a Recruiting Chatbot Agent: Job Search, Application Guidance, and Screening
Learn how to build an AI recruiting chatbot agent that handles job search queries, guides candidates through applications, conducts screening interviews, and provides real-time status updates.
Why Recruiting Needs Agentic AI
Traditional applicant tracking systems are passive — they store resumes and wait for recruiters to act. A recruiting chatbot agent flips this model by actively engaging candidates, matching them to open roles, guiding them through applications, and conducting preliminary screening. This reduces time-to-hire while giving every candidate a responsive experience regardless of recruiter bandwidth.
The key architectural insight is that recruiting is inherently a multi-step workflow: search, match, apply, screen, schedule, and follow up. Each step has its own data sources, validation rules, and decision logic — making it an ideal fit for agentic tool-calling patterns.
Core Architecture
A recruiting agent needs access to the job database, candidate profiles, screening rubrics, and an application submission system. We start by defining the data models and tools.
from dataclasses import dataclass, field
from typing import Optional
from agents import Agent, Runner, function_tool
import json
@dataclass
class JobPosting:
job_id: str
title: str
department: str
location: str
remote_ok: bool
required_skills: list[str]
preferred_skills: list[str]
experience_years: int
salary_range: tuple[int, int]
status: str # "open", "closed", "paused"
@dataclass
class CandidateProfile:
candidate_id: str
name: str
email: str
skills: list[str]
experience_years: int
preferred_locations: list[str]
open_to_remote: bool
applications: list[str] = field(default_factory=list)
Job Search and Matching Tool
The search tool lets candidates find relevant positions based on their skills, location preferences, and experience level. The matching algorithm scores each job against the candidate profile.
See AI Voice Agents Handle Real Calls
Book a free demo or calculate how much you can save with AI voice automation.
# Simulated job database
JOB_DATABASE: dict[str, JobPosting] = {}
@function_tool
def search_jobs(
skills: list[str],
location: str = "",
remote_only: bool = False,
min_experience: int = 0,
) -> str:
"""Search open positions matching candidate criteria."""
matches = []
for job in JOB_DATABASE.values():
if job.status != "open":
continue
if remote_only and not job.remote_ok:
continue
if location and location.lower() not in job.location.lower():
if not job.remote_ok:
continue
skill_overlap = set(s.lower() for s in skills) & set(
s.lower() for s in job.required_skills + job.preferred_skills
)
match_score = len(skill_overlap) / max(
len(job.required_skills), 1
)
if match_score > 0.3:
matches.append({
"job_id": job.job_id,
"title": job.title,
"department": job.department,
"location": job.location,
"remote": job.remote_ok,
"match_score": round(match_score * 100),
"matching_skills": list(skill_overlap),
"salary_range": f"${job.salary_range[0]:,}-${job.salary_range[1]:,}",
})
matches.sort(key=lambda x: x["match_score"], reverse=True)
return json.dumps(matches[:10])
Screening Question Engine
Once a candidate expresses interest, the agent conducts a preliminary screening based on the job requirements. The screening tool generates role-specific questions and evaluates responses.
SCREENING_RUBRICS: dict[str, list[dict]] = {
"software_engineer": [
{
"question": "Describe a system you designed that handles high traffic.",
"criteria": ["scalability", "architecture", "tradeoffs"],
"weight": 3,
},
{
"question": "How do you approach debugging a production issue?",
"criteria": ["systematic", "monitoring", "communication"],
"weight": 2,
},
],
}
@function_tool
def get_screening_questions(job_id: str) -> str:
"""Retrieve screening questions for a specific job posting."""
job = JOB_DATABASE.get(job_id)
if not job:
return json.dumps({"error": "Job not found"})
role_key = job.title.lower().replace(" ", "_")
questions = SCREENING_RUBRICS.get(role_key, [])
if not questions:
questions = [
{
"question": f"What interests you about the {job.title} role?",
"criteria": ["motivation", "role_understanding"],
"weight": 2,
},
{
"question": "Describe your most relevant experience for this position.",
"criteria": ["relevance", "depth", "results"],
"weight": 3,
},
]
return json.dumps({"job_title": job.title, "questions": questions})
@function_tool
def submit_application(
candidate_id: str,
job_id: str,
screening_responses: str,
) -> str:
"""Submit a candidate application with screening responses."""
# Validate job exists and is open
job = JOB_DATABASE.get(job_id)
if not job or job.status != "open":
return json.dumps({"status": "error", "message": "Job not available"})
application_id = f"APP-{candidate_id[:4]}-{job_id[:4]}"
return json.dumps({
"status": "submitted",
"application_id": application_id,
"next_steps": "A recruiter will review within 3 business days.",
})
Assembling the Recruiting Agent
recruiting_agent = Agent(
name="TalentBot",
instructions="""You are TalentBot, a recruiting assistant. Help candidates:
1. Search for jobs matching their skills and preferences
2. Understand job requirements and company culture
3. Complete screening questions for positions they are interested in
4. Submit applications and track their status
Be encouraging but honest. If a candidate lacks key requirements,
suggest how they might bridge the gap rather than discouraging them.
Never share salary negotiation details or internal hiring decisions.""",
tools=[search_jobs, get_screening_questions, submit_application],
)
result = Runner.run_sync(
recruiting_agent,
"I have 5 years of Python and AWS experience. What remote roles are open?",
)
print(result.final_output)
FAQ
How do you prevent bias in the screening process?
Define screening criteria tied to specific job requirements rather than subjective traits. Use structured rubrics with weighted criteria, and ensure the agent evaluates responses against those criteria consistently. Audit screening outcomes regularly to detect disparate impact across demographic groups.
Can this agent handle high applicant volumes?
Yes. The agentic pattern scales naturally because each conversation is stateless from the agent's perspective — state lives in the database. For high volumes, deploy multiple agent instances behind a load balancer and use a message queue for application submissions.
How should screening responses be stored for compliance?
Store all screening interactions with timestamps, the exact questions asked, candidate responses, and any scoring output. This audit trail supports compliance with equal employment opportunity regulations and provides transparency if a candidate requests feedback on their application.
#Recruiting #Chatbot #HRAI #CandidateScreening #AgenticAI #LearnAI #AIEngineering
CallSphere Team
Expert insights on AI voice agents and customer communication automation.
Try CallSphere AI Voice Agents
See how AI voice agents work for your industry. Live demo available -- no signup required.