Agent Atlas

Atlas · building

Config and secrets

Settings that change between machines, and keys that must never be in the code an agent can read and commit.

Established practiceDepth 2 of 4Reviewed 2026-11-12

In plain words

Some values change from one machine to another, like which database to use. Some are secret, like an API key. Neither belongs written into the code.

How it works

The Twelve-Factor App defines config as everything likely to vary between deploys, and keeps it in environment variables. Hosting platforms store secrets separately: Cloudflare’s Worker secrets are encrypted values for things like API keys and auth tokens. Its docs say the local secret files .dev.vars and .env should not be committed to git.

Going deeper

This matters more with agents. A key that sits in a file the agent reads can end up in its context, and from there in a request to the model provider. See sandboxing.

Sources

  1. The Twelve-Factor App: Config Adam Wiggins
    • An app’s config is everything that is likely to vary between deploys (staging, production, developer environments, etc).
    • The twelve-factor app stores config in environment variables (often shortened to env vars or env).
  2. Secrets Cloudflare
    • Secrets are a type of binding that allow you to attach encrypted text values to your Worker. Secrets are used for storing sensitive information like API keys and auth tokens.
    • The .dev.vars and .env files should not be committed to git.

Quotes were checked against the live pages on 2026-11-12.