# ── LLM Provider API Keys ──────────────────────────────────────────── # Set the key(s) for the provider(s) you use. OPENAI_API_KEY= GOOGLE_API_KEY= ANTHROPIC_API_KEY= XAI_API_KEY= OPENROUTER_API_KEY= # ── Data Provider API Keys ─────────────────────────────────────────── ALPHA_VANTAGE_API_KEY= # Free at https://finnhub.io — required for earnings/economic calendars and insider transactions FINNHUB_API_KEY= # ── Configuration overrides ────────────────────────────────────────── # Any setting in DEFAULT_CONFIG (tradingagents/default_config.py) can be # overridden with a TRADINGAGENTS_ environment variable. # Unset or empty values are ignored — the hardcoded default is kept. # # This file is the single source of truth for runtime configuration. # Copy this file to .env and fill in the values you want to override. # ── General ────────────────────────────────────────────────────────── # TRADINGAGENTS_RESULTS_DIR=./results # ── LLM model selection ───────────────────────────────────────────── # Top-level provider & model (applies to all tiers unless overridden) # TRADINGAGENTS_LLM_PROVIDER=openai # openai | google | anthropic | xai | openrouter | ollama # TRADINGAGENTS_BACKEND_URL=https://api.openai.com/v1 # Deep-think tier (complex reasoning — e.g. research manager, risk judge) # TRADINGAGENTS_DEEP_THINK_LLM=gpt-5.2 # TRADINGAGENTS_DEEP_THINK_LLM_PROVIDER= # override provider for this tier only # TRADINGAGENTS_DEEP_THINK_BACKEND_URL= # override backend URL for this tier only # Mid-think tier (balanced analysis — e.g. debate agents) # Falls back to quick_think_llm when left empty. # TRADINGAGENTS_MID_THINK_LLM= # TRADINGAGENTS_MID_THINK_LLM_PROVIDER= # TRADINGAGENTS_MID_THINK_BACKEND_URL= # Quick-think tier (fast responses — e.g. analysts, scanners) # TRADINGAGENTS_QUICK_THINK_LLM=gpt-5-mini # TRADINGAGENTS_QUICK_THINK_LLM_PROVIDER= # TRADINGAGENTS_QUICK_THINK_BACKEND_URL= # ── Provider-specific thinking / reasoning controls ────────────────── # Global (applies to all tiers unless overridden per-tier below) # TRADINGAGENTS_GOOGLE_THINKING_LEVEL= # "high", "minimal", etc. # TRADINGAGENTS_OPENAI_REASONING_EFFORT= # "low", "medium", "high" # Per-tier overrides # TRADINGAGENTS_DEEP_THINK_GOOGLE_THINKING_LEVEL= # TRADINGAGENTS_DEEP_THINK_OPENAI_REASONING_EFFORT= # TRADINGAGENTS_MID_THINK_GOOGLE_THINKING_LEVEL= # TRADINGAGENTS_MID_THINK_OPENAI_REASONING_EFFORT= # TRADINGAGENTS_QUICK_THINK_GOOGLE_THINKING_LEVEL= # TRADINGAGENTS_QUICK_THINK_OPENAI_REASONING_EFFORT= # ── Debate & discussion settings ───────────────────────────────────── # TRADINGAGENTS_MAX_DEBATE_ROUNDS=2 # bull/bear investment debate rounds (1–5) # TRADINGAGENTS_MAX_RISK_DISCUSS_ROUNDS=2 # risk analyst discussion rounds (1–5) # TRADINGAGENTS_MAX_RECUR_LIMIT=100 # LangGraph recursion limit # ── Concurrency settings ────────────────────────────────────────────── # Number of per-ticker analysis pipelines that run in parallel during # 'auto' mode (CLI: `pipeline` command; AgentOS: auto run type). # Raise this if your LLM & data-vendor API plans support higher call rates. # TRADINGAGENTS_MAX_CONCURRENT_PIPELINES=2 # ── Google NotebookLM sync (optional) ──────────────────────────────── # Notebook ID for daily digest upload via the nlm CLI tool # NOTEBOOKLM_ID= # ── Data vendor routing ────────────────────────────────────────────── # Category-level vendor selection (yfinance | alpha_vantage | finnhub) # TRADINGAGENTS_VENDOR_CORE_STOCK_APIS=yfinance # TRADINGAGENTS_VENDOR_TECHNICAL_INDICATORS=yfinance # TRADINGAGENTS_VENDOR_FUNDAMENTAL_DATA=yfinance # TRADINGAGENTS_VENDOR_NEWS_DATA=yfinance # TRADINGAGENTS_VENDOR_SCANNER_DATA=yfinance # TRADINGAGENTS_VENDOR_CALENDAR_DATA=finnhub # ── Portfolio Manager ───────────────────────────────────────────────── # PostgreSQL connection string for Supabase (required for portfolio commands) # SUPABASE_CONNECTION_STRING=postgresql://postgres.:@aws-1-.pooler.supabase.com:6543/postgres # Root directory for all reports (scans, analysis, portfolio artifacts). # All output lands under {REPORTS_DIR}/daily/{date}/... # PORTFOLIO_DATA_DIR overrides this for portfolio-only reports if you need them split. # TRADINGAGENTS_REPORTS_DIR=/absolute/path/to/reports # PORTFOLIO_DATA_DIR=/absolute/path/to/reports # Portfolio constraint overrides # TRADINGAGENTS_PM_MAX_POSITIONS=15 # maximum number of open positions # TRADINGAGENTS_PM_MAX_POSITION_PCT=0.15 # max single position as fraction of portfolio # TRADINGAGENTS_PM_MAX_SECTOR_PCT=0.35 # max sector concentration # TRADINGAGENTS_PM_MIN_CASH_PCT=0.05 # minimum cash reserve # TRADINGAGENTS_PM_DEFAULT_BUDGET=100000.0 # starting cash budget (USD)