Guardrails, permissions and governance for AI HR and recruiting agents

Permissions, approvals and rules for agents that screen candidates, send offers, change payroll and read personnel files, with what the GDPR, the EU AI Act and US hiring laws require.

· 10 min read

Build guardrails for an HR or recruiting agent by separating the work that decides nothing about a person from the work that does. Scheduling, drafting and summarising run free. Every decision about a candidate or employee (a rejection, a shortlist, an offer, a pay or bank change) goes to a named person with the reasons in front of them, and some never belong to an agent at all: ending someone’s employment, acting on a background check, reading health or union data. Give each agent its own API user with only the fields its task needs, keep personal data out of what it sends for approval, and keep a record of who decided what.

Governance is that line written down: the list of actions, who may approve each, the laws that apply, and evidence that a person really decided. In hiring the law adds weight to every part of it. The GDPR restricts decisions made by software alone, the EU AI Act treats recruitment systems as high-risk, and New York City, Illinois and Colorado have their own rules. This page goes through screening, offers, payroll, personnel files, background checks, offboarding and company messages, with the rules and code for each.

Sort every action by who it affects

List every tool the agent can call, then ask one question of each: does this change what happens to a particular person? Booking an interview slot does not. Moving an application to “rejected” does, even if the agent only clicked a button a recruiter would have clicked.

HR and recruiting agent actions with the action name they ask under, what can go wrong, and the guardrail to put in front of each
OptionAction nameWhat can go wrongGuardrail
Schedule or move an interviewAction nameinterview.scheduleWhat can go wrongSmall. A clash or a missed slot, fixed with a message.GuardrailAllow rule. Logged, not asked.
Shortlist or advance candidatesAction namecandidate.shortlist, candidate.advanceWhat can go wrongFiltering applicants is a selection decision; a skewed filter is invisible.GuardrailAsk the recruiter. The agent proposes, with the criteria it scored against.
Reject a candidateAction namecandidate.rejectWhat can go wrongA decision about a person made by software alone, and a letter that cannot be unsent.GuardrailAsk the named recruiter, with the reasons. The message sent is a template, never the model's text.
Send an offer or contract termsAction nameoffer.sendWhat can go wrongA binding promise of pay, and a number every later raise starts from.GuardrailAsk, with the salary as the amount; two people above the band.
Change pay or an employee's bank detailsAction namepayroll.bank_details.change, payroll.changeWhat can go wrongPayroll diversion: a salary paid to a fraudster, found on payday.GuardrailAsk two people, after a call-back to a number already on file. Masked account in the request.
Read personnel filesAction namepersonnel.read_file, personnel.read_specialWhat can go wrongHealth, union membership and disciplinary records seen by the wrong eyes.GuardrailOnly the fields the task needs. Ask for the file with a purpose; never special category data.
Order or act on a background checkAction namescreening.order, screening.adverse_noticeWhat can go wrongA report ordered without consent, or a rejection without the notices the law requires.GuardrailAsk to order, once the signed authorisation is on file. Never act on the result.
End employment or offboardAction nameemployment.end, access.revokeWhat can go wrongThe most serious decision an employer makes, and access cut off from the wrong person.GuardrailNever. People decide; IT removes access through its own process.
Message all employeesAction namecomms.broadcastWhat can go wrongEveryone reads it at once: a wrong date, a leak, a tone that lands badly.GuardrailAsk the head of people, with the audience and the first lines.

One family of names per kind of decision lets one rule cover it: candidate.* for everything that moves an applicant, payroll.* for everything that changes pay, employment.* for everything nobody automates. More in naming agent actions. The tool risk checker sorts a list of tools into tiers like these.

Permissions: separate agents, narrow fields

  • Two agents, not one. A recruiting agent works on applicants; a people-ops agent works on employees. Each has its own approval key, so a rule written for one cannot be used by the other, and each key can be scoped to the actions it may ask about: interview.*, candidate.*, offer.* and screening.* for the first, payroll.*, personnel.* and comms.* for the second.
  • Its own API user in the ATS and the HR system. Never a recruiter’s login. Most HR systems let you limit an integration user to certain objects and fields; use that to leave out medical, union, disciplinary and bank fields wherever the agent has no task that needs them.
  • Ids in requests, not people. The person deciding sees an application id, a role, the criteria and a masked account, and opens the record in the ATS if they need more. An approval request is kept as evidence; it is no place for a CV or a diagnosis. The summary check holds a request whose summary says something its details do not.
  • No tool for what nobody should automate. An agent with no termination call cannot be talked into one. Rules are the second line.

The laws that shape the answers

Hiring and employment are among the most regulated things an agent can touch. These are the rules that most often decide what must ask and what must never happen. They are a starting point, not legal advice: check them for your countries and states with your counsel.

Automated decisions under the GDPR

Article 22 gives a person the right not to be subject to a decision based solely on automated processing, including profiling, that has legal effects on them or similarly significantly affects them. Recital 71 names “e-recruiting practices without any human intervention” as an example. Where such a decision is allowed at all, the person keeps the right to human intervention, to give their point of view and to contest it. The Article 29 Working Party’s guidelines (WP251rev.01, endorsed by the EDPB) add that a person rubber stamping the output does not change this: the review has to be meaningful, by someone with the authority and competence to change the decision.

For the agent: it may sort, score and draft, but every rejection is a request a named recruiter decides, with the reasons and the score in front of them. More on what a real review looks like in human oversight under Article 14.

Recruitment is high-risk under the EU AI Act

Annex III, point 4 lists AI systems used to recruit or select people (to place targeted job adverts, analyse and filter applications and evaluate candidates) and those used to decide on promotion, termination or terms of work, allocate tasks, or monitor and evaluate workers. Those obligations were due on 2 August 2026. The Digital Omnibus on AI, Regulation (EU) 2026/1744, published on 24 July 2026 and in force since 27 July 2026, moved them to 2 December 2027. Two things already apply. Since 2 February 2025, Article 5(1)(f) has banned AI that infers the emotions of people at work, other than for medical or safety reasons, which rules out scoring a video interview for enthusiasm or nerves. When the high-risk duties apply, a deployer must assign oversight to people with the competence, training and authority for it (Article 26(2)), tell workers’ representatives and the affected workers before using such a system at work (Article 26(7)), and tell people a high-risk system is used in decisions about them (Article 26(11)).

Special category data

GDPR Article 9 forbids processing special categories of data, among them health, trade union membership, racial or ethnic origin, religious beliefs and sexual orientation, unless an exception applies, such as obligations under employment law. Article 5(1)(c) limits any processing to what is adequate, relevant and limited to what is necessary for its purpose. An agent that schedules interviews has no reason to see a sick note. Leave those fields out of its API user, and keep personal data out of requests: ids, counts and masked values are enough to decide.

New York City Local Law 144

An employer or employment agency may use an automated employment decision tool on candidates or employees in New York City only if the tool had a bias audit within the year before its use, information about the audit is public, and candidates or employees get the required notice 10 business days before it is used. The city’s Department of Consumer and Worker Protection has enforced it since 5 July 2023. If the agent’s scores substantially help decide who goes forward, check whether the agent itself is such a tool.

Illinois

The Artificial Intelligence Video Interview Act, in effect since 1 January 2020, says an employer that has AI analyse recorded video interviews must tell each applicant beforehand, explain how the AI works and what general characteristics it evaluates, and get their consent. It may share the videos only with those whose expertise or technology is needed to evaluate the applicant, and must delete them within 30 days of the applicant asking. Separately, Public Act 103-0804 (HB 3773) amended the Illinois Human Rights Act from 1 January 2026: an employer must not use AI that has the effect of discriminating against protected classes, or use zip codes as a proxy for them, and must notify employees when it uses AI for decisions such as hiring and promotion.

Colorado

Colorado’s AI Act, SB 24-205, never took effect as written. SB 25B-004 delayed it to 30 June 2026, and SB 26-189, signed on 14 May 2026, repealed and replaced it with rules on automated decision-making technology, most of them from 1 January 2027. Decisions about access to employment or its pay are covered. A deployer must give notice where the technology is used and, after an adverse decision, a plain-language description of its role and a way to ask for meaningful human review. The attorney general is due to write rules on the details.

Background checks in the US

Under the Fair Credit Reporting Act, an employer that wants a consumer report on an applicant or employee must first tell them in writing, in a document that consists only of that disclosure, and get their written permission. Before taking adverse action based on the report, it must give the person a copy of the report and the summary of their rights; after, an adverse action notice naming the reporting agency and their right to dispute it. The code that orders a check verifies the signed authorisation is on file before it asks. The decision to act on a result, and the notices, stay with people.

The pattern in code

Each risky tool asks before it acts, waits for the answer, and acts only when allowed is true. Pending, denied, expired and withdrawn all mean no, and so does an approval while agents are paused. One helper holds that logic, with the TypeScript SDK. The people-ops agent has its own copy with its own name and key.

import { ApprovalClient } from "@variantgate/agent";
import { describe } from "@variantgate/agent/errors";
import type { ApprovalRequest, Decision, Outcome } from "@variantgate/agent/types";

// One client per agent, each with its own key, so a rule for one never covers another.
const approvals = new ApprovalClient({
  agent: "recruiting-agent",
  apiUrl: process.env.VARIANTGATE_API_URL ?? "https://api.variantgate.com",
  key: process.env.VARIANTGATE_KEY ?? "",
});

type Answer = { go: true; decision: Decision } | { go: false; why: string };

/** Asks and waits. Only an approval without changes lets the agent act. */
export async function askAndWait(request: ApprovalRequest): Promise<Answer> {
  let asked: Decision | undefined;
  try {
    asked = await approvals.ask(request, 30);
    const decision = await approvals.waitForDecision(asked);
    if (!decision.allowed) {
      // Denied, expired, withdrawn, still pending at the end, or approved while paused.
      return { go: false, why: `the request is ${describe(decision)}` };
    }
    if (decision.changed) {
      // A person changed it before approving. This code can only do what it asked.
      await report(decision.id, "failed", "not done: the approval changed the request");
      return { go: false, why: "it was approved only with changes" };
    }
    return { go: true, decision };
  } catch {
    // No answer is not a yes. Take the request back so nobody approves it later.
    if (asked) await approvals.withdraw(asked.id).catch(() => undefined);
    return { go: false, why: "no answer could be had" };
  }
}

/** Reports how it went. Best effort: a failed report never undoes or repeats the action. */
export function report(id: string, outcome: Outcome, note?: string) {
  return approvals.reportOutcome(id, outcome, note).then(() => true, () => false);
}

/** The error's class only. Messages from other APIs can carry tokens and addresses. */
export const kindOf = (error: unknown) => (error instanceof Error ? error.name : "error");

Rejecting a candidate

The rejection tool can only propose. It takes the reasons from the role’s scorecard rather than from the model, sends the recruiter’s own template rather than anything the model wrote, and checks the application did not change while the request waited. A recruiter who wants different wording denies the request and writes the letter; an approval with changes is treated as a no.

/** The tool the model calls to reject a candidate. It only ever proposes; a recruiter decides. */
export async function rejectCandidate(applicationId: string, agentNote: string): Promise<string> {
  // Read the application now, so the recruiter approves this application in this state.
  const app = await ats.getApplication(applicationId);
  if (app.stage === "rejected") return "Already rejected. Nothing to do.";
  // The reasons come from the role's scorecard, criterion by criterion, not from the model.
  const unmet = app.scorecard.filter((item) => !item.met).map((item) => item.criterion);
  if (unmet.length === 0) return "Not asked: no criterion on the scorecard is unmet. Leave it to the recruiter.";

  const answer = await askAndWait({
    action: "candidate.reject",
    summary: `Reject application ${app.id} for ${app.roleTitle} (${unmet.length} criteria unmet)`,
    details: {
      application: app.id, // an id, never the candidate's name or CV
      role: app.roleTitle,
      stage: app.stage,
      "criteria not met": unmet,
      "scored by": app.scorecard.some((item) => item.scoredBy === "agent") ? "agent, in part" : "people",
      "letter template": app.role.rejectionTemplateId, // the recruiter's text, sent as written
      "agent's view": agentNote.slice(0, 300), // shown to the recruiter, never sent
    },
    ttlSeconds: 2 * 24 * 60 * 60,
  });
  if (!answer.go) return `Not rejected: ${answer.why}. The candidate stays where they are.`;

  const decisionId = answer.decision.id;
  // If anyone moved, scored or commented on it while the request waited, the approval is stale.
  const now = await ats.getApplication(applicationId);
  if (now.version !== app.version) {
    await report(decisionId, "failed", "not done: the application changed while waiting");
    return "Not rejected: the application changed. A person will look at it.";
  }
  try {
    await ats.reject(app.id, {
      templateId: app.role.rejectionTemplateId,
      // Keyed on the application's state: a retry cannot send a second letter.
      idempotencyKey: `reject-${app.id}-v${app.version}`,
    });
  } catch (error) {
    await report(decisionId, "failed", `may have gone through: ${kindOf(error)}`);
    return "The rejection may or may not have been sent. Tell the recruiter; never try again yourself.";
  }
  // Done. From here nothing throws, so the model has nothing to retry.
  await report(decisionId, "succeeded", `application ${app.id} rejected`);
  return "Rejected with the recruiter's letter.";
}

Changing an employee’s bank details

Payroll diversion is the reason for the second sample. The FBI’s IC3 described the pattern in 2019: HR or payroll receives an email that looks like it came from an employee asking to change their direct deposit, and the new account is the fraudster’s. It counted 1,053 complaints with $8,323,354 in reported losses between January 2018 and June 2019, and advised verifying changes through a second channel. An agent that reads the HR inbox is the easiest target there is, so the tool takes only the id of a change already submitted in the HR system, needs a recorded call-back by a person, shows a masked account, and reads the record again after two people approve.

/**
 * Applies a bank change an employee submitted in the HR system. The model passes only the
 * change's id: it never sees, types or chooses an account number.
 */
export async function applyBankChange(changeId: string): Promise<string> {
  const change = await hris.getPendingBankChange(changeId);
  const employee = await hris.getEmployee(change.employeeId);
  // A person called the employee back on a number that was on file before the request.
  const callBack = await hris.getVerification(changeId);
  if (!callBack || callBack.verifiedBy === "agent" || callBack.phoneAddedAt > change.createdAt) {
    return "Not changed: no call-back to the employee is recorded. Payroll will do it.";
  }

  const answer = await askAndWait({
    action: "payroll.bank_details.change",
    summary: `Pay employee ${employee.id} into a new account ending ${change.accountLast4}`,
    details: {
      employee: employee.id,
      "new account": `ending ${change.accountLast4}, ${change.bankCountry}`,
      "old account": `ending ${employee.accountLast4}`,
      "submitted through": change.channel, // self-service, or keyed in from an email
      "last bank change": employee.lastBankChangeAt ?? "never",
      "call-back by": callBack.verifiedBy,
      "next payday": employee.nextPayday,
    },
    ttlSeconds: 24 * 60 * 60,
  });
  if (!answer.go) return `Not changed: ${answer.why}. Pay goes to the account on file.`;

  const id = answer.decision.id;
  // Two people approved this change against this record. Read both again before acting.
  const [changeNow, employeeNow] = await Promise.all([
    hris.getPendingBankChange(changeId),
    hris.getEmployee(change.employeeId),
  ]);
  const stale = changeNow.version !== change.version || employeeNow.version !== employee.version;
  if (stale || employeeNow.status !== "active") {
    await report(id, "failed", "not done: the record changed after it was approved");
    return "Not changed: the record changed. Payroll will look at it.";
  }
  try {
    // The key is the change and the record it was approved against, not the decision.
    await hris.applyBankChange(changeId, { idempotencyKey: `${changeId}-v${change.version}` });
  } catch (error) {
    await report(id, "failed", `may have gone through: ${kindOf(error)}`);
    return "It is unclear whether the account changed. Tell payroll before the next run; do not retry.";
  }
  await report(id, "succeeded", `bank change ${changeId} applied`);
  return `Changed: pay now goes to the account ending ${change.accountLast4}.`;
}

Neither tool throws once the change has run, and both tell the model not to retry: a rejection letter or a pay change that happens twice is worse than one that needs a person to check. Outcome notes carry the error’s class, never its message, since HR systems put names and account numbers in theirs.

Standing rules for an HR workspace

Standing rules answer routine requests at once and send the rest to the right person. A set for the inventory above:

  1. Always allow interview.schedule, for recruiting-agentBooking and moving interview slots decides nothing about anyone, so it runs at once and still leaves a line in the record.
  2. Always ask about candidate.*, for the recruiter and the recruiting leadShortlisting, advancing and rejecting are decisions about a person. A recruiter makes each one with the reasons in front of them. Because ask beats allow, no remembered answer can turn rejections into automatic ones.
  3. Always ask about offer.send, for the recruiting lead, anyone after 4 hoursEvery offer waits for the person who owns hiring, with the salary as the amount. Escalation keeps a good candidate from waiting a day because one person is out.
  4. Always ask about offer.* above €120,000, two people, for the recruiting lead and financeA salary above the band needs a second person, from finance, and it does not escalate to anyone else (workspace owners can always decide routed requests too). An offer that states no salary in euros needs two people too, so leaving the amount out never makes an offer easier.
  5. Always ask about payroll.*, two people, for the payroll lead and the HR leadBank details and pay changes are where payroll diversion works. Two different people approve, after someone has called the employee back; one denial stops it.
  6. Always ask about screening.order, for the recruiting leadA background check is ordered for one candidate, for one role, once the signed authorisation is on file.
  7. Never allow screening.adverse*Acting on what a background check found, and the notices that go with it, is done by people.
  8. Never allow personnel.read_special*Health, union membership and other special category data stay out of the agent's reach. A person who needs them reads them.
  9. Never allow employment.*Ending, suspending or changing someone's employment is never an agent's action, at any size.
  10. Always ask about comms.broadcast, for the head of peopleA message to every employee, or to a whole site, is read by everyone at once and cannot be taken back.
The same rules as API bodies
# POST /v1/workspaces/{workspace_id}/rules, one call per rule
{
  "action": "interview.schedule",
  "agent_key_id": "RECRUITING_AGENT_KEY_ID",
  "effect": "allow"
}

{
  "action": "candidate.*",
  "deciders": [
    "USER_ID_OF_RECRUITER",
    "USER_ID_OF_RECRUITING_LEAD"
  ],
  "effect": "ask"
}

{
  "action": "offer.send",
  "deciders": [
    "USER_ID_OF_RECRUITING_LEAD"
  ],
  "effect": "ask",
  "escalate_after_seconds": 14400
}

{
  "action": "offer.*",
  "approvals": 2,
  "deciders": [
    "USER_ID_OF_RECRUITING_LEAD",
    "USER_ID_OF_FINANCE_LEAD"
  ],
  "effect": "ask",
  "limit_amount": "120000.00",
  "limit_currency": "EUR"
}

{
  "action": "payroll.*",
  "approvals": 2,
  "deciders": [
    "USER_ID_OF_PAYROLL_LEAD",
    "USER_ID_OF_HR_LEAD"
  ],
  "effect": "ask"
}

{
  "action": "screening.order",
  "deciders": [
    "USER_ID_OF_RECRUITING_LEAD"
  ],
  "effect": "ask"
}

{
  "action": "screening.adverse*",
  "effect": "deny"
}

{
  "action": "personnel.read_special*",
  "effect": "deny"
}

{
  "action": "employment.*",
  "effect": "deny"
}

{
  "action": "comms.broadcast",
  "deciders": [
    "USER_ID_OF_HEAD_OF_PEOPLE"
  ],
  "effect": "ask"
}

Owners write rules under Rules in the app, or post these bodies while signed in. Replace the ids in capitals with your own.

When rules disagree the most cautious wins: deny, then ask, then allow. So the “always ask” on candidate.* holds even if an owner later approves a rejection “always” from the inbox, and the deny on employment.* holds whatever is allowed. Amount limits only work in the cautious direction: an offer above €120,000, or one with no salary in euros, and so any offer in dollars, needs two people. To give each currency its own band, have code put the currency in the action name, such as offer.send.usd, and write each currency’s rules for its own names instead of one rule on offer.*. Escalation only works if the request lives longer than the wait, so an offer should ask for a day (ttlSeconds), not the default 15 minutes. Rules match on the agent’s key, never on the name it gives itself. Writing rules needs Pro, two-person approval needs Team, and routing and escalation need Business. The approval policy generator writes a first set from a checklist; the rules reference has every option.

Who approves what

  • Rejections and shortlists: the recruiter who owns the role, who knows what the hiring manager asked for and can see the candidate’s whole application.
  • Offers: the recruiting lead, with the salary, the band and the start date; above the band a second person, from finance.
  • Pay and bank changes: two people from payroll and HR, never the employee’s own manager alone, after a call-back to a number that was on file before the request. See two-person approval; the same check protects suppliers’ bank details in finance exceptions.
  • Company-wide messages: the head of people or internal communications, with the audience count and the first lines.
  • Terminations and offboarding: nobody through the agent. A person decides with HR and legal; IT removes access through its own leaver process. The agent may draft the checklist or open the IT ticket once a person has decided.

Make the review a real one

A person who approves every rejection the agent proposes, in a few seconds each, is the token gesture the GDPR guidance warns about, and the decision is in substance automated again. Three things keep the review real. Show the reasons, not just the verdict: the criteria not met, and whether a person or the agent scored them. Give the reviewer the authority and the time to say no. And watch the numbers. If a recruiter approves every rejection and takes four seconds for each, the check is not working. VariantGate’s Insights shows the time to decide and the approval rate per action; the audit trail shows who decided each request. More in measuring human in the loop.

If an agent starts going wrong, any member can pause every agent from the inbox at once. While paused nothing is allowed, whatever was approved, and only an owner can resume. A pause does not stop a letter the ATS has already queued or a payroll run already submitted: stop those in the system itself.

Checklist

  1. List every tool your recruiting and people-ops agents can call.
  2. Mark each: decides nothing, decides about a person, changes pay, or never automated.
  3. Give each agent its own key and its own ATS or HR system user, without special category, disciplinary or bank fields it does not need.
  4. Make every decision about a person ask in code, and act only on allowed: true without changes.
  5. Route rejections to the recruiter with the reasons; send only approved templates.
  6. Send offers with the salary as the amount; two people above the band.
  7. Two people for bank and pay changes, after a call-back on a number already on file.
  8. Deny terminations, adverse background check actions and special category data.
  9. Check which AI hiring laws apply where you hire, and give the notices they require.
  10. Review approval rates and time to decide every month.

To see the inbox side before wiring anything up, try a request in the playground. The wider set of controls is in guardrails for AI agents, and requests to delete personal data are covered in the data deletion and GDPR guide.

Sources

  1. Regulation (EU) 2016/679 (GDPR), Articles 5, 9 and 22, and Recital 71
  2. Article 29 Working Party: Guidelines on automated individual decision-making and profiling, WP251rev.01 (2018)
  3. Regulation (EU) 2024/1689 (AI Act), Articles 5(1)(f) and 26, and Annex III, point 4
  4. Regulation (EU) 2026/1744 (Digital Omnibus on AI), amending Article 113. EUR-Lex.
  5. NYC Department of Consumer and Worker Protection: Automated Employment Decision Tools (Local Law 144 of 2021)
  6. Illinois Artificial Intelligence Video Interview Act, 820 ILCS 42
  7. Illinois General Assembly: HB 3773 (Public Act 103-0804), amending the Human Rights Act
  8. Colorado General Assembly: SB 25B-004
  9. Colorado General Assembly: SB 26-189, Automated Decision-Making Technology
  10. FTC: Using Consumer Reports, What Employers Need to Know
  11. FBI IC3: Business Email Compromise, the $26 Billion Scam (10 September 2019), on payroll diversion

Try it without signing up

It opens in your browser with this case filled in. Nothing is sent anywhere.

Give your agents somewhere to ask.

Free for 100 requests a month. Sign in with your email and have a first request waiting a few minutes from now.

Start free