.env
Inspect reads .env from the project directory to read environment
variables used for evaluations.
Environment variables are each specified in .env on a single line
using the syntax NAME=VALUE.
For example, you can create .env to define environment variables like
this:
.env
OPENAI_API_KEY=your-api-key ANTHROPIC_API_KEY=your-api-key GOOGLE_API_KEY=your-api-key INSPECT_LOG_DIR=./logs-04-07-2024 INSPECT_LOG_LEVEL=warning INSPECT_EVAL_MAX_RETRIES=5 INSPECT_EVAL_MAX_CONNECTIONS=20 INSPECT_EVAL_MODEL=anthropic/claude-3-5-sonnet-20240620
Gage uses .env to define the active profile using GAGE_PROFILE.
Gage creates
.envif it doesn’t exist with you rungage profile use.
Secrets
Rather than define secrets in .env, we recommend that you use Gage
profiles and secrets. Gage secrets are encrypted and accesible only to
authorized users.
Define profiles in the Gage config file gage.toml.
Define secrets in secrets.json.
Copyright 2025 Gage ML, Inc.