# ๐Ÿค– Setup Anthropic (Claude) for TradingAgents Your company VPN blocks OpenAI, but **Anthropic (Claude) works perfectly!** ๐ŸŽ‰ ## โœ… Test Results Summary - **โœ… Anthropic (Claude)** - Fully accessible and working - **โŒ Google (Gemini)** - Blocked by company proxy - **โŒ OpenRouter** - Blocked by Zscaler firewall - **โŒ Ollama** - Not installed (local option) ## ๐Ÿ”‘ Step 1: Get Anthropic API Key 1. Go to: **https://console.anthropic.com/** 2. Sign up or sign in 3. Navigate to **"API Keys"** section 4. Click **"Create Key"** 5. Copy your API key (starts with `sk-ant-...`) ## ๐Ÿ“ Step 2: Update .env File Replace the placeholder in your `.env` file: ```bash # Change this line: ANTHROPIC_API_KEY=your_anthropic_api_key_here # To your actual key: ANTHROPIC_API_KEY=sk-ant-your-actual-key-here ``` ## ๐Ÿงช Step 3: Test Your Setup Run the test script to verify everything works: ```bash ./test_ai_providers.py ``` You should see: `โœ… Anthropic (Claude) - FULLY WORKING` ## ๐Ÿš€ Step 4: Run TradingAgents Start the TradingAgents CLI: ```bash source venv/bin/activate.fish python -c "from cli.main import app; app()" ``` When prompted, select: - **LLM Provider**: `Anthropic` - **Quick-Thinking Model**: `Claude Haiku 3.5` - **Deep-Thinking Model**: `Claude Sonnet 3.5` or `Claude Sonnet 4` ## ๐Ÿ’ฐ Pricing Claude is very affordable: - **Haiku 3.5**: ~$0.25 per 1M tokens - **Sonnet 3.5**: ~$3 per 1M tokens - **Opus 4**: ~$15 per 1M tokens For typical trading analysis: **~$0.10-$0.50 per analysis** ## ๐ŸŽฏ Available Models ### Quick-Thinking (Fast): - `claude-3-5-haiku-latest` - Fast and cost-effective - `claude-3-5-sonnet-latest` - Balanced performance ### Deep-Thinking (Advanced): - `claude-3-5-sonnet-latest` - High-quality analysis - `claude-3-7-sonnet-latest` - Advanced reasoning - `claude-sonnet-4-0` - Premium performance ## ๐Ÿ› ๏ธ Troubleshooting ### If you see "Connection Error": 1. Check your API key is correctly set in `.env` 2. Restart your terminal/shell 3. Re-run the test script ### If you see "Invalid API Key": 1. Verify the key starts with `sk-ant-` 2. Make sure there are no extra spaces 3. Generate a new key if needed ### If TradingAgents won't start: 1. Make sure virtual environment is activated 2. Check that all dependencies are installed 3. Run `pip install -e .` to reinstall ## โœจ Success! Once setup, you'll have: - โœ… Full TradingAgents functionality - โœ… High-quality AI analysis from Claude - โœ… Works around company VPN restrictions - โœ… Affordable pricing **Ready to analyze some stocks! ๐Ÿ“ˆ**