Rules are reusable instructions that define AI behavior, enforce guardrails, maintain brand voice, and ensure compliance across your organization's AI applications.
Rules are declarative policies that modify how AI assistants behave and respond. They can enforce:
- Behavioral guidelines - Tone, style, and communication standards
- Safety guardrails - Content policies and prohibited topics
- Compliance requirements - Industry regulations and legal constraints
- Brand voice - Consistent messaging and formatting
- Context-specific instructions - Situational behavior modifications
Create once, apply to multiple assistants, users, models, or vector stores. Rules are stored centrally and referenced by ID.
Control rule precedence with a 1-100 priority scale. Higher priority rules are applied first, ensuring critical safety rules take precedence.
Three-tier access system (owner, edit, view) enables team collaboration while maintaining security.
Attach rules to different entity types with independent configurations:
- Assistants
- Vector stores
- Users
- Models
- Organizations
Automatic version incrementing on updates helps track changes and maintain audit trails.
Define your rule with content, category, and type:
curl -X POST https://api.aitronos.com/v1/organizations/org_123/rules \
-H "X-API-Key: $FREDDY_API_KEY" \
-d '{
"name": "Professional Communication",
"content": "Always maintain professional tone...",
"category": "professional",
"rule_type": "behavior"
}'Apply the rule to assistants, users, or other entities:
curl -X POST https://api.aitronos.com/v1/rules/rule_abc/attachments \
-H "X-API-Key: $FREDDY_API_KEY" \
-d '{
"entity_type": "assistant",
"entity_id": "asst_123",
"priority": 80
}'When the entity (assistant, user, etc.) is used, attached rules are automatically included in the context based on priority order.
- safety - Safety and compliance rules
- professional - Professional conduct and tone
- creative - Creative writing and style guidelines
- technical - Technical constraints and requirements
- custom - Organization-specific rules
- behavior - Behavioral guidelines and tone
- guardrails - Safety boundaries and restrictions
- formatting - Output formatting and structure
- context - Context-specific instructions
- content_policy - Content policies and restrictions
- constraint - Hard constraints and limitations
Rules use a 1-100 priority scale (higher = applied first):
| Priority Range | Use Case | Example |
|---|---|---|
| 90-100 | Critical safety rules | "Never share PII" |
| 70-89 | High priority compliance | "Follow GDPR requirements" |
| 50-69 | Standard behavior | "Professional tone" |
| 30-49 | Low priority style | "Use active voice" |
| 1-29 | Optional preferences | "Prefer concise responses" |
Create a rule with attachments in a single request:
curl -X POST https://api.aitronos.com/v1/organizations/org_123/rules \
-H "X-API-Key: $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Support Standards",
"content": "Be empathetic, professional, and solution-focused. Always acknowledge customer concerns and provide clear next steps.",
"category": "professional",
"rule_type": "behavior",
"attachments": [
{
"entity_type": "assistant",
"entity_id": "asst_support",
"priority": 80
}
]
}'Each rule should have a single, clear purpose. Avoid "mega-rules" that try to cover everything.
Names should clearly indicate the rule's purpose: "PII Protection Policy" not "Rule 1".
Reserve 90-100 for critical safety rules. Use 50-69 for standard guidelines.
Test rules in staging environments before applying to production assistants.
Use analytics to track rule adoption and effectiveness across your organization.
Rules auto-increment versions on updates. Document changes for team awareness.
Apply the same communication style across all customer-facing assistants.
Enforce industry regulations (HIPAA, GDPR, etc.) across all AI interactions.
Apply different rules to support vs. sales assistants while maintaining shared safety rules.
Share rules with team members using access controls for collaborative rule management.
- Rules Management Guide - Comprehensive guide
- Rules API Reference - API documentation
- Create Rule - Create endpoint
- Rule Object - Object schema
- Attach Rule - Attachment endpoint