Kyvvu

Policy library

Policies for AI agents, in plain YAML.

9 open-source packs and 73 policies, from OWASP agentic defaults to the EU AI Act. Read them here, test them in the playground, assign them in one command.

Packs

Start with a pack.

  1. Security · 8 policies

    OWASP agentic default policy pack

    Default security policy set for new Kyvvu installations, providing baseline coverage of the OWASP Top 10 for Agentic Applications (2026) at agent development time.

  2. Security · 4 policies

    Data exfiltration guard policy pack

    Path-dependent security manifest that prevents data exfiltration from AI agents. Once an agent reads from a sensitive data source (classified as PII), any subsequent external communication is permanently blocked for the remainder of the task.

  3. Developer · 13 policies

    Claude Code safety policy pack

    Default safety manifest for Claude Code agents. Every policy addresses a real risk that developers face when using autonomous coding agents: credential exfiltration, destructive commands, scope escape, runaway and runaway loops.

  4. Operational · 8 policies

    Internal AI starter policy pack

    General-purpose responsible-AI policy set for organizations deploying AI agents without a specific regulatory requirement. Provides sensible defaults for tool allowlisting (fail-closed), execution and cost limits, destructive operation gates, and infinite loop prevention.

  5. Compliance · 12 policies

    EU AI Act, high risk policy pack

    Policy set for EU AI Act compliance targeting HIGH risk AI systems under Annex III. Implements requirements from Articles 6-15 covering:

  6. Compliance · 7 policies

    EU AI Act, minimal and limited risk policy pack

    Policy set for EU AI Act compliance targeting MINIMAL and LIMITED risk AI systems. Implements Article 50 transparency obligations (chatbot disclosure, synthetic content marking) and basic registration-time documentation requirements from Articles 6, 11, 13, and 16.

  7. Compliance · 6 policies

    GDPR data subject rights policy pack

    Policy set implementing key GDPR requirements for AI agents that process personal data. Covers purpose limitation (Article 5(1)(b)), data minimization (Article 5(1)(c)), right to erasure (Article 17), data subject contact point (Article 13(1)(a)), and safeguards for automated decision-making (Article 22).

  8. Compliance · 9 policies

    Financial services: DORA and MiFID II policy pack

    Policy set for AI agents in financial services, implementing controls from the Digital Operational Resilience Act (DORA) and the Markets in Financial Instruments Directive (MiFID II).

  9. Compliance · 6 policies

    Healthcare: NEN 7510 and HIPAA policy pack

    Policy set for AI agents that handle Protected Health Information (PHI) in healthcare contexts. Implements controls from NEN 7510 (Dutch healthcare information security standard) and the HIPAA Privacy Rule.

Runtime policies

Checked before every step.

Each one judges a step against the path of the task so far. Critical ones block; the rest warn.

  1. OWASP agentic default · high

    Bound resource calls per task to prevent runaway loops

    Blocks tasks that issue more than 50 step.resource calls.

  2. OWASP agentic default · critical

    Code execution requires a preceding gate

    Direct mitigation for OWASP's most concrete RCE-class threat. Any step.exec must be preceded by a step.gate (human approval, static check, or sandboxed dry-run).

  3. OWASP agentic default · critical

    Destructive resource operations require a preceding gate

    DELETE is the bright-line irreversible verb. The default narrows to DELETE only (not POST/PATCH) so dev-time iteration is not constantly blocked; production deployments typically widen this to mutating verbs as confidence in the agent grows.

  4. OWASP agentic default · critical

    External content taint: high-impact actions require a fresh gate

    If the agent has fetched external content earlier in this task, any subsequent high-impact action (code execution, outbound message, destructive or mutating resource call) must be IMMEDIATELY preceded by a step.gate. A single approval at task start does not whitewash the rest of the path - oversight must be re-confirmed AFTER external influence has entered the context.

  5. OWASP agentic default · critical

    Tool calls must be in the declared allowlist

    Pairs with registration policy. At runtime, blocks tool calls whose step_name is not in the agent's declared_tools allowlist.

  6. Data exfiltration guard · critical

    Block external send after sensitive data read

    Once a sensitive data source is read (step.resource GET with data.classification set to pii), any external outbound communication (step.message POST or step.resource POST) is permanently blocked for the remainder of the task.

  7. Data exfiltration guard · critical

    External sends require an exfiltration review gate

    Defense-in-depth: all outbound messages (step.message) must be preceded by an exfiltration_review gate somewhere in task history. This catches cases where the taint policy does not apply (no sensitive read) but the message content may still be risky.

  8. Data exfiltration guard · critical

    Forbid credential read followed by external send

    Blocks a step.message after any step.credential GET in the task history. A credential write does not taint the path. This prevents credential exfiltration via indirect prompt injection.

  9. Data exfiltration guard · critical

    Restrict outbound to approved domains

    Domain allowlist restricting step.resource targets to approved internal endpoints. Blocks calls to unknown external domains.

  10. Claude Code safety · critical

    Max consecutive exec

    No more than 10 consecutive Bash calls without a file read or write in between. Catches agents stuck in compile/test retry loops.

  11. Claude Code safety · critical

    Max exec per task

    Limit Bash executions to 50 per task. Prevents infinite retry loops and runaway scripts. Start a new session to reset the counter.

  12. Claude Code safety · critical

    No exec after secret read

    Block Bash execution after reading files classified as secrets (.env, .pem, .key, credentials, pgpass, netrc). The kyvvu-claude mapper automatically classifies these files with data.classification: secret.

  13. Claude Code safety · critical

    No force push

    Prevent git push --force which can destroy remote history. Use git push --force-with-lease if a force push is truly needed. Uses 'not' compound rule because field_matches_regex returns True when the field matches — we want to block when it matches.

  14. Claude Code safety · critical

    No git reset --hard

    Prevent git reset --hard which discards all uncommitted work. Use git stash or create a commit before resetting.

  15. Claude Code safety · critical

    No network after secret read

    Block network access (WebFetch) after reading files classified as secrets. Prevents data exfiltration via HTTP requests.

  16. Claude Code safety · critical

    No recursive delete of home

    Block recursive rm targeting the home directory: rm -rf ~, ~/, $HOME, $HOME/. A named subdir of home (rm -rf ~/project/build) is allowed.

  17. Claude Code safety · critical

    No recursive delete of root

    Block recursive rm targeting filesystem root: rm -rf /, rm -r /, rm -rf /*, and root followed by trailing options. Force flag irrelevant.

  18. Claude Code safety · critical

    No recursive delete of system directories

    Block recursive rm into protected system paths (/etc, /bin, /lib, /boot, /System, /Library, ...). Mirrors the write-scope policy for exec/rm. NOTE: /usr and /var are intentionally NOT listed — /usr/local and /var/tmp see legitimate use. Add them only if your environment warrants, and extend the fixture if you do.

  19. Claude Code safety · critical

    No recursive delete via parent traversal

    Block recursive rm that climbs out of the tree via parent refs: rm -rf .., ../.., ../../... A named relative path (rm -rf ../sibling) is allowed; only pure ..-chains block.

  20. Claude Code safety · critical

    No shell read of secret files

    Block shell reads of secret files (cat/less/head/tail/cp/xxd/base64/strings of .env, .pem, .key, credentials, pgpass, netrc). The tainted-path guard only classifies secrets read via the Read tool; Bash `cat .env` bypasses it entirely.

  21. Claude Code safety · critical

    No shell write to sensitive paths

    Block shell write operations (redirect, tee, cp, mv, dd, install) targeting sensitive system/user paths. Complements "No write outside project", which only inspects the Write/Edit tools — Bash is the most common write-bypass vector.

  22. Claude Code safety · critical

    No write outside project

    Allowlist containment: block any write whose target path does not resolve under the session project_root. This is strictly stronger than the previous denylist — it covers /tmp, sibling repos, and every other out-of-project path, not just a hardcoded list of sensitive directories, and it applies whether the write comes from the Write/Edit tools or from a Bash shell write (Layer B sets target.host for shell writes too).

  23. Internal AI starter · critical

    Destructive operations require human approval

    DELETE operations on resources and code execution require a human_approval gate. This prevents accidental or malicious destructive actions.

  24. Internal AI starter · critical

    Limit LLM calls per task

    Loop control: cap model inference calls at 50 per task to prevent runaway analysis loops, excessive cost, and cascading failures.

  25. Internal AI starter · critical

    Prevent infinite LLM loops

    Block tasks where the agent calls the model more than 5 times consecutively without any other action kind intervening. This catches agents stuck in a reasoning loop.

  26. Internal AI starter · critical

    Token budget per task

    Cost control: cap cumulative token usage at 100,000 tokens per task. Requires the agent to emit usage.total_tokens in step.model properties.

  27. EU AI Act, high risk · high

    HIGH risk - Data quality gate required before model calls

    EU AI Act Article 10(2) and 10(3) require data governance measures including examination for biases and ensuring data relevance and accuracy. A step.gate must appear in the task history before any step.model call to confirm data quality checks have been performed.

  28. EU AI Act, high risk · critical

    HIGH risk - Destructive operations require human approval

    EU AI Act Article 14(4)(d) requires that humans can decide not to use the AI system or override its output. DELETE operations are irreversible and require explicit human approval via a step.gate.

  29. EU AI Act, high risk · critical

    HIGH risk - Mutating resource operations require human approval

    EU AI Act Article 14(4)(c) requires oversight measures including the ability to interrupt the AI system. Write operations (POST) that modify external state require an earlier completed step.gate with properties.kind human and output.decision pass.

  30. EU AI Act, high risk · high

    Limit model calls per task for robustness

    EU AI Act Article 15(1) requires appropriate levels of accuracy and robustness. Capping step.model calls at 30 per task prevents excessive inference loops that may indicate errors or adversarial manipulation.

  31. EU AI Act, high risk · high

    Limit resource calls per task for robustness

    EU AI Act Article 15(3) requires that high-risk AI systems be resilient against errors, faults, and inconsistencies. Capping step.resource calls at 50 per task prevents runaway loops, potential abuse, and cascading failures.

  32. EU AI Act, minimal and limited risk · high

    AI-generated content must be marked before delivery

    EU AI Act Article 50(2) requires providers of AI systems generating synthetic audio, image, video, or text to ensure the outputs are marked in a machine-readable format and detectable as artificially generated. Marking applies to the model's output, so the checkpoint sits between that output and its delivery: once a task holds a completed step.model, every delivery step -- an outbound step.message POST, or a step.resource POST to an external target -- must have a step.gate after the most recent step.model. A model step on its own, and a delivery in a task with no model output, do not trigger it.

  33. EU AI Act, minimal and limited risk · high

    Chatbot disclosure gate required before outbound messages

    EU AI Act Article 50(1) requires that natural persons be informed they are interacting with an AI system, unless this is obvious from the circumstances. A step.gate before outbound messages (step.message POST) enforces the disclosure checkpoint.

  34. GDPR data subject rights · critical

    Automated decisions on personal data require consent gate

    GDPR Article 22 — The data subject has the right not to be subject to a decision based solely on automated processing which produces legal effects or similarly significant effects. Model calls that process personal data must be preceded by a data_subject_consent gate confirming the data subject's explicit consent or another lawful basis.

  35. GDPR data subject rights · critical

    Erasure operations require an approval gate

    GDPR Article 17 — Right to erasure: the controller must be able to erase personal data without undue delay. DELETE operations on resources must be preceded by an erasure_approval gate to ensure the request is legitimate and properly scoped.

  36. GDPR data subject rights · high

    Limit resource access scope per task

    GDPR Article 5(1)(c) — Data minimization: restrict the volume of resource accesses per task to prevent excessive data collection beyond what is necessary for the stated purpose.

  37. Financial services: DORA and MiFID II · critical

    Financial write operations require human approval

    MiFID II Article 27 — Best execution: firms must take sufficient steps to obtain the best possible result for their clients. Write operations (POST) on financial resources must be preceded by a human_approval gate to ensure suitability and best execution obligations are met.

  38. Financial services: DORA and MiFID II · critical

    Market data read taints downstream trade execution

    DORA Article 9 — ICT risk management: once market data is read from an external source, automated trade execution (step.resource POST) is permanently blocked for the remainder of the task. This prevents algorithmic decisions based on potentially manipulated or stale market data from being executed without human review.

  39. Financial services: DORA and MiFID II · critical

    No LLM call between approval and trade execution

    MiFID II Article 27 — Approval integrity: once a human approves a trade, no LLM inference (step.model) may occur between the approval gate and the actual trade execution (step.resource POST). This prevents the model from reinterpreting or modifying the approved action.

  40. Financial services: DORA and MiFID II · critical

    Restrict execution to market hours

    MiFID II Article 48 — Trading venue requirements: algorithmic trading must operate within defined parameters. This policy restricts agent execution to European market hours (08:00-18:00 CET).

  41. Healthcare: NEN 7510 and HIPAA · critical

    Code execution is forbidden for healthcare agents

    NEN 7510 clause 12.2 — Protection from malware: arbitrary code execution by healthcare AI agents introduces unacceptable risk of data breach or system compromise. This policy blocks step.exec for all high-risk healthcare agents.

  42. Healthcare: NEN 7510 and HIPAA · critical

    PHI access requires patient consent gate

    HIPAA 45 CFR 164.508 — Uses and disclosures for which an authorization is required. Resource access involving patient data must be preceded by a patient_consent gate confirming a valid authorization is on file.

  43. Healthcare: NEN 7510 and HIPAA · critical

    Restrict data access to approved healthcare domains

    NEN 7510 clause 13.1 — Network security management: restrict external communications to approved endpoints. This policy allowlists domains that are approved for PHI data exchange.

Your own rules

Write a policy for your agents.

For developers

Policy authoring

25 rule types, from tool allowlists to tainted paths. Your manifests sit next to the library's.

For security teams

Request a demo

We write the first policies from your own rules with you.