Use this file to discover all available pages before exploring further.
agtOS reads configuration from environment variables, with optional file-based config as a fallback. Environment variables always take precedence over config file values.
Secrets and local overrides. Never committed to git.
2
Load .env
Shared defaults. Can be committed to git.
3
Load JSON config file
~/.agtos/config.json (desktop/user default) or /etc/agtos/config.json (system default), or the path in AGTOS_CONFIG_PATH. Only fills gaps not covered by env vars.
Environment variables set in .env.local or .env override the JSON config file. The JSON file is useful for Docker deployments and for storing model slot configuration.
Voice pipeline WebSocket server (audio streaming, signaling)
PORT
3000
Alias for VOICE_PORT
MCP_PORT
4100
MCP server (Streamable HTTP)
HEALTH_PORT
4102
Health endpoints, REST API, metrics, and dashboard
The Tauri desktop app and web dashboard connect to the same ports via localhost. The health port serves the REST API, Prometheus metrics, static dashboard files, and health checks.
Claude transport mode: sdk (direct API) or cli (spawn claude CLI binary)
Cloud provider selection (Claude vs OpenAI) is no longer configured via environment variable. It is now set per slot in ~/.agtos/config.json via the Model Slot Registry (ADR-020). Run agtos setup to configure slots interactively.
sherpa-onnx is the default provider. These variables tune its behavior. Set STT_PROVIDER=speaches or TTS_PROVIDER=speaches to use the external server instead.
Absolute path to bundled ONNX Runtime binaries. Set automatically by the Tauri sidecar in desktop builds. In development, leave unset — onnxruntime-node resolves from node_modules.
These variables configure independent provider selection for specialized AI tasks (ADR-018). Each task can use a different provider (ollama, claude, or openrouter), allowing you to optimize cost, quality, and privacy per task.
Variable
Default
Description
AGTOS_EMBEDDING_PROVIDER
ollama
Embedding provider (ollama for local, openrouter for cloud)
AGTOS_EMBEDDING_MODEL
nomic-embed-text
Embedding model
AGTOS_CLASSIFIER_PROVIDER
ollama
Intent classification provider
AGTOS_CLASSIFIER_MODEL
— (uses Ollama default)
Intent classification model
AGTOS_CONSOLIDATION_PROVIDER
—
Memory consolidation (Dreamer) provider
AGTOS_CONSOLIDATION_MODEL
—
Memory consolidation model
AGTOS_REASONING_PROVIDER
—
User reasoning (Dialectic) provider
AGTOS_REASONING_MODEL
—
User reasoning model
AGTOS_SUMMARIZATION_PROVIDER
—
Conversation summarization provider
AGTOS_SUMMARIZATION_MODEL
—
Conversation summarization model
OPENROUTER_API_KEY
—
OpenRouter API key (required when using openrouter provider for any task)
OPENROUTER_HTTP_REFERER
—
Attribution header for the OpenRouter leaderboard. Optional.
OPENROUTER_X_TITLE
agtOS
App name header sent to OpenRouter for attribution.
These settings are also configurable at runtime via PUT /api/settings. Changes to provider settings require a provider restart to take effect.
These variables control the periodic memory lint sweep and its background-work gating (ADR-021, ADR-027). See Memory System for the user-facing description.
Variable
Default
Description
AGTOS_MAINTENANCE_ENABLED
true
Kill switch for memory maintenance. Set to false to disable both auto-registered and manually-created schedules, plus any direct event publishes on memory.maintenance.
AGTOS_MAINTENANCE_SCHEDULE
0 3 * * *
Cron expression for the auto-registered memory-maintenance task.
AGTOS_MAINTENANCE_TIMEZONE
UTC
IANA timezone (e.g., America/New_York) used to evaluate the maintenance cron expression. Validated via Intl.DateTimeFormat at startup.
AGTOS_BACKGROUND_WORK_POLICY
auto
ResourceGuard policy: auto (default — runs all checks), always (skip all checks; dedicated GPU hosts), idle-only (stricter 0.3×CPU load threshold; POSIX only).
AGTOS_NLI_ENABLED
true
Kill switch for the NLI cross-encoder (Stage 2) in the 3-stage contradiction pipeline. When false, Stage 2 is skipped and Stage 3 (LLM judge) receives the full candidate list from Stage 1 directly.
AGTOS_NLI_MODEL_SIZE
base
DeBERTa-v3 model variant for the Stage 2 cross-encoder: xsmall, small, base, or disabled. Requires server restart.
AGTOS_NLI_CONTRADICTION_THRESHOLD
0.7
Softmax confidence floor for the NLI contradiction verdict (0.0–1.0). Higher values = fewer false positives. Takes effect immediately.
These variables control model discovery and caching for the ProviderCatalog system (ADR-026).
Variable
Default
Description
AGTOS_PROVIDER_CATALOG_CACHE_TTL_SECONDS
3600
Catalog model-list cache expiry in seconds (default 1 hour). Lower values give fresher model lists but increase upstream API calls. Takes effect immediately.
AGTOS_PROVIDER_CATALOG_AUTO_REFRESH
true
Enable background refresh of cached provider catalogs. Set to false to only fetch catalogs on demand. Requires provider restart.
Redis connection URL. Used for sessions, memory, scheduler, events, devices, and preferences.
REDIS_HOST
—
Alternative to REDIS_URL (host component)
REDIS_PORT
—
Alternative to REDIS_URL (port component)
REDIS_PASSWORD
—
Redis auth password (if using authenticated Redis)
Redis is optional but recommended. Without it, the scheduler, episodic/semantic memory, device registry, and user preferences are disabled. Session management falls back to in-memory storage.
These variables are managed by the Settings API (PUT /api/settings) and the legacy config API (PUT /api/config). They can be changed at runtime without restarting the server.
Variable
Default
Reload Type
Description
AGTOS_TTS_VOICE
af_heart
immediate
TTS voice name
AGTOS_TTS_SPEED
1.0
immediate
TTS speech speed (0.5—2.0)
AGTOS_STT_LANGUAGE
en
provider-restart
STT language code
AGTOS_STT_MODEL
moonshine-tiny-en-int8
provider-restart
STT model ID
AGTOS_STT_STREAMING_MODEL
zipformer-streaming-en-20m
provider-restart
Streaming STT model ID
AGTOS_LLM_PROVIDER
—
provider-restart
Primary LLM provider (claude, ollama, auto)
AGTOS_LLM_MODEL
—
provider-restart
LLM model name
AGTOS_API_RATE_LIMIT
—
immediate
API rate limit per minute (1—1000)
AGTOS_CHAT_RATE_LIMIT
—
immediate
Chat rate limit per minute (1—100)
AGTOS_MEMORY_SEARCH_MODE
hybrid
immediate
Memory search strategy (hybrid, vector, bm25)
AGTOS_MEMORY_QUERY_EXPANSION
false
immediate
Enable Ollama-powered query expansion
AGTOS_VAD_THRESHOLD
0.3
immediate
VAD speech detection threshold (0.0—1.0)
AGTOS_VAD_SENSITIVITY
—
immediate
VAD sensitivity preset (low, medium, high)
AGTOS_AUDIO_INPUT_DEVICE
—
provider-restart
Audio input device ID
AGTOS_MEMORY_RETENTION_DAYS
30
immediate
Memory retention in days (1—365)
AGTOS_NOTIFICATIONS_ENABLED
—
immediate
Enable desktop notifications
AGTOS_PTT_HOTKEY
—
immediate
Push-to-talk hotkey (e.g., Alt+Space)
The API_RATE_LIMIT and CHAT_RATE_LIMIT variables (without the AGTOS_ prefix) are used at server startup. The AGTOS_ prefixed versions are used by the runtime config system for hot-reload. Both control the same behavior — set the non-prefixed versions in .env.local for startup defaults, and use the Settings API to adjust at runtime.
Overrides the machine secret for AES-256-GCM encryption. By default, a 32-byte secret is auto-generated at ~/.agtos/.secret. Set this env var for Docker/CI where filesystem persistence isn’t available.
AGTOS_CREDENTIAL_SALT
— (auto-generated)
Hex-encoded salt for scrypt key derivation. By default, a 32-byte salt is auto-generated at ~/.agtos/.salt. Set this env var for Docker/CI deployments.
AGTOS_CREDENTIAL_PATH
~/.agtos/credentials.json
Path to the AES-256-GCM encrypted credential file.
Credentials are stored encrypted at ~/.agtos/credentials.json with 0o600 permissions. Key derivation uses scrypt (N=16384, r=8, p=1) with AAD binding per provider. The machine secret (~/.agtos/.secret) and salt (~/.agtos/.salt) are auto-generated on first use. For Docker deployments, set AGTOS_CREDENTIAL_SECRET and AGTOS_CREDENTIAL_SALT as environment variables so credentials persist across container restarts.
Generate values for Docker:
# Generate a credential secret (32 random bytes, hex-encoded)node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"# Generate a salt (32 random bytes, hex-encoded)node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Path to JSON config file. Defaults to ~/.agtos/config.json (desktop) or /etc/agtos/config.json (system). File values fill gaps not covered by env vars.
Use host.docker.internal to reach services running on the Docker host (like Ollama or speaches). On Linux, you may need --network=host or extra Docker config instead.