HR Team Agent
The HR team agent handles tasks related to recruitment, onboarding, performance management, and organizational culture. It automates repetitive HR tasks while maintaining a warm, people-centric culture.
Implementing the HR Agentโ
// src/agents/hr.ts
import { query } from "@anthropic-ai/claude-agent-sdk";
import { AgentResponse } from "../shared/types";
import { extractText, log } from "../shared/utils";
const HR_SYSTEM_PROMPT = `You are a People & Culture expert.
You support data-driven HR decisions and prioritize Employee Experience (EX).
You reflect Diversity & Inclusion (D&I) in all HR processes.
You strictly protect personal information and sensitive data.`;
export async function runHRAgent(task: string): Promise<AgentResponse> {
log("HR", `Starting task: ${task.slice(0, 40)}...`);
const response = await query({
prompt: `${HR_SYSTEM_PROMPT}\n\n---\n\n${task}`,
options: {
maxTurns: 10,
tools: ["Read", "Write"]
}
});
const result = extractText(response);
log("HR", "Task completed");
return {
department: "hr",
result,
confidence: "high",
actionItems: [],
escalationNeeded: result.toLowerCase().includes("legal") ||
result.toLowerCase().includes("disciplinary")
};
}
Core HR Workflowsโ
1. Job Posting Creationโ
> HR Team: Please write a job posting for a Senior Full Stack Engineer.
Stack: React, Node.js, PostgreSQL
Experience: 5+ years / Location: Seoul (Hybrid)
Salary: 80M~120M KRW
Agent Response Example:
## Senior Full Stack Engineer
### What you will do
- Design and develop core product features used by users every day
- Address technical debt and lead code quality culture
- Mentor junior engineers and review code
### Who we are looking for
- 5+ years of practical experience with React + Node.js
- Experience with PostgreSQL query optimization
- A self-directed individual who can define and solve problems
### Nice to have (Not required)
- Experience using TypeScript
- Cloud (AWS/GCP) operation experience
...
2. Onboarding Program Designโ
async function designOnboarding(
role: string,
department: string,
startDate: string
) {
return runHRAgent(
`Please design a 30-60-90 day onboarding program for a new hire in the ${role} position.
Department: ${department}
Start Date: ${startDate}
Contents to include:
- Day 1: First day experience (Welcome, equipment setup, team introduction)
- Week 1: Understanding company/product/culture
- 30 Days: Basics of role core competencies
- 60 Days: Independent task execution
- 90 Days: First performance evaluation and goal setting
Please format this as a checklist.`
);
}
3. Performance Review Template Generationโ
async function generatePerformanceReview(
employeeName: string,
role: string,
achievements: string,
period: string
) {
return runHRAgent(
`Please write a draft performance review for ${employeeName} (${role}) for the ${period}.
Key Achievements:
${achievements}
Review Structure:
1. Core achievement summary (3~5 bullets)
2. Competency evaluation (Technical/Collaboration/Leadership/Growth)
3. Opportunities for improvement (Constructive feedback)
4. Next quarter goal setting (SMART criteria)
5. Overall rating recommendation
Please write in a positive and growth-oriented tone.`
);
}
4. Employee Satisfaction Survey Analysisโ
async function analyzeSurveyResults(surveyData: string) {
return runHRAgent(
`Please analyze the employee satisfaction survey results and suggest improvement priorities.
Survey Data:
${surveyData}
Analysis Request:
- Areas of strength (High-scoring items)
- Areas needing improvement (Low-scoring items)
- Department-specific specifics
- Changes compared to the previous quarter
- 3 immediately executable improvement ideas
- Long-term cultural improvement direction`
);
}
HR Agent Specialized Configurationsโ
// Additional safeguards for handling sensitive data
const HR_SENSITIVE_KEYWORDS = [
"salary", "pay", "disciplinary", "termination", "lawsuit",
"discrimination", "harassment", "personal information"
];
export async function runHRAgentSafe(task: string): Promise<AgentResponse> {
const isSensitive = HR_SENSITIVE_KEYWORDS.some(kw =>
task.toLowerCase().includes(kw)
);
if (isSensitive) {
log("HR", "Sensitive matter detected โ Marked for HR review");
}
const result = await runHRAgent(task);
return {
...result,
escalationNeeded: isSensitive || result.escalationNeeded
};
}
HR Agent Usage Precautions
- Decisions related to salary, disciplinary actions, and terminations must be finalized by an HR representative
- Minimize Personally Identifiable Information (PII, e.g., name, employee ID) in prompts
- Legally binding documents (contracts, warning letters) should be linked with the Legal Team Agent
Found an issue on this page? Report it โ