ai-hedge-fund: From Viral Python Script to Drag-and-Drop AI Investment Committee

One developer turned a subway idea into a 48.9k-star visual editor where Warren Buffett, Cathie Wood, and Michael Burry agents debate stocks in a React Flow canvas. The real story is what it reveals about building serious agent platforms.

by Virat Singh · virattt/ai-hedge-fund · ~12 min read

A bustling trading floor with 18 stylized investor portraits seated around a central table debating over a glowing stock ticker. A large transparent React Flow canvas overlays the scene with draggable nodes and edges connecting the figures. A human hand is shown dragging one node into position.
A wide view of the project's blend of theatrical investor debate and modern visual workflow tooling.
Key Takeaways

The Investment Committee You Can Drag and Drop

Open the web app and you are greeted with a polished React Flow canvas. On the left sits a library of nodes. On the right, configuration panels. In the center, you compose your own investment committee by dragging and connecting components.

Stock Analyzer node feeds data to specialized investor nodes. Each investor node represents a distinct philosophy. Those connect to a Risk Manager and finally a Portfolio Manager that synthesizes the debate into a clear recommendation.

Click run. Watch data flow through the graph. Outputs appear in the bottom panel: conflicting analyses, reasoned counterarguments, and a final synthesized trade decision. The entire experience feels like a professional workflow tool rather than a novelty script.

48.9k
GitHub Stars
18
Agent Personas
5+
LLM Providers
6
Months to Full IDE

How 18 Distinct Investing Philosophies Actually Argue

The power comes from deliberate conflict. Instead of generic agents that converge too quickly, this system gives each participant a strong, opinionated voice.

Warren Buffett looks for wonderful businesses at fair prices. Cathie Wood hunts disruptive growth stories. Michael Burry hunts deep value with near-term catalysts. Aswath Damodaran builds detailed valuation models. The Risk Manager challenges them all with volatility metrics and position limits.

This tension produces richer synthesis than a single model could achieve. The Portfolio Manager node receives these contradictory signals and must reconcile them into a coherent recommendation.

Let multiple AI agents with conflicting strategies debate the same data and force them to reach a consensus.

— Yuval Avidani, yuv.ai
Three distinct hands writing conflicting notes on the same stock analysis report. One hand writes 'wonderful business at a fair price,' another 'disruptive growth at any valuation,' and the third 'deep value with margin of safety and catalyst.' Taut threads connect each note to a central decision node.
Strong opposing investment philosophies create the productive tension that drives better synthesis.
WSJ hedcut-style portrait of Virat Singh

This started as a simple idea while riding the NYC subway. I wanted to see what would happen if legendary investors could debate stocks together using modern AI.

— Virat Singh, creator of ai-hedge-fund

From Subway Script to Full Agent IDE in Six Months

The project began as a compact Python script. A handful of hardcoded agents, a simple orchestration loop, and entertaining output. It struck a nerve and went viral, reaching thousands of stars in days.

Instead of stopping at the meme, Virat Singh kept building. He migrated the core logic to a more scalable LangGraph-style execution model. Then he added a complete full-stack web application with a visual editor. Persistent flows, execution history, database storage via SQLAlchemy and Alembic migrations, and a polished React + TypeScript frontend using React Flow.

What was once a single file evolved into a professional-grade platform built almost entirely by one developer.

A mechanical arm evolving across three connected stages from left to right. The left shows a simple Python script unspooling from a typewriter. The middle shows the script growing into a complex node graph. The right shows the polished modern dashboard interface. Line density and precision increase across the stages.
The project's rapid evolution from a clever script to a full visual agent platform.

The Architecture That Makes It Work

The system maintains a clean separation between design time and runtime. The React Flow canvas is purely for authoring flows. Nodes map to backend agent definitions stored in data files. When you execute a flow, the backend translates the visual graph into an executable orchestration using the services in the FastAPI backend.

Key services include the graph execution engine, individual agent runners, portfolio management logic, and a backtesting service that evaluates historical performance. Every run is persisted to the database along with its cycles and outputs, creating an inspectable history similar to LangSmith.

Multi-LLM support is handled cleanly. Users can assign different models to different nodes or use a single provider across the board. Local models via Ollama are fully supported.

Extreme close-up of a cracked gear representing a flawed single-model decision. A thin firewall line contains the crack while multiple smaller gears labeled with investor names turn smoothly on the right side of the image.
Multi-agent debate acts as a containment mechanism for individual model errors and biases.

AI Hedge Fund vs. The Rest

Most alternatives fall into different categories. Some focus on research report generation. Others attempt live execution. Few combine memorable personas with a visual composer and strong educational framing.

Project Agent Style Primary Interface Execution Persistence Stars Best For
virattt/ai-hedge-fund 18 distinct investor personas React Flow visual editor + CLI Graph orchestration with debate SQLAlchemy + runs history 48.9k Learning multi-perspective agents
FinRobot Orchestrated research agents Jupyter notebooks Director + specialized tools Limited ~6.4k Financial report generation
AutoHedge Swarm intelligence agents Code-first Autonomous with execution Minimal ~1.1k Live strategy experimentation
Freqtrade Rule and ML based Web UI + code Backtesting engine Full Many thousands Traditional quant trading
A single authoritative judge figure seated at a bench receiving contradictory report stacks from stylized investor silhouettes and issuing one clean, synthesized order sheet.
The final synthesis step where conflicting views are reconciled into actionable decisions.

Why This Pattern Matters Beyond Finance

The project demonstrates a broader shift in how we build agent systems. Moving from imperative scripts to visual, inspectable, and persistent platforms lowers the barrier to experimentation while increasing transparency and debuggability.

Strong personas force models to articulate their reasoning more clearly. The visual canvas makes the decision process legible. Persistent execution history allows users to inspect where and why the committee reached its conclusions.

While the project includes strong disclaimers that it is for educational purposes only, it offers a compelling template for domain-specific agent platforms in other fields. Legal analysis, medical reasoning, and strategic planning could all benefit from similar multi-perspective visual workflows.