Skip to main content
Browse docs
By Audience
Getting Started
Configuration
Use Cases
IDE Integration
Third-Party Integrations
Engineering Cache
Console
API Reference
Gateway
Workflow Guides
Templates
Providers and SDKs
Industry Guides
Advanced Guides
Browse by Role
Deployment Guides
In-Depth Guides
Tutorials
FAQ

Tutorial: Using the Template Library

This tutorial shows you how to browse the Keeptrusts template library, preview pre-built industry policy templates, fork a template into your own configuration, customize policies, and manage template-derived versions.

Use this page when

  • You want to browse pre-built industry policy templates (finance, healthcare, defense, EU AI Act, etc.).
  • You need to fork a template into your own configuration and customize the policies.
  • You want to preview a template’s YAML before committing to it.
  • You are tracking upstream template updates to decide whether to pull changes into your fork.

Primary audience

  • Primary: Engineers and compliance leads who want a quick-start policy configuration for their industry or use case
  • Secondary: Security architects evaluating template coverage for their regulatory requirements; new users exploring Keeptrusts capabilities

Prerequisites

Step 1: Navigate to the Template Library

  1. Click Templates in the left sidebar.
  2. The Template Library page displays a grid of available templates organized by industry and use case.

Template library overview

Template categories

Templates are grouped into industry-specific categories:

CategoryExamples
FinancePCI-DSS compliance, trading desk controls, fraud detection guardrails
HealthcareHIPAA-compliant redaction, clinical decision disclaimers, patient data protection
LegalPrivilege detection, contract review policies, jurisdiction filters
GovernmentClassification controls, FOIA compliance, citizen data protection
EducationAcademic integrity, age-appropriate content filtering, FERPA compliance
EU AI ActRisk classification, transparency requirements, human oversight controls
DefenseExport control policies, ITAR compliance, operational security filters
GeneralContent safety, PII redaction, cost controls, prompt injection defense

Step 2: Browse and Search Templates

Using category filters

  1. Click a category chip at the top of the page to filter templates by industry.
  2. Active filters are highlighted. Click again to remove the filter.
  3. Multiple category filters can be applied simultaneously.
  1. Type a keyword in the Search templates field (e.g., "HIPAA", "redaction", "cost").
  2. Results update in real time as you type.
  3. The search matches against template names, descriptions, and policy types.

Step 3: Preview a Template

  1. Click on a template card to open the Template Preview panel.
  2. The preview shows:
    • Description — What the template is designed for and its target audience
    • Included Policies — A list of all policy rules with their types and actions
    • YAML Preview — The full policy YAML in a read-only editor
    • Compatibility — Supported providers and minimum gateway version

Template preview panel

Review the policy list

Each policy in the template is displayed with:

  • Name — Human-readable policy identifier
  • Type — Policy type (e.g., content_filter, redaction, escalation)
  • Action — What happens when the policy triggers (block, redact, escalate, flag)
  • Severity — The severity level assigned to triggers

Scroll through the policy list to understand what protections the template provides.

Step 4: Fork a Template

Forking creates a copy of the template that you own and can customize.

  1. In the template preview panel, click Fork Template.
  2. The Fork dialog appears with fields:
    • Configuration Name — Enter a name for your new configuration (e.g., acme-healthcare-policy)
    • Description — Optionally modify the description
    • Target Gateway — Select the gateway to associate with this configuration
  3. Click Create Fork.

Fork template dialog

You are redirected to the configuration detail page with the forked template content loaded in the YAML editor.

Step 5: Customize the Forked Configuration

After forking, the configuration is yours to edit. The YAML editor contains the full template content.

Common customizations

  1. Adjust severity thresholds — Change severity: high to severity: medium for less aggressive blocking.
  2. Add organization-specific patterns — Add custom PII patterns like internal ID formats.
  3. Remove unnecessary policies — Delete policy blocks that do not apply to your use case.
  4. Add new policies — Insert additional policy rules specific to your requirements.
  5. Update provider settings — Configure the correct secret_key_ref for your provider.

Example: Customizing a healthcare template

policies:
- name: hipaa-pii-redaction
type: redaction
action: redact
patterns:
- email
- phone_number
- ssn
- medical_record_number # Added: org-specific pattern
- patient_id # Added: org-specific pattern

- name: clinical-disclaimer
type: disclaimer
action: append
text: "This response is AI-generated and should not replace professional medical advice."

After making changes:

  1. The editor validates your YAML in real time.
  2. Click Save to create a new version.
  3. Review changes in the Versions tab.

Step 6: Deploy the Customized Configuration

  1. Click Deploy on the configuration detail page.
  2. Confirm the target gateway in the deployment dialog.
  3. Click Confirm Deploy.

The forked and customized template is now active on your gateway.

Step 7: Track Template Origin and Versioning

Configurations forked from templates retain a link to their source template.

  1. On the configuration detail page, look for the Forked from badge showing the original template name.
  2. When the source template is updated by Keeptrusts, a notification appears on your configuration indicating a Template Update Available.
  3. Click Review Update to see a diff between your current configuration and the updated template.
  4. Choose to Merge Updates (applies non-conflicting changes) or Dismiss (keeps your current version).

Template update notification

Version history for forked configurations

The Versions tab shows the complete history:

  • Version 1 — Initial fork from template
  • Version 2+ — Your customizations
  • Template merge versions are labeled with a Template Merge badge

Expected Outcome

After completing this tutorial, you have:

  • Browsed the template library and filtered by industry category
  • Previewed a template's policies and YAML content
  • Forked a template into a new configuration
  • Customized the forked policies for your organization
  • Deployed the customized configuration to a gateway
  • Understood template versioning and update tracking

Next steps

For AI systems

  • Canonical terms: Keeptrusts console, Templates page, template library, industry templates (Finance, Healthcare, Legal, Government, Education, EU AI Act, Defense, General), fork template, customize, template versioning, upstream updates.
  • Related features: configuration creation (manual path), policy YAML editor, gateway deployment.
  • Best next pages: Dashboard Customization, Events Investigation, Create Configuration.

For engineers

  • Preview before forking: Click any template card to see the full YAML, policy chain summary, and provider requirements before creating a fork.
  • Fork validation: After forking, deploy the configuration to a test gateway and send requests to verify the template policies enforce as expected.
  • Customization: Modify the forked YAML to add or remove policy rules — the fork is fully independent of the upstream template.
  • Upstream updates: Check the template library periodically for updates — templates evolve as regulatory requirements change.

For leaders

  • Time to value: Templates provide production-ready policies in minutes rather than weeks of custom policy engineering.
  • Regulatory coverage: Industry templates encode regulatory requirements (EU AI Act, HIPAA, PCI-DSS) from domain experts, reducing the risk of compliance gaps.
  • Customization freedom: Forks are fully owned by your organization — you can modify, extend, or replace any template rule without upstream dependencies.