Reference
Environment variables
Every variable AgentsVille reads, what sets it, and what happens when it is absent. For the order to set them in and why, read Configuration; this page is the lookup.
There is one .env in the repository, at the root. Every app and package reads
that file and no other. Node loads it natively — nothing here depends on the
dotenv package — and a variable already present in the environment always wins
over a line in the file. .env.example is the annotated template.
An empty string counts as unset. A variable set to "" falls back to its
default rather than being read as an empty value.
API server
Validated at boot. A missing or malformed required variable stops the process rather than letting it serve a half-configured instance.
Neither Provider key is required. A Village can run entirely on Providers added
in Settings → Providers — a model on the Operator's own machine needs no key
at all — so there is nothing to check at boot. A Village with no usable model
refuses each Message with NO_MODEL_CONFIGURED or PROVIDER_NOT_CONFIGURED,
and Settings shows which Providers are ready.
Connector OAuth clients
Read dynamically, one pair per service, so adding a service to the catalogue
needs no schema change. The names are the CONNECTOR_OAUTH_PREFIX followed by
the kind in upper case:
A service whose pair is unset is offered in the catalogue as unavailable rather than hidden, so a Player can ask their Operator for it. The other catalogue entries — Composio and Sentry — take a token the Player pastes in and need no variables here.
Each service's redirect URI is PUBLIC_API_URL plus
/api/connectors/<kind>/callback. See
Connecting Linear, Notion and Jira.
Web app
Sandbox broker
Only used with docker compose --profile sandbox, which runs the one service
that holds the Docker socket. Read
The sandbox boundary before enabling it.
These are read by the Docker driver inside the broker:
Read by Docker Compose only
These never reach the application. They are substituted into
docker-compose.yml itself.
Compose also sets NODE_ENV, PORT, DATABASE_URL, VALKEY_URL and
SERVER_URL for its services from fixed values, overriding whatever .env
says for those keys.
Read by the backup script
scripts/backup.sh reads four of its own. They are documented with the script,
in Scripts.