Applied Patterns
Six production HR-agent patterns drawn out concretely. Inputs, tool calls, HITL gates, audit log. The patterns you should be able to whiteboard in a 45-minute design round.
1 · New-hire onboarding orchestrator
Goal: turn an accepted Ashby offer into a complete, ready-to-approve Workday hire + provisioning plan, with HRBP / Payroll signoff before commit.
Trigger
- Ashby webhook: offer accepted (or status → "Onboarding")
Inputs (reads, idempotent)
ashby_get_application(application_id)— candidate, offer terms, start dateashby_get_offer(offer_id)— salary, bonus, equity, sign-on, locationworkday_get_position(position_id)— confirm the slot is still openworkday_get_supervisory_org(sup_org_id)— manager, location defaultspolicy_get(country=candidate.country, topic="new_hire")— local statutory requirementspayroll_get_calendar(country)— confirm start date is safely outside any lock windowworkday_check_existing_worker(email, ssn_hash)— rehire detection
Agent reasoning (Sonnet, tools attached)
System prompt: "Draft a complete new-hire package. Validate the start date against payroll calendar. If the candidate is a rehire, surface that prominently. Propose, do not commit."
Proposed actions (write-MCP, non-committing)
propose_workday_hire— full Hire BP payload as an EIB-ready rowpropose_okta_provision— group memberships per role + locationpropose_equipment_order— laptop SKU per countrydraft_welcome_email— to candidate + buddy + managerpropose_calendar_invites— day-1 orientation, week-1 1:1spropose_benefits_enrollment_window— per-country rules
HITL gates
- HRBP approves the Workday hire payload
- Payroll Ops approves if start date is within 5 business days of cutoff
- IT auto-approves Okta provisioning (low-risk, reversible)
Commit
Approved proposals execute via n8n: EIB upload runs Hire BP, Okta API provisions, calendar invites send. Idempotency keys ensure retry safety.
Audit log entry shape
{
"run_id": "onb-2026-05-12-001",
"trigger": {"source": "ashby", "event": "offer_accepted", "id": "ASH-9921"},
"model": "claude-sonnet-4-5",
"system_prompt_hash": "sha256:1f3a...",
"tools_invoked": [
{"name": "ashby_get_offer", "ts": "...", "result_hash": "..."},
{"name": "workday_check_existing_worker", "ts": "...", "result": "no_match"}
],
"proposals": [
{"id": "P-101", "kind": "workday_hire", "idempotency_key": "hire:ASH-9921:2026-06-01"},
{"id": "P-102", "kind": "okta_provision", "idempotency_key": "..."}
],
"approvals": [
{"proposal_id": "P-101", "approver": "hrbp:janet@", "ts": "...", "decision": "approve"}
],
"commits": [
{"proposal_id": "P-101", "executed_at": "...", "result": "eib_run_id:EIB-44919"}
],
"pii_classification": "Confidential"
}
2 · Leaver checklist agent
Goal: when a termination is initiated, produce an end-to-end offboarding plan that catches every dependency — access, equity, final pay, knowledge transfer.
Trigger
- HRBP initiates Terminate BP in Workday → outbound webhook
Inputs
workday_get_worker(employee_id)— current stateworkday_get_compensation(employee_id)— base, bonus, equitypolicy_get_severance(country, role_band, tenure)workday_list_pending_actions(employee_id)— open BPs, future-dated changesjira_list_open_tickets(reporter=employee_id)— knowledge transfer scopeokta_list_groups(user)— access to revokepayroll_get_calendar(country)equity_get_grants(employee_id)— vesting, treatment per plan
Proposed actions
propose_workday_termination— effective date, reason, last day workedpropose_final_pay_calc— PTO payout, prorated bonus, severancepropose_equity_treatment— accelerate / forfeit / convert per planpropose_okta_offboarding— staged revocation (last day vs. immediate)draft_offboarding_communication— to manager, to team, to candidatecreate_knowledge_transfer_jirapropose_jurisdictional_notices— e.g. WARN in US, redundancy notice in UK
HITL gates (two-key for payroll-affecting steps)
- HRBP approves termination + comms
- Payroll Ops approves final-pay calc (separate approver)
- Legal approves jurisdictional notices when present
If termination effective date is within 3 business days of payroll cutoff, agent halts and escalates. Payroll Ops decides whether to push the effective date or process under exception.
3 · Employee Q&A agent over policies
Goal: answer "how does X work for me?" questions from employees in Slack — accurately, with sources, with jurisdiction-awareness.
Trigger
- Slack mention in #ask-people or DM to People bot
Inputs
workday_get_worker(slack_user_id → employee_id)— country, location, role, tenurepolicy_retrieve(question, country=worker.country)— RAG over policy library, jurisdiction-filteredworkday_get_balances(employee_id)— PTO, sick balance if relevant
Agent reasoning
System prompt: "Answer the employee's question using only retrieved policy chunks for their country. Cite each fact with the policy doc reference. If the question requires a Legal interpretation, say so and route to HRKX."
Output
- Structured response:
{answer, citations[], confidence, route_to_human} - If
route_to_humanorconfidence < threshold→ HITL queue - Else → post to Slack with citations
Eval surface (heavy)
- Accuracy on labeled policy Q&A set per jurisdiction
- Citation correctness (every claimed fact maps to a real chunk)
- Jurisdictional cross-talk (UK question never answered with US policy)
- PII leakage tests (employee A can't get answers referencing employee B's data)
See 07-evaluation-quality for eval design.
4 · Survey synthesis agent (Qualtrics)
Goal: at survey close, produce a leadership-ready synthesis of free-text responses — themes, sentiment, risk flags.
Trigger
- Scheduled run after Qualtrics survey closes
Pipeline (multi-agent appropriate here)
- Clusterer (Sonnet) — embed responses, cluster by theme. Returns labeled clusters.
- Sentiment scorer (Haiku, per-response) — high-volume, simple. Returns sentiment + intensity.
- Risk flagger (Sonnet) — scans for red-flag content: harassment, retaliation, regulatory issues, leadership concerns. Routes flagged content to HRBP immediately, before synthesis.
- Narrative writer (Opus) — given clusters + sentiment + cross-cycle context, drafts a leadership summary.
HITL gate
- People Analytics lead reviews and approves before distribution
- Risk-flagged content is routed immediately to a designated HRBP, never goes through the synthesis path
Survey responses are pseudonymous — but a free-text comment can contain identifying detail ("my manager Sarah said…"). The PII redaction pass happens before any data leaves the secured analytics environment. Logs of the redaction itself are restricted-access.
5 · Promotion-cycle analytics agent
Goal: support promotion committees by pre-scoring packets against the rubric, surfacing edge cases, and producing a calibration view across the org.
Trigger
- Manual kickoff by People Analytics when cycle opens
Inputs
- Promotion packets (from a Google Drive / Notion folder)
- Role rubric for target level (from policy library — prompt-cached)
- Performance review history (from Workday Talent module)
- Tenure-in-role, scope, comp band data (Workday)
Agent reasoning
For each candidate: score each rubric dimension (qualitative + cited evidence), flag inconsistencies (e.g. self-assessment 5/5 but manager 3/5), produce a recommendation tier (clear yes / clear no / committee discussion).
HITL gate
- The agent's output is advisory. Committees decide.
- Edge cases are surfaced for explicit discussion ("this candidate's rubric scores diverge sharply from manager assessment").
This is one of the highest bias-risk patterns. Eval must include fairness checks: does the agent's tier distribution differ systematically by demographic? See 07-evaluation-quality. Surface this risk yourself in interview before being asked.
6 · Recruiter pipeline summary agent
Goal: produce a weekly hiring-health snapshot per recruiter / function from Ashby pipeline data.
Trigger
- Weekly cron, Friday mornings
Inputs
ashby_list_active_jobs()ashby_pipeline_metrics(job_id, range)— applications, screens, onsites, offers, stage durationsashby_list_offers_pending()- Prior-week snapshot for delta computation
Output
- Markdown summary per recruiter: open reqs, pipeline funnel, stage-conversion rates, offers out, deltas vs prior week, flagged stale candidates (no movement in >14d), at-risk reqs
- Posted to Slack channel per function; archived to a Notion page
HITL gate
- None — low-risk read-only summary. Sampled review (5%) for quality.
Reusable scaffolds — the templates HRKX inherits
"Multiply the People team's capability" is in the JD. Concretely you deliver, for each pattern above:
- Runbook — what the agent does, what it doesn't, what to do when it fails, who owns it
- n8n template — exportable JSON the team can fork to spin up variants (e.g., a contractor-onboarding variant of the new-hire pattern)
- Eval set — the labeled examples used to validate the agent, owned by HRKX going forward
- Risk register entry — tier, owner, halt criteria, last review date
- Replay protocol — given a run_id, how to reproduce and inspect
When asked "how do you measure success in 6 months?" — your answer includes "the HRKX team has independently spun up two variants of patterns I delivered, using my templates, without me writing code." That's the multiplier metric.
30-90 minute build idea: prototype the policy Q&A agent
Before the interview, ship a tiny version of pattern 3:
- Pick 5 fake policies (PTO, parental leave, RTO, expense, security) and write them as markdown.
- Embed them with a small embedding model (or just keep them all in context — they fit).
- Write a Python script that takes a question + a fake worker country, retrieves relevant policy chunks, calls Claude with a system prompt instructing citation, and returns structured output with citations.
- Add a single negative test: ask about a topic not in the policies. Confirm the agent refuses / routes-to-human.
One evening of work, and you have a concrete answer to "what have you built lately?"