A guide for coding agents to configure environment and secrets
Configure environment variables, add Python dependencies, and manage secrets securely in your Autonomy applications.Key Terms: See the definitions section of the main guide.Keywords: environment variables, secrets, python dependencies, docker, configuration This guide shows how to set environment variables, provide secrets securely, and add Python dependencies using multi-stage Docker builds.
Environment Variables and Secrets
Configure environment variables directly in yourautonomy.yaml:
secrets.yaml file:
openssl rand -hex 32
Important: Always add secrets.yaml to your .gitignore:
Multi-Stage Docker Builds for Python Dependencies
When your application requires additional Python packages beyond what the baseautonomy-python image includes, use a multi-stage build approach.
Create a requirements.txt file with your Python dependencies:
images/main/Dockerfile to use multi-stage build:
- Uses the
autonomy-python-devimage (which includes pip), as base, to install dependencies - Then copies the packages you installed to the production image
- Keeps the final image size optimized while having all packages you need

