# Manage secrets (/en/ai/platform/studio/build/secrets)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

> Documentation: Conversational AI.
> Documentation version: Preview.
> This document describes only this version. [Version index](/llms/doc-versions-convoai-guides-v2.txt).


Secrets protect your credentials. A secret set is a named group of keys in your project, such as `team_staging`. Each key holds one secret value, such as an OpenAI API key. An agent refers to a key by name, and Agora resolves it when each session starts.

![Secrets page](/temp/agent-studio-preview/secrets-page.png)

## Create a secret

To store a key:

1. In the navigation sidebar, select **Secrets**.

2. Select **Create secret**.

3. Select an existing set, or select **New set** and enter a **Set name**.

4. Enter a **Key** and a **Value**. To add several keys, do one of the following:

   - Select **Add another**.
   - Select **Import .env** and choose a `.env` file, or paste the contents of a `.env` file into **Key**.

5. Select **Create secret**.

![Create secret dialog](/temp/agent-studio-preview/create-secret.png)

You can also create a secret from the agent editor. See [Bring your own key](/en/ai/platform/studio/build/customize-agent#bring-your-own-key).

Set names and key names can contain up to 64 letters, digits, and underscores. Hyphens aren't allowed. A set name must be unique in your project. For other limits, see [Use your own provider keys](/en/ai/platform/build/use-your-own-keys#store-your-keys-in-a-secret-set).

> **Warning**
>
> You can't view a value after you save it. Keep a copy of your key with your provider.

> **Tip: Best practices**
>
> - Use descriptive names to distinguish between development, staging, and production secrets. For example, create one set for each environment, with the same key names in each.
> - Rotate API keys regularly according to your security policies.
> - Delete unused secrets to minimize security exposure.

## Manage a secret

To manage a saved key, select **...** in its row. For example, to rotate an API key, select **Replace value**. To copy the reference that an agent uses to read the key, select **Copy reference**.

## Next steps

- [Bring your own key](/en/ai/platform/studio/build/customize-agent#bring-your-own-key): Use a saved secret for a model.
- [Use your own provider keys](/en/ai/platform/build/use-your-own-keys): Learn how secret sets work with the Platform API.
