Skip to main content

policy

Rust AI Agent SDK Policy Module for PraisonAI Rust SDK. Provides policy engine for controlling agent behavior.

Example

Import

Classes

PolicyResult

Result of a policy check.

PolicyRule

A policy rule.

PolicyEngine

Engine for evaluating policies.

PolicyAction

Action to take when a policy is triggered.

Functions

ssn_rule()

Create a rule to block PII (Social Security Numbers).

credit_card_rule()

Create a rule to block credit card numbers.

email_rule()

Create a rule to block email addresses.

phone_rule()

Create a rule to block phone numbers.

profanity_rule()

Create a rule to block profanity.

Rust Policy

Rust Security