-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
208 lines (182 loc) · 9.51 KB
/
.env.example
File metadata and controls
208 lines (182 loc) · 9.51 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
# =============================================================================
# corvid-agent Environment Configuration
# Copy to .env and fill in your values: cp .env.example .env
# Bun loads .env automatically — no dotenv needed.
# =============================================================================
# --- AI Provider --------------------------------------------------------------
# For 100% local mode: set ENABLED_PROVIDERS=ollama, no cloud keys needed.
# When no ANTHROPIC_API_KEY or OPENAI_API_KEY is set, the system auto-restricts
# to Ollama and validates connectivity on startup.
# If Claude Code CLI is installed (`claude` on PATH), the system uses your
# subscription automatically — no API key needed for Claude access.
# ANTHROPIC_API_KEY=sk-ant-...
# --- Server -------------------------------------------------------------------
# HTTP server port
# PORT=3000
# Bind address — 127.0.0.1 = localhost only (safe default).
# Set to 0.0.0.0 for Docker/VM deployments — requires API_KEY!
BIND_HOST=127.0.0.1
# API key for HTTP/WS authentication. Required when BIND_HOST is not localhost.
# API_KEY=
# Admin API key for elevated operations (optional, separate from API_KEY)
# ADMIN_API_KEY=
# Comma-separated allowed CORS origins (default: * on localhost)
# ALLOWED_ORIGINS=https://yourdomain.com
# Public URL for device auth flow callbacks
# PUBLIC_URL=http://localhost:3578
# --- Logging ------------------------------------------------------------------
# Log level: debug | info | warn | error
# LOG_LEVEL=info
# Log format: text (human-readable) | json (structured)
# LOG_FORMAT=text
# --- Algorand / AlgoChat -----------------------------------------------------
# 25-word Algorand mnemonic for the agent's wallet
# ALGOCHAT_MNEMONIC=word1 word2 word3 ... word25
# Network: localnet | testnet | mainnet
ALGORAND_NETWORK=localnet
# Network for agent sub-wallets (defaults to ALGORAND_NETWORK)
# AGENT_NETWORK=localnet
# Polling interval for new AlgoChat messages (ms)
# ALGOCHAT_SYNC_INTERVAL=30000
# Default agent profile ID (UUID). Leave blank to auto-create on first run.
# ALGOCHAT_DEFAULT_AGENT_ID=
# Pre-shared key URI for encrypted AlgoChat channels
# ALGOCHAT_PSK_URI=algochat-psk://v1?addr=...&psk=...
# Comma-separated Algorand addresses authorized as owner (admin commands)
# ALGOCHAT_OWNER_ADDRESSES=
# Algorand indexer URL for on-chain reputation verification
# ALGORAND_INDEXER_URL=https://mainnet-idx.algonode.cloud
# --- Localnet URL Overrides (for Docker / container deployments) ------------
# When running corvid-agent inside Docker, localhost points to the container,
# not the host where AlgoKit localnet runs. Set these to reach the host:
# On Docker Desktop (macOS/Windows): host.docker.internal
# On Linux Docker: use --add-host=host.docker.internal:host-gateway
# LOCALNET_ALGOD_URL=http://host.docker.internal:4001
# LOCALNET_KMD_URL=http://host.docker.internal:4002
# LOCALNET_INDEXER_URL=http://host.docker.internal:8980
# --- Wallet Security ----------------------------------------------------------
# AES-256 encryption key for agent sub-wallets at rest.
# Defaults to a key derived from ALGOCHAT_MNEMONIC on localnet.
# Required on testnet/mainnet if ALGOCHAT_MNEMONIC is set.
# WALLET_ENCRYPTION_KEY=
# Path to the wallet keystore file
# WALLET_KEYSTORE_PATH=./wallet-keystore.json
# --- Spending Limits ----------------------------------------------------------
# Daily ALGO spending cap in microALGOs (default: 10 ALGO)
# DAILY_ALGO_LIMIT_MICRO=10000000
# --- Rate Limiting ------------------------------------------------------------
# Global per-IP sliding-window rate limits (requests per minute).
# These serve as a first-pass global limit. Per-endpoint limits (below) can
# further restrict individual routes.
# RATE_LIMIT_GET=600
# RATE_LIMIT_MUTATION=60
#
# Per-endpoint rate limiting is enabled by default with sensible defaults
# derived from RATE_LIMIT_GET and RATE_LIMIT_MUTATION. Different auth tiers
# (public, user, admin) receive different limits automatically:
# - public: RATE_LIMIT_GET / 2 (reads), RATE_LIMIT_MUTATION / 2 (mutations)
# - user: RATE_LIMIT_GET (reads), RATE_LIMIT_MUTATION (mutations)
# - admin: RATE_LIMIT_GET * 2 (reads), RATE_LIMIT_MUTATION * 2 (mutations)
# Exempt paths: /api/health, /webhooks/github, /ws, /.well-known/agent-card.json
# All responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset headers.
# --- Agent Sessions -----------------------------------------------------------
# Agent session timeout in ms (default: 30 min)
# AGENT_TIMEOUT_MS=1800000
# --- Ollama (local LLM provider) ---------------------------------------------
# Host URL for Ollama API
# OLLAMA_HOST=http://localhost:11434
# Max concurrent Ollama requests (default: 1 — serial is safest)
# OLLAMA_MAX_PARALLEL=1
# Context window size per request
# OLLAMA_NUM_CTX=16384
# Max tokens to predict per response
# OLLAMA_NUM_PREDICT=2048
# Number of GPU layers (-1 = all)
# OLLAMA_NUM_GPU=-1
# Batch size for prompt processing
# OLLAMA_NUM_BATCH=512
# Request timeout in ms (default: 30 min)
# OLLAMA_REQUEST_TIMEOUT=1800000
# --- Multi-Model Provider Routing ---------------------------------------------
# Comma-separated list of enabled providers.
# Options: anthropic, ollama
# When no cloud API keys are set, defaults to ollama automatically.
# ENABLED_PROVIDERS=anthropic,ollama
# For 100% local mode:
# ENABLED_PROVIDERS=ollama
# --- Council Model Override (optional) ----------------------------------------
# Use a bigger model for council chairman/synthesis while members use the default.
# Only applies to council sessions with councilRole=chairman.
# COUNCIL_MODEL=qwen3:32b
# --- GitHub Integration -------------------------------------------------------
# GitHub token for work tasks, PRs, webhooks, and mention polling
# GH_TOKEN=ghp_...
# Webhook secret for validating incoming GitHub webhook payloads (HMAC SHA-256).
# Must match the value configured in your GitHub webhook settings.
# GITHUB_WEBHOOK_SECRET=
# --- Work Tasks (self-improvement workflow) -----------------------------------
# Base directory for git worktrees (default: sibling .corvid-worktrees dir)
# WORKTREE_BASE_DIR=
# Max validation iterations before marking a task as failed
# WORK_MAX_ITERATIONS=3
# Max work tasks an agent can create per day
# WORK_TASK_MAX_PER_DAY=100
# --- Web Search ---------------------------------------------------------------
# Brave Search API key for corvid_web_search and corvid_deep_research tools
# BRAVE_SEARCH_API_KEY=
# --- Notifications (multi-channel, all optional) -----------------------------
# Global fallback channels. Agents can override via corvid_configure_notifications.
# DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
# TELEGRAM_BOT_TOKEN=123456:ABC-DEF...
# TELEGRAM_CHAT_ID=123456789
# NOTIFICATION_GITHUB_REPO=CorvidLabs/corvid-agent
# WHATSAPP_ACCESS_TOKEN=
# Signal messenger (requires signal-cli-rest-api running)
# SIGNAL_API_URL=http://localhost:8080
# SIGNAL_SENDER_NUMBER=+1234567890
# --- Bidirectional Telegram Bridge (talk to agents from Telegram) -----------
# Set both to enable the bidirectional Telegram bridge.
# TELEGRAM_BOT_TOKEN is shared with notifications above.
# TELEGRAM_ALLOWED_USER_IDS — comma-separated Telegram numeric user IDs (empty = allow all)
# TELEGRAM_ALLOWED_USER_IDS=123456789,987654321
# --- Bidirectional Discord Bridge (talk to agents from Discord) -------------
# Requires a Discord bot with MESSAGE_CONTENT intent enabled.
# DISCORD_BOT_TOKEN=your-bot-token
# DISCORD_CHANNEL_ID=channel-id-to-listen-in
# --- Voice (TTS/STT via OpenAI) -------------------------------------------
# Required for voice notes in Telegram and audio responses.
# OPENAI_API_KEY=sk-...
# --- Billing (Stripe integration, optional) ----------------------------------
# STRIPE_SECRET_KEY=sk_...
# STRIPE_WEBHOOK_SECRET=whsec_...
# --- Observability (OpenTelemetry, optional) ----------------------------------
# OTLP endpoint for trace export (if unset, tracing is disabled)
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# Service name for traces
# OTEL_SERVICE_NAME=corvid-agent
# --- Sandbox (container isolation, optional) ----------------------------------
# Set to true to enable Docker container sandboxing for agent execution
# SANDBOX_ENABLED=false
# --- Multi-Tenant (optional) -------------------------------------------------
# Set to true to enable multi-tenant isolation and billing.
# When enabled:
# - POST /api/tenants/register becomes available (public, no auth)
# - Each tenant gets isolated agents, sessions, projects, and work tasks
# - API keys are mapped to tenants via the api_keys table
# - Tenant members get RBAC roles (owner, operator, viewer)
# - Plan-based limits are enforced (agent count, session count, etc.)
# When false (default): single-tenant mode, all data uses tenant_id='default'
# MULTI_TENANT=false
# --- Database Backups ---------------------------------------------------------
# Directory for database backup files
# BACKUP_DIR=./backups
# Maximum number of backup files to keep (oldest are pruned after each backup)
# BACKUP_MAX_KEEP=10
# --- Directory Browsing Security ----------------------------------------------
# Comma-separated additional directories the /api/browse-dirs endpoint may serve.
# By default, only the home directory and registered project dirs are allowed.
# ALLOWED_BROWSE_ROOTS=/opt/projects,/mnt/shared
# --- MCP Stdio Mode (for external MCP clients) -------------------------------
# These are only needed when running corvid-agent as an MCP stdio server
# CORVID_AGENT_ID=
# CORVID_API_URL=http://localhost:3000