> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://poly-ai.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://poly-ai.ferndocs.com/_mcp/server.

# Overview

> Store API keys and credentials securely in the Secrets Vault.

Store API keys, tokens, and credentials securely. Your agent's [tools](/agent-studio/tools/overview) retrieve them at runtime – no hardcoded secrets in code, logs, or version history.

> **Info**
>
> Secrets are managed at the **account level**, not inside individual agents. Access the Secrets Vault from the **Secrets** tab in the top bar of the workspace homepage.

> **Note**
>
> The Secrets tab is only visible to **workspace admins** on supported workspaces. If you are an admin and the tab is not visible in your workspace, the Secrets Vault may not be enabled for your account yet — [contact PolyAI support](/academy/maintain/common-issues) to request access.

![Secrets Vault overview](/_fern-files/_img/feafe6f42268504d2a0c02fa25ca74345a98261ce7d79ba809698d51932d6263.webp)

## How it works

1. You [create a secret](/advanced/secrets/how-to-create-a-secret) in the Secrets Vault with a name, optional description, and value.
2. You [grant access](/advanced/secrets/access-control) to specific agents.
3. Functions retrieve the secret at runtime using `conv.utils.get_secret("secret_name")`.

```python
api_key = conv.utils.get_secret("stripe_api_key")
response = requests.get(url, headers={"Authorization": f"Bearer {api_key}"})
```

## Storage formats

Secrets can be stored as:

* **Single value** – A plain string (e.g., an API key).
* **Key/value pairs** – A dictionary of related credentials (e.g., `client_id` and `client_secret`).

## Next steps

#### [Create a secret](/advanced/secrets/how-to-create-a-secret)

Add a new secret to the Secrets Vault.

#### [Manage access control](/advanced/secrets/access-control)

Grant secrets to specific agents.

#### [Use in functions](/advanced/secrets/how-to-create-a-secret#using-secrets-in-functions)

Retrieve secrets at runtime in your code.