Governance Overview
Implement human oversight for your AI agents with flexible governance patterns.
Why Governance?
As AI agents become more autonomous, human oversight becomes critical for:
- Safety - Prevent harmful or unintended actions
- Compliance - Meet regulatory requirements
- Quality - Ensure outputs meet standards
- Trust - Build confidence in AI systems
- Learning - Improve agents from human feedback
Governance Patterns
TuringPulse supports three governance patterns, each suited for different use cases:
Human-in-the-Loop (HITL)
Require approval BEFORE agent action
Human-after-the-Loop (HATL)
Review and audit AFTER agent action
Human-on-the-Loop (HOTL)
Real-time monitoring with intervention
Comparison
| Pattern | When | Latency Impact | Use Case |
|---|---|---|---|
| HITL | Before execution | High (blocks) | High-risk actions, financial transactions |
| HATL | After execution | None | Quality audits, compliance reviews |
| HOTL | During execution | None (async) | Real-time monitoring, anomaly response |
Quick Start
Enable Governance via SDK
agent.py
from turingpulse_sdk import instrument, GovernanceDirective
@instrument(
name="financial-advisor",
governance=GovernanceDirective(
hitl=True,
hatl=True,
reviewers=["compliance@company.com"],
escalation_channels=["pagerduty://critical"],
auto_escalate_after_seconds=3600,
)
)
def process_transaction(user_id: str, amount: float, action: str):
return execute_transaction(user_id, amount, action)Enable Governance via UI
- Go to Governance → Policies
- Click Create Policy
- Select the workflow and governance type
- Configure conditions and reviewers
- Save and enable the policy
Review Queue
All items requiring human review appear in the Review Queue:
- HITL Pending - Actions waiting for approval
- HATL Review - Completed actions to audit
- HOTL Alerts - Real-time issues requiring attention
Review Actions
- Approve - Allow the action to proceed (HITL)
- Reject - Block the action (HITL)
- Modify - Edit and approve with changes (HITL)
- Flag - Mark for follow-up (HATL)
- Acknowledge - Confirm review (HATL)
ℹ️
Review Queue Access
Navigate to Governance → Review Queue to see all pending reviews.
Review Policies
Policies define when and how governance is applied:
Policy Configuration
| Option | Description |
|---|---|
workflow_id | Apply to specific workflow or "*" for all |
type | hitl, hatl, or hotl |
condition | When to trigger (always, conditional) |
reviewers | List of reviewer emails or groups |
escalation_channels | Alert channels for escalation |
auto_escalate_after_seconds | Seconds before escalation triggers |
severity | Review priority: low, medium, high |
Conditional Governance
Apply governance only when certain conditions are met:
governance_examples.py
from turingpulse_sdk import GovernanceDirective
# HITL for all runs of a high-risk workflow
governance = GovernanceDirective(
hitl=True,
reviewers=["security@company.com"],
auto_escalate_after_seconds=1800,
escalation_channels=["pagerduty://critical"],
)
# HATL for post-execution audit
governance = GovernanceDirective(
hatl=True,
reviewers=["qa@company.com"],
)ℹ️
Conditional Governance
To apply governance only when certain conditions are met (e.g., high-cost runs, low-confidence outputs), configure condition-based policies in the TuringPulse UI under Governance → Policies. The SDK marks a workflow for governance; the platform evaluates conditions.
Escalation
Configure escalation for unreviewed items:
governance = GovernanceDirective(
hitl=True,
reviewers=["level1@company.com"],
auto_escalate_after_seconds=1800,
escalation_channels=["pagerduty://critical", "slack://managers"],
)💡
Timeout Policies
Auto-approve and auto-reject timeouts can be configured per-workflow in the platform under Governance → Policies.
Review Insights
Track governance metrics and reviewer performance:
- Review Volume - Items reviewed per day/week
- Review Time - Average time to review
- Approval Rate - Percentage approved vs rejected
- Escalation Rate - Percentage escalated
- Reviewer Load - Distribution across reviewers
Next Steps
- Review Policies - Configure policies
- Review Queue - Process reviews
- HITL - Pre-execution approval
- HATL - Post-execution audit
- HOTL - Real-time monitoring