A multi-agent system built with LangGraph that simulates an investment committee debate between bullish and bearish perspectives, with a chairman making final investment decisions.
This system demonstrates true agentic behavior where three AI agents debate and make investment decisions:
- 🐂 Bull Agent: Finds positive reasons to buy stocks
- 🐻 Bear Agent: Finds negative reasons to avoid stocks
- 🎯 Chairman Agent: Makes final investment decisions after hearing both sides
- Real-time web research using Tavily search
- Agentic debate where agents counter each other's arguments
- Multi-round discussion with structured workflow
- Final decision making with reasoning
- Interactive command-line interface
investment-committee/
├── src/
│ ├── __init__.py # Package marker
│ ├── config.py # Prompts and model configuration
│ ├── tools.py # Agent tools organized by function
│ ├── utils.py # Utility functions for display
│ └── agents.py # Agent and supervisor creation
├── main.py # Command-line interface
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
└── README.md # This file
-
Clone and navigate to the directory
cd investment-committee
-
Install dependencies
Install dependencies using uv, a fast Python package installer and resolver:
uv sync
-
Set up environment variables
Next, create an
.env
file and populate it with your API keys from OpenAI and Tavily.cp .env.example .env # Edit .env with your API keys
-
Run the application
Run the application with the
python
command:python main.py
or with uv:
uv run main.py
- Start the application with
python main.py
- Enter any stock symbol (e.g., NVDA, TSLA, AAPL)
- Watch the agents debate the investment merits
- See the chairman's final decision with reasoning
- Type 'quit' to exit
- Model settings: Modify
src/config.py
- Agent prompts: Customize prompts in
src/config.py
- Tool behavior: Adjust tools in
src/tools.py
- Python 3.8+
- OpenAI API key
- Tavily API key (for web search)
This project demonstrates:
- Multi-agent system architecture with LangGraph
- Agent-to-agent communication and debate
- Real-time web search integration
- Structured decision-making workflows
- Command-line interface design
Perfect for learning how to build collaborative AI systems!