v0.2.4 · Apache-2.0 · Python 3.10+

Transparent, debate-driven investment research.

Agent-Alpha is a LangGraph-powered multi-agent pipeline that turns one or many ticker symbols into deterministic markdown and JSON research reports. Specialist analysts, adversarial researchers, a trader, a risk committee, and a portfolio manager collaborate through structured disagreement to produce auditable, five-tier investment recommendations.

12
Named Agent Roles
10
LLM Providers
5-tier
Decision Scale
11
Report Sections

A new category of research tooling

Most trading systems are rigid rule engines or opaque ML models. Agent-Alpha sits in the middle: every recommendation comes with an inspectable reasoning trail, from analyst findings through adversarial debate to final decision.

Auditable by design

Stable markdown reports with deterministic section headings, structured metadata, and a daily index. Built for human review and downstream machine ingestion alike.

Conflict as signal

The system intentionally manufactures disagreement. Bull and bear researchers debate, then three risk debaters pressure-test exposure before the portfolio manager decides.

Memory without training

An append-only decision log tracks outcomes, computes alpha versus SPY, and reflects lessons back into future runs. Lightweight learning without fine-tuning new weights.

How a run moves through the graph

A directed LangGraph workflow stages analysts, debate, synthesis, risk review, and a final decision into a single deterministic pass.

1

Analyst Intake

Four specialists (market, sentiment, news, fundamentals) collect tool-backed evidence and write independent reports.

2

Tool Loops

Each analyst cycles through LangChain tool nodes until continuation logic is satisfied, then messages are cleared.

3

Bull vs Bear

Two structurally opposed researchers debate across configurable rounds, sharpening disagreement into synthesis.

4

Trade + Risk

Research manager writes the plan, trader proposes action, and three risk debaters cycle aggressive/conservative/neutral.

5

Portfolio Decision

The PM receives the full chain plus memory-log context, writes the final rating, and logs state for future reflection.

The complete runtime cast

Named roles, not anonymous prompt fragments. Each agent occupies a specific graph node, uses the quick or deep model profile, and contributes a distinct artifact.

Analyst

Market Analyst

Price action, indicators, and technical trend context.

get_stock_data, get_indicators
Analyst

Sentiment Analyst

Public mood and positioning signals from news-backed sentiment.

social analysis node
Analyst

News Analyst

Company and macro developments, global news, insider activity.

get_news, get_global_news, get_insider_transactions
Analyst

Fundamentals Analyst

Financial statements, cash flow, income statement, balance sheet.

get_fundamentals, get_balance_sheet, get_cashflow
Research

Bull Researcher

Constructs and defends the strongest upside case from analyst reports.

multi-round adversarial debate
Research

Bear Researcher

Challenges optimism and argues the downside, forcing robust synthesis.

alternates with bull until debate ends
Manager

Research Manager

Synthesizes debate into a structured plan with five-tier rating scale.

deep-thinking model profile
Execution

Trader

Turns the research plan into an actionable proposal with position guidance.

feeds the risk stage
Risk

Aggressive Analyst

Pushes for conviction and higher exposure where thesis is strong.

rotating risk trio
Risk

Conservative Analyst

Focuses on downside, fragility, and event-risk containment.

checks over-exposure
Risk

Neutral Analyst

Balances aggressive and defensive positions to keep committee grounded.

routes back into risk cycle
Decision

Portfolio Manager

Receives the full chain plus memory-log context and issues the final rating.

deep-thinking model · decision owner

Project structure at a glance

The repo is organized around a script-first operational core, a minimal local web app, structured planning docs, and a comprehensive test suite.

tradingagents/

Domain core

Installable Python package with graph orchestration, agent roles, LLM provider adapters, dataflow helpers, deterministic reporting, and shared config.

  • graph/ — workflow setup, routing, checkpointing, reflection, signal processing
  • agents/ — analysts, researchers, managers, trader, risk, schemas
  • llm_clients/ — factory pattern with per-provider client adapters
  • reporting.py — deterministic markdown + JSON serialization
scripts/

Operational entrypoints

The primary interface for running analyses. Supports single and batch tickers, provider selection, model override, debate rounds, and checkpoint resume.

  • run_today.py — daily orchestrator CLI
  • run_batch.py — thin batch wrapper
  • smoke_structured_output.py — provider sanity check
app/

Local web UI

Lightweight stdlib HTTP server and static frontend for launching runs, saving defaults and API keys, monitoring jobs, and browsing generated reports.

  • server.py — threaded local API + static server
  • src/ — vanilla HTML/CSS/JS interface
planning/

Product and technical docs

Product overview, output schema contract, and a SaaS Studio vision that maps the evolution from a local script wrapper to a production AI operations platform.

  • Product_overview.md — product-language summary
  • Output_Schema.md — strict report contract
  • app-build-/ — SaaS PRD, architecture, roadmap

What a successful run produces

Reports follow a strict schema contract designed for both human review and machine ingestion. Every field has a defined type, location, and validation level.

report.md

Canonical analysis report with 11 required sections.

metadata.json

Machine-parseable run metadata mirroring report primitives.

Directory layout

Date-first folder structure with daily index aggregation.

Buy Overweight Hold Underweight Sell Five-tier decision scale

Quick start

python -m venv .venv source .venv/bin/activate pip install . cp .env.example .env # set provider key python scripts/run_today.py --ticker NVDA python scripts/run_today.py --tickers NVDA,MSFT,AAPL python scripts/run_today.py --ticker NVDA --checkpoint python app/server.py # http://127.0.0.1:8787

Technology

  • LangGraph — directed graph orchestration and checkpointing
  • LangChain — provider integrations (OpenAI, Anthropic, Google, Azure, xAI, DeepSeek, Qwen, GLM, Ollama, OpenRouter)
  • yfinance + stockstats — market data and indicators
  • pandas — data manipulation and analysis
  • Pytest — output schema, ticker, checkpoint, memory, signal tests
  • stdlib HTTP + vanilla JS — local app and control room

Future product direction

The planning docs describe the evolution from script-first local execution to a polished SaaS AI operations platform with live runs, agent discovery, report history, and enterprise controls.

Planned experiences

  • Agent Gallery with role, responsibility, and pipeline position
  • Run Builder with validation, presets, and multi-ticker config
  • Live Run Console with timeline, logs, and retry controls
  • Report history, comparison views, and richer metadata panels
  • Admin and policy layers for quotas, credentials, and RBAC

Planned architecture

  • Frontend app for dashboard, reports, settings, and admin
  • API service for auth, runs, settings, and artifact retrieval
  • Worker service reusing the Python orchestration core
  • Queue, database, object storage, realtime channel, observability
  • Tenant-aware security, encrypted secrets, and audit logs