> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Guardrail Preset • Rust AI Agent SDK

> GuardrailPreset: Guardrail preset configuration

# GuardrailPreset

> Defined in the [**presets**](../modules/presets) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Guardrail preset configuration

## Fields

| Name          | Type                | Description       |
| ------------- | ------------------- | ----------------- |
| `enabled`     | `bool`              | Enable guardrails |
| `max_retries` | `usize`             | Maximum retries   |
| `on_fail`     | `String`            | Action on failure |
| `policies`    | `Vec&lt;String&gt;` | Policies to apply |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/presets.rs#L510">
  `praisonai/src/presets.rs` at line 510
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Guardrails" icon="shield" href="/docs/rust/guardrails" />

  <Card title="Rust Approval" icon="check" href="/docs/rust/approval" />

  <Card title="Rust Security" icon="lock" href="/docs/rust/security" />
</CardGroup>
