A comprehensive Multi-Agent Financial Analysis Platform built with LangGraph, CrewAI, and FastAPI.
- Multi-Agent System: Research, Analysis, Risk, Report, and Compliance agents
- RAG Pipeline: SEC filings and earnings calls knowledge base
- Real-time Data: Integration with Yahoo Finance, Alpha Vantage, FRED APIs
- Observability: MLflow and OpenTelemetry logging
- Security: API key management and audit trails
- Governance: Bias monitoring and decision explainability
FinFlow AI Agents/
├── agents/ # Agent implementations
├── api/ # FastAPI endpoints
├── core/ # Core utilities and models
├── data/ # Data processing and storage
├── tools/ # External API integrations
├── config/ # Configuration management
└── tests/ # Test suite
- LangGraph: Agent orchestration and workflow management
- CrewAI: Multi-agent collaboration framework
- FastAPI: High-performance API framework
- Chroma: Vector database for RAG
- AWS: Cloud infrastructure and services
- MLflow: Experiment tracking and model management
- OpenTelemetry: Observability and monitoring
# Clone the repository
git clone https://github.com/yourusername/finance-gpt-agents.git
cd finance-gpt-agents
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your API keysCreate a .env file with your API keys:
# OpenAI API
OPENAI_API_KEY=your_openai_key
# Financial APIs
YAHOO_FINANCE_API_KEY=your_yahoo_key
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key
FRED_API_KEY=your_fred_key
# AWS Configuration
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secret
AWS_REGION=us-east-1
# Database
CHROMA_PERSIST_DIRECTORY=./data/chroma# Start the FastAPI server
uvicorn api.main:app --reload
# Run agent workflow
python -m core.workflow --symbol AAPL --analysis_type comprehensivePOST /api/v1/analyze: Comprehensive financial analysisGET /api/v1/agents/status: Agent status and healthPOST /api/v1/research: Financial research requestGET /api/v1/reports/{report_id}: Retrieve analysis reports
- Gathers financial data from multiple APIs
- Processes SEC filings and earnings calls
- Maintains knowledge base with Chroma
- Performs quantitative analysis
- Generates financial ratios and metrics
- Creates technical analysis charts
- Assesses portfolio risks
- Calculates VaR and stress tests
- Monitors market volatility
- Generates executive summaries
- Creates comprehensive reports
- Formats data for stakeholders
- Ensures regulatory compliance
- Monitors for bias and fairness
- Maintains audit trails
from core.workflow import FinancialAnalysisWorkflow
# Initialize workflow
workflow = FinancialAnalysisWorkflow()
# Run comprehensive analysis
result = workflow.analyze(
symbol="AAPL",
analysis_type="comprehensive",
include_risk_assessment=True
)
print(result.report)# Run all tests
pytest
# Run specific test categories
pytest tests/test_agents/
pytest tests/test_api/
pytest tests/test_tools/- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE for details.
- LangGraph team for the excellent agent orchestration framework
- CrewAI for multi-agent collaboration patterns
- FastAPI for the high-performance API framework
Built with ❤️ for the open-source community