-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.env.local
More file actions
232 lines (209 loc) · 19.7 KB
/
example.env.local
File metadata and controls
232 lines (209 loc) · 19.7 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
# Enable experimental streamable Mermaid TLDraw shape
NEXT_PUBLIC_ENABLE_MERMAID_STREAM_SHAPE=true
# Control subagent autorun (true/false). In dev defaults to false unless set true.
NEXT_PUBLIC_SUBAGENT_AUTORUN=true
# Environment Variables
# custom AI Configuration
NEXT_PUBLIC_custom_API_KEY=your_api_key_here # custom AI API key (required for generative UI)
NEXT_PUBLIC_LK_TOKEN_ENDPOINT=/api/token # API route for LiveKit token generation
NEXT_PUBLIC_LK_SERVER_URL=wss://your-livekit-url.livekit.cloud # LiveKit websocket URL (for UI components)
NEXT_PUBLIC_EDGE_INGRESS_ENABLED=false # Route hot stateless API calls through Cloudflare edge ingress
NEXT_PUBLIC_EDGE_INGRESS_URL= # e.g. https://present-edge-ingress.<subdomain>.workers.dev
NEXT_PUBLIC_CANVAS_DEV_BYPASS=false # If true, bypass auth on /canvas in dev
NEXT_PUBLIC_STEWARD_FLOWCHART_ENABLED=true # Enable flowchart steward routing in ToolDispatcher
NEXT_PUBLIC_TOOL_DISPATCHER_LOGS=false # Verbose ToolDispatcher logs in the browser console
NEXT_PUBLIC_TOOL_DISPATCHER_METRICS=false # Emit tSend/tArrive/tPaint metrics for perf testing
# LiveKit Configuration
LIVEKIT_URL=wss://your-livekit-url.livekit.cloud # LiveKit websocket server URL (for agent)
LIVEKIT_API_KEY=your_livekit_api_key # LiveKit API key (for agent)
LIVEKIT_API_SECRET=your_livekit_api_secret # LiveKit API secret (for agent)
EDGE_INGRESS_ENABLED=false # Server-side edge ingress routing toggle (Node runtimes)
EDGE_INGRESS_URL= # Server-side edge ingress base URL
TOKEN_SIGNATURE_MAX_SKEW_MS=300000 # Max signed token request clock skew
TOKEN_NONCE_TTL_MS=120000 # Reject token nonce replays inside this TTL
TOKEN_RATE_LIMIT_PER_USER_PER_MIN=30 # LiveKit token mints per user per minute
TOKEN_RATE_LIMIT_PER_ROOM_PER_MIN=90 # LiveKit token mints per room per minute
TOKEN_REQUIRE_AUTH=false # Enable in production to require authenticated token minting
TOKEN_REQUIRE_SIGNED_NONCE=false # Enable in production to require x-signature/x-timestamp/x-nonce
TOGETHER_API_KEY=your-together-ai-api-key # Together AI API key for image generation
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key # OpenAI API key (for agent/LLM features)
ANTHROPIC_API_KEY=your_anthropic_api_key # (Optional) Anthropic API key for Claude models
GOOGLE_API_KEY=your_google_api_key # (Optional) Google Generative AI key (future support)
CEREBRAS_API_KEY=your-cerebras-api-key # (Optional) Cerebras API key for StewardFAST
CEREBRAS_API_BASE_URL=https://api.cerebras.ai # (Optional) override Cerebras base URL
GROQ_API_KEY=your-groq-api-key # (Optional) Groq API key for fast STT/StewardFAST
GROQ_API_BASE_URL=https://api.groq.com/openai/v1 # (Optional) override Groq base URL for StewardFAST
# Bring Your Own Keys (BYOK)
# Base64-encoded 32-byte key used to encrypt per-user provider keys stored in Supabase.
# Generate one with: `node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"`
BYOK_ENCRYPTION_KEY_BASE64=your-32-byte-base64-key-here
# Linear Configuration
LINEAR_API_KEY=your-linear-api-key # (Optional) Linear API key for Linear Kanban (dev fallback)
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url # Supabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key # Supabase anonymous key
SUPABASE_URL=https://your-supabase-url.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Task Queue Configuration
TASK_DEFAULT_CONCURRENCY=1
TASK_MAX_CONCURRENCY_CANVAS=1
TASK_MAX_CONCURRENCY_FLOWCHART=2
TASK_MAX_CONCURRENCY_YOUTUBE=4
TASK_DEBOUNCE_MS_CANVAS=300
TASK_IDLE_POLL_MS=500 # Base idle poll interval when queue is empty
TASK_IDLE_POLL_MAX_MS=1000 # Max idle poll interval for bounded exponential backoff
# Tldraw Sync Configuration
NEXT_PUBLIC_TLDRAW_SYNC_URL=wss://tldraw-sync-demo.tldraw.com/connect # (Optional) Tldraw sync server URL
# Recommended default: wss://tldraw-sync-demo.tldraw.com/connect
# Self-hosted (Cloudflare Worker): set to your worker base URL (with /connect)
# Local dev worker: ws://localhost:5172/connect
# Optional: Google OAuth configuration in Supabase dashboard
# No additional environment variables needed for OAuth providers
NODE_ENV=development # Node environment (development/production)
AGENT_DEV_MODE=true # Enable agent development mode
AGENT_LLM_MODEL=gpt-4.1 # (Optional) LLM model for agent (defaults to gpt-4.1; OpenAI only)
AGENT_STT_MODEL=your-stt-model-name # (Optional) STT model for agent (e.g., whisper-large-v3-turbo)
AGENT_TTS_MODEL=your-tts-model-name # (Optional) TTS model for agent (e.g., tts-1)
AGENT_STT_LANGUAGE=en # (Optional) STT language (e.g., en)
VOICE_AGENT_INPUT_TRANSCRIPTION_MODEL=gpt-4o-mini-transcribe # (Optional) Voice agent STT model; falls back to AGENT_STT_MODEL
VOICE_AGENT_TRANSCRIPTION_ENABLED=true # (Optional) Enable realtime STT (defaults to true when model provided and multi-participant mode is off)
VOICE_AGENT_TRANSCRIPTION_LANGUAGE=en # (Optional) Language hint for realtime transcription (defaults to AGENT_STT_LANGUAGE)
VOICE_AGENT_TURN_DETECTION=server_vad # (Optional) 'server_vad', 'semantic_vad', or 'none'
VOICE_AGENT_MIC_PROFILE=noisy_room # (Optional) near_field | far_field | noisy_room (maps to noise-reduction defaults)
VOICE_AGENT_INPUT_NOISE_REDUCTION= # (Optional) near_field | far_field | none (overrides MIC_PROFILE mapping)
VOICE_AGENT_TURN_THRESHOLD= # (Optional) Server VAD threshold (0-1)
VOICE_AGENT_TURN_PREFIX_PADDING_MS= # (Optional) Server VAD prefix padding (ms)
VOICE_AGENT_TURN_SILENCE_DURATION_MS= # (Optional) Server VAD silence duration (ms)
VOICE_AGENT_TURN_CREATE_RESPONSE=false # (Optional) Keep false for explicit generateReply control
VOICE_AGENT_TRANSCRIPT_DEDUPE_WINDOW_MS=2500 # (Optional) Duplicate transcript suppression window
VOICE_AGENT_TRANSCRIPT_DEDUPE_MAX_ENTRIES=256 # (Optional) Duplicate transcript suppression cache size
VOICE_AGENT_ACTIVE_RESPONSE_RECOVERY_MAX_ATTEMPTS=3 # (Optional) Max recovery attempts for active-response conflicts
VOICE_AGENT_ROOM_NOISE_CANCELLATION_ENABLED=true # (Optional) Cloud RoomIO noise-cancellation module (fail-open on startup)
VOICE_AGENT_ROOM_NOISE_CANCELLATION_MODULE_ID=bvc # (Optional) LiveKit audio filter module id
VOICE_AGENT_ROOM_NOISE_CANCELLATION_OPTIONS_JSON={} # (Optional) JSON object passed to the module
VOICE_AGENT_MULTI_PARTICIPANT_TRANSCRIPTION=false # Keep expensive multi-participant transcription off by default
VOICE_AGENT_UPDATE_LOSSY=true # If true, send update_component over lossy channel for lower latency
VOICE_AGENT_EVENT_BUDGET_PER_SEC=24 # Max tool_call events/sec per room before drop
VOICE_AGENT_TOOL_DEDUPE_WINDOW_MS=1500 # Duplicate tool_call suppression window
VOICE_AGENT_ALLOW_INTERNAL_BYPASS=false # Only true for trusted server-side bypass flows
FLOWCHART_STEWARD_VARIANT=openai # Set to "fast", "groq", or "cerebras" to enable StewardFAST
FLOWCHART_STEWARD_FAST_PROVIDER=groq # Override provider for StewardFAST ("groq" or "cerebras")
FLOWCHART_STEWARD_FAST_MODEL=openai/gpt-oss-20b # Model used when StewardFAST is active (provider-specific)
SUMMARY_STEWARD_FAST_MODEL=llama3.3-70b # Model used for CRM summary steward (fast)
SUMMARY_MEMORY_MCP_TOOL=qdrant-store # MCP tool name for vector memory (e.g. qdrant-store, upsert-records w/ Pinecone)
SUMMARY_MEMORY_MCP_COLLECTION=present-memory # Optional: Qdrant collection name
SUMMARY_MEMORY_MCP_INDEX=present-memory # Optional: Pinecone index name
SUMMARY_MEMORY_MCP_NAMESPACE=present # Optional: Pinecone namespace
SUMMARY_MEMORY_AUTO_SEND=false # Auto-send summaries to SUMMARY_MEMORY_MCP_TOOL
NEXT_PUBLIC_INFOGRAPHIC_MEMORY_MCP_TOOL=qdrant-store # MCP tool name for infographic memory (client-side)
NEXT_PUBLIC_INFOGRAPHIC_MEMORY_MCP_COLLECTION=present-memory # Qdrant collection name for infographic memory
NEXT_PUBLIC_INFOGRAPHIC_MEMORY_MCP_INDEX=present-memory # Pinecone index name for infographic memory
NEXT_PUBLIC_INFOGRAPHIC_MEMORY_MCP_NAMESPACE=present # Pinecone namespace for infographic memory
NEXT_PUBLIC_INFOGRAPHIC_MEMORY_AUTO_SEND=false # Auto-send infographics to vector memory
NEXT_PUBLIC_MEMORY_RECALL_MCP_TOOL=qdrant-find # MCP tool name for vector memory recall
NEXT_PUBLIC_MEMORY_RECALL_MCP_COLLECTION=present-memory # Qdrant collection name for memory recall
NEXT_PUBLIC_MEMORY_RECALL_MCP_INDEX=present-memory # Pinecone index name for memory recall
NEXT_PUBLIC_MEMORY_RECALL_MCP_NAMESPACE=present # Pinecone namespace for memory recall
NEXT_PUBLIC_MEMORY_RECALL_AUTO_SEARCH=true # Auto-search memory when query changes
CANVAS_STEWARD_MODEL=claude-haiku-4-5 # Preferred canvas steward model (falls back if provider unavailable)
NEXT_PUBLIC_CANVAS_AGENT_CLIENT_ENABLED=false # Keep the legacy browser TLDraw agent disabled (only enable in rare debugging scenarios)
NEXT_PUBLIC_CANVAS_AGENT_THEME_ENABLED=true # Keep TLDraw branding enabled even when the client agent is off
NEXT_PUBLIC_FAIRY_ENABLED=false # Enable the TLDraw Fairy UI system
NEXT_PUBLIC_FAIRY_CLIENT_AGENT_ENABLED=false # Retired legacy flag (no runtime effect in server-first fairy mode)
NEXT_PUBLIC_FAIRY_DEV_PANEL=false # Show the compact dev-only Fairy control panel
FAIRY_MODEL=gpt-5.1 # Default Fairy model (see @tldraw/fairy-shared models)
FAIRY_INTENT_DEDUPE_MS=1200 # Suppress identical intents within this window (ms)
FAIRY_INTENT_DEDUPE_MAX=200 # Max fingerprints cached for dedupe
CANVAS_QUEUE_DIRECT_FALLBACK=false # Set true to execute the steward immediately when queue enqueue fails
SWARM_ORCHESTRATION_ENABLED=false # Enable swarm orchestration wrapper for conductor tasks
SWARM_FAIRY_SPECULATIVE_ENABLED=true # Enable low-confidence speculative routing
SWARM_FAIRY_CONFIDENCE_THRESHOLD=0.70 # Fairy-first confidence threshold
SWARM_SPECULATIVE_TIMEOUT_MS=200 # Max speculative wait budget in milliseconds
AGENT_TRACE_LEDGER_ENABLED=true # Persist trace events to agent_trace_events
AGENT_TRACE_SAMPLE_RATE=1 # 0..1 trace sampling rate
AGENT_TRACE_RETENTION_DAYS=30 # Intended trace retention period
AGENT_WORKER_HEARTBEAT_MS=5000 # Worker heartbeat interval in milliseconds
AGENT_ADMIN_ALLOWLIST_USER_IDS= # REQUIRED: comma-separated Supabase user IDs allowed to access /admin/agents
AGENT_ADMIN_PUBLIC_READ_ACCESS=false # If true, summary overview can be read without sign-in (detail routes still policy-gated)
AGENT_ADMIN_AUTHENTICATED_OPEN_ACCESS=false # Temporary override: allow any authenticated user to view admin observability (safe actions still require allowlist)
AGENT_ADMIN_DETAIL_SIGNED_IN_REQUIRED=true # Require a signed-in user for detail routes (/queue,/traces,/workers,/audit,/api/traces/:id)
AGENT_ADMIN_DETAIL_GLOBAL_SCOPE=true # Detail routes are global across all rooms for signed-in users
AGENT_ADMIN_DETAIL_MASK_DEFAULT=true # Default UI mask setting for payload/transcript details
AGENT_ADMIN_ACTIONS_ENABLED=true # Allow admin safe actions (cancel/retry/requeue) for allowlisted admins
AGENT_ADMIN_PROVIDER_LINK_TEMPLATE_OPENAI= # Optional URL template for provider deep links ({traceId},{requestId},{providerRequestId},{model},{room},{taskId})
AGENT_ADMIN_PROVIDER_LINK_TEMPLATE_ANTHROPIC= # Optional URL template for provider deep links
AGENT_ADMIN_PROVIDER_LINK_TEMPLATE_CEREBRAS= # Optional URL template for provider deep links
AGENT_ADMIN_PROVIDER_LINK_TEMPLATE_GOOGLE= # Optional URL template for provider deep links
AGENT_ADMIN_PROVIDER_LINK_TEMPLATE_TOGETHER= # Optional URL template for provider deep links
CANVAS_STEWARD_DEBUG=false # Set true to log prompts/actions for canvas steward debugging
CANVAS_AGENT_SECRET=change-me-to-strong-secret # Used to sign agent inbox tokens
NEXT_PUBLIC_CANVAS_SCREENSHOT_COALESCE_MS=250 # Coalesce screenshot bursts to first/last frame
CANVAS_SCREENSHOT_RETENTION_MS=86400000 # Screenshot inbox retention (24h)
CANVAS_ACK_RETENTION_MS=86400000 # Ack inbox retention (24h)
# CANVAS_AGENT_DEV_ALLOW_UNAUTH=true # Optional dev bypass (do not enable in production)
# Unified Canvas Agent Configuration (see docs/canvas-agent.md)
CANVAS_AGENT_UNIFIED=true # Enable unified server-centric Canvas Agent (default: true)
CANVAS_AGENT_SCREENSHOT_TIMEOUT_MS=3500 # Screenshot RPC timeout in milliseconds (floored at 2500ms)
CANVAS_AGENT_SCREENSHOT_RETRIES=1 # Additional screenshot attempts before giving up (default: 1)
CANVAS_AGENT_SCREENSHOT_RETRY_DELAY_MS=450 # Delay between screenshot retries (ms)
CANVAS_AGENT_LOW_ACTION_THRESHOLD=6 # Trigger a deterministic follow-up when fewer than N actions emit
CANVAS_AGENT_CONFIG= # Optional JSON overrides for the knobs above (e.g. {"screenshot":{"timeoutMs":5000}})
CANVAS_AGENT_TTFB_SLO_MS=200 # Target time-to-first-byte for first action envelope (default: 200)
CANVAS_AGENT_PRESET=creative # creative | precise (controls tuning + follow-ups)
CANVAS_AGENT_TEMPERATURE=0.85 # Model temperature (creative preset default)
CANVAS_AGENT_TOP_P=0.95 # Model top_p (creative preset default)
CANVAS_AGENT_MAX_OUT=4096 # Max output tokens for creative turns
CANVAS_AGENT_PROMPT_BUDGET=8000 # Target token budget for prompt assembly
CANVAS_AGENT_TRANSCRIPT_WINDOW_MS=300000 # Transcript lookback window for Canvas Agent context (ms)
CANVAS_AGENT_FOLLOWUP_MAX_DEPTH=3 # Override creative follow-up depth (precise defaults to 2)
CANVAS_AGENT_DISABLE_PROMPT_CACHE=0 # Set to 1 to skip Anthropic prompt caching headers
ANTHROPIC_CACHE_TTL=1h # TTL for Anthropic prompt cache beta (5m | 1h)
CANVAS_AGENT_MAX_FOLLOWUPS=3 # Legacy follow-up cap (kept for backward compatibility)
CANVAS_AGENT_SCREENSHOT_MAX_SIZE=1024 # Max screenshot edge length (pixels)
CANVAS_AGENT_SHAPE_STATE_LIMIT=4096 # Max bytes of TLDraw shape.props.state to include in prompt (truncates beyond)
CANVAS_SCREENSHOT_COALESCE_MS=250 # Server-side reference for screenshot coalescing windows
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key # Required for Canvas Agent todos table writes
LIVEKIT_REST_URL=https://your-livekit-url.livekit.cloud # LiveKit REST URL for server-side data channel broadcasts
# Proxy + ingestion guardrails
MCP_PROXY_ALLOWLIST=server.smithery.ai,mcp.linear.app # Comma-separated host allowlist for /api/mcp-proxy
MCP_PROXY_REQUIRE_AUTH=false # Require Supabase bearer auth (recommended true in production)
MCP_PROXY_RATE_LIMIT_PER_USER_PER_MIN=120
MCP_PROXY_MAX_CONCURRENCY_PER_USER=4
TRANSCRIBE_MAX_BODY_BYTES=3000000
TRANSCRIBE_MAX_AUDIO_BYTES=1500000
TRANSCRIBE_RATE_LIMIT_PER_USER_PER_MIN=20
TRANSCRIBE_REQUIRE_AUTH=false # Enable in production to require authenticated transcription calls
TRANSCRIPT_RETENTION_DAYS=30 # Transcript retention horizon
# Queue + background controls
SCORECARD_AUTO_FACT_CHECK=false # Keep auto fact-check opt-in by default
SCORECARD_AUTO_FACT_CHECK_MIN_INTERVAL_MS=30000
SCORECARD_AUTO_FACT_CHECK_ROOM_MIN_INTERVAL_MS=120000
CONDUCTOR_IDLE_BACKOFF_MAX_MS=15000
FACT_CHECK_CACHE_TTL_SEC=900
TASK_QUEUE_MAX_DEPTH_PER_ROOM=0 # 0 disables queue-depth breaker
CONDUCTOR_ALLOW_INTERNAL_BYPASS=false # Only true for trusted server-side bypass flows
# Cost circuit breakers
COST_CIRCUIT_BREAKER_ENABLED=false
COST_TOKEN_MINT_PER_MINUTE_LIMIT=300
COST_SEARCH_PER_MINUTE_LIMIT=40
COST_SCREENSHOT_BYTES_PER_MINUTE_LIMIT=8000000
COST_TRANSCRIBE_AUDIO_BYTES_PER_MINUTE_LIMIT=24000000
# React Profiler (set to true to enable React DevTools Profiler in development)
NEXT_PUBLIC_REACT_APP_PROFILER=false
# custom Debug Mode (set to true to enable verbose logging in development)
NEXT_PUBLIC_custom_DEBUG=false
# Subagent autorun control
# Disable automatic subagent execution in development unless explicitly enabled
# This prevents components from auto-calling MCP tools (e.g., weather) on dev start
NEXT_PUBLIC_SUBAGENT_AUTORUN=false
# Allow placeholder "Current Location" fallback for Weather subagent
# When false, weather tools will only execute with a concrete location string
NEXT_PUBLIC_ALLOW_CURRENT_LOCATION=false
# Feature Flags for local-first tool routing and MCP readiness
NEXT_PUBLIC_LOCAL_TOOL_ROUTING_ENABLED=true
NEXT_PUBLIC_MCP_EARLY_INIT_ENABLED=true
NEXT_PUBLIC_BYPASS_CLOUD_CHAT_THREAD=false
NEXT_PUBLIC_TOOL_DISPATCH_STRICT_TYPES=true
NEXT_PUBLIC_TOOL_DISPATCH_KILL_SWITCH=false
NEXT_PUBLIC_MCP_READY_TIMEOUT_MS=150