How aasim78/finagent works
FinAgent presents financial summaries and charts, and answers natural-language questions using an LLM that selects deterministic data and calculation tools. The query path runs from the React dashboard through FastAPI to the agent, which calls Ollama and dispatches requested tools; those tools read the CSV-backed data layer. The dashboard also loads a separate summary endpoint. README capabilities include comparisons, growth, missing-data handling, and local Qwen3/Ollama execution. backend/prompts.py guides answers; backend/main.py and backend/agent.py show the runtime wiring, while unsampled implementation links are omitted.
Main entry points: agent.py Agent orchestration · main.py FastAPI endpoints · App.jsx React Dashboard · tools.py Financial tools
Components 10
Dashboard
- React Dashboard
frontend/src/App.jsx
API
- FastAPI endpoints
backend/main.py
Agent and LLM
- Agent orchestration
backend/agent.py - Answer guidance
backend/prompts.py
Financial Analysis
- Tool dispatch
backend/agent.py - Financial tools
backend/tools.py
Financial Data
- CSV data access
backend/data.py - Financial dataset
data/financial_data.csv
Other components
- User
- Ollama / Qwen3
Connections 12
- User → React Dashboard: asks / views
frontend/src/App.jsx - React Dashboard → FastAPI endpoints: requests summary
frontend/src/App.jsx - React Dashboard → FastAPI endpoints: posts question
frontend/src/App.jsx - FastAPI endpoints → Agent orchestration: calls agent
backend/main.py - FastAPI endpoints → Financial tools: requests analysis
backend/main.py - Agent orchestration → Answer guidance: uses guidance
backend/agent.py - Agent orchestration → Ollama / Qwen3: sends messages
backend/agent.py - Ollama / Qwen3 → Agent orchestration: returns tool requests
backend/agent.py - Agent orchestration → Tool dispatch: dispatches calls
backend/agent.py - Tool dispatch → Financial tools: invokes functions
backend/agent.py - Financial tools → CSV data access: reads records
backend/tools.py - CSV data access → Financial dataset: loads CSV
backend/data.py