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.
pcc secrets set my-secrets SECRET_NAME secret-value SECRET_NAME_2 secret-value-2
This command will create or modify the secret set with the name 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.
Copy
Ask AI
pcc secrets set my-secrets SECRET_NAME_3 secret-value-3
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.
Name it (e.g., “pcc-images”) and set permissions (e.g. “Read & Write”)
Copy and save the generated token securely
Step 2: Make Your Docker Hub Image Private
Go to your repository on Docker Hub
Click “Settings”
Under “Visibility,” change from “Public” to “Private”
Save changes
Step 3: Set Up Image Pull Secret in Pipecat Cloud
Copy
Ask AI
# Create image pull secretpcc secrets image-pull-secret my-image-pull-secret https://index.docker.io/v1/# Enter your Docker Hub username when prompted# Enter your access token (not password) when prompted
dockerhub-access is the name of your image pull secret, so name it whatever
you’d like.
Step 4: Deploy Your Agent with the Image Pull SecretUpdate your pcc-deploy.toml file:
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:
If you prefer to manage secrets outside of Pipecat Cloud, you can use environment variables or other secret management tools.You could, for example, set environment variables in your Dockerfile: