Configuring the workbench

August 31, 2026 · View on GitHub

This is the map of where a configuration value lives in agents-server. There are three planes, and which one a value is on is a rule, not a habit (workbench invariant 54):

PlaneSet byChanged byFor
Process flagsagents-server --flag …restartwhat must be fixed for the process's life
EnvironmentAGENTS_* env varrestartkeeping a secret off the command line
Runtime settingsSettings panel / APIlive, no restartwhat an operator tunes while running

The SDK the workbench embeds has its own, separate rule: it reads no environment variable of its own — everything is passed in (spec §2.14, SDK config). The only model-backend key from the environment is openai-go's OPENAI_API_KEY, and that is the provider's, not the server's.

Authoritative defaults live at the source, not here: run agents-server --help for the flags, and open the Settings panel (or read internal/settings/registry.go) for the runtime settings. This page is the map and the reasons; the values below are a convenience copy.

Process flags

A value is a flag when it must be fixed for the process's life — for one of two reasons. (A cap the SDK consumes is not one of them: see the runtime settings below, and invariant 54.)

Needed before the DB and API exist (bind, storage, identity bootstrap):

FlagDefaultMeaning
--host127.0.0.1Bind address (0.0.0.0 for LAN)
--port9527HTTP port
--dbdata.dbSQLite path, or a postgres:// DSN
--base-urlPublic origin of this server (required behind a proxy for OAuth)
--authtokentoken (one static token) or oauth (per-user login)
--oauth-google-client-idEnables the Google login provider
--oauth-google-client-secretGoogle secret (or env, below)
--allowed-domainsComma-separated email domains admitted to OAuth
--allowed-emailsComma-separated emails admitted to OAuth
--bootstrap-adminEmail that signs in as admin (the recovery hatch)
--secret-key-fileFile holding the 32-byte key that seals stored credentials (or env, below)
--log-levelinfodebug / info / warn / error
--log-formattexttext / json

Security-load-bearing — mutating it through the running API would defeat its purpose:

FlagDefaultMeaning
--tokenauto-generatedThe static auth token (or env, below). A secret, never API-settable
--trusted-proxiesnoneProxy IPs/CIDRs whose X-Forwarded-For is believed
--audit-retention-days0 (keep forever)Prune audit entries older than N days — the log of config changes must not be shortened through the API it records

Environment variables

The server reads env vars for one purpose: keeping a secret off argv/ps. Each is the fallback of an explicit flag (flag wins, then env), never a standalone knob. There is no viper-style "every flag is also an env var".

VariableFlag it backsHolds
AGENTS_TOKEN--tokenThe static auth token
AGENTS_SECRET_KEY--secret-key-fileThe 32-byte credential-sealing key (base64 or hex)
AGENTS_OAUTH_GOOGLE_CLIENT_SECRET--oauth-google-client-secretThe Google OAuth client secret

Runtime settings

Everything an operator tunes live, without a restart — enforced by a server loop that re-reads it, so a change takes effect on the next run, tick or connect. Every key is one entry in the settings registry (invariant 40); the panel, masking and validation all derive from it. Current keys:

KeyDefaultMeaning
proxy_urlRoute all outbound API/MCP HTTP through this proxy
system_promptInstructions prepended to all agents
trace_retention_days30Prune trace events older than N days (0 keeps everything)
trace_include_sensitive_datatrueRecord prompts/outputs/tool args in stored traces
trace_span_data_kb8192How much of a span's request/response is stored
log_sensitive_datafalseInclude conversation content in the SDK's own log records
approval_ttl_minutes1440How long a run waits for tool approval before expiring (0 disables)
max_tasks_per_session6Concurrent live background tasks per session; read at each spawn (feeds the SDK's tasks.Config.MaxConcurrentPerParent resolver)
max_terminals_per_sandbox4Concurrent interactive terminals on one sandbox
sandbox_idle_minutes30Stop a project's container after N idle minutes (0 disables)