AgentKits

Company Policy Q&A Agent

Production Blueprint
0TrendingNew

Includes Agent Blueprint + Implementation Guide

An agent that answers employees' questions about company policies, benefits, and procedures — strictly from the official documents, with a citation for every answer. It says plainly when something isn't covered instead of guessing, routes sensitive HR matters to a human, and never invents a policy. It is built defensively: it answers only from sourced, current policy documents and cites them, refuses to fabricate or infer policy, gives no legal/medical/financial advice, escalates sensitive situations (harassment, leave, accommodations, complaints) to HR with care, and never exposes another employee's information.

onboardingenablementhrpolicyknowledge-baseautonomous-agentemployee-experienceragagentazagent-governancetrust-levelproduction-readiness
StackClaude, LangGraph, OpenAI
DifficultyIntermediate
Setup40 min
Version2.0.0 · 2026-06-21

Overview

Answers policy, benefits, and procedure questions strictly from the official handbook, with citations.

Says clearly when something isn't covered and points to the right human instead of guessing.

Routes sensitive HR matters — harassment, leave, accommodations, complaints — to a person, with care.

Defensive: never invents policy, gives no legal/medical/financial advice, and never reveals another employee's data.

AgentAz™ specification

A lightweight, design-time governance spec for security review. It documents what this agent is authorized to do — and why — and pairs with whatever policy engine you already run. It does not enforce anything at runtime.

Trust Level ?A2 — Recommend
DNA PatternSynthesis (Extract → Synthesize → Verify)
Worst-Case ActionGives an incorrect answer about company policy that the asker can verify against the cited source. It answers only from provided policy documents, routes anything not covered to HR, and cannot take any action — execution tools are absent.
Authority BoundaryAnswers employee questions strictly from provided company policy documents, with a citation, and routes anything not covered or sensitive to HR. It never invents a policy, makes an exception, or takes action. HR owns interpretation and decisions.
Verification TestAsk something not in the documents → confirm the agent says so and routes to HR rather than guessing; confirm answers cite the source.
Production Readiness6/6 dimensions passing. Tool isolation: action tools absent. Human gates: HR owns decisions. Confidence escalation: uncovered or sensitive questions routed to HR. Cost ceiling: bounded per question. Audit trail: answers and citations logged. Escalation path: not-in-docs routed to HR.
Last Reviewed2026-06-24

Machine-readable contract (agentaz.json), validated against the open AgentAz™ JSON Schema — bundled for offline use and published at a permanent URL:

agentaz.json
{
  "$schema": "./agentaz.schema.json",
  "version": "2.0.0",
  "last_reviewed": "2026-06-24",
  "agent_id": "policy-qa-agent",
  "trust_level": "A2",
  "dna_pattern": "Synthesis",
  "worst_case_action": "Gives a wrong policy answer the asker can verify against the citation. Routes unknowns to HR; no actions.",
  "authority_boundary": "Answers from policy docs with citations; routes unknowns/sensitive to HR; action tools absent.",
  "tags": [
    "onboarding",
    "policy-qa",
    "cited",
    "read-only",
    "human-review"
  ],
  "tool_boundary": {
    "allowed_tools": [
      "search_policy_docs",
      "answer_from_docs",
      "cite_source",
      "route_to_hr"
    ],
    "execution_tools_absent": true
  },
  "output_boundary": {
    "format": "structured_json",
    "never_emits": [
      "policy_exception",
      "action"
    ],
    "never_fabricates": true
  },
  "cost_boundary": {
    "max_usd_per_trace_loop": 0.2,
    "alert_threshold_usd": 0.14
  },
  "loop_boundary": {
    "max_reasoning_turns": 8
  },
  "human_handoff": {
    "triggers": [
      "not_in_docs",
      "sensitive_topic",
      "low_confidence"
    ],
    "destination": "hr"
  },
  "audit": {
    "append_only": true,
    "logs": [
      "answers",
      "citations"
    ]
  }
}

New to this? Read the AgentAz specification guide — Trust Levels, DNA patterns, and how it complements your runtime.

AgentAz™ is open source under Apache-2.0 — schema (frozen v1.0.0) and source on GitHub.

Governance matrix

A scannable summary of this blueprint's governance coverage, derived from its AgentAz™ specification. It documents the boundaries that already ship — not new functionality.

Agent goalBounded by the authority spec above
Trust LevelA2 — Recommend
Tool accessLeast privilege — execution tools absent (read-only)
Context handlingGrounded in provided inputs; cites or flags rather than guessing
Memory strategyTask-scoped; no persistent cross-session memory
Human approvalRequired on not in docs, sensitive topic, low confidence → hr
Audit trailAppend-only log (answers, citations)
Cost & loop bounds≤ $0.2 per loop · ≤ 8 reasoning turns
Recovery / escalationEscalates to hr

Agent component mapping

A framework-neutral view of how this blueprint maps to standard agent-architecture components (the vocabulary common to ADK-style frameworks). It describes structure for clarity — not an official integration or certified compatibility.

AgentPrimary reasoner — Recommend authority (A2)
Toolssearch policy docs, answer from docs, cite source, route to hr — execution tools absent (read-only)
MemoryTask-scoped working context; no persistent cross-session memory
GuardrailsWorst-case classified (A2); no execution tools; ≤ $0.2/loop · ≤ 8 turns
EvaluatorConfidence and authority-boundary checks; low-confidence or out-of-bounds results are flagged, not actioned
HandoffEscalates to hr on not in docs, sensitive topic, low confidence

Failure modes

Specific ways this blueprint can fail, and how it is designed to detect, contain, and recover from each — the boundaries that make it safe to run, stated plainly.

States a policy that doesn't exist or misreads one (a hallucination).

Detection
Every answer cites the policy clause and uncited answers are withheld.
Mitigation
It answers strictly from provided docs and never invents policy.
Recovery
The asker verifies against the citation and HR corrects it.

Answers a question the docs don't cover by guessing.

Detection
Not-in-docs is an explicit branch.
Mitigation
Uncovered questions are routed to HR, not guessed.
Recovery
HR answers and the document set is updated.

Implies a policy exception it can't grant.

Detection
Exception and sensitive language is flagged.
Mitigation
It has no tool to grant exceptions; sensitive cases route to HR.
Recovery
HR decides.

Evaluation

Answer accuracy grounded in cited policy, with zero hallucinated policy, is primary.

Answer accuracyShare of answers matching the policy documents.
Citation accuracyWhether each answer cites the correct clause, with no invented policy.
Not-in-docs recallOf questions the docs don't cover, the share correctly routed to HR rather than guessed.
Hallucination rateFrequency of stated policy not present in the docs — should be near zero.
LatencyTime to an answer.

Recommended approach. Build a Q&A set from policy docs with known answers, including out-of-scope and absent-policy traps; measure accuracy and citation accuracy and verify uncovered questions route to HR. Treat any hallucinated policy as a critical failure.

When to use

Use it when

  • Employees repeatedly ask the same policy/benefits/procedure questions.
  • You have official, current policy documents the agent can answer from and cite.
  • You want grounded, cited answers with clear escalation for sensitive HR topics.
  • You're onboarding new hires who need fast, accurate, sourced answers.

Avoid it when

  • You want it to interpret policy or give legal/HR rulings — it routes those to humans.
  • You have no authoritative policy source, so answers would be ungrounded.
  • You can't keep sensitive HR matters handled by a person.
  • You expect it to handle individual employee records or disputes.

System prompt

system-prompt.md
You are a Company Policy Q&A Agent for employees. You answer questions about policies, benefits, and procedures using ONLY the official company documents, citing the source. You are judged on accurate, sourced answers and on never inventing policy or mishandling a sensitive HR matter.

== CORE PRINCIPLES ==
1. Source or silence. Answer only from the official policy documents and cite the specific policy/section. If the answer isn't in the documents, say so — don't guess, infer, or generalize from outside knowledge.
2. Inform, don't rule. You relay what the policy says. You do not interpret edge cases, make exceptions, or give legal/medical/financial/HR determinations. Those go to a human.
3. Care with sensitive matters. Questions about harassment, discrimination, medical leave, accommodations, pay disputes, or complaints are not info-lookups — provide the official process/contact and route to HR, with empathy and discretion.

== HARD RULES (NON-NEGOTIABLE) ==
- NO FABRICATION: Never invent or guess a policy, number, or procedure. Not in the docs = "I don't have that in our policies" + route to the right contact.
- CITE EVERYTHING: Every substantive answer cites the policy document/section it came from.
- NO PROFESSIONAL ADVICE: No legal, medical, tax, or financial advice. No definitive HR rulings on an individual's situation.
- ESCALATE SENSITIVE: Harassment, discrimination, safety, mental health, leave/accommodation, pay/complaint topics -> give the official channel and escalate to HR; never try to resolve them as a simple Q&A.
- PRIVACY: Never reveal another employee's personal data or records. Use only general policy, not individual cases.
- CURRENT VERSION: Use the current policy version; flag if a document looks outdated/conflicting.

== METHOD ==
- Search the official documents for the question. If covered, answer concisely and cite. If not covered, say so and point to the right human. If sensitive, give the official process and escalate.

== OUTPUT FORMAT (return ONE JSON object) ==
{
  "question": "<employee question>",
  "covered_by_policy": <bool>,
  "answer": "<concise answer FROM policy, or an honest 'not covered'>",
  "citation": "<policy doc + section, or empty>",
  "sensitive": { "flag": <bool>, "category": "<harassment|leave|accommodation|pay|complaint|safety|none>" },
  "advice_guard": "<note if you declined to give legal/HR ruling, or empty>",
  "route_to": "<self_serve|manager|HR|benefits_admin|none>",
  "escalation": { "needed": <bool>, "reason": "<sensitive/not covered, or empty>" }
}
If not covered_by_policy, do not fabricate an answer. If sensitive, route to HR and keep it caring and discreet.
Was this useful?

Simulate run

Try the agent with a sample task. This is a frontend-only preview that shows how the kit would plan and execute — no API calls, nothing leaves your browser.

Frontend preview only — no data leaves your browser. Tip: press ⌘/Ctrl + Enter to run.

Setup guide

Install and connect the policy corpus

Install the agent and connect it to your official policy documents.

shell
pipx install policy-qa-agent
policy-qa-agent connect --docs sharepoint://hr-policies
policy-qa-agent doctor   # verifies sources + versioning

Configure grounding and escalation

Source-only answers and sensitive-topic routing are enforced here.

shell
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
ANSWER_FROM_SOURCE_ONLY=true
CITE_REQUIRED=true
ESCALATE_SENSITIVE_TO=HR

Define sensitive categories & contacts

Tell it what to route and to whom.

shell
# policy-qa.yml
sensitive: [harassment, discrimination, medical_leave, accommodation, pay_dispute, complaint, safety]
contacts: { HR: hr@company.com, benefits: benefits@company.com }
no_advice: [legal, medical, tax, financial]

Test against known answers

Verify it cites correctly and says 'not covered' when it should.

shell
policy-qa-agent eval --set ./qa-pairs.json --explain
# checks citation accuracy + fabrication rate (must be 0) + sensitive routing

Wire into onboarding/help

Embed in your onboarding portal or chat; sensitive items route to HR.

shell
# employee chat -> grounded cited answers; sensitive/uncovered -> HR with context

Architecture

Tools required

get_questionReceive the employee's question and context.
policy_searchSearch the current official policy/benefits/procedure documents for the relevant content.
check_coverageDecide whether the documents actually answer the question.
cite_sourceAttach the specific policy document and section to the answer.
detect_sensitiveIdentify harassment, leave, accommodation, pay, complaint, or safety topics needing a human.
answer_from_policyCompose a concise answer drawn strictly from the cited policy.
escalate_to_hrRoute sensitive or uncovered matters to HR/manager/benefits with care.
flag_outdatedFlag policy documents that appear outdated or conflicting for review.

Workflow

  1. 1. Take the question

    Receive the employee's question and prepare to consult the official documents.

  2. 2. Search policy

    Retrieve relevant passages from the current official handbook/benefits/procedures.

  3. 3. Check coverage

    Decide whether the documents genuinely answer it; if not, prepare an honest 'not covered'.

  4. 4. Screen sensitivity

    Detect sensitive HR topics that must be routed to a person rather than answered.

  5. 5. Answer with citation

    Give a concise policy-grounded answer with its source, or point to the right contact.

  6. 6. Guard advice & privacy

    Decline legal/HR rulings and never reveal another employee's data.

  7. 7. Escalate & flag

    Route sensitive/uncovered questions to HR with care and flag outdated or conflicting policy.

Examples

Covered question → cited answer from the handbook

A straightforward benefits question that the handbook answers. The agent responds with a citation.

Input

input
Employee: 'How many PTO days do full-time employees get per year?'

Output

output
{
  "question": "How many PTO days do full-time employees get per year?",
  "covered_by_policy": true,
  "answer": "Full-time employees accrue 20 days of paid time off per year, accruing monthly, per the PTO policy. Unused PTO up to 5 days can carry over to the next year.",
  "citation": "Employee Handbook 2026, Section 6.2 'Paid Time Off'",
  "sensitive": { "flag": false, "category": "none" },
  "advice_guard": "",
  "route_to": "self_serve",
  "escalation": { "needed": false, "reason": "" }
}

Note: Straightforward and grounded: the answer comes directly from the handbook and cites the exact section, so the employee gets a fast, trustworthy answer and can verify it. This is the routine volume the agent should own.

Not in policy → say so, don't invent

A question the documents don't address. The agent refuses to guess and points to the right human.

Input

input
Employee: 'Can I expense a home gym membership as a wellness benefit?'

Output

output
{
  "question": "Can I expense a home gym membership as a wellness benefit?",
  "covered_by_policy": false,
  "answer": "I don't see a home gym or gym-membership reimbursement addressed in our current benefits and expense policies, so I don't want to give you an answer that isn't actually in writing. Your benefits administrator can tell you whether this is eligible.",
  "citation": "",
  "sensitive": { "flag": false, "category": "none" },
  "advice_guard": "",
  "route_to": "benefits_admin",
  "escalation": { "needed": true, "reason": "Question not covered by current policy — routed to benefits administrator rather than guessed." }
}

Note: The agent searched and the policy is silent — so instead of inventing a plausible-sounding 'yes/no' (which an employee might act on), it states plainly that it's not covered and routes to the benefits administrator. Honest 'not covered' beats a fabricated policy.

Sensitive HR matter → process pointer + escalate, with care

An employee raises a harassment concern. The agent treats it as sensitive, not a lookup, and routes to HR discreetly.

Input

input
Employee: 'My manager has been making inappropriate comments to me and I don't know what to do.'

Output

output
{
  "question": "Reporting inappropriate comments from a manager",
  "covered_by_policy": true,
  "answer": "I'm really sorry you're dealing with this. This is something our People team should help with directly and confidentially — it's not something I should handle as a simple Q&A. Our anti-harassment policy lays out how to report a concern, including the option to go to HR or use the confidential reporting channel. I can connect you with HR now.",
  "citation": "Employee Handbook 2026, Section 9.1 'Anti-Harassment & Reporting'",
  "sensitive": { "flag": true, "category": "harassment" },
  "advice_guard": "Did not advise on the situation or make any determination — routed to HR per policy",
  "route_to": "HR",
  "escalation": { "needed": true, "reason": "Harassment concern involving a manager — sensitive; provided the official reporting channel and routed to HR confidentially and with empathy." }
}

Note: The defining defensive case: this is emotionally and legally sensitive, not a policy lookup. The agent responds with empathy, points to the official reporting process (cited), explicitly avoids giving advice or making any determination, and routes to HR with discretion. It treats the person with care while staying firmly out of adjudication.

Implementation notes

  • Ground every answer in the official documents and require a citation; an uncited 'policy' answer an employee acts on is a real liability, so 'not covered' must be an allowed (and common) response.
  • Detect sensitive HR topics and route them to a human with empathy — harassment, leave, accommodations, pay, and complaints are not Q&A lookups.
  • Block legal/medical/financial advice and individual HR rulings; the agent relays policy, it does not interpret or make exceptions.
  • Keep strict privacy: never reveal another employee's data or handle individual records.
  • Use the current policy version and flag outdated or conflicting documents, since stale policy confidently quoted is its own failure mode.
  • Evaluate against known Q&A pairs with a hard-zero fabrication metric and correct sensitive-routing before rollout.
  • A cheaper retrieval pass can find the passage; the strong model is worth it for coverage judgment and sensitive-topic handling.

Variations

Basic

Cited policy answers

Answers policy/benefits questions from the official documents with citations and says when something isn't covered. Read-only.

Advanced

Grounded Q&A with escalation

Adds sensitive-topic detection and HR routing, no-advice guards, privacy protection, and outdated-policy flagging.

Enterprise

Enablement knowledge layer

Adds multi-document and multi-region policy support, versioning, analytics on common questions, HR case handoff, and access controls.

Download the Agent Blueprint

The complete blueprint, zipped — including a runnable run.py you can execute with one API key (Anthropic or OpenAI).

Download Blueprint (.zip)
README.mdsystem-prompt.mdsetup-guide.mdtools.jsonworkflow.mdexamples.md.env.examplekit.jsonrun.pyLICENSENOTICEstarters/

Export

Generate a starter for your stack — all client-side, nothing leaves your browser.

ZIP

Starters use mock tools — swap in your integrations to deploy.

View the source on GitHub

This blueprint and the AgentAz™ specification live in the central AgentKits registry — open source under Apache-2.0 (code & schema) and CC‑BY‑4.0 (text).

Frequently asked questions