-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
466 lines (363 loc) · 15 KB
/
.env.example
File metadata and controls
466 lines (363 loc) · 15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# =============================================================================
# AUTOBOT MASTER CONFIGURATION - SINGLE SOURCE OF TRUTH
# =============================================================================
# AutoBot - AI-Powered Automation Platform
# Copyright (c) 2025 mrveiss
# Author: mrveiss
#
# Version: 1.0.0
# Issue: #599 - SSOT Configuration System Epic
# Issue: #601 - SSOT Phase 1: Foundation
#
# This file defines ALL configuration for AutoBot.
# All other configuration files derive from these values.
#
# USAGE:
# 1. Copy this file to .env: cp .env.example .env
# 2. Adjust values for your environment
# 3. Run: ./scripts/sync-env.sh to generate frontend .env
#
# NAMING CONVENTION: AUTOBOT_{CATEGORY}_{NAME}
# Categories: DEPLOYMENT, VM, PORT, LLM, REDIS, TIMEOUT, FEATURE, SECURITY
# =============================================================================
# =============================================================================
# DEPLOYMENT MODE CONFIGURATION
# =============================================================================
# Deployment mode determines infrastructure layout:
# - hybrid: Mixed local/distributed (default for development)
# - distributed: Full 6-VM deployment (production)
# - local: All services on localhost (simple setup)
AUTOBOT_DEPLOYMENT_MODE=hybrid
# Environment type (development, staging, production)
AUTOBOT_ENVIRONMENT=development
# Debug mode (enables detailed logging)
AUTOBOT_DEBUG=true
# Log level (DEBUG, INFO, WARNING, ERROR)
AUTOBOT_LOG_LEVEL=INFO
# =============================================================================
# NETWORK INFRASTRUCTURE (6-VM Architecture)
# =============================================================================
# IP addresses for the distributed VM infrastructure.
# For local development, use 127.0.0.x addresses.
# For distributed deployment, use actual VM IPs.
#
# Default VM Layout:
# Main (WSL) - 172.16.168.20 - Backend API + VNC Desktop
# VM1 Frontend - 172.16.168.21 - Web interface
# VM2 NPU Worker - 172.16.168.22 - Hardware AI acceleration
# VM3 Redis - 172.16.168.23 - Data layer
# VM4 AI Stack - 172.16.168.24 - AI processing
# VM5 Browser - 172.16.168.25 - Web automation (Playwright)
# Main Machine (WSL) - Backend API + VNC Desktop
AUTOBOT_BACKEND_HOST=172.16.168.20
# VM1 Frontend - Web interface (SINGLE FRONTEND SERVER)
AUTOBOT_FRONTEND_HOST=172.16.168.21
# VM2 NPU Worker - Hardware AI acceleration
AUTOBOT_NPU_WORKER_HOST=172.16.168.22
# VM3 Redis - Data layer
AUTOBOT_REDIS_HOST=172.16.168.23
# VM4 AI Stack - AI processing (Ollama, etc.)
AUTOBOT_AI_STACK_HOST=172.16.168.24
# VM5 Browser - Web automation (Playwright)
AUTOBOT_BROWSER_SERVICE_HOST=172.16.168.25
# Ollama host (typically localhost or AI Stack VM)
AUTOBOT_OLLAMA_HOST=127.0.0.1
# =============================================================================
# SERVICE PORTS
# =============================================================================
# Standard ports for all AutoBot services.
# Backend API port
AUTOBOT_BACKEND_PORT=8001
# Frontend web interface port
AUTOBOT_FRONTEND_PORT=5173
# Redis port
AUTOBOT_REDIS_PORT=6379
# Ollama LLM API port
AUTOBOT_OLLAMA_PORT=11434
# AI Stack port
AUTOBOT_AI_STACK_PORT=8080
# NPU Worker port
AUTOBOT_NPU_WORKER_PORT=8081
# Browser automation service port
AUTOBOT_BROWSER_SERVICE_PORT=3000
# VNC desktop port
AUTOBOT_VNC_PORT=6080
# Prometheus monitoring port
AUTOBOT_PROMETHEUS_PORT=9090
# Grafana dashboard port
AUTOBOT_GRAFANA_PORT=3000
# =============================================================================
# SERVICE URLs (Computed from hosts and ports)
# =============================================================================
# These are computed by the SSOT loaders, but can be overridden if needed.
AUTOBOT_BACKEND_URL=http://172.16.168.20:8001
AUTOBOT_FRONTEND_URL=http://172.16.168.21:5173
AUTOBOT_REDIS_URL=redis://172.16.168.23:6379
AUTOBOT_OLLAMA_URL=http://127.0.0.1:11434
AUTOBOT_AI_STACK_URL=http://172.16.168.24:8080
AUTOBOT_NPU_WORKER_URL=http://172.16.168.22:8081
AUTOBOT_BROWSER_SERVICE_URL=http://172.16.168.25:3000
AUTOBOT_WS_URL=ws://172.16.168.20:8001/ws
# =============================================================================
# REDIS DATABASE CONFIGURATION
# =============================================================================
# Redis database assignments for different data types.
# Each database is isolated for specific functionality.
AUTOBOT_REDIS_DB_MAIN=0
AUTOBOT_REDIS_DB_KNOWLEDGE=1
AUTOBOT_REDIS_DB_PROMPTS=2
AUTOBOT_REDIS_DB_AGENTS=3
AUTOBOT_REDIS_DB_METRICS=4
AUTOBOT_REDIS_DB_CACHE=5
AUTOBOT_REDIS_DB_SESSIONS=6
AUTOBOT_REDIS_DB_TASKS=7
AUTOBOT_REDIS_DB_LOGS=8
AUTOBOT_REDIS_DB_TEMP=9
AUTOBOT_REDIS_DB_BACKUP=10
AUTOBOT_REDIS_DB_TESTING=15
# Redis authentication (leave empty if no password)
AUTOBOT_REDIS_PASSWORD=
# =============================================================================
# LLM MODEL CONFIGURATION - SINGLE SOURCE OF TRUTH
# =============================================================================
# All model references in the codebase read from these environment variables.
# Change models here - they will be used across the entire application.
#
# Available Ollama models (run: ollama list):
# - llama3.2:1b (1.3GB) - Fast, lightweight
# - qwen3.5:9b (4.4GB) - Balanced quality (RECOMMENDED)
# - dolphin-llama3:8b (4.7GB) - High quality
# - qwen2.5-coder:7b (4.7GB) - Code generation
# - nomic-embed-text (274MB) - Embeddings only
# Default model - used for all tasks unless overridden
AUTOBOT_DEFAULT_LLM_MODEL=qwen3.5:9b
# Specialized models by role (all default to AUTOBOT_DEFAULT_LLM_MODEL if not set)
AUTOBOT_EMBEDDING_MODEL=nomic-embed-text:latest
AUTOBOT_CLASSIFICATION_MODEL=qwen3.5:9b
AUTOBOT_REASONING_MODEL=qwen3.5:9b
AUTOBOT_RAG_MODEL=qwen3.5:9b
AUTOBOT_CODING_MODEL=qwen3.5:9b
# Agent/workflow models
AUTOBOT_ORCHESTRATOR_MODEL=qwen3.5:9b
AUTOBOT_AGENT_MODEL=qwen3.5:9b
AUTOBOT_RESEARCH_MODEL=qwen3.5:9b
AUTOBOT_ANALYSIS_MODEL=qwen3.5:9b
AUTOBOT_PLANNING_MODEL=qwen3.5:9b
# LLM provider (ollama, openai, anthropic)
AUTOBOT_LLM_PROVIDER=ollama
# LLM request timeout in seconds
AUTOBOT_LLM_TIMEOUT=30
# =============================================================================
# TIMEOUT CONFIGURATION
# =============================================================================
# Timeouts in milliseconds (ms) unless otherwise noted.
# API request timeout (ms)
AUTOBOT_API_TIMEOUT=10000
# WebSocket timeout (seconds)
AUTOBOT_WEBSOCKET_TIMEOUT=30
# Health check timeout (seconds)
AUTOBOT_HEALTH_CHECK_TIMEOUT=3
# Maximum concurrent requests
AUTOBOT_MAX_CONCURRENT_REQUESTS=50
# =============================================================================
# FEATURE FLAGS
# =============================================================================
# Enable/disable various features.
# Use unified configuration system
AUTOBOT_USE_UNIFIED_CONFIG=true
# Enable semantic chunking for documents
AUTOBOT_SEMANTIC_CHUNKING=true
# Enable debug mode for detailed logging
AUTOBOT_DEBUG_MODE=true
# Enable hot reload for development
AUTOBOT_HOT_RELOAD=true
# Single user mode (no authentication)
AUTOBOT_SINGLE_USER_MODE=true
# =============================================================================
# VNC CONFIGURATION
# =============================================================================
# VNC desktop and terminal configuration.
AUTOBOT_VNC_PASSWORD=<GENERATE_SECURE_PASSWORD>
# =============================================================================
# SECURITY CONFIGURATION
# =============================================================================
# Security-related settings.
# Service authentication enforcement
SERVICE_AUTH_ENFORCEMENT_MODE=true
# Service identity
SERVICE_ID=main-backend
SERVICE_KEY_FILE=/home/kali/.autobot/service-keys/main-backend.env
# =============================================================================
# TLS / mTLS CONFIGURATION (Issue #725)
# =============================================================================
# Transport Layer Security settings for secure service communication.
#
# TLS Modes:
# - disabled: No TLS (default, for development)
# - optional: TLS available but not enforced (migration phase)
# - required: TLS required for all connections (production)
#
# Migration Path:
# 1. Start with disabled (development)
# 2. Switch to optional + generate certs (test TLS)
# 3. Switch to required + disable plain ports (production mTLS)
# TLS Mode (disabled, optional, required)
AUTOBOT_TLS_MODE=disabled
# Certificate directory (relative to project root or absolute path)
AUTOBOT_TLS_CERT_DIR=certs
# CA Certificate path
AUTOBOT_TLS_CA_CERT=certs/ca/ca-cert.pem
# Remote certificate directory on VMs
AUTOBOT_TLS_REMOTE_CERT_DIR=/etc/autobot/certs
# Redis TLS Settings
AUTOBOT_REDIS_TLS_ENABLED=false
AUTOBOT_REDIS_TLS_PORT=6380
AUTOBOT_REDIS_TLS_AUTH_CLIENTS=optional
AUTOBOT_REDIS_TLS_DISABLE_PLAIN=false
# Certificate Source: 'local' (files on controller) or 'slm-api' (fetch from SLM API)
AUTOBOT_TLS_SOURCE=local
# SLM API for certificate management (when AUTOBOT_TLS_SOURCE=slm-api)
# SLM_API_URL=http://172.16.168.19:8000
# SLM_API_TOKEN=<your-auth-token>
# REDIS_TLS_CREDENTIAL_ID=<credential-id-from-slm>
# Backend TLS (HTTPS for FastAPI)
AUTOBOT_BACKEND_TLS_ENABLED=false
AUTOBOT_BACKEND_TLS_PORT=8443
# =============================================================================
# CELERY CONFIGURATION (Task Queue)
# =============================================================================
# Celery broker and result backend using Redis.
# When AUTOBOT_REDIS_TLS_ENABLED=true, use rediss:// protocol and port 6380
CELERY_BROKER_URL=redis://172.16.168.23:6379/1
CELERY_RESULT_BACKEND=redis://172.16.168.23:6379/2
# For TLS: CELERY_BROKER_URL=rediss://172.16.168.23:6380/1
# For TLS: CELERY_RESULT_BACKEND=rediss://172.16.168.23:6380/2
# =============================================================================
# HARDWARE ACCELERATION
# =============================================================================
# TensorFlow/Keras compatibility settings.
TF_USE_LEGACY_KERAS=1
KERAS_BACKEND=tensorflow
# =============================================================================
# CHROMADB CONFIGURATION
# =============================================================================
# Vector database settings.
ANONYMIZED_TELEMETRY=False
# =============================================================================
# CONTEXTUAL RETRIEVAL (Issue #1498)
# =============================================================================
# Prepends LLM-generated context to each chunk before embedding.
# Reported +35% retrieval improvement. Disabled by default (zero behavior change).
# Enable contextual retrieval enrichment
CONTEXT_ENABLED=false
# LLM model for context generation (lightweight model recommended)
CONTEXT_MODEL=llama3.2:3b
# Days to cache per-document summaries in Redis (key: context:summary:{doc_id})
CONTEXT_SUMMARY_TTL_DAYS=30
# Max tokens for document text sent to summary LLM
CONTEXT_MAX_TOKENS=150
# =============================================================================
# FRONTEND ENVIRONMENT VARIABLES (VITE_*)
# =============================================================================
# These are auto-generated by ./scripts/sync-env.sh
# Do NOT edit directly - update the AUTOBOT_* variables above instead.
#
# Run: ./scripts/sync-env.sh to regenerate autobot-vue/.env
VITE_BACKEND_HOST=172.16.168.20
VITE_BACKEND_PORT=8001
VITE_FRONTEND_HOST=172.16.168.21
VITE_FRONTEND_PORT=5173
VITE_REDIS_HOST=172.16.168.23
VITE_REDIS_PORT=6379
VITE_OLLAMA_HOST=127.0.0.1
VITE_OLLAMA_PORT=11434
VITE_AI_STACK_HOST=172.16.168.24
VITE_AI_STACK_PORT=8080
VITE_NPU_WORKER_HOST=172.16.168.22
VITE_NPU_WORKER_PORT=8081
VITE_BROWSER_HOST=172.16.168.25
VITE_BROWSER_PORT=3000
VITE_HTTP_PROTOCOL=http
# VNC Configuration
VITE_DESKTOP_VNC_HOST=172.16.168.20
VITE_DESKTOP_VNC_PORT=6080
VITE_DESKTOP_VNC_PASSWORD=autobot
VITE_TERMINAL_VNC_HOST=172.16.168.20
VITE_TERMINAL_VNC_PORT=6080
VITE_TERMINAL_VNC_PASSWORD=autobot
VITE_PLAYWRIGHT_VNC_HOST=172.16.168.25
VITE_PLAYWRIGHT_VNC_PORT=6081
VITE_PLAYWRIGHT_VNC_PASSWORD=playwright
# API Configuration
VITE_API_TIMEOUT=60000
VITE_KNOWLEDGE_TIMEOUT=300000
VITE_API_RETRY_ATTEMPTS=3
VITE_API_RETRY_DELAY=1000
VITE_ENABLE_DEBUG=true
VITE_ENABLE_RUM=true
VITE_DISABLE_CACHE=false
# VM Infrastructure IPs (for multi-host deployments)
VITE_VM0_IP=172.16.168.20
VITE_VM1_IP=172.16.168.21
VITE_VM2_IP=172.16.168.22
VITE_VM3_IP=172.16.168.23
VITE_VM4_IP=172.16.168.24
VITE_VM5_IP=172.16.168.25
# =============================================================================
# LEGACY COMPATIBILITY VARIABLES
# =============================================================================
# These are provided for backward compatibility with older code.
# New code should use AUTOBOT_* variables via the SSOT config loaders.
REDIS_HOST=172.16.168.23
REDIS_PORT=6379
OLLAMA_HOST=127.0.0.1
OLLAMA_PORT=11434
# =============================================================================
# OPTIONAL: USER MANAGEMENT & POSTGRESQL (Issue #576)
# =============================================================================
# Uncomment and configure for multi-user deployments.
#
# User management mode:
# single_user - No authentication, personal use (default)
# single_company - Single organization, teams enabled
# multi_company - Multiple organizations with isolation
# provider - SaaS mode with billing and self-signup
#
# AUTOBOT_USER_MODE=single_user
#
# PostgreSQL Configuration (required for non-single_user modes)
# AUTOBOT_POSTGRES_HOST=172.16.168.23
# AUTOBOT_POSTGRES_PORT=5432
# AUTOBOT_POSTGRES_DB=autobot
# AUTOBOT_POSTGRES_USER=autobot
# AUTOBOT_POSTGRES_PASSWORD=<GENERATE_SECURE_PASSWORD>
# =============================================================================
# OPENTELEMETRY DISTRIBUTED TRACING (Issue #697)
# =============================================================================
# Configure OpenTelemetry for distributed tracing across the 6-VM infrastructure.
# Traces are exported to Jaeger running on the Redis VM.
# Jaeger OTLP endpoint (default: Redis VM port 4317)
AUTOBOT_JAEGER_ENDPOINT=http://172.16.168.23:4317
# Trace sampling rate (0.0-1.0)
# 1.0 = trace everything (development)
# 0.1 = trace 10% of requests (production recommended)
AUTOBOT_TRACE_SAMPLE_RATE=1.0
# Enable console span export for debugging
AUTOBOT_TRACE_CONSOLE=false
# =============================================================================
# OPTIONAL: ALERT NOTIFICATION (Issue #69)
# =============================================================================
# Uncomment and configure for Prometheus AlertManager integration.
#
# Email Notifications (SMTP)
# ALERT_EMAIL_USERNAME=autobot-alerts@example.com
# ALERT_EMAIL_PASSWORD=<YOUR_SMTP_PASSWORD>
# ALERT_EMAIL_TO=ops-team@example.com
#
# Slack Notifications
# ALERT_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
#
# Alert Thresholds
# ALERT_ERROR_RATE_THRESHOLD=0.05
# ALERT_COOLDOWN_SECONDS=300
# ALERT_CIRCUIT_BREAKER_FAILURE_WARNING=3