Cli
cli
Flag-driven runner for the TradingAgents pipeline.
Exposes :func:run_cli as the cli subcommand of the tradingagents
console script. Each parameter is a fire-friendly flag, with defaults
matching the previous hard-coded values from the legacy cli.py.
Functions:
| Name | Description |
|---|---|
run_cli |
Run the TradingAgents pipeline for a single ticker. |
run_cli
run_cli(
ticker: str = "GOOG",
date: str | None = None,
llm_provider: LLMProvider = "google_genai",
deep_think_llm: str = "gemini-3.1-pro-preview",
quick_think_llm: str = "gemini-3-flash-preview",
reasoning_effort: ReasoningEffort = "high",
response_language: ResponseLanguage = "zh-TW",
max_debate_rounds: int = 10,
max_risk_discuss_rounds: int = 10,
max_recur_limit: int = 100,
selected_analysts: list[str] | tuple[str, ...] | None = None,
debug: bool = True,
) -> str
Run the TradingAgents pipeline for a single ticker.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Ticker symbol or company name to analyse. Defaults to GOOG. |
'GOOG'
|
|
str | None
|
Trade date in YYYY-MM-DD format. Defaults to today's local date when None. |
None
|
|
LLMProvider
|
LangChain init_chat_model registry key. Defaults to google_genai. |
'google_genai'
|
|
str
|
Model name for deep-thinking nodes (Research Manager, Risk Manager). Defaults to gemini-3.1-pro-preview. |
'gemini-3.1-pro-preview'
|
|
str
|
Model name for quick-thinking nodes (analysts, researchers, trader, debaters). Defaults to gemini-3-flash-preview. |
'gemini-3-flash-preview'
|
|
ReasoningEffort
|
Unified reasoning level mapped per provider. Defaults to high. |
'high'
|
|
ResponseLanguage
|
BCP 47 language tag (zh-TW, zh-CN, en-US, ja-JP, ko-KR, de-DE) appended to agent prompts. Defaults to zh-TW. |
'zh-TW'
|
|
int
|
Maximum Bull/Bear investment debate rounds. Defaults to 10. |
10
|
|
int
|
Maximum risk management debate rounds. Defaults to 10. |
10
|
|
int
|
Maximum recursion limit for LangGraph execution. Defaults to 100. |
100
|
|
list[str] | tuple[str, ...] | None
|
Analyst types to include. Valid options are market, social, news, fundamentals. Defaults to all four when None. |
None
|
|
bool
|
Stream agent messages live (still routed through the Rich renderer regardless of this flag — the flag only affects the underlying graph's verbosity). Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The final BUY / SELL / HOLD decision text. |