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

# Resolve Secret • AI Agent SDK

> resolve_secret: Resolve a credential input to a :class:`SecretResolution`.

# resolve\_secret

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

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

Resolve a credential input to a :class:`SecretResolution`.

Backward compatible: a plain string is returned verbatim (with the existing
`$&#123;ENV&#125;` convention honoured), so plaintext configs keep working. A
:class:`SecretRef` (or its `&#123;"source", "id"&#125;` dict form) is resolved via
the matching resolver. A resolved value is registered for log redaction
unless `redact=False`.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def resolve_secret(value: SecretInput) -> SecretResolution
```

## Parameters

<ParamField query="value" type="SecretInput" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="SecretResolution">
  The result of the operation.
</ResponseField>

## Uses

* `SecretResolution`
* `register_secret_for_redaction`
* `resolve`

## Source

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