sudo apt install -y git python3 python3-venv python3-pip curl
git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents
pip install uv
uv venv --python 3.13
source .venv/bin/activate
cd /path/to/TradingAgents
uv pip install .
### .env file
# Required
TRADINGAGENTS_LLM_PROVIDER=openai_compatible
TRADINGAGENTS_LLM_BACKEND_URL=https://api.puter.com/puterai/openai/v1 # ← your endpoint
# Models your server actually serves
TRADINGAGENTS_DEEP_THINK_LLM=openrouter:google/gemini-4-argon
TRADINGAGENTS_QUICK_THINK_LLM=openrouter:google/gemini-4-argon
# Optional – only if the endpoint requires a key
OPENAI_COMPATIBLE_API_KEY=
# ------------------------------------------------------------
# Optional settings
# ------------------------------------------------------------
TRADINGAGENTS_OUTPUT_LANGUAGE=English
TRADINGAGENTS_MAX_DEBATE_ROUNDS=1
TRADINGAGENTS_MAX_RISK_ROUNDS=1
TRADINGAGENTS_TEMPERATURE=0.0
TRADINGAGENTS_MAX_TOKENS=8192
# Optional free data sources
# FRED_API_KEY= # FRED macro data (free, optional)
# SEC_EDGAR_USER_AGENT=Your Name your@email.com
# ALPHA_VANTAGE_API_KEY=... # Alpha Vantage
tradingagents \
--ticker NVDA \
--date 2026-10-15 \
--analysts market,news,fundamentals,sentiment \
--save \
--no-show
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
import os
# Load from .env automatically, or set manually:
os.environ["TRADINGAGENTS_LLM_PROVIDER"] = "openai_compatible"
os.environ["TRADINGAGENTS_LLM_BACKEND_URL"] = "http://localhost:8000/v1"
config = DEFAULT_CONFIG.copy()
config["llm_provider"] = "openai_compatible"
config["backend_url"] = "http://localhost:8000/v1"
config["deep_think_llm"] = "your-deep-model-name"
config["quick_think_llm"] = "your-quick-model-name"
ta = TradingAgentsGraph(debug=True, config=config)
state, decision = ta.propagate("NVDA", "2026-10-15")
print(decision)
ta.save_reports(state, "NVDA")