|
| 1 | +# ============================================ |
| 2 | +# AI COMMS — Environment Variables |
| 3 | +# Copy this to .env and fill in your keys |
| 4 | +# ============================================ |
| 5 | + |
| 6 | +# --- AI Provider API Keys (fill in the ones you want to use) --- |
| 7 | + |
| 8 | +# Which provider to use: openai | anthropic | google | mistral | cohere | groq | ollama | deepseek | xai | perplexity | together | fireworks | codex | copilot | claude-code | claude-cowork | nvidia-nim | openclaw |
| 9 | +AI_PROVIDER=openai |
| 10 | + |
| 11 | +# OpenAI (GPT-4o, GPT-4, GPT-3.5) |
| 12 | +OPENAI_API_KEY= |
| 13 | +OPENAI_MODEL=gpt-4o |
| 14 | + |
| 15 | +# Anthropic (Claude 4, Claude 3.5 Sonnet, etc.) |
| 16 | +ANTHROPIC_API_KEY= |
| 17 | +ANTHROPIC_MODEL=claude-sonnet-4-20250514 |
| 18 | + |
| 19 | +# Google Gemini |
| 20 | +GOOGLE_API_KEY= |
| 21 | +GOOGLE_MODEL=gemini-2.0-flash |
| 22 | + |
| 23 | +# Mistral AI |
| 24 | +MISTRAL_API_KEY= |
| 25 | +MISTRAL_MODEL=mistral-large-latest |
| 26 | + |
| 27 | +# Cohere (Command R+) |
| 28 | +COHERE_API_KEY= |
| 29 | +COHERE_MODEL=command-r-plus |
| 30 | + |
| 31 | +# Groq (fast inference — LLaMA, Mixtral) |
| 32 | +GROQ_API_KEY= |
| 33 | +GROQ_MODEL=llama-3.3-70b-versatile |
| 34 | + |
| 35 | +# Ollama (local LLMs — no API key needed) |
| 36 | +OLLAMA_BASE_URL=http://localhost:11434 |
| 37 | +OLLAMA_MODEL=llama3 |
| 38 | + |
| 39 | +# DeepSeek |
| 40 | +DEEPSEEK_API_KEY= |
| 41 | +DEEPSEEK_MODEL=deepseek-chat |
| 42 | + |
| 43 | +# xAI (Grok) |
| 44 | +XAI_API_KEY= |
| 45 | +XAI_MODEL=grok-2-latest |
| 46 | + |
| 47 | +# Perplexity |
| 48 | +PERPLEXITY_API_KEY= |
| 49 | +PERPLEXITY_MODEL=sonar-pro |
| 50 | + |
| 51 | +# Together AI (open-source models hosted) |
| 52 | +TOGETHER_API_KEY= |
| 53 | +TOGETHER_MODEL=meta-llama/Llama-3-70b-chat-hf |
| 54 | + |
| 55 | +# Fireworks AI |
| 56 | +FIREWORKS_API_KEY= |
| 57 | +FIREWORKS_MODEL=accounts/fireworks/models/llama-v3p1-70b-instruct |
| 58 | + |
| 59 | +# OpenAI Codex (code-optimized) |
| 60 | +CODEX_API_KEY= |
| 61 | +CODEX_MODEL=o4-mini |
| 62 | + |
| 63 | +# GitHub Copilot / GitHub Models |
| 64 | +# Get a token at https://github.com/settings/tokens (needs copilot scope) |
| 65 | +COPILOT_TOKEN= |
| 66 | +COPILOT_MODEL=gpt-4o |
| 67 | +COPILOT_BASE_URL=https://models.github.ai/inference |
| 68 | + |
| 69 | +# Claude Code (Anthropic's agentic coding model) |
| 70 | +CLAUDE_CODE_API_KEY= |
| 71 | +CLAUDE_CODE_MODEL=claude-sonnet-4-20250514 |
| 72 | +CLAUDE_CODE_MAX_TOKENS=16384 |
| 73 | +CLAUDE_CODE_THINKING_BUDGET=10000 |
| 74 | + |
| 75 | +# Claude Cowork (Anthropic's collaborative agent) |
| 76 | +CLAUDE_COWORK_API_KEY= |
| 77 | +CLAUDE_COWORK_MODEL=claude-sonnet-4-20250514 |
| 78 | +CLAUDE_COWORK_MAX_TOKENS=8192 |
| 79 | +CLAUDE_COWORK_THINKING_BUDGET=8000 |
| 80 | + |
| 81 | +# NVIDIA NIM / NemoClaw (open source models via NVIDIA inference) |
| 82 | +# Get an API key at https://build.nvidia.com |
| 83 | +NVIDIA_API_KEY= |
| 84 | +NVIDIA_NIM_BASE_URL=https://integrate.api.nvidia.com/v1 |
| 85 | +NVIDIA_NIM_MODEL=nvidia/nemotron-3-super-120b-a12b |
| 86 | +NVIDIA_NIM_MAX_TOKENS=4096 |
| 87 | + |
| 88 | +# OpenClaw (personal AI assistant — https://openclaw.ai) |
| 89 | +# Connects to a running OpenClaw Gateway instance |
| 90 | +OPENCLAW_BASE_URL=http://localhost:18789 |
| 91 | +OPENCLAW_AUTH_TOKEN= |
| 92 | +OPENCLAW_SESSION=main |
| 93 | +OPENCLAW_MODEL=default |
| 94 | + |
| 95 | +# --- Security --- |
| 96 | + |
| 97 | +# Allowlist — comma-separated phone numbers or Teams IDs that can use the bot |
| 98 | +# Leave empty to allow everyone. Set SECURITY_ENABLE_ALLOWLIST=true to activate. |
| 99 | +SECURITY_ENABLE_ALLOWLIST=false |
| 100 | +SECURITY_ALLOWLIST= |
| 101 | +SECURITY_BLOCKLIST= |
| 102 | + |
| 103 | +# Rate limiting (on by default) — max messages per sender per window |
| 104 | +SECURITY_ENABLE_RATE_LIMIT=true |
| 105 | +SECURITY_RATE_LIMIT_MAX=20 |
| 106 | +SECURITY_RATE_LIMIT_WINDOW_MS=60000 |
| 107 | + |
| 108 | +# Max message length (chars) |
| 109 | +SECURITY_MAX_MESSAGE_LENGTH=10000 |
| 110 | + |
| 111 | +# Agent-to-agent shared secret — all agents in your network must use the same secret |
| 112 | +# Generate one: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" |
| 113 | +SECURITY_AGENT_SECRET= |
| 114 | +SECURITY_REQUIRE_AGENT_AUTH=false |
| 115 | + |
| 116 | +# Prompt injection detection (on by default, logging only) |
| 117 | +# Set BLOCK to true to reject suspicious messages instead of just logging |
| 118 | +SECURITY_ENABLE_INPUT_SANITIZATION=true |
| 119 | +SECURITY_BLOCK_PROMPT_INJECTION=false |
| 120 | + |
| 121 | +# Replay protection — reject agent messages older than this (ms), 0 = disabled |
| 122 | +SECURITY_MAX_MESSAGE_AGE_MS=300000 |
| 123 | + |
| 124 | +# Payload encryption — AES-256-GCM for agent-to-agent message bodies |
| 125 | +# All agents in your network must share the same key |
| 126 | +# Generate one: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" |
| 127 | +SECURITY_ENCRYPTION_KEY= |
| 128 | + |
| 129 | +# TLS for webhook servers (Cloud API + Teams) |
| 130 | +# Provide paths to cert/key files, or use a reverse proxy (nginx/Caddy) instead |
| 131 | +TLS_CERT_PATH= |
| 132 | +TLS_KEY_PATH= |
| 133 | + |
| 134 | +# --- Agent Identity --- |
| 135 | +AGENT_NAME=MyAI |
| 136 | +AGENT_ID=agent_001 |
| 137 | + |
| 138 | +# --- Messaging Platform --- |
| 139 | +# Which platform(s) to connect: whatsapp | teams | both |
| 140 | +PLATFORM=whatsapp |
| 141 | + |
| 142 | +# --- WhatsApp --- |
| 143 | +# "baileys" for free local connection, "cloud-api" for official Meta API |
| 144 | +WHATSAPP_MODE=baileys |
| 145 | + |
| 146 | +# Only needed if WHATSAPP_MODE=cloud-api |
| 147 | +WHATSAPP_PHONE_NUMBER_ID= |
| 148 | +WHATSAPP_ACCESS_TOKEN= |
| 149 | +WHATSAPP_VERIFY_TOKEN= |
| 150 | +WHATSAPP_WEBHOOK_PORT=3000 |
| 151 | + |
| 152 | +# Cloud API webhook signature verification (optional but recommended) |
| 153 | +# Get this from your Meta App Dashboard > App Secret |
| 154 | +WHATSAPP_APP_SECRET= |
| 155 | + |
| 156 | +# --- Microsoft Teams --- |
| 157 | +# Register a bot at https://dev.botframework.com or Azure Portal |
| 158 | +TEAMS_APP_ID= |
| 159 | +TEAMS_APP_PASSWORD= |
| 160 | +TEAMS_PORT=3978 |
| 161 | + |
| 162 | +# --- Health & Monitoring --- |
| 163 | +HEALTH_PORT=9090 |
| 164 | + |
| 165 | +# --- Admin --- |
| 166 | +# Comma-separated phone numbers that can use !admin commands |
| 167 | +ADMIN_LIST= |
| 168 | + |
| 169 | +# --- Provider Failover --- |
| 170 | +# Comma-separated fallback providers if the primary fails |
| 171 | +# e.g. AI_FALLBACK_PROVIDERS=anthropic,google,groq |
| 172 | +AI_FALLBACK_PROVIDERS= |
| 173 | + |
| 174 | +# --- Per-Provider Rate Limits (requests per minute, optional) --- |
| 175 | +# RATE_LIMIT_OPENAI_RPM=60 |
| 176 | +# RATE_LIMIT_ANTHROPIC_RPM=40 |
| 177 | +# RATE_LIMIT_GOOGLE_RPM=60 |
0 commit comments