Skip to content

SnaetWarre/Financial_AI_Agent

Repository files navigation

Financial AI Agent

A conversational AI assistant for managing a simulated investment portfolio. Ask questions, get advice, and execute trades through natural language.

Architecture

Features

  • Natural Language Trading: "Buy 20 shares of SPY" or "Invest $500 in gold"
  • RAG-Powered Responses: Uses actual market data, not hallucinated prices
  • MCP Tool Calling: Executes trades, checks portfolio, fetches prices
  • Streaming Responses: Real-time token-by-token output
  • Session Persistence: Chat history saved across sessions
  • Multi-Asset Support: SPY, GLD, SLV, AGG, TLT, VNQ

Quick Start

# 1. Clone and configure
git clone <repository>
cp .env.example .env

# 2. Start all services
docker compose up --build

# 3. Open the app
# Frontend: http://localhost:3000
# API Docs: http://localhost:8081/docs

Architecture

Service Technology Port
Frontend React + Vite 3000
Inference API FastAPI + SSE 8081
MCP Server FastAPI + MCP 8000
RAG Pipeline ChromaDB + Ollama -
Database PostgreSQL 5432
LLM Ollama (Qwen2.5) 11434

Supported Assets

Symbol Description
SPY S&P 500 ETF
GLD Gold ETF
SLV Silver ETF
AGG Aggregate Bond ETF
TLT 20+ Year Treasury Bond ETF
VNQ Real Estate ETF

Market Data

We use historical 2024 data projected to 2025 for realistic price movements without requiring paid API subscriptions.

Commands

# Start services
docker compose up -d

# View logs
docker compose logs -f

# Stop services
docker compose down

# Rebuild after changes
docker compose up --build

Project Structure

├── frontend/          # React UI
├── inference/         # Chat orchestrator + streaming API
├── mcp-server/        # Portfolio operations + MCP tools
├── rag-pipeline/      # Knowledge base + embeddings
└── shared/            # Common models and utilities

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors