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

# Is Weak Secret • AI Agent SDK

> is_weak_secret: Return True if ``value`` is empty or a known-weak/placeholder secret.

# is\_weak\_secret

Function

> This function is defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Return True if `value` is empty or a known-weak/placeholder secret.

Comparison is whitespace-stripped and case-insensitive.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def is_weak_secret(value: Optional[str]) -> bool
```

## Parameters

**value** `Optional[str]` *required*

No description available.

### Returns

**Returns** `bool`

The result of the operation.

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
>>> is_weak_secret("change-me")
    True
    >>> is_weak_secret("$(openssl rand -hex 16)")
    True
    >>> is_weak_secret("strong-non-placeholder-token")
    False
```

## Used By

* [`assert_gateway_secret_strong`](../functions/assert_gateway_secret_strong)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L2949)
>
> `praisonaiagents/gateway/protocols.py` at line 2949


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.