Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
547 lines (507 loc) · 29.4 KB
/
Copy path.env.example
File metadata and controls
547 lines (507 loc) · 29.4 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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
# development for local work; use production on deployed servers (quieter
# info-level logs + socket origin check enforced).
NODE_ENV=production
PORT=80
# Logging
# Set log level: debug, info, warn, error. Defaults to debug in development, info in production.
# LOG_LEVEL=debug
# Supabase
SUPABASE_URL=
SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
# AI Providers
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY=
# OpenRouter — one key for every upstream model, used for ANALYSIS tasks only
# (suggestions, audit signals, sentiment). Prompt tracking cannot go through it:
# it relies on provider-hosted web search, which OpenRouter does not relay.
# Model ids keep their namespace: openrouter/anthropic/claude-haiku-4.5
# OPENROUTER_API_KEY=
# OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# OPENROUTER_SITE_URL / OPENROUTER_SITE_NAME are sent as OpenRouter's optional
# attribution headers; defaults point at ansvisor.com.
# Web research fallback for the suggestion routes. When set, the research phase
# runs its search through Tavily instead of the provider's own search tool,
# which is quota-gated on free keys (Google Search grounding 429s the whole
# suggestion flow). Without it the provider tool is used, and when that call
# hits a quota or rate-limit wall the research falls back to the model's own
# knowledge so suggestions still return. Each Tavily search uses a Tavily
# credit plus one extra model call to write the query.
# TAVILY_API_KEY=
# The SERP provider chain for web research, comma-separated in order
# (default: tavily). Cloro, Context, Scrape.do and Firecrawl are opt-in, so an install
# that already holds those keys for tracking or Site Audit keeps those credits
# for the jobs they were added for. Example: tavily,firecrawl
# WEB_RESEARCH_PROVIDERS=
# Context search uses query-relevant Highlights when explicitly listed above.
# CONTEXT_DEV_API_KEY=
# Search country for the Cloro and Scrape.do providers (default: US).
# WEB_RESEARCH_COUNTRY=
# Brand sentiment. With a decision provider configured and SENTIMENT_MODEL
# unset, a decision model answers it: it reads the whole answer and returns
# real probabilities, at a fraction of a chat model's cost. It falls back to
# openai/gpt-5-mini if the decision model fails.
# DECIDER_PROVIDER picks the Decisions API: "openrouter" (default, needs
# OPENROUTER_API_KEY) or "google" (Google's Gemini Decisions API, needs
# GOOGLE_GENERATIVE_AI_API_KEY - for installs with a Google key and no
# OpenRouter account). Note: Google's free tier may use submitted content to
# improve its products; check the terms for your account.
# DECIDER_PROVIDER=openrouter
# DECIDER_MODEL=perplexity/pplx-decider-v1.1-27b
# DECIDER_GOOGLE_MODEL=gemini-decision-1
#
# Query Fan-out intents. Set FANOUT_INTENTS_DECIDER=1 (with a decision
# provider configured - see DECIDER_PROVIDER above) to classify new fan-out
# queries with the decision model, 128 per request, instead of a chat-model
# call per query. Compare the two first:
# node src/scripts/compare-fanout-intents.js
# FANOUT_INTENTS_DECIDER=1
#
# Setting SENTIMENT_MODEL (provider/model) picks a chat model instead. Any
# configured provider works; without OpenRouter it defaults to
# openai/gpt-5-mini — the previous hard-coded value.
# SENTIMENT_MODEL=anthropic/claude-haiku-4-5
DEFAULT_SUGGESTION_MODEL=google/gemini-3-flash-preview
# The model AI-written text (opportunities, Action Center, Site Audit) is
# translated with into a viewer's interface language (LOC-010). Needs
# OPENROUTER_API_KEY. Default: openrouter/google/gemini-3.8-flash.
# AI_TEXT_TRANSLATE_MODEL=
TOPIC_SUGGESTION_MODEL=google/gemini-3-flash-preview
PROMPT_SUGGESTION_MODEL=google/gemini-3-flash-preview
COMPETITOR_SUGGESTION_MODEL=google/gemini-3-flash-preview
# Tells a new brand's kind of site (b2b, ecommerce, b2c) and industry when its
# home page doesn't settle it: one small call per brand, at setup. Falls back
# to DEFAULT_SUGGESTION_MODEL, then google/gemini-3-flash-preview.
# SITE_TYPE_MODEL=google/gemini-3-flash-preview
# Groups prompts into clusters and judges their fan-out queries (#857).
# Falls back to DEFAULT_SUGGESTION_MODEL when unset.
# PROMPT_CLUSTER_MODEL=openai/gpt-6-luna
# Positions panel → Improve tab suggestions (provider/model). One call per
# generation, charged at its token cost against the plan's monthly budget
# (improveMonthlyBudgetUsd). Falls back to
# DEFAULT_SUGGESTION_MODEL, then google/gemini-3-flash-preview.
# IMPROVE_SUGGESTION_MODEL=google/gemini-3-flash-preview
# The brief eval's judge (node src/scripts/eval-brief.js, maintainers only):
# another model family than the brief's, so it doesn't grade its own. Falls
# back to anthropic/claude-haiku-4-5 (needs ANTHROPIC_API_KEY).
# BRIEF_EVAL_JUDGE_MODEL=
# Content Editor briefs plan with the brief rules (2026): each section's
# answer, format and facts, as version 2 (web brief.ts). Off until the brief
# eval passes them (node src/scripts/eval-brief.js with it on).
# CONTENT_BRIEF_RULES=true
# Content Editor models (provider/model), metered from the AI budget. The
# read model writes the brief (Rebuild outline) and runs Quality's checks;
# the write model is the Content Agent's: pages written or rewritten whole
# and its suggestions. With ANTHROPIC_API_KEY set they
# default to anthropic/claude-haiku-5-5 (read) and anthropic/claude-sonnet-5-5
# (write); without it, to IMPROVE_SUGGESTION_MODEL, then
# DEFAULT_SUGGESTION_MODEL, then google/gemini-3-flash-preview, as before.
# The Improve tab keeps its own model.
# CONTENT_READ_MODEL=
# CONTENT_WRITE_MODEL=
# Content Editor Quality's AI checks (CE-046 on: the kind of a source's
# site the rules can't place): a small, cheap model. Metered from the same
# AI budget as "quality". Falls back to CONTENT_READ_MODEL, then
# anthropic/claude-haiku-5-5 with ANTHROPIC_API_KEY, then
# DEFAULT_SUGGESTION_MODEL, then google/gemini-3-flash-preview.
# QUALITY_CHECK_MODEL=
# Action Center: write each new action's tasks from its evidence (AC-004) —
# one task per page or domain, with where, why, how and done-when. Off unless
# "true"; turn on after product has reviewed a sample
# (node src/scripts/review-action-tasks.js). Metered from the Improve budget.
# ACTION_TASKS_AI=
# The model that writes them. Falls back to IMPROVE_SUGGESTION_MODEL.
# ACTION_TASKS_MODEL=
# Chat: the new Chat (Drive Chat specs, CHAT-00…25), off unless "true"; a
# change applies when the server starts again (a restart or a new
# deployment). Off, today's agent stays as it is. Set the web's
# CHAT_AGENTIC and CHAT_AGENTIC_ORGS to the same values.
# CHAT_AGENTIC_ORGS: with Chat on, only these organizations (ids,
# comma-separated); empty = every organization.
# CHAT_AGENTIC=
# CHAT_AGENTIC_ORGS=
# With Chat on, agents publishing and sending pages on their own (Settings ›
# Chat), off unless "true": staff's rollout list and kill switch on the
# cloud. Off, this server refuses every go-live step
# (/api/internal/chat/go-live, 403 auto_go_live_off), even for a workspace
# whose Admins left their own switch on. CHAT_AUTO_GO_LIVE_ORGS: with it on,
# only these organizations (ids, comma-separated); empty = every
# organization Chat is on for. MUST match the web app's CHAT_AUTO_GO_LIVE
# and CHAT_AUTO_GO_LIVE_ORGS. A change applies when the server starts again.
# CHAT_AUTO_GO_LIVE=
# CHAT_AUTO_GO_LIVE_ORGS=
# With Chat on, Chat's agents (schedules, Signal triggers, the sweep): every
# minute this server calls the web app's /api/internal/chat/agents/tick at
# PUBLIC_APP_URL, and after each signal pass it tells the web which signals
# are new. Both send "Authorization: Bearer <CHAT_INTERNAL_SECRET>": the web's
# CHAT_INTERNAL_SECRET MUST be the same value. Unset, agents run only by Run
# now. Not in development (NODE_ENV=development): there, run
# node src/scripts/chat-agents-tick.js. Generate: openssl rand -hex 32
# CHAT_INTERNAL_SECRET=
# With Chat on, the other way: an agent's triggered run has no one's
# session, so the web's writes through this API for it (an opportunity's
# status, a dismissed prompt suggestion, Send to Action Center and its
# duplicate check), and its reads of Ads' Opportunities with ADS_ENABLED on,
# send "Authorization: Bearer <CHAT_ACTING_SECRET>" and
# "X-Acting-User: <the member's id>", checked as that member's own session
# would be, on those routes only. A secret of its own, not
# CHAT_INTERNAL_SECRET's value; the web's CHAT_ACTING_SECRET MUST be the
# same value. At least 32 characters; unset or shorter, those writes are
# refused (401). Generate: openssl rand -hex 32
# CHAT_ACTING_SECRET=
# With Chat on, the models' prices are synced daily from OpenRouter's public
# catalog (no key needed). Cron expression, UTC; unset = 05:17 every day.
# MODEL_PRICES_SCHEDULE=17 5 * * *
# With Chat on, daily suggestions (CHAT-26) are picked every hour for the
# people whose morning it is (07:00 in their time zone); no key, no AI call.
# Product events the server sends itself (daily_suggestion_sent,
# daily_suggestions_paused) go to PostHog only when POSTHOG_KEY is set: the
# web's NEXT_PUBLIC_POSTHOG_KEY and NEXT_PUBLIC_POSTHOG_HOST. Unset (the
# self-hosted default), nothing is sent. Host unset = https://us.i.posthog.com.
# POSTHOG_KEY=
# POSTHOG_HOST=
# The team's cancel e-mail (CANCEL_FEEDBACK_EMAILS below) is followed, in its
# thread and after the customer has their answer, by an analysis of the
# person's last 14 days: day by day, where they got stuck, replays to watch,
# what the workspace never used, and the AI's take in Turkish (on
# CONTENT_READ_MODEL's model). Read from PostHog's query API only when
# CANCEL_FEEDBACK_EMAILS is set, and both of these are. The key is a PostHog
# personal API key with only the query:read scope, for this project; the id
# is in PostHog's project settings. Unset (the self-hosted default), nothing
# is read and no follow-up is sent. PostHog failing or taking over 10 s: the
# follow-up goes without the activity; the AI failing: without its part.
# POSTHOG_PERSONAL_API_KEY=
# POSTHOG_PROJECT_ID=
# PostHog's app, where its API is. Unset: from POSTHOG_HOST, a cloud ingestion
# host turned into its app (https://eu.i.posthog.com → https://eu.posthog.com)
# and another host (a self-hosted PostHog) as it is; no POSTHOG_HOST:
# https://us.posthog.com. Set it when POSTHOG_HOST is a proxy.
# POSTHOG_APP_HOST=
# Content Editor Quality (Drive quality spec): which phase is live on the
# server, 0 (unset) for none, as the web's NEXT_PUBLIC_CONTENT_QUALITY_PHASE.
# 2 tells the Content Agent the brand's site type (CE-056), and turns on the
# AI reads of the sites a page's sources are on that the rules can't place
# (CE-046) and of the claims in a draft's own paragraphs (CE-045), drawn from
# the workspace's AI budget as "quality". Set it with the web's
# NEXT_PUBLIC_CONTENT_QUALITY_PHASE.
# CONTENT_QUALITY_PHASE=
# How alike two content opportunities' prompt and fan-out baskets must be to
# count as one (0-1, default 0.6). A new suggestion above it is skipped and
# uses no quota (CONTENT-004). Raise it if distinct work is being dropped.
# OPPORTUNITY_DUPLICATE_THRESHOLD=0.6
# Ads (Drive Ads spec, ADS-01), an internal preview. Ads is in development:
# leave unset in production. "true" (local development and preview
# deployments only) answers the /api/ads routes, for every workspace on the
# install; anything else, every /api/ads path is not found (404). No
# per-workspace or per-person switch. MUST match the web app's ADS_ENABLED.
# A change applies when the server starts again.
# ADS_ENABLED=
# Ads Phase 1 probes (src/scripts/probe-google-ads.js, probe-openai-ads.js),
# run by hand only: nothing in the app reads these yet. Server-side only;
# never commit the values.
# GOOGLE_ADS_DEVELOPER_TOKEN= optional: Google stopped issuing tokens (9 Sep 2026)
# GOOGLE_ADS_API_VERSION= e.g. v26, a version Google still serves
# GOOGLE_ADS_LOGIN_CUSTOMER_ID= optional: the manager account's id
# GOOGLE_ADS_CLIENT_ID= direct mode only (own OAuth client)
# GOOGLE_ADS_CLIENT_SECRET=
# GOOGLE_ADS_REFRESH_TOKEN=
# OPENAI_ADS_API_KEY=
# OPENAI_ADS_API_BASE= the base URL from OpenAI's Ads API docs
# Ads › Connections reads ChatGPT Ads with each customer's own key (one key
# per ad account, no OAuth), sealed with CONNECTOR_CREDENTIALS_KEY below: no
# key of ours is set for it. OPENAI_ADS_API_BASE, when set to an https URL,
# also overrides the app's base (default https://api.ads.openai.com/v1).
# With ADS_ENABLED, connected ad accounts sync daily (lib/ads/sync.js):
# a cron expression in the server's time zone, default "20 5 * * *".
# ADS_SYNC_SCHEDULE=
# ChatGPT Business Hub (Businesses in ChatGPT), an internal preview until
# its pages, names and regions are confirmed: leave unset in production.
# "true" raises the Business Hub setup action in the nightly signal pass, for
# every workspace on the install. MUST match the web app's
# BUSINESS_HUB_ENABLED. A change applies when the server starts again.
# BUSINESS_HUB_ENABLED=
# With BUSINESS_HUB_ENABLED: the countries where a business can claim its
# Business Hub profile now (ISO codes, comma-separated). Default: US. Elsewhere
# the setup action says to join the waitlist and has no Business Agent task.
# BUSINESS_HUB_OPEN_REGIONS=US
# Model used for the Site Audit LLM-judged signals and AI recommendations
# (provider/model). Cheap by default; point it at anthropic/claude-... or
# openai/... if you prefer. Use a pinned, versioned model id (a stable release,
# never a -preview or -latest alias): each signal's verdict is kept by model id
# and judged again only when the page or the model changes, so a model that
# changes under the same id would change scores unnoticed. Default
# google/gemini-3.8-flash.
AUDIT_LLM_MODEL=google/gemini-3.8-flash
# Site Audit page fetching (proxy + JS render)
SCRAPEDO_API_KEY=
# Firecrawl API key. Fetches Site Audit pages when AUDIT_FETCHER=firecrawl,
# and runs web research when WEB_RESEARCH_PROVIDERS names firecrawl.
# FIRECRAWL_API_KEY=
# Which service fetches Site Audit pages: scrapedo (default) or firecrawl.
# firecrawl needs FIRECRAWL_API_KEY; without it Site Audit stays on Scrape.do.
# AUDIT_FETCHER=scrapedo
# CORS
ALLOWED_ORIGINS=http://localhost:3000
# Cloud / Self-hosted mode
# Set to "true" only for the official cloud deployment.
# Self-hosted instances should leave this unset or "false" — all features
# will be unlocked automatically.
IS_CLOUD=false
# DataForSEO (for keyword volume data)
DATAFORSEO_LOGIN=
DATAFORSEO_PASSWORD=
# A prompt's real demand (PROMPT-014): read Google Trends, People Also Ask
# and YouTube for each tracked prompt's top keyword about once a week, as
# DataForSEO Standard tasks (about $0.004 a prompt a week; at most 500
# prompts a night). Off unless "true"; needs the DataForSEO keys above.
# Search Console demand is read every night either way, at no cost.
# DEMAND_SIGNALS=
# Cloro (platform web scrapers)
CLORO_API_KEY=
# Cloro webhook callback URL (publicly reachable, e.g. https://api.example.com/cloro/callback).
# When set, tracking jobs submit tasks with this webhook and DO NOT poll inline —
# Cloro pushes results to /cloro/callback as they complete (survives server restarts
# and scales without blocking workers). Leave empty to fall back to inline polling.
CLORO_WEBHOOK_URL=
# Cloro webhook signing secret (whsec_…). Generated when you enable signed
# deliveries at https://dashboard.cloro.dev/webhooks — shown exactly once, store
# it here. When set, /cloro/callback rejects any delivery without a valid
# HMAC signature (401) or with a stale timestamp (400). Leave empty to accept
# unsigned deliveries (the default; required while dashboard signing is off).
# IMPORTANT: flip the dashboard switch and set this value together — setting
# only one of the two breaks webhook delivery.
CLORO_WEBHOOK_SECRET=
# ChatGPT's query fan-out (the searches behind its answers). Its default
# interface stopped carrying them on 2026-09-30; Cloro's legacy desktop
# interface (best-effort and temporary) still does, for +2 credits a task.
# sample each prompt's ChatGPT answer asks for them one day a week
# all every nightly run asks (+2 credits on every ChatGPT task)
# off never ask
# Empty: off here (self-host), sample on the managed cloud. Any other value is
# off, with a warning in the log. Only the nightly run's first attempt asks;
# manual runs, retries and recovered runs don't. The day's answer is the one
# tracking stores, with no extra request. Credits are per task, so a prompt
# tracked in 3 locations costs 3 x 2 on its day. The day is read in UTC when
# the run starts: with DAILY_CRON_SCHEDULE close to midnight UTC, a run that
# starts on either side of it can make a prompt's week ask 0 or 2 times.
CLORO_CHATGPT_FANOUT=
# The answer provider that asks the AI platforms (ChatGPT, Google AI
# Overviews, Gemini…) your prompts: `cloro` (default) or `anakin`. Unset,
# blank or unknown means cloro. Each needs its own key: CLORO_API_KEY above,
# ANAKIN_API_KEY below.
PLATFORM_PROVIDER=cloro
# Single platforms on the other provider: platform=provider pairs, comma-
# separated, e.g. copilot-web=cloro keeps Bing AI Mode on Cloro while
# PLATFORM_PROVIDER=anakin answers the rest. Both providers then need their
# key (and their webhook settings, for webhook mode). Blank: none moved.
PLATFORM_PROVIDER_OVERRIDES=
# Anakin (anakin.io), when PLATFORM_PROVIDER=anakin. The API key from
# Anakin's dashboard (Settings › API Keys).
ANAKIN_API_KEY=
# Where Anakin posts finished jobs: this API's public URL + /anakin/callback,
# e.g. https://api.example.com/anakin/callback. Unset: each task is polled,
# which is slower on large runs (Anakin limits polls a minute).
ANAKIN_WEBHOOK_URL=
# The signing secret of your Anakin account (Settings › Webhooks, or
# GET /v1/webhooks/signing-secret). Required with ANAKIN_WEBHOOK_URL: a
# delivery without a valid X-Anakin-Signature is refused, and without the
# secret the webhook URL is ignored and each task is polled.
ANAKIN_WEBHOOK_SECRET=
# Anakin's limits a minute per key: task submissions and job polls. Blank
# uses Anakin's documented defaults (20 and 60); raise them to what Anakin
# set for your account, so a run submits its tasks faster.
ANAKIN_SUBMIT_PER_MIN=
ANAKIN_POLL_PER_MIN=
# AI Volume Multiplier (AI search adoption rate: the share of Google volume
# estimated to get an AI answer, e.g. 0.45 = 45%; AI Overviews appear on
# roughly 43-48% of Google searches)
AI_VOLUME_MULTIPLIER=0.45
# Cron / Internal-endpoint secret (cloud, and self-hosted with Chat on)
# Guards the internal server endpoints:
# /api/internal/daily-tracking
# /api/internal/content/:id/brief
# /api/internal/trigger-tracking
# /api/internal/chat/budget (Chat's AI budget, with CHAT_AGENTIC on)
# The web app sends this as "Authorization: Bearer <value>"; the server
# compares against its own copy. MUST be the same value on both sides.
# Generate: openssl rand -hex 32
# CRON_SECRET=
# The in-process daily tracking cron (self-hosted only). Runs at
# DAILY_CRON_SCHEDULE (default 0 6 * * *, i.e. 06:00 UTC) inside the server
# process. Set to 'false' when an external cron (e.g. the Vercel cron in
# web/vercel.json) already triggers daily tracking: the in-process one skips
# only the daily tracking run, so the day's run cannot fire twice; the
# nightly old-job cleanup still runs on the same schedule.
# SELF_HOSTED_CRON=true
# Stripe (cloud only — not needed for self-hosted)
# STRIPE_SECRET_KEY=sk_test_...
# STRIPE_WEBHOOK_SECRET=whsec_...
# Daily Pulse email via Resend (cloud only — self-hosted deployments never
# send pulse emails; the daily_pulse.created webhook event works everywhere)
# The web app needs the same key (web/.env.example): it sends the user.signed_up
# event that starts the welcome Automation. src/scripts/send-missed-welcome.js
# sends that event, by hand, to the accounts that missed it.
# RESEND_API_KEY=re_...
# RESEND_FROM_EMAIL="Ansvisor <[email protected]>"
# Where Settings › Billing › Cancel Subscription answers go (cloud only): why
# the customer cancels, or their request for three days first. Comma-separated;
# replies go to the customer. Sent through Resend above; empty = only kept in
# the cancellation_feedback table. With POSTHOG_PERSONAL_API_KEY and
# POSTHOG_PROJECT_ID set (above), an analysis of the person's last 14 days
# follows it in the same thread.
# Public URL of the web app, used for links in Daily Pulse emails and in the
# action_task.sent webhook (Action Center → Send to webhook)
# PUBLIC_APP_URL=https://app.example.com
# Visibility cache pre-warm: "true" and, after each brand's tracking run
# stamps and its rollups are refreshed, this server asks the web app
# (PUBLIC_APP_URL, POST /api/internal/visibility-prewarm, with CRON_SECRET)
# to store the Overview, Mentions and Citations views before anyone opens
# them. Off unless "true"; needs PUBLIC_APP_URL and CRON_SECRET (the same on
# both) and the web's VISIBILITY_CACHE_ENABLED. Fire-and-forget: it never
# holds up or fails a run.
# VISIBILITY_PREWARM_ENABLED=
# Public https URL of this API server, as the internet reaches it. Written
# into AI-bot connections (Cloudflare Worker, Logpush, Vercel drain) as their
# /bots/ingest endpoint, and used by content webhooks. Without it, AI-bot
# connections can't be made (http is accepted for localhost in development).
# PUBLIC_SERVER_URL=https://api.example.com
# Composio managed auth (Settings → Integrations, #577). Optional — without
# these the Integrations cards show "not configured" and everything else works.
# Each provider needs the shared API key plus its own auth config id, so
# configuring one never implies the other is available.
# COMPOSIO_API_KEY=
# COMPOSIO_GSC_AUTH_CONFIG_ID=
# COMPOSIO_GA_AUTH_CONFIG_ID=
# Pinned toolkit versions for tool execution (optional overrides)
# COMPOSIO_GSC_TOOLKIT_VERSION=20260721_00
# COMPOSIO_GA_TOOLKIT_VERSION=20260721_00
# GA4 property listing limits (#694). Listing is one call; resolving each
# property's web data streams for the domain auto-match is one call per
# property, so the second limit bounds how long the mapping UI waits.
# Properties past it stay listed and manually selectable.
# COMPOSIO_GA_MAX_PROPERTIES=500
# COMPOSIO_GA_STREAM_LOOKUPS=100
# Send to CMS → Webflow (#1331, phase 2): an auth config of the Webflow
# toolkit with API-key auth (Webflow has no Composio-managed OAuth app). Each
# brand connects its own site token in Settings → Integrations; Composio
# keeps the token. Without it, Webflow shows "not configured".
# COMPOSIO_WEBFLOW_AUTH_CONFIG_ID=
# COMPOSIO_WEBFLOW_TOOLKIT_VERSION=20260826_00
# Google Merchant Center for the product catalog (#1270): an auth config of
# the Google Merchant toolkit (GOOGLE_MERCHANT) with our own Google OAuth app
# and the https://www.googleapis.com/auth/content scope (Composio has no
# managed app for it). The workspace connects it in Settings → Integrations
# like Search Console; the catalog reads the Merchant API v1 through
# Composio's proxy, so the API key needs the "Proxy execute" permission, and
# the Google Cloud project must be registered with Merchant Center once
# (registerGcp). Without it, Merchant Center shows "not configured".
# COMPOSIO_GMC_AUTH_CONFIG_ID=
# Google Ads for Ads (Phase 1, behind ADS_ENABLED): an auth config of the
# Google Ads toolkit (GOOGLEADS) with Composio's managed app. The reads use
# Composio's own GOOGLEADS_* tools, so no Google Ads developer token is set
# here (Google issues none since 2026-09). Without it, Google Ads shows
# "not configured" in Ads › Connections.
# COMPOSIO_GADS_AUTH_CONFIG_ID=
# COMPOSIO_GADS_TOOLKIT_VERSION=20261116_00
# Slack (#2139): an auth config of Composio's Slackbot toolkit. On Ansvisor
# Cloud it is our own Slack app ("use your own app": its client id and
# secret, bot scopes chat:write, chat:write.public, channels:read,
# groups:read, users:read, users:read.email); Composio's managed Slackbot app
# works too, its consent then says Composio. Each brand connects a workspace
# and picks a channel in Settings → Integrations; Composio keeps the bot
# token. Calls go through Composio's proxy, so the API key needs the "Proxy
# execute" permission. Without it, Slack shows "not configured".
# COMPOSIO_SLACK_AUTH_CONFIG_ID=
# Approve and Reject from Slack (#2139, Growth and up on the cloud): your own
# Slack app's Signing Secret (Basic Information → App Credentials). In the
# Slack app, under Interactivity & Shortcuts, turn Interactivity on and set
# the Request URL to https://<this server>/webhooks/slack/interactivity. Also
# needs the new Chat (CHAT_AGENTIC) and CHAT_INTERNAL_SECRET. Every request is
# checked against it; unset, every click is refused and the "agent needs you"
# message has no buttons. Composio's managed Slackbot app can't take clicks.
# SLACK_SIGNING_SECRET=
# HubSpot (#2140, Growth and above on the cloud): an auth config of the HubSpot
# toolkit with OAuth (Composio's managed app, or our own HubSpot app for the
# App Marketplace) and the scopes oauth, crm.objects.contacts.read and .write,
# crm.schemas.contacts.read and .write, crm.objects.deals.read and content.
# Each brand connects its own HubSpot account in Settings → Integrations;
# calls go through Composio's proxy, so the API key needs the "Proxy execute"
# permission. Without it, HubSpot shows "not configured".
# COMPOSIO_HUBSPOT_AUTH_CONFIG_ID=
# Store connections for the product catalog (#1263, CONNECTORS.md), and
# Send to CMS's WordPress, Framer and Wix connections (#1331): the key that
# encrypts a store's or a WordPress site's sign-in, and a Framer project's
# or a Wix site's API key, 32 bytes in base64 (openssl rand -base64 32). Only this server
# holds it; the web app never sees a sign-in. Optional: without it,
# Settings says store connections, WordPress, Framer and Wix aren't set up, and
# feeds, uploads and the webhook work as before. Changing it makes the saved
# sign-ins unreadable until they're entered again.
# CONNECTOR_CREDENTIALS_KEY=
# Framer's client (framer-api) writes to the console itself, past this
# server's logger: at its default level (warn) an error Framer sends on an
# open connection is printed with Framer's own words (silent prints nothing).
# silent, error, warn, info or debug; read once, when the server starts.
# FRAMER_API_LOG_LEVEL=warn
# How long a run waits for Cloro's FIRST result before giving up (default 90
# min). Nothing has come back yet at that point, so the stall and ghost exits
# below — which compare successive pending counts — have nothing to measure.
# On large brands the first callback has landed as late as 65 minutes in.
# CLORO_FIRST_RESULT_WAIT_MIN=90
# How long the tail may take, measured from the first result rather than from
# submission (default 60 min), so a slow queue start doesn't eat the time the
# rest of the delivery needs.
# CLORO_DRAIN_TAIL_MIN=60
# Drain-stall tolerance: consecutive 15s polls with no new Cloro result before
# a run stops waiting (default 100 ≈ 25 min). Only counted after the first
# result has arrived.
# CLORO_STALL_POLL_LIMIT=100
# Ghost-task tolerance: consecutive 15s polls with no new result before a run
# stops waiting *when every remaining task is already older than the ghost age
# below* (default 60 ≈ 15 min). Tasks that old can no longer be in flight —
# Cloro accepted them and will never call back — so this exits the quiet tail
# of a run without shortening the stall tolerance for tasks still plausibly
# coming.
# CLORO_GHOST_STALL_POLLS=60
# How old a still-pending task must be to count as a ghost (default 30 min).
# The safe value tracks Cloro's delivery latency, which moves: first results
# have arrived 34 minutes after submission on one brand and 29.7 on another.
# Raise this if healthy runs start ending with `cloro drain finished (ghosts)`.
# CLORO_GHOST_TASK_AGE_MIN=30
# How many brands may run tracking jobs at once (default 2). Tracking mostly
# waits on scraper callbacks, so raising this shortens the nightly cycle;
# watch memory before going far above 4 on a small instance.
# TRACKING_CONCURRENCY=2
# Slots the first run after a payment may take beyond TRACKING_CONCURRENCY
# (default 1), so it never waits behind the nightly runs. It goes ahead of the
# queue either way; 0 turns only the extra slot off.
# TRACKING_PRIORITY_SLOTS=1
# --- Free AI visibility report card (POST /public/report-card) ---
# The form on www.ansvisor.com posts here. Origins it may post from,
# comma-separated (default: https://www.ansvisor.com,https://ansvisor.com).
# REPORT_CARD_ORIGINS=https://www.ansvisor.com,https://ansvisor.com
# Cloudflare Turnstile's secret key for the form's bot check. Without it,
# development skips the check; a cloud server refuses every request.
# TURNSTILE_SECRET_KEY=
# Caps (defaults in parentheses): cards a day (200), dollars a month (200),
# days before a company gets a new card instead of the last one again (30),
# requests an hour from one address (5).
# REPORT_CARD_DAILY_CAP=200
# REPORT_CARD_MONTHLY_BUDGET_USD=200
# REPORT_CARD_REPEAT_DAYS=30
# REPORT_CARD_IP_HOURLY=5
# The cards run on the cloud server only, every minute, this many at a time (2).
# REPORT_CARD_CONCURRENCY=2
# The model that writes a card's questions and reads its competitors
# (default: DEFAULT_SUGGESTION_MODEL, else google/gemini-3-flash-preview).
# REPORT_CARD_MODEL=
# What one engine answer and the keyword call cost, in dollars, for the caps
# until the provider's contract confirms them (0.002 and 0.075).
# REPORT_CARD_ANSWER_USD=0.002
# REPORT_CARD_VOLUME_USD=0.075
# The card's e-mail: sent from this address (a domain Resend has verified;
# default RESEND_FROM_EMAIL), with replies going here. The PDF is drawn by the
# web app at PUBLIC_APP_URL, with CRON_SECRET (the same on both).
# REPORT_CARD_FROM_EMAIL="Ansvisor <[email protected]>"