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-5-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.
✓ Check yourself
Answer from memory before opening each one.
-
In the onboarding orchestrator, which reads protect the human approver from approving a bad hire, and which approvals are skipped or added based on the data?
Show answer
The position-open check, the rehire check, the payroll calendar check on the start date, and the local policy lookup. HRBP approves the Workday hire payload every time, Payroll Ops joins only if the start date is within 5 business days of cutoff, and IT provisioning can auto-approve because it is low-risk and reversible. See New-hire onboarding orchestrator.
-
A termination is entered for a worker in Germany, where the leaver agent also drafts jurisdictional notices. Who approves what, and what causes the agent to stop?
Show answer
HRBP approves the termination and communications, Payroll Ops separately approves final pay, and Legal approves the notices. That is two keys on pay and a third reviewer for legal content. The agent halts when the effective date is within 3 business days of payroll cutoff. See Leaver checklist agent.
-
The Q&A agent answers a UK employee's question about notice periods using a US policy document. Which controls would have caught it, and what does that tell you about the eval set?
Show answer
Jurisdiction-filtered retrieval keyed to the worker's country, a citation check that every fact maps to a retrieved chunk, and a cross-talk test in the eval set where a UK question must never use US text. The eval set needs per-jurisdiction cases and a PII-leakage case. See Employee Q&A agent over policies.
-
A survey free-text comment says "my manager Sarah told me to delete the emails." Where in the survey pipeline does that go, and why not into the narrative?
Show answer
It goes to the risk flagger and then straight to a designated HRBP, before synthesis, and it never enters the leadership summary. Retaliation or regulatory issues need action, not a theme summary, and the identifying detail must be redacted before data leaves the secured environment. See Survey synthesis agent.
-
Someone proposes having the promotion agent output a final yes or no per candidate to save committee time. What do you answer, and what must the eval cover?
Show answer
Keep the output advisory and tiered, with edge cases surfaced for discussion, because committees decide and this is one of the highest bias-risk patterns. The eval must include fairness checks on whether the tier distribution differs systematically by demographic group. See Promotion-cycle analytics agent.
-
Why does the recruiter summary run with no approval gate, while the onboarding agent has three? What would make you add a gate to the recruiter summary?
Show answer
It reads pipeline data and posts a summary, so it takes no action on people and nothing it says changes pay or status, which makes sampled review at 5% enough. Add a gate if it starts to feed decisions, such as ranking candidates for rejection, or surfaces personal data to a wider audience. See Recruiter pipeline summary agent.
Takeaway
- Every pattern follows one shape: a trigger, idempotent reads, a model that proposes, gates sized to risk, a commit by approved proposal, and an audit entry.
- Onboarding and leavers are payroll-adjacent, so HRBP, Payroll Ops and Legal gates attach to the steps they own, and a cutoff window halts the agent.
- The Q&A agent must answer only from retrieved chunks for the worker's country, cite each fact, and route to a human when unsure or when Legal interpretation is needed.
- Survey risk flags bypass the synthesis path, and redaction runs before data leaves the secure environment.
- The promotion agent is advisory only, and fairness checks belong in its eval from the start.
- Read-only summaries can run with sampled review, and each pattern ships with a runbook, template, eval set, risk register entry and replay protocol so HRKX can extend it.
The patterns need proof they work, so the next chapter covers how to measure correctness and catch regressions. → Evaluation & Quality
Further reading
- Ashby API reference — Ashby. Candidates, applications, offers and webhooks used in the onboarding and recruiter patterns.
- Citations — Anthropic docs. Grounding answers in source documents so each claim maps to a passage.
- Reduce hallucinations — Anthropic docs. Techniques such as quote extraction and permitting "I don't know" for policy Q&A.
- Worker Adjustment and Retraining Notification (WARN) — US Department of Labor. The US notice rules behind the jurisdictional notices step.
- How we built our multi-agent research system — Anthropic, 2025. A pipeline and orchestrator-worker case study with lessons on cost and evaluation.
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?"