Configuration
Agents uses a combination of environment variables and plugin settings.
Runtime model:
- API routes are the production execution surface.
- CLI commands are operator/developer tools.
- Discovery docs are optional public discovery features.
Environment Variables
Core runtime
PLUGIN_AGENTS_ENV_PROFILE(optional:local|test|staging|production)PLUGIN_AGENTS_ENABLEDPLUGIN_AGENTS_REQUIRE_TOKEN(defaulttrue)PLUGIN_AGENTS_ALLOW_INSECURE_NO_TOKEN_IN_PROD(defaultfalse)PLUGIN_AGENTS_ALLOW_QUERY_TOKEN(defaultfalse)PLUGIN_AGENTS_FAIL_ON_MISSING_TOKEN_IN_PROD(defaulttrue)
Credentials and scopes
PLUGIN_AGENTS_API_TOKENPLUGIN_AGENTS_API_CREDENTIALS(JSON)PLUGIN_AGENTS_TOKEN_SCOPESPLUGIN_AGENTS_ENABLE_USERS_API(defaultfalse)
Lifecycle governance (optional)
PLUGIN_AGENTS_LIFECYCLE_METADATA_MAP(JSON map keyed by credential handle)PLUGIN_AGENTS_LIFECYCLE_STALE_UNUSED_WARN_DAYS(default30)PLUGIN_AGENTS_LIFECYCLE_STALE_UNUSED_CRITICAL_DAYS(default90)PLUGIN_AGENTS_LIFECYCLE_STALE_NEVER_USED_WARN_DAYS(default30)PLUGIN_AGENTS_LIFECYCLE_STALE_NEVER_USED_CRITICAL_DAYS(default90)PLUGIN_AGENTS_LIFECYCLE_ROTATION_WARN_DAYS(default45)PLUGIN_AGENTS_LIFECYCLE_ROTATION_CRITICAL_DAYS(default120)
Privacy and rate limiting
PLUGIN_AGENTS_REDACT_EMAIL(defaulttrue)PLUGIN_AGENTS_RATE_LIMIT_PER_MINUTE(default60)PLUGIN_AGENTS_RATE_LIMIT_WINDOW_SECONDS(default60)
Webhooks
PLUGIN_AGENTS_WEBHOOK_URLPLUGIN_AGENTS_WEBHOOK_SECRETPLUGIN_AGENTS_WEBHOOK_TIMEOUT_SECONDS(default5)PLUGIN_AGENTS_WEBHOOK_MAX_ATTEMPTS(default3)
Experimental surfaces
PLUGIN_AGENTS_WRITES_EXPERIMENTAL(defaultfalse)- Control CP (
agents/control/*) followsPLUGIN_AGENTS_WRITES_EXPERIMENTAL(single gate).
Environment profile defaults
When explicit PLUGIN_AGENTS_* posture vars are unset, runtime defaults are sourced from the active profile:
local:rateLimitPerMinute=300,webhookMaxAttempts=2,webhookTimeoutSeconds=5test:rateLimitPerMinute=300,webhookMaxAttempts=2,webhookTimeoutSeconds=5staging:rateLimitPerMinute=120,webhookMaxAttempts=3,webhookTimeoutSeconds=5production:rateLimitPerMinute=60,webhookMaxAttempts=3,webhookTimeoutSeconds=5
Profile resolution:
PLUGIN_AGENTS_ENV_PROFILEwhen set- otherwise inferred from
ENVIRONMENT/CRAFT_ENVIRONMENT
Runtime precedence:
- explicit env var
- profile default
- built-in fallback
CP Settings
Agents -> Settings controls:
- API availability (
enabled) unless env-locked byPLUGIN_AGENTS_ENABLED - live agent usage indicator (
enableCredentialUsageIndicator) - discovery file switches (
llms.txt,llms-full.txt,commerce.txt) - custom discovery body overrides (
llmsTxtBody,commerceTxtBody) with reset actions
config/agents.php can override these settings; when overridden, CP fields are shown as locked.
Agent policy controls (CP)
Agents -> Agents supports per-agent controls in addition to scopes:
- webhook resource/action subscriptions
- optional credential TTL (days) and reminder window
- IP allowlist (CIDR/IP entries)
Enablement precedence
- If
PLUGIN_AGENTS_ENABLEDis set, it is the source of truth. - Otherwise the plugin setting
enabledcontrols runtime state.