Open Source Agent Architecture

Automate Equity Research without the Cloud API Tax.

Piping raw news articles and financial filings directly into cloud LLMs is cost-prohibitive at scale. StoxFlow implements a hybrid multi-agent architecture using LangGraph, compressing text locally with Ollama before synthesizing the final thesis via Gemini.

account_tree LangGraph Pipeline

  • check Resolves semantic ticker queries
  • check Fetches Upstox API fundamentals concurrently
  • check Processes technical weekly OHLC candles
  • check Extracts signals via local Qwen SLMs
  • check Synthesizes thesis via Cloud LLM
  • check Observability telemetry via Arize Phoenix

savings Cost Optimization

Instead of sending 25,000+ tokens of raw news directly to a frontier model, StoxFlow compresses the articles locally on your machine. This reduces cloud API input token consumption by over 80%.

// Hybrid Execution Flow:

1. Scrape Web DOM (Async HTTP)

2. Extract Facts & Sentiment (Ollama 3B)

3. Synthesize JSON Report (Gemini Flash)