# {{project_name}} — environment (template — copy to .env)
LEAFMESH_LICENSE_KEY=

OPENAI_API_KEY=
ANTHROPIC_API_KEY=

REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=

# Escalation channels
PAGER_WEBHOOK=                # consumed: manager.escalation webhook target in config.yaml
SLACK_CS_CHANNEL=            # consumed: manager.escalation slack channel_id in config.yaml
# The Slack escalation target above posts a channel notification. The
# channel_id alone does NOT authenticate — to actually post you must
# wire a bot token into the escalation channel (or a top-level
# `channels:` slack adapter, which reads bot_token). These two are NOT
# auto-consumed by the escalation block as written; wire them in the
# connector/channel config before relying on Slack delivery.
SLACK_BOT_TOKEN=             # wire into a channels: slack adapter — not auto-read by escalation
SLACK_SIGNING_SECRET=        # only needed if you add an inbound Slack adapter; wire in code/config

# n8n connector webhooks (connector-YAML agents — fill in, then
# uncomment the matching wake_up crons in configs/config.yaml)
N8N_CS_OPERATIONS_WEBHOOK_URL=        # Pendo / Amplitude / Segment workflow
N8N_CUSTOMER_ONBOARDING_WEBHOOK_URL=  # Salesforce / Gainsight workflow
N8N_COMPETITOR_INTEL_WEBHOOK_URL=     # Klue / Crayon workflow

LEAFMESH_ENV_TOKEN=development

# Tuning — save_play_agent's @chain caps save-play touches per account;
# past the cap the play escalates to a senior CSM (bounded loop, Rule 3).
CS_SAVE_PLAY_MAX_TOUCHES=3   # consumed: agency/save_play_agent.py

# play_runner_agent — the EXECUTOR. After a human approves a play it RUNS
# it: SENDS the save-message via comms, or BOOKS the QBR via calendar.
# Both connectors are INERT until set — with neither set, play_runner
# records the sent message / booked meeting in the dev store so the play
# still produces a real artifact day-0.
CS_COMMS_WEBHOOK_URL=        # consumed: agency/play_runner_agent.py — comms platform send webhook (Slack/email/CPaaS)
CALENDAR_WEBHOOK_URL=        # consumed: agency/play_runner_agent.py — calendar booking webhook (Google Calendar / Cal.com)
CS_MAX_PLAYS_PER_DAY=3       # consumed: agency/play_runner_agent.py — per-account frequency cap (fail-closed)
