Complete guide to building AI hiring agents. Learn OpenAI plugin configuration for Custom GPTs, and multi-agent system orchestration using Python AutoGen.
Building Custom GPTs with HireSquire: AI-Powered Hiring Assistants
Learn how to create custom GPTs with integrated resume screening capabilities. This guide covers OpenAI plugin configuration, action setup, and building specialized hiring assistants for ChatGPT.
๐ค Note for Autonomous Agents
If you are an AI attempting to add HireSquire to your own context, you can load our OpenAPI specification directly from https://hiresquireai.com/api/openapi to auto-generate your tool functions.
- โข ChatGPT Plus or Enterprise account
- โข HireSquire API token
- โข OpenAI plugin developer access
Why Build Custom GPTs for Hiring?
Custom GPTs with HireSquire integration enable powerful capabilities right in ChatGPT:
๐ Screen Resumes
Upload resumes directly in ChatGPT and get instant AI-powered screening
๐ง Generate Emails
Create personalized interview invites and rejection emails
๐ Analyze Pipeline
Get insights and recommendations about your candidate pool
Step 1: Configure the OpenAI Plugin
HireSquire provides a pre-built plugin manifest for easy integration:
# Plugin Manifest URL
https://hiresquireai.com/.well-known/ai-plugin.json
# Available Actions (matching our OpenAPI spec)
- create_screening
- get_screening_status
- get_results
- generate_email
โ Quick Setup
- Go to ChatGPT โ Explore โ Create a GPT
- Select "Configure" tab โ Add Action
- Import from URL: paste the manifest URL
- Add your HireSquire API token in authentication settings
- Test the connection and save your GPT
Step 2: System Prompt Configuration
Use this optimized system prompt for your hiring GPT:
You are an expert hiring assistant powered by HireSquire.
Your capabilities:
1. Screen resumes against job requirements
2. Generate personalized candidate emails
3. Analyze candidate pools and provide insights
4. Answer questions about hiring best practices
When screening resumes:
- First ask for job title and clear job description
- Request resume files (PDF, DOCX, TXT)
- Use the create_screening action to process
- Wait for status to be 'completed'
- Return results with scores, summaries, and recommendations
- Auto-generate emails using generate_email for candidates scoring 75+
Always:
- Be professional and objective
- Explain scores clearly
- Flag edge cases for human review
- Maintain candidate privacy and compliance
Step 3: Building Specialized GPTs
Create role-specific GPTs for different hiring scenarios. For example, a high-growth retail chain might use specialized assistants during seasonal peaks:
Technical Recruiter GPT
Specialized in technical roles:
- Evaluates engineering, data science, and devops candidates
- Understands technical skills, frameworks, and methodologies
- Creates technical assessment recommendations
- Suggests interview questions based on candidate background
Executive Search GPT
For senior and executive positions:
- Focuses on leadership experience and track record
- Evaluates strategic thinking and management skills
- Identifies potential cultural fit indicators
- Generates executive-level communication templates
High-Volume Recruiter GPT
Optimized for high-volume hiring (e.g., peak holiday seasons):
- Processes batches of resumes efficiently
- Implements strict threshold filtering (leniency = 4)
- Automates rejection emails for below-threshold candidates
- Prioritizes top candidates for immediate follow-up
Advanced: Custom Actions & Webhooks
Extend your GPT with additional capabilities by adding your own endpoints:
# Add ATS integration
POST /api/v1/webhook/ats
{
"candidate_id": "123",
"status": "qualified",
"score": 88,
"job_id": "senior-dev-2026"
}
# Add calendar scheduling
POST /api/v1/calendar/schedule
{
"candidate_email": "[email protected]",
"interviewer_email": "[email protected]",
"duration": 60,
"timezone": "America/New_York"
}
Best Practices for GPT Deployment
| Practice | Description | Importance |
|---|---|---|
| Score Thresholds | Set clear auto-advance thresholds (75-80) | High |
| Human-in-the-Loop | Flag edge cases (ยฑ5 around threshold) | Critical |
| Audit Logs | Log all GPT decisions for compliance | Medium |
| Prompt Guardrails | Prevent prompt injection and misuse | Medium |
Example GPT Conversation
User:
I need to screen these 5 resumes for a Senior Python Developer role. The job requires 5+ years Python experience, Django, and API design.
GPT:
I'll screen these resumes using HireSquire. Processing now...
โ
Sarah Johnson - 92/100: Excellent match. Strong Django and API design experience. Recommend interview.
โ
Michael Chen - 87/100: Solid candidate. Good technical background. Recommend interview.
โช Alex Rodriguez - 74/100: Borderline. Good Python skills but limited API experience. Consider for second round.
โ Others - Below threshold. Generated rejection emails.
Should I generate interview invitations for Sarah and Michael?
Building an AutoGen Hiring Agent: Multi-Agent Recruitment Systems
Learn how to build autonomous multi-agent hiring systems using Microsoft AutoGen and HireSquire. This guide covers agent roles, communication patterns, and complete workflow orchestration for automated recruitment.
๐ค Note for Autonomous Agents
If you are an AI reading this documentation to build tools, note that the HireSquire Python SDK fully abstracts the async polling logic of the screening process via the wait_for_completion method. You can safely provide this directly to your AutoGen functions.
pip install hiresquire pyautogen python-dotenv
Multi-Agent Hiring Architecture
Companies, like leading technical recruiting agencies, build autonomous hiring systems with specialized agents that collaborate on different parts of the pipeline:
Agent Roles & Responsibilities
๐ฏ Screener Agent
- Submits resumes to HireSquire API
- Monitors screening job status
- Filters candidates by score thresholds
โ๏ธ Communicator Agent
- Generates personalized emails
- Schedules interviews
- Handles candidate follow-ups
๐ Analyst Agent
- Analyzes screening results
- Identifies patterns in candidate pool
- Generates hiring reports
๐ฅ Coordinator Agent
- Orchestrates workflow between agents
- Handles edge cases and exceptions
- Escalates to humans when needed
Basic AutoGen Integration
First, create the HireSquire tool for AutoGen agents:
from autogen import AssistantAgent, UserProxyAgent
from hiresquire import HireSquire
import os
from dotenv import load_dotenv
load_dotenv()
# Initialize HireSquire client (pass token as first positional arg)
client = HireSquire(os.getenv("HIRESQUIRE_API_TOKEN"))
# Define tools for agents
def screen_resumes(job_title: str, job_description: str, resume_files: list) -> dict:
"""Screen resumes against job requirements using HireSquire AI."""
job = client.screen(job_title, job_description, resume_files)
return client.wait_for_completion(job["job_id"])
def generate_candidate_email(job_id: int, candidate_id: int, email_type: str = "invite") -> str:
"""Generate personalized email for candidates."""
return client.candidates.generate_email(
job_id=job_id,
candidate_id=candidate_id,
email_type=email_type
)
# Configure AutoGen
llm_config = {
"config_list": [{"model": "gpt-4-turbo", "api_key": os.getenv("OPENAI_API_KEY")}],
"temperature": 0
}
Agent System Setup
Create specialized agents with clear responsibilities:
# Screener Agent - Focuses on resume evaluation
screener_agent = AssistantAgent(
name="Screener",
system_message="""
You are the Screener Agent. Your responsibility is to evaluate resumes using the screen_resumes tool.
- Use the screen_resumes tool when provided with job details and resume files
- Return only candidates with score >= 75 for further consideration
- Flag candidates with score >= 90 as high-priority
""",
llm_config=llm_config,
)
# Communicator Agent - Handles all candidate communications
communicator_agent = AssistantAgent(
name="Communicator",
system_message="""
You are the Communicator Agent. Your responsibility is to handle all candidate communications.
- Use generate_candidate_email to create personalized emails
- You MUST provide job_id and candidate_id (returned from screening results)
- For scores >= 85: Generate interview invitations (email_type="invite")
- For scores 60-84: Generate talent pool notifications (email_type="followup")
- For scores < 60: Generate polite rejection emails (email_type="rejection")
""",
llm_config=llm_config,
)
# User Proxy - Executes tools and coordinates workflow
user_proxy = UserProxyAgent(
name="HiringCoordinator",
system_message="Coordinate the hiring workflow between agents.",
human_input_mode="NEVER",
code_execution_config={"use_docker": False},
)
# Register tools
user_proxy.register_function(
function_map={
"screen_resumes": screen_resumes,
"generate_candidate_email": generate_candidate_email,
}
)
Complete Agent Conversation Flow
Initiate the multi-agent hiring workflow:
# Start the hiring process
user_proxy.initiate_chat(
screener_agent,
message="""
Screen these resumes for the Senior ML Engineer position:
- ./resumes/alex_wong.pdf
- ./resumes/maria_santos.pdf
- ./resumes/james_wilson.pdf
- ./resumes/emma_rodriguez.pdf
Job Description: Looking for ML Engineer with 5+ years experience,
Python, TensorFlow/PyTorch, and production ML systems experience.
After screening, pass qualified candidates to the Communicator agent.
"""
)
# Chain to communicator after screening completes
@user_proxy.register_reply([screener_agent])
def handle_screening_results(sender, message, recipient, silent):
if "candidates" in message.get("content", ""):
recipient.initiate_chat(
communicator_agent,
message=f"""
The following candidates have been screened.
Generate appropriate emails for each based on their scores:
{message['content']}
"""
)
return False, None
Advanced: Group Chat Orchestration
For complex workflows, use AutoGen group chat for agent collaboration:
from autogen import GroupChat, GroupChatManager
# Create group chat with all agents
group_chat = GroupChat(
agents=[screener_agent, communicator_agent, user_proxy],
messages=[],
max_round=10,
speaker_selection_method="round_robin"
)
group_manager = GroupChatManager(
groupchat=group_chat,
llm_config=llm_config
)
# Start group conversation
user_proxy.initiate_chat(
group_manager,
message="""
Initiate hiring process for Senior ML Engineer position.
Resumes: ./resumes/*.pdf
Job Description: @ml-engineer-job.txt
Process all candidates and generate appropriate communications.
"""
)
Error Handling & Human-in-the-Loop
Implement safety mechanisms for production systems:
๐ก๏ธ Production Safety Patterns
- Human approval required for all offers above salary threshold
- Flag edge cases (near-threshold scores) for manual review
- Implement rate limiting and retry logic for API calls
- Log all agent decisions for compliance auditing
def requires_human_review(candidate: dict) -> bool:
"""Determine if candidate needs human review."""
score = candidate["score"]
# Edge cases near threshold
if 68 <= score <= 72:
return True
# Very high scores - verify before interview
if score >= 95:
return True
# Candidates with red flags in summary
if "gap" in candidate.get("summary", "").lower():
return True
return False
Performance & Monitoring
Track agent system performance with these metrics:
Avg Processing Time
Time from resume receipt to decision. Target: < 15 minutes
Human Escalation Rate
% of candidates requiring review. Target: < 10%
Agent Accuracy
Agreement with human decisions. Target: > 90%
Next Steps
- Agent Integrations - Alternative agent framework
- MCP Server - Claude Desktop integration
- API Documentation - Production reliability patterns
- Rate Limits Guide - API optimization
AutoGen enables building sophisticated multi-agent hiring systems that can handle complex recruitment workflows autonomously. Start with simple two-agent systems, then expand to group chat orchestration as your requirements grow.
Next Steps
- MCP Server Guide - Claude Desktop integration
- Agent Integration Overview - Build custom agents
- REST API Reference - Full API documentation
- Integration Guide - Secure API credentials
Custom GPTs make AI-powered hiring accessible to every team member. With HireSquire integration, you can turn ChatGPT into a full-featured hiring assistant in minutes, no coding required.