Skip to content

vrajasekaran/ai-fin-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FinFlow AI Agents 🤖💰

A comprehensive Multi-Agent Financial Analysis Platform built with LangGraph, CrewAI, and FastAPI.

🚀 Features

  • 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

🏗️ Architecture

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

🛠️ Tech Stack

  • 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

📦 Installation

# 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 keys

🔧 Configuration

Create 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

🚀 Quick Start

# Start the FastAPI server
uvicorn api.main:app --reload

# Run agent workflow
python -m core.workflow --symbol AAPL --analysis_type comprehensive

📊 API Endpoints

  • POST /api/v1/analyze: Comprehensive financial analysis
  • GET /api/v1/agents/status: Agent status and health
  • POST /api/v1/research: Financial research request
  • GET /api/v1/reports/{report_id}: Retrieve analysis reports

🤖 Agents Overview

ResearchAgent

  • Gathers financial data from multiple APIs
  • Processes SEC filings and earnings calls
  • Maintains knowledge base with Chroma

AnalysisAgent

  • Performs quantitative analysis
  • Generates financial ratios and metrics
  • Creates technical analysis charts

RiskAgent

  • Assesses portfolio risks
  • Calculates VaR and stress tests
  • Monitors market volatility

ReportAgent

  • Generates executive summaries
  • Creates comprehensive reports
  • Formats data for stakeholders

ComplianceAgent

  • Ensures regulatory compliance
  • Monitors for bias and fairness
  • Maintains audit trails

📈 Usage Examples

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)

🧪 Testing

# Run all tests
pytest

# Run specific test categories
pytest tests/test_agents/
pytest tests/test_api/
pytest tests/test_tools/

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📄 License

MIT License - see LICENSE for details.

🙏 Acknowledgments

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors