The Autonomous Investment Committee that lives in your browser.
Retail investors are drowning in noise. To analyze a single asset, you need to switch between TradingView for charts, Yahoo Finance for fundamentals, and Twitter/News for sentiment. It's a fragmented, cognitive nightmare that leads to bad decisions.
Cofinance Analyst is not just a chatbotβit's an Agentic Orchestrator. It unifies the entire financial research workflow into a single conversation. By coordinating a team of specialized AI agents, it delivers institutional-grade analysis, interactive visuals, and real-time data without you ever leaving the chat.
- Context-Aware Intelligence: Automatically switches strategies based on asset class (e.g., analyzing P/E for Stocks vs. Volatility for Crypto).
- Zero Hallucination Risk: Agents are physically incapable of guessing data; they must use Python tools to fetch real-time prices and news.
- Visual Alpha: Generates interactive Plotly charts on the fly, bridging the gap between text and technical analysis.
Cofinance uses a Hub-and-Spoke architecture where a central "Manager Agent" directs specialized workers.
sequenceDiagram
participant U as π€ User
participant M as π§ Manager Agent
participant D as π Data Analyst
participant N as π° News Researcher
U->>M: "Should I buy Bitcoin?"
Note over M: π Strategy: Detected Crypto.<br/>Activating Risk Guardian Mode.
par Parallel Execution
M->>D: Get Price & Volatility
D->>D: yFinance API
M->>N: Get Sentiment & FUD
N->>N: DuckDuckGo Search
end
D-->>M: Price: $95k, Volatility: High
N-->>M: Sentiment: Extreme Greed
Note over M: βοΈ Synthesis: Price is up,<br/>but risk is too high.
M->>U: "Bitcoin is up, but overextended. Wait for pullback."
The system is smart enough to treat assets differently:
- Stocks (AAPL, NVDA): Focuses on Earnings, Revenue, and P/E Ratios.
- Crypto (BTC, SOL): Switches to Risk Management Mode, analyzing Fear & Greed Index, Distance from ATH, and Volatility.
No more static images. The Data Agent writes and executes Python code to generate interactive Plotly charts that you can zoom, pan, and hover over for exact price points.
Unlike standard LLM chats that forget you instantly, Cofinance uses an SQLite Database to maintain your personal "Watchlist" across sessions.
- Ask: "How is my portfolio doing?"
- Action: Agent queries the DB, checks your specific tickers, and summarizes the news.
This project demonstrates mastery of Agentic AI concepts:
- Multi-Agent Orchestration: Implemented via phidata using a Team Lead/Worker pattern.
- Tool Use (Function Calling): Custom Python tools for
yfinance,duckduckgo_search, andsqlite3. - Structured Output: Enforces strict "Strategy -> Data -> News -> Verdict" response formats using System Prompt Engineering.
- Observability: Full visibility into agent thought processes via Streamlit expanders.
| Feature | Screenshot |
|---|---|
| Summary | ![]() |
| Deep Think | ![]() |
| Response | ![]() |
| Watchlist | ![]() |
| Compare | ![]() |
- Python 3.9+
- A Google Gemini API Key or LLM Studio or OpenRouter API Key
-
Clone the repo
git clone [https://github.com/creosb/Cofinance-analyst.git](https://github.com/cresoB/Cofinance.git) cd Cofinance-analyst -
Create a Virtual Environment (Windows)
python -m venv .venv .\.venv\Scripts\Activate.ps1 -
Install Dependencies
pip install -r requirements.txt
-
Set Up Keysexport GOOGLE_API_KEY="your_api_key_here"
-
Run the App
python -m streamlit run app.py --browser.gatherUsageStats false
We use pytest to ensure our data tools are robust (especially the crypto-fallback logic).
pytest -qCofinance-analyst/
βββ agents/ # Agent definitions (Manager, Data, News)
βββ tools/ # Custom Python tools (yfinance, plotly)
βββ storage/ # SQLite database logic
βββ tests/ # Unit tests for tools
βββ app.py # Main Streamlit application
βββ requirements.txt # Pinned dependencies
βββ README.md # Documentation
- Track: Finance Agent / Multi-Agent Systems
- Framework: Phidata
- Model: Google Gemini 2.5 Flash - Qwen 3 4b - gpt oss 20b
Built with β€οΈ by Creos
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.







