Skip to content

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 only
Terminal window
agent-platform secrets set my-agent OPENAI_API_KEY # hidden prompt
cat key.txt | agent-platform secrets set my-agent OPENAI_API_KEY # or from stdin
agent-platform secrets list my-agent # names only
agent-platform secrets delete my-agent OPENAI_API_KEY

Values 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.

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

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.