Secrets & environment variables
List secret names in agent.yaml; set their values separately. Values are never written to agent.yaml, the agent’s
stored config, logs or the API’s responses.
secrets: [OPENAI_API_KEY, WEATHER_TOKEN]env: LOG_LEVEL: info # plain, non-secret values onlySet values
Section titled “Set values”agent-platform secrets set my-agent OPENAI_API_KEY # hidden promptcat key.txt | agent-platform secrets set my-agent OPENAI_API_KEY # or from stdinagent-platform secrets list my-agent # names onlyagent-platform secrets delete my-agent OPENAI_API_KEYValues are read from a hidden prompt or stdin — never a command-line argument, so they don’t end up in shell history.
You can set secrets before the agent’s first deploy. agent-platform init asks for them as it writes agent.yaml, and the
dashboard’s deploy wizard and assistant builder have a Secrets step.
A deploy stops with a clear message if a listed secret has no value.
How each cloud receives them
Section titled “How each cloud receives them”| Cloud | Delivered as |
|---|---|
| AWS ECS | AWS Secrets Manager, referenced by the task definition |
| AWS Lambda | Encrypted environment variables |
| Google Cloud | Secret Manager |
| Azure | Container Apps secrets |
| On-prem | A root-only env file |
Changing a secret
Section titled “Changing a secret”Set the new value and redeploy. Each deploy saves a snapshot of secret values with its version, so a rollback restores the secrets that version ran with.
Environment variables can also be edited on the agent page in the dashboard.