Most agents will require access to sensitive information, such as API keys, passwords, and other secrets. To keep this information secure, we recommend using Pipecat Cloud’s secret management feature. Secrets are created as “sets” of key-value pairs, and defined at the user / organization level. This means that secrets can be shared across all agent deployments within the same user workspace or organization. To access secrets, your deployment must specify the secret set to use.Documentation Index
Fetch the complete documentation index at: https://daily-docs-pr-4424.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Working with secrets
Secrets can be managed via either the CLI or the Dashboard .Creating a secret set and adding secrets
my-secrets, and add or update the key-value pairs SECRET_NAME and SECRET_NAME_2.
You can add additional secrets to the set by specifying more key-value pairs.
Whenever a secret is added or updated in an existing set, any deployments
using that set will need to be redeployed to access the new values.
Regions
Secret sets are created in a specific region. By default, secrets are created inus-west if no region is specified.
Special characters
There are several ways to specify key-value pairs:-
Simple values (no spaces or special characters):
-
Values with spaces:
-
Values containing equals signs:
-
Values containing quotes:
-
Values containing backslashes:
Important Notes
- Keys must contain only alphanumeric characters, underscores, and hyphens (
[a-zA-Z0-9_-]) - Keys must not exceed 64 characters in length
- Values are preserved exactly as entered, including any spaces, quotes, or special characters
- If a value contains spaces, you must either:
- Enclose the value in quotes:
KEY="value with spaces" - Enclose the entire key-value pair in quotes:
"KEY=value with spaces"
- Enclose the value in quotes:
- When using quotes within values, you can either:
- Use single quotes around the pair containing double quotes:
'KEY=value "quoted" here' - Use escaped double quotes:
KEY="value \"quoted\" here"
- Use single quotes around the pair containing double quotes:
List secret sets
You can view a list of available secret sets in your currently selected workspace or organization.Removing a secret
To remove a secret from a set, use theunset command.
delete command:
Image pull secrets
Image pull secrets are only needed when deploying from your own container
registry. If you’re using cloud builds,
you can skip this section.
username:token and base64-encodes them before
storing the image pull secret. If you create an image pull secret through the
dashboard or API, the auth value must already be base64-encoded.
Like regular secret sets, image pull secrets are region-specific. Specify the region with the --region flag:
pcc-deploy.toml:
To update an image pull secret’s credentials, simply re-run the
image-pull-secret command with the same name. Image pull secrets must be in
the same region as the agents that use them.Accessing secrets in your agent code
Secrets are mounted as environment variables in your agent process. For example, if you define a secret with the key MY_SECRET, you can access it in your agent code like so:- Specify a secret set as part of your deploy command:
- Specify a
secret_setkey in yourpcc-deploy.tomlfile: