Skip to content

shilok09/multi-agent-finance-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Multi Agent Finance Chatbot

A sophisticated multi-agent financial analysis system powered by AI that provides comprehensive market research, sentiment analysis, and automated report generation.

๐ŸŒŸ Features

  • ๐Ÿ” Finance Research Agent: Gathers real-time stock data, market trends, and financial metrics using Yahoo Finance
  • ๐ŸŒ Web Scrapper Agent: Collects current financial news and market insights from multiple sources
  • ๐Ÿ“Š Sentiment Analysis Agent: Analyzes market sentiment from news articles and financial content
  • ๐Ÿ“„ Report Generator: Creates structured, professional financial reports with markdown formatting
  • ๐Ÿค Team Coordination: Intelligent agent coordination for comprehensive financial analysis
  • ๐Ÿ’พ Memory System: Persistent storage for analysis history and context
  • ๐ŸŽฎ Interactive Playground: Web-based interface for easy interaction with the AI team

๐Ÿ—๏ธ Architecture

The system consists of specialized AI agents working together:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Finance Researchโ”‚    โ”‚  Web Scrapper    โ”‚    โ”‚ Sentiment       โ”‚
โ”‚ Agent           โ”‚    โ”‚  Agent           โ”‚    โ”‚ Analysis Agent  โ”‚
โ”‚ (Yahoo Finance) โ”‚    โ”‚ (News & Search)  โ”‚    โ”‚ (Market Mood)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                       โ”‚                       โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Report Generator   โ”‚
                    โ”‚  (Structured Output)โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • Node.js 18+ (for UI)
  • API Keys:
    • Groq API Key
    • OpenAI API Key (or GitHub Models API)
    • Agno API Key

1. Clone the Repository

git clone <your-repo-url>
cd Agno

2. Backend Setup (Python Agent)

Install Dependencies

pip install -r requirements.txt

Set Environment Variables

Create a .env file or set environment variables:

export GROQ_API_KEY="your_groq_api_key"
export OPENAI_API_KEY="your_openai_api_key"  # or GitHub token
export AGNO_API_KEY="your_agno_api_key"

Run the Agent

python agent.py

The agent playground will be available at: http://localhost:8000

3. Frontend Setup (Next.js UI)

Clone the Agent UI from Official Repository

git clone https://github.com/agno-agi/agent-ui.git

Navigate to UI Directory

cd agent-ui

Pull Teams Functionality (Required for Multi-Agent Support)

# Fetch and checkout the PR branch for teams functionality
git fetch origin pull/92/head:teams-support
git checkout teams-support

Note: This pulls PR #92 which contains the necessary changes to support multi-agent teams in the UI.

Install Dependencies

# Using npm
npm install

# Using pnpm (recommended)
pnpm install

# Using yarn
yarn install

Run Development Server

# Using npm
npm run dev

# Using pnpm
pnpm dev

# Using yarn
yarn dev

The UI will be available at: http://localhost:3000

Available Commands

Backend (Python)

# Run the main agent
python agent.py

# Install dependencies
pip install -r requirements.txt

Frontend (Next.js)

# Development server
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

# Linting and formatting
pnpm lint
pnpm format
pnpm typecheck

Configuration

API Keys Setup

  1. Groq API: Get your API key from Groq Console
  2. OpenAI/GitHub Models:
    • OpenAI: Get from OpenAI Platform
    • GitHub Models: Use your GitHub token with models access
  3. Agno API: Get from Agno Platform

Environment Variables

# Required API Keys
GROQ_API_KEY=your_groq_api_key_here
OPENAI_API_KEY=your_openai_or_github_token_here
AGNO_API_KEY=your_agno_api_key_here

# Optional: Custom OpenAI Base URL (for GitHub Models)
OPENAI_API_BASE=https://models.github.ai/inference

Usage Examples

Basic Financial Analysis

# The system will automatically coordinate agents to:
# 1. Gather financial data (Finance Research Agent)
# 2. Collect recent news (Web Scrapper Agent)
# 3. Analyze sentiment (Sentiment Analysis Agent)
# 4. Generate comprehensive report (Report Generator)

# Example query: "Analyze Tesla's current financial position"

Custom Queries

  • "What's the market sentiment around Apple's latest earnings?"
  • "Generate a comprehensive report on Microsoft's financial health"
  • "Analyze the tech sector trends for Q4 2024"

๐Ÿ—‚๏ธ Project Structure

Agno/
โ”œโ”€โ”€ agent.py              # Main agent configuration and team setup
โ”œโ”€โ”€ requirements.txt      # Python dependencies
โ”œโ”€โ”€ README.md            # This file
โ”œโ”€โ”€ tmp/                 # Database files (auto-created)
โ”‚   โ”œโ”€โ”€ memory.db        # Agent memory storage
โ”‚   โ””โ”€โ”€ agent_storage.db # Session storage
โ””โ”€โ”€ agent-ui/            # Next.js frontend
    โ”œโ”€โ”€ src/             # Source code
    โ”œโ”€โ”€ package.json     # Node.js dependencies
    โ””โ”€โ”€ ...              # Other UI files

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

About

A sophisticated multi-agent financial analysis system powered by AI that provides comprehensive market research, sentiment analysis, and automated report generation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages