A multi-agent AI system for intelligent stock market research and decision support — running 100% locally.
Trinetra-FinAI orchestrates a collaborative team of specialized AI agents that research, analyze, and synthesize a comprehensive investment report for any publicly listed company. Inspired by the Trinetra (the third eye of clear sight), it fuses three lenses of analysis fundamental, technical, and sentiment into a single strategic view, with no data ever leaving your machine.
- Why Trinetra-FinAI
- Key Features
- Architecture
- The Agent Crew
- Built With
- Getting Started
- Configuration
- Usage
- Project Structure
- Sample Output
- Roadmap
- Contributing
- Disclaimer
- License
Most retail research is fragmented - fundamentals in one tab, charts in another, news in a third - and stitching them together is slow and inconsistent. Trinetra-FinAI automates that workflow with a coordinated crew of agents, each an expert in one domain, that hand off their findings to a final analyst for synthesis.
- 100% local & private - runs entirely through Ollama. No API keys, no per-token billing, no data sent to third parties.
- Multi-perspective by design - fundamental, technical, and sentiment signals are weighed together rather than in isolation.
- Explainable - every section of the final report traces back to the agent that produced it.
- Extensible - agents, tools, and tasks are modular; add a new data source or analyst without touching the rest of the pipeline.
- Automated end-to-end research pipeline for any listed ticker
- Fundamental scoring (P/E, EPS, revenue growth, debt ratios)
- Technical signal generation (RSI, MACD, moving averages, support/resistance)
- News & social sentiment scoring via VADER
- Synthesized, structured investment report as the final deliverable
- Sequential agent orchestration powered by CrewAI
The system runs a sequential pipeline of 5 agents across 8 tasks, flowing from raw data extraction to a final strategic report.
flowchart LR
A[🔍 Data Extractor] --> B[📊 Fundamental Analyst]
A --> C[📈 Technical Analyst]
A --> D[📰 Sentiment Analyst]
B --> E[📝 Report Writer]
C --> E
D --> E
E --> F[(📄 Investment Report)]
The Data Extractor produces a clean, shared dataset. The three analysts work from that common source — each scoring its own dimension — and the Report Writer consolidates all signals into one coherent recommendation. All LLM inference is served locally by Ollama.
| Agent | Role | Responsibilities |
|---|---|---|
| 🔍 Data Extractor | Pulls price, volume, and financial statements | Data fetch, cleaning & preprocessing |
| 📊 Fundamental Analyst | Evaluates company health | P/E, EPS, revenue growth, debt ratios → fundamental score |
| 📈 Technical Analyst | Reads price action | RSI, MACD, moving averages, support/resistance → technical signals |
| 📰 Sentiment Analyst | Gauges market mood | News headlines & social signals → sentiment score (VADER) |
| 📝 Report Writer | Synthesizes the verdict | Combines all inputs into a structured final report |
- CrewAI — orchestrates the multi-agent framework and task hand-offs.
- Ollama — runs the LLMs 100% locally for privacy and zero API cost.
- VADER — lexicon-based sentiment scoring tuned for short-form text.
- Python 3.10+ — the core language powering data extraction and orchestration logic.
- Python 3.10+
- Ollama installed and running locally
- At least one pulled model (e.g.
llama3,mistral, orqwen2.5)
git clone https://github.com/<your-username>/trinetra-finai.git
cd trinetra-finaipython -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activatepip install -r requirements.txtollama pull llama3
ollama serve # if it isn't already runningCreate a .env file in the project root to point the crew at your local model and any data sources:
# LLM (served by Ollama)
OLLAMA_MODEL=llama3
OLLAMA_BASE_URL=http://localhost:11434
# Optional: API keys for richer market/news data
# NEWS_API_KEY=your_key_hereAdjust the model name to match whatever you pulled with
ollama pull. No cloud LLM keys are required for the core pipeline.
Run the crew against any ticker:
python main.py --ticker AAPLThe pipeline will spin up the agents in sequence and write the final report to the outputs/ directory.
Replace
main.pyand the flag names with your actual entry point if they differ - adjust this section to match the repo.
trinetra-finai/
├── agents/ # Agent definitions (role, goal, backstory, tools)
├── tasks/ # Task definitions and expected outputs
├── tools/ # Custom tools (data fetch, indicators, sentiment)
├── outputs/ # Generated investment reports
├── config/ # Model & pipeline configuration
├── main.py # Entry point — assembles and kicks off the crew
├── requirements.txt
└── README.md
This reflects a conventional CrewAI layout — tweak it to match your actual tree.
=================== TRINETRA-FINAI REPORT: AAPL ===================
Fundamental Score : 7.5 / 10 (Strong revenue growth, low debt)
Technical Signal : NEUTRAL (RSI 54, price above 50-DMA)
Sentiment Score : +0.32 (Mildly positive news flow)
-------------------------------------------------------------------
Verdict: HOLD — solid fundamentals, but momentum and sentiment
suggest waiting for a clearer entry point.
===================================================================
- Parallel agent execution for faster runs
- Web UI / dashboard for report viewing
- Backtesting module for historical signal validation
- Configurable scoring weights per investor profile
- Support for multiple tickers / portfolio-level analysis
- Pluggable data providers (Yahoo Finance, Alpha Vantage, etc.)
Trinetra-FinAI is a research and educational tool. Its outputs are not financial advice and should not be the sole basis for any investment decision. LLM-generated analysis can be incomplete or wrong. Always do your own research and consult a licensed financial professional before investing.
Distributed under the MIT License. See LICENSE for details.
Built with 🔱 and a healthy respect for risk.