AI Employee Onboarding Automation
Employee onboarding is 2–4 weeks of repetitive explanations given to each new hire. AI automation handles the informational part (answering questions, document access, process introduction), leaving only what requires human contact to people.
AI Onboarding Architecture
from anthropic import Anthropic
from pydantic import BaseModel
from typing import Literal, Optional
import json
from datetime import datetime, timedelta
client = Anthropic()
class NewEmployee(BaseModel):
employee_id: str
name: str
department: str
role: str
start_date: str
manager_id: str
mentor_id: Optional[str] = None
it_systems_access: list[str] = []
completed_steps: list[str] = []
class OnboardingPlan(BaseModel):
employee_id: str
steps: list[dict] # {id, title, description, due_day, completed, category}
day_1_schedule: list[dict]
week_1_goals: list[str]
key_contacts: list[dict]
class AIOnboardingSystem:
def __init__(self, company_kb_path: str):
self.company_kb = self._load_knowledge_base(company_kb_path)
self.conversation_history: dict[str, list] = {}
def _load_knowledge_base(self, path: str) -> str:
"""Load corporate knowledge base"""
from pathlib import Path
kb_parts = []
for md_file in Path(path).rglob("*.md"):
kb_parts.append(md_file.read_text())
return "\n\n".join(kb_parts[:20]) # Top 20 files
def create_onboarding_plan(self, employee: NewEmployee) -> OnboardingPlan:
"""Create a personalized onboarding plan"""
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=4096,
messages=[{
"role": "user",
"content": f"""Create an onboarding plan for a new employee.
Employee:
- Name: {employee.name}
- Position: {employee.role}
- Department: {employee.department}
- Start Date: {employee.start_date}
Company Information:
{self.company_kb[:2000]}
Return JSON:
{{
"steps": [
{{
"id": "step_1",
"title": "...",
"description": "...",
"due_day": 1,
"category": "admin|technical|social|culture",
"completed": false
}}
],
"day_1_schedule": [
{{"time": "09:00", "activity": "...", "with_whom": "..."}}
],
"week_1_goals": ["..."],
"key_contacts": [
{{"role": "...", "purpose": "..."}}
]
}}
Include steps for 30 days."""
}]
)
text = response.content[0].text
data = json.loads(text[text.find("{"):text.rfind("}") + 1])
return OnboardingPlan(employee_id=employee.employee_id, **data)
def answer_question(
self,
employee: NewEmployee,
question: str,
session_id: str,
) -> str:
"""Answer a new employee's question"""
history = self.conversation_history.get(session_id, [])
system_prompt = f"""You are an AI onboarding assistant for new employee {employee.name}.
Position: {employee.role}, department: {employee.department}.
Company Knowledge Base:
{self.company_kb[:3000]}
Rules:
- Answer specifically and in a structured way
- If information is not in the knowledge base — be honest and suggest who to contact
- For urgent questions (access, equipment) — refer to HR/IT immediately
- Use the employee's name in responses"""
messages = history + [{"role": "user", "content": question}]
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
system=system_prompt,
messages=messages,
)
answer = response.content[0].text
# Update history
history.append({"role": "user", "content": question})
history.append({"role": "assistant", "content": answer})
self.conversation_history[session_id] = history[-20:] # Keep last 10 exchanges
return answer
def generate_daily_checklist(self, employee: NewEmployee, day: int) -> list[dict]:
"""Generate a task checklist for a specific day"""
response = client.messages.create(
model="claude-haiku-4-5",
max_tokens=1024,
messages=[{
"role": "user",
"content": f"""Create a task checklist for a new employee on day {day} of onboarding.
Employee: {employee.role} in department {employee.department}
Already completed: {employee.completed_steps}
Return JSON:
[{{
"task": "...",
"category": "admin|technical|social|learning",
"priority": "must|should|nice",
"estimated_minutes": 30,
"resources": ["link or instruction"]
}}]
5–8 tasks, realistic for one day."""
}]
)
text = response.content[0].text
start = text.find("[")
end = text.rfind("]") + 1
return json.loads(text[start:end])
def send_proactive_tips(self, employee: NewEmployee, day: int) -> str:
"""Send proactive tips at the beginning of the day"""
tips_by_day = {
1: "team and workplace introduction",
3: "starting work with main tools",
5: "first working tasks",
14: "mid-check and questions",
30: "first month summary",
}
if day not in tips_by_day:
return ""
response = client.messages.create(
model="claude-haiku-4-5",
max_tokens=512,
messages=[{
"role": "user",
"content": f"""Write a short (3-4 sentences) welcome message for a new employee on day {day}.
Day focus: {tips_by_day[day]}.
Tone: friendly, supportive, specific.
Name: {employee.name}."""
}]
)
return response.content[0].text
Automatic HR and IT Tasks
class OnboardingAutomation:
"""Automates administrative onboarding tasks"""
def create_it_request(self, employee: NewEmployee) -> dict:
"""Generate an IT access request"""
response = client.messages.create(
model="claude-haiku-4-5",
max_tokens=512,
messages=[{
"role": "user",
"content": f"""Create an IT request for workstation setup.
Employee: {employee.name}
Position: {employee.role}
Department: {employee.department}
Standard access list for the role + specific systems.
Return JSON: {{"systems": [...], "priority": "high", "notes": "..."}}"""
}]
)
text = response.content[0].text
return json.loads(text[text.find("{"):text.rfind("}") + 1])
def generate_welcome_email(self, employee: NewEmployee, plan: OnboardingPlan) -> str:
"""Generate a personalized welcome email"""
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
messages=[{
"role": "user",
"content": f"""Write a welcome email for a new employee.
Employee: {employee.name}, {employee.role}
Start Date: {employee.start_date}
First three plan steps: {json.dumps(plan.steps[:3], ensure_ascii=False)}
First day schedule: {json.dumps(plan.day_1_schedule, ensure_ascii=False)}
The email should be: warm, specific, with clear first-day instructions.
No more than 300 words."""
}]
)
return response.content[0].text
Practical Case: IT Company with 150 Employees
Situation: hired 5–7 people per month, HR spent 60% of time on onboarding (same questions, explanations, setups).
Implementation:
- Knowledge base: 85 MD files about company, processes, tools
- Telegram bot for new employee questions
- Automatic checklists for each day of the first month
- Jira integration (auto-create tasks)
Results:
- HR time per new employee: 8 hours → 2.5 hours
- First-month questions resolved without HR: 73%
- Time to first productive task: 21 days → 12 days
- Employee onboarding rating: 3.4/5 → 4.6/5
Key factor: new employees weren't afraid to ask "silly" questions to the bot — they got answers immediately without feeling like they were bothering colleagues.
Timeline
- AI assistant for answering questions: 3–5 days
- Personalized onboarding plan: 1 week
- Automatic checklists + notifications: 1 week
- Full HR system and Jira integration: 2–3 weeks







