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

# Redact Dict • AI Agent SDK

> redact_dict: Redact sensitive values from a dictionary.

# redact\_dict

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**redact**](../modules/redact) module.

Redact sensitive values from a dictionary.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def redact_dict(data: Dict[str, Any], enabled: bool) -> Dict[str, Any]
```

## Parameters

<ParamField query="data" type="Dict[str, Any]" required={true}>
  Dictionary to redact
</ParamField>

<ParamField query="enabled" type="bool" required={false} default="True">
  If False, returns data unchanged
</ParamField>

### Returns

<ResponseField name="Returns" type="Dict[str, Any]">
  New dictionary with sensitive values redacted
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/trace/redact.py#L85">
  `praisonaiagents/trace/redact.py` at line 85
</Card>
