# AI News Research Agent - Production Configuration Template # Copy this file to .env and fill in your actual values # ============================================================================ # LLM CONFIGURATION # ============================================================================ # Local embeddings are used for semantic deduplication. # No embedding API key is required. EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2 # OpenRouter API (primary provider - no rate limits) # Get key from: https://openrouter.ai/settings OPENROUTER_API_KEY=your_openrouter_api_key_here OPENROUTER_MODEL=liquid/lfm-2.5-1.2b-thinking:free # Groq API (fallback provider - has rate limits) # Get key from: https://console.groq.com/keys GROQ_API_KEY=your_groq_api_key_here GROQ_MODEL=llama-3.3-70b-versatile # Gemini API (final newsletter formatting) # Get key from: https://aistudio.google.com/app/apikey GEMINI_API_KEY=your_gemini_api_key_here GEMINI_MODEL=gemini-2.5-flash # ============================================================================ # LANGCHAIN & OBSERVABILITY # ============================================================================ # LangChain API for tracing and debugging # Get key from: https://smith.langchain.com/ LANGCHAIN_API_KEY=your_langchain_api_key_here LANGCHAIN_TRACING_V2=true # ============================================================================ # TELEGRAM BOT # ============================================================================ # Get token from BotFather on Telegram (@BotFather) TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here # Your personal chat ID to receive newsletters # Get from @userinfobot on Telegram TELEGRAM_CHAT_ID=your_telegram_chat_id_here # ============================================================================ # DATABASE # ============================================================================ # PostgreSQL connection (for persistent workflow checkpoints) # Format: postgresql+psycopg://user:password@host:port/database # Leave empty to use in-memory checkpointing POSTGRES_URL=postgresql+psycopg://user:password@localhost:5432/news_agent # SQLite fallback path (used if PostgreSQL not configured) SQLITE_DB_PATH=newsletter.db # ============================================================================ # VECTOR STORE # ============================================================================ # ChromaDB path (for semantic embeddings and deduplication) CHROMA_PATH=./chroma_data # ============================================================================ # SOCIAL MEDIA API CREDENTIALS (Optional - not needed for MVP) # ============================================================================ # Reddit API (for subreddit scraping) REDDIT_CLIENT_ID=your_reddit_client_id REDDIT_CLIENT_SECRET=your_reddit_client_secret # Twitter/X API (for tweet collection) TWITTER_BEARER_TOKEN=your_twitter_bearer_token # ============================================================================ # SCHEDULER CONFIGURATION # ============================================================================ # Daily newsletter time (24-hour format) NEWSLETTER_HOUR=9 NEWSLETTER_MINUTE=0 # ============================================================================ # NEWSLETTER SETTINGS # ============================================================================ # Minimum items required to send newsletter MIN_NEWS_ITEMS=5 # Maximum items to include in newsletter MAX_NEWS_ITEMS=20 # Similarity threshold for deduplication (0.0-1.0) # Higher = stricter deduplication (more sensitive to duplicates) SIMILARITY_THRESHOLD=0.85 # ============================================================================ # LOGGING # ============================================================================ # Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL LOG_LEVEL=INFO # ============================================================================ # FEATURE FLAGS # ============================================================================ # Enable semantic embeddings for deduplication USE_EMBEDDINGS=true # Use PostgreSQL for persistent checkpoints # Leave false for free Render deployments USE_POSTGRES_CHECKPOINT=false # ============================================================================ # GOOGLE DRIVE INTEGRATION # ============================================================================ # Enable Google Drive integration for LinkedIn newsletter # Set to true to save LinkedIn newsletter to Google Drive ENABLE_GOOGLE_DRIVE=false # Google Drive folder ID (get from folder URL) # Example: https://drive.google.com/drive/folders/ABC123xyz... GOOGLE_DRIVE_FOLDER_ID=your_folder_id_here # Google Service Account JSON credentials # Copy the entire JSON from Google Cloud Console > Service Accounts # Format: {"type":"service_account","project_id":...} GOOGLE_SERVICE_ACCOUNT_JSON={"type":"service_account","project_id":"","private_key":"","client_email":""} # ============================================================================ # AGENTROUTER MULTI-AGENT ORCHESTRATION # ============================================================================ # AgentRouter API for multi-agent orchestration # Get key from: https://agentrouter.to/ (sign in and copy API key) AGENTROUTER_API_KEY=your_agentrouter_api_key_here # Model to use for AgentRouter agents (default: usf-mini) AGENTROUTER_MODEL=claude-opus-4-6 # ============================================================================ # RUN MODE # ============================================================================ # Set to true when running from scheduled cron job # This triggers LinkedIn newsletter generation # Only set this in your cron job command, not in .env # IS_SCHEDULED_RUN=true