# ============================================================================= # RuvBot Environment Configuration # ============================================================================= # Copy this file to .env and configure your settings # All variables are optional unless marked as REQUIRED # ============================================================================= # Core Configuration # ============================================================================= # Bot instance name (used in logs and multi-tenant scenarios) RUVBOT_NAME=my-ruvbot # API server port (default: 3000) RUVBOT_PORT=3000 # Log level: debug, info, warn, error (default: info) RUVBOT_LOG_LEVEL=info # Enable debug mode (default: false) RUVBOT_DEBUG=false # Environment: development, staging, production (default: development) NODE_ENV=development # ============================================================================= # LLM Provider Configuration (at least one REQUIRED for AI features) # ============================================================================= # Anthropic Claude (RECOMMENDED) ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxx # OpenRouter (alternative - access to multiple models) OPENROUTER_API_KEY=sk-or-xxxxxxxxxxxxxxxxxxxxx OPENROUTER_DEFAULT_MODEL=anthropic/claude-3.5-sonnet # OpenAI (optional) OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxx # Google AI (optional) GOOGLE_API_KEY=xxxxxxxxxxxxxxxxxxxxx # QwQ Reasoning Model (optional - for advanced reasoning tasks) QWQ_API_KEY=xxxxxxxxxxxxxxxxxxxxx QWQ_MODEL=qwq-32b-preview # ============================================================================= # Database Configuration # ============================================================================= # Storage type: sqlite, postgres, memory (default: sqlite) RUVBOT_STORAGE_TYPE=sqlite # SQLite database path (when using sqlite) RUVBOT_SQLITE_PATH=./data/ruvbot.db # PostgreSQL connection (when using postgres) # Format: postgresql://user:password@host:port/database DATABASE_URL=postgresql://ruvbot:password@localhost:5432/ruvbot # PostgreSQL individual settings (alternative to DATABASE_URL) POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_USER=ruvbot POSTGRES_PASSWORD=your-secure-password POSTGRES_DATABASE=ruvbot # ============================================================================= # Redis Configuration (optional - for caching and queues) # ============================================================================= # Redis connection URL REDIS_URL=redis://localhost:6379 # Redis individual settings (alternative to REDIS_URL) REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD= # ============================================================================= # Vector Memory Configuration # ============================================================================= # Embedding dimensions (default: 384 for MiniLM) RUVBOT_EMBEDDING_DIM=384 # Maximum vectors to store (default: 100000) RUVBOT_MAX_VECTORS=100000 # HNSW index parameters RUVBOT_HNSW_M=16 RUVBOT_HNSW_EF_CONSTRUCTION=200 RUVBOT_HNSW_EF_SEARCH=50 # Memory persistence path RUVBOT_MEMORY_PATH=./data/memory # ============================================================================= # Channel Adapters # ============================================================================= # Slack Integration SLACK_BOT_TOKEN=xoxb-xxxxxxxxxxxxxxxxxxxxx SLACK_APP_TOKEN=xapp-xxxxxxxxxxxxxxxxxxxxx SLACK_SIGNING_SECRET=xxxxxxxxxxxxxxxxxxxxx # Discord Integration DISCORD_BOT_TOKEN=xxxxxxxxxxxxxxxxxxxxx DISCORD_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxx DISCORD_GUILD_ID=xxxxxxxxxxxxxxxxxxxxx # Telegram Integration TELEGRAM_BOT_TOKEN=xxxxxxxxxxxxxxxxxxxxx # Webhook endpoint (for custom integrations) WEBHOOK_SECRET=your-webhook-secret WEBHOOK_ENDPOINT=/api/webhooks # ============================================================================= # Security Configuration # ============================================================================= # Enable AI Defense (prompt injection protection) RUVBOT_AIDEFENCE_ENABLED=true # AI Defense threat blocking threshold: none, low, medium, high, critical RUVBOT_AIDEFENCE_THRESHOLD=medium # Enable PII detection and masking RUVBOT_PII_DETECTION=true # Enable audit logging RUVBOT_AUDIT_LOG=true # API authentication secret (for API endpoints) RUVBOT_API_SECRET=your-api-secret-key # JWT secret (for token-based auth) RUVBOT_JWT_SECRET=your-jwt-secret-key # Allowed origins for CORS (comma-separated) RUVBOT_CORS_ORIGINS=http://localhost:3000,http://localhost:5173 # ============================================================================= # Plugin Configuration # ============================================================================= # Enable plugin system RUVBOT_PLUGINS_ENABLED=true # Plugin directory path RUVBOT_PLUGINS_DIR=./plugins # Auto-load plugins on startup RUVBOT_PLUGINS_AUTOLOAD=true # Maximum plugins allowed RUVBOT_PLUGINS_MAX=50 # IPFS gateway for plugin registry (optional) RUVBOT_IPFS_GATEWAY=https://ipfs.io # ============================================================================= # Swarm/Multi-Agent Configuration # ============================================================================= # Enable swarm coordination RUVBOT_SWARM_ENABLED=false # Swarm topology: hierarchical, mesh, ring, star RUVBOT_SWARM_TOPOLOGY=hierarchical # Maximum agents in swarm RUVBOT_SWARM_MAX_AGENTS=8 # Consensus algorithm: byzantine, raft, gossip RUVBOT_SWARM_CONSENSUS=raft # ============================================================================= # GCP Deployment (optional - for cloud deployment) # ============================================================================= # GCP Project ID GCP_PROJECT_ID=your-project-id # GCP Region GCP_REGION=us-central1 # Cloud Run service name GCP_SERVICE_NAME=ruvbot # Cloud SQL instance connection name GCP_SQL_CONNECTION=project:region:instance # Secret Manager prefix GCP_SECRET_PREFIX=ruvbot # ============================================================================= # Monitoring & Observability # ============================================================================= # Enable metrics collection RUVBOT_METRICS_ENABLED=true # Metrics endpoint path RUVBOT_METRICS_PATH=/metrics # Enable health check endpoint RUVBOT_HEALTH_ENABLED=true # Health check path RUVBOT_HEALTH_PATH=/health # OpenTelemetry endpoint (optional) OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 # Sentry DSN (optional - for error tracking) SENTRY_DSN=https://xxx@sentry.io/xxx # ============================================================================= # Development Options # ============================================================================= # Enable hot reload (development only) RUVBOT_HOT_RELOAD=false # Mock LLM responses (for testing without API calls) RUVBOT_MOCK_LLM=false # Verbose SQL logging RUVBOT_SQL_LOGGING=false # Skip SSL verification (development only - NEVER in production) NODE_TLS_REJECT_UNAUTHORIZED=1