> ## 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.

# Blocklist Guardrail • Rust AI Agent SDK

> BlocklistGuardrail: Keyword blocklist guardrail.

# BlocklistGuardrail

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

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

Keyword blocklist guardrail.

## Fields

| Name             | Type                | Description             |
| ---------------- | ------------------- | ----------------------- |
| `keywords`       | `Vec&lt;String&gt;` | Blocked keywords        |
| `case_sensitive` | `bool`              | Case sensitive matching |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(keywords: Vec<String>) -> Self
```

Create a new blocklist guardrail

**Parameters:**

| Name       | Type                |
| ---------- | ------------------- |
| `keywords` | `Vec&lt;String&gt;` |

### `case_sensitive`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn case_sensitive(mut self, sensitive: bool) -> Self
```

Set case sensitivity

**Parameters:**

| Name        | Type   |
| ----------- | ------ |
| `sensitive` | `bool` |

### `add_keyword`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn add_keyword(mut self, keyword: impl Into<String>) -> Self
```

Add a keyword

**Parameters:**

| Name      | Type                      |
| --------- | ------------------------- |
| `keyword` | `impl Into&lt;String&gt;` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/guardrails/mod.rs#L338">
  `praisonai/src/guardrails/mod.rs` at line 338
</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>
