For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Getting Started
    • Welcome
    • Architecture
    • Installation
    • Authentication
    • Quick Start
    • Support
  • Core Concepts
    • Guardrails
    • AI BOM
    • Red Teaming
    • Compliance
    • Audit Logs
  • Integrations
    • GitHub
    • GitLab
    • Azure DevOps
    • Bitbucket
    • Jira
    • LiteLLM
  • Usage Guides
    • Organization
    • Guardrails Setup
    • Policies
    • Scans
    • Red Team
    • Dashboards
  • Code Examples
    • cURL
    • Python
    • Node.js
    • API Patterns
On this page
  • Setting Up Guardrails
  • Quick Start
  • Via Dashboard
  • Via API
  • Common Guardrail Types
  • Testing Guardrails
  • Best Practices
  • Next Steps
Usage Guides

Setting Up Guardrails

Was this page helpful?
Edit this page
Previous

Creating Policies

Next
Built with

Setting Up Guardrails

Learn how to create and configure guardrails to protect your AI applications.

Quick Start

Via Dashboard

  • Guardrails → Create Guardrail
  • Select rule type (e.g., “Block PII”)
  • Configure parameters
  • Set severity
  • Test with sample input
  • Click Save

Via API

$curl -X POST https://api.governanceai.com/v1/guardrails \
> -H "Authorization: Bearer $API_KEY" \
> -d '{
> "name": "Block Toxic Content",
> "rule_type": "block_toxic_content",
> "severity": "high",
> "config": {
> "toxicity_threshold": 0.8,
> "action": "block"
> }
> }'

Common Guardrail Types

  • block_pii - Block personally identifiable information
  • block_toxic_content - Block abusive language
  • rate_limit - Limit requests per user
  • enforce_classification - Require data tags
  • jailbreak_detection - Detect jailbreak attempts
  • agent_tool_control - Control agent tool access

Testing Guardrails

Test before deploying:

$curl -X POST https://api.governanceai.com/v1/guardrails/test \
> -H "Authorization: Bearer $API_KEY" \
> -d '{
> "guardrail_id": "guardrail_123",
> "test_input": "My credit card is 4532-1111-2222-3333",
> "context": {"user_id": "user_test"}
> }'
$
$# Response:
${
> "decision": "block",
> "reason": "PII detected: credit card number",
> "matched_rules": ["credit_card_regex"]
>}

Best Practices

  • Test thoroughly before production
  • Start with broad rules, then refine
  • Monitor violation rates
  • Adjust thresholds based on feedback
  • Document rule purposes

Next Steps

  • Creating Policies - Bundle guardrails into policies
  • Running Scans - Scan your repositories
  • API Reference - Guardrail APIs