Streamlit + CrewAI application that runs a 5-agent hierarchical crew against an NSE India stock symbol and returns an investment write-up.
-
Install dependencies:
pip install -r requirements.txt
-
Set environment variables: Create a
.envfile in the root of the project:GEMINI_API_KEY=YOUR_GEMINI_API_KEY SERPER_API_KEY=YOUR_SERPER_API_KEY LANGSEARCH_API_KEY=YOUR_LANGSEARCH_API_KEY PASSKEY=YOUR_PASSKEYOptional tuning variables are documented in
src/config.py. -
Run the application:
streamlit run app.py
app.py # Streamlit UI
stock_analysis.py # analyse_stock (UI) + run_analysis (worker)
src/
config.py # All configuration
stocks.py # Stock symbol validation
tools/ # CalculatorTool, LangsearchTool
crew/ # CrewAI agents, tasks, and runner
storage/ # SQLite (WAL mode) — cache, queue, in-flight tracking
workers/ # Background queue processing thread
data/
stock.csv # NSE India symbols
Requests are enqueued and processed asynchronously by a background worker thread — the UI never blocks on crew execution. Results are cached for 3 days (configurable).
See docs/ for detailed architecture, security, concurrency, and testing documentation.