Smart Rules Overview
Overview
Smart Rules are AI-powered policy rules that automatically govern AI agent behavior within your organization. They combine pattern recognition, risk assessment, and compliance requirements to create dynamic governance controls that adapt to your security needs.
Unlike static policies, Smart Rules learn from agent behavior patterns and can be generated automatically using natural language descriptions or manually configured through a JSON editor.
Key Features
- AI-Powered Generation: Create rules from natural language descriptions using LLM technology
- Risk-Based Actions: Automatically determine actions (block, approve, monitor) based on risk levels
- Multi-Agent Support: Apply rules to specific agents or all agents using wildcards
- Performance Tracking: Monitor rule effectiveness with built-in analytics
- Compliance Integration: SOC 2, PCI-DSS, and HIPAA compliance framework support
- Real-Time Evaluation: Rules evaluated instantly when agent actions are submitted
Rule Types and Categories
By Risk Level
| Risk Level | Score Range | Typical Actions |
|---|---|---|
| Critical | 90-100 | Immediate block, security team alert |
| High | 70-89 | Require approval, enhanced monitoring |
| Medium | 50-69 | Flag for review, standard monitoring |
| Low | 0-49 | Auto-approve, basic logging |
By Action Type
- File Operations:
file_access,file_delete,file_write - Network Operations:
network_request,api_call,network_scan - System Operations:
system_command,privilege_escalation - Data Operations:
data_access,data_query,database_write
By Scope
- Agent-Specific: Rules that apply to a single agent ID
- Universal: Rules with
agent_id: "*"that apply to all agents - Department-Scoped: Rules filtered by organizational department
How It Works
Rule Evaluation Flow
Agent Action Submitted
|
v
+------------------+
| Load Smart Rules |
+------------------+
|
v
+------------------+
| Match Conditions |
| - agent_id |
| - action_type |
| - risk_level |
+------------------+
|
v
+------------------+
| Execute Action |
| - require_approval|
| - auto_block |
| - monitor |
+------------------+
|
v
Decision
Rule Matching
Rules are evaluated in priority order. When an agent action is submitted:
- Condition Matching: The system checks if the action matches the rule's condition (agent_id, action_type)
- Risk Assessment: The action's risk score is compared against the rule's risk level
- Action Execution: The specified action is applied (block, approve, escalate, or monitor)
Configuration
Basic Rule Structure
{
"id": 1,
"agent_id": "*",
"action_type": "database_write",
"description": "Validates database modifications",
"condition": "action_type == 'database_write'",
"action": "require_approval",
"risk_level": "high",
"enabled": true,
"priority": 10
}
Configuration Options
| Field | Type | Description |
|---|---|---|
agent_id | string | Target agent ID or * for all |
action_type | string | Action type to match |
condition | string | Evaluation condition expression |
action | string | Action to take when matched |
risk_level | string | low, medium, high, critical |
enabled | boolean | Whether rule is active |
priority | integer | Evaluation priority (higher = first) |
Usage Examples
List All Smart Rules
curl -X GET "https://api.ascend.ai/api/smart-rules" \
-H "Authorization: Bearer $TOKEN"
Create a Smart Rule
curl -X POST "https://api.ascend.ai/api/smart-rules" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "code-assistant",
"action_type": "file_delete",
"description": "Block file deletions from code assistant",
"action": "auto_block",
"risk_level": "critical"
}'
Generate Rule from Natural Language
curl -X POST "https://api.ascend.ai/api/smart-rules/generate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "Block any agent from making network requests to external APIs without approval"
}'
Related
- AI Rule Generation - Create rules using natural language
- Manual Rule Creation - JSON editor and schema reference
- Rule Analytics - Performance metrics and optimization
- Policy Engine - Broader policy management
- Risk Scoring - How risk scores are calculated