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

# sentinelize • AI Agent SDK

> sentinelize: Return an opaque sentinel token standing in for ``secret``.

# sentinelize

Function

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

Return an opaque sentinel token standing in for `secret`.

The model only ever sees the returned token; the plaintext is held in a
per-process map and never placed in prompts, tool arguments, transcripts or
logs. Calling again with the same secret returns the same token (stable
within a process). The secret is also registered for log redaction so an
accidental leak of the plaintext is still masked.

Any non-empty string is sentinelised — the opaque, randomly-minted token
never collides with ordinary text, so there is no minimum length (a short
PIN or password must be hidden just as a long key is). Only an empty or
non-string value is returned verbatim.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def sentinelize(secret: str) -> str
```

## Parameters

**secret** `str` *required*

No description available.

### Returns

**Returns** `str`

The result of the operation.

## Uses

* `_stdlib_secrets.token_hex`
* `register_secret_for_redaction`

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/secrets.py#L421)**
>
> `praisonaiagents/secrets.py` at line 421


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