Skip to main content
Policies define what rules your agent must follow. While Personas represent who interacts with your agent, policies represent the constraints your agent must respect compliance requirements, operational guidelines, content restrictions, and security boundaries.

Why Policies Matter

Every organization has rules about what AI agents can and cannot do. These might be:
  • Regulatory requirements: HIPAA, GDPR, SOC 2, industry-specific mandates
  • Operational guidelines: Response formatting, escalation procedures, approved topics
  • Security boundaries: Data access limits, prohibited actions, authentication requirements
  • Content restrictions: Tone guidelines, forbidden topics, disclosure requirements
Without explicit policies, evaluations test generic behaviors. With policies, evaluations verify that your agent respects your specific constraints.

The Policy Registry

Navigate to Policies in the sidebar to open the Policy Registry. The registry displays all policies in your workspace:

Policy Categories

Vijil organizes policies into categories that reflect their purpose:

Creating Policies

Open Policies in the left sidebar, then click + Create Policy to open the creation modal. You can write a policy directly or upload an existing document.

Write Policy

Use this option to define policies directly in the console: 1. Basic Information:
  • Policy Name: Descriptive identifier (e.g., “GDPR Compliance Policy”, “Customer Support Guidelines”)
  • Description: Brief summary of what this policy covers
2. Category & Status:
  • Category: Select from Compliance, Security, Operational, or Custom
  • Status: Start with Draft, change to Active when ready for use
  • Version: Semantic version (e.g., 1.0.0)
3. Policy Content:
  • Policy Text: The full text of your policy, written in plain text or markdown

Upload Policy

You can use this option to import existing policy documents: Supported formats:
  • PDF: Standard policy documents
  • TXT: Plain text files
Maximum file size: 10MB After upload, Vijil extracts the policy text. To generate rules from that text, open the policy and click Extract Rules as described below.

Extract Rules From a Policy

Automatic rule extraction turns your policy document or manually entered policy text into individual rules that you can review and approve.
  1. Open Policies in the left sidebar.
  2. Create a policy with + Create Policy, uploading a policy file or entering policy text, or choose an existing policy.
  3. In the Policy Registry, click the policy to open its details.
  4. Locate Extract Rules alongside the policy details and, if you uploaded a file, the uploaded document.
  5. Click Extract Rules and wait for extraction to finish.
  6. Review the generated draft rules against your policy. Approve the rules you want to use, and edit or reject rules that need changes.
You can extract up to 50 rules from a policy. Harness or Dome configuration can use up to 50 approved rules.

Policy Structure

Effective policies contain clear, testable statements. Structure your policies with: Prohibitions: What the agent must never do:
“The agent must never disclose customer personal information to unauthorized parties.”
Obligations: What the agent must always do:
“The agent must verify user identity before providing account information.”
Permissions: What the agent is allowed to do:
“The agent may recommend products based on customer purchase history.”
Conditions: Context-specific rules:
“When handling healthcare data, the agent must comply with HIPAA requirements.”
Write policies in clear, imperative language. Avoid ambiguous terms like “should try to” or “when appropriate.” Vijil generates better test cases from precise statements.

From Policy to Test Cases

When you select approved rules for a custom Harness, Vijil:
  1. Structures the Harness around your selected rules, with one dimension per rule.
  2. Generates test cases that Probe each rule.
When you run an Evaluation with that Harness, Vijil tests whether your agent respects the rules and reports violations with specific evidence. For example, an approved rule stating “Never recommend competitors” generates test cases where personas ask about competitor products, measuring whether your agent deflects appropriately.

Policy Status

Policies progress through lifecycle states: Set status to Active before including policies in Harnesses.

Common Policy Patterns

Data Privacy Policy

Content Moderation Policy

Access Control Policy

Using Policies in Harnesses

Use your approved rules to create a custom Harness that follows your policy:
  1. Navigate to Harnesses and click + Create Harness.
  2. Enter the Harness details and select your Agent and any personas.
  3. In the Select Policies step, choose the relevant policies and select their approved rules for Harness generation, up to 50 rules in total.
  4. Create the Harness. Vijil structures it around the selected rules and generates test cases that combine persona behaviors with those constraints.
A security researcher persona combined with a data privacy policy generates test cases where an adversarial user attempts to extract protected information testing both the attack surface and the policy enforcement. You can also select approved rules on the Dome page to generate Dome Guardrail configurations.

Conditional Rules in Dome

When approved rules are compiled into Dome Controls, their structured conditions determine when each rule is checked. The Agent integration must supply the required context. For example, a rule configured to apply when the communication channel is SMS behaves as follows: See Conditional Policy Rules for integration details.

Next Steps

Define Personas

Create user profiles for evaluation

Build Custom Harnesses

Combine personas and policies into targeted evaluations
Last modified on November 17, 2026