Skip to content

Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.

15.3 KB
Raw Blame
# 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.

# Brand sentiment. With OPENROUTER_API_KEY set and SENTIMENT_MODEL unset, a
# decision model answers it through OpenRouter's Decisions API: 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_MODEL=perplexity/pplx-decider-v1.1-27b
#
# Query Fan-out intents. Set FANOUT_INTENTS_DECIDER=1 (with OPENROUTER_API_KEY)
# 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
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, 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 * * *
# 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
# Model used for the Site Audit LLM-judged signals (provider/model). Cheap by
# default; point it at anthropic/claude-... or openai/... if you prefer.
AUDIT_LLM_MODEL=google/gemini-3-flash-preview

# Site Audit page fetching (proxy + JS render)
SCRAPEDO_API_KEY=

# 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=

# Platform provider for web scrapers (default: cloro)
PLATFORM_PROVIDER=cloro

# 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 only — not needed for self-hosted)
# Guards three internal server endpoints:
#   /api/internal/daily-tracking
#   /api/internal/content/:id/brief
#   /api/internal/trigger-tracking
# 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=

# 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)
# 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.
# [email protected],[email protected]

# 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

# 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=

# 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