Skip to content

thesysdev/analytics-agent-generativeui

Repository files navigation

Analytics with C1

Introduction

Experience the power of intelligent stock market analytics through Thesys, where large language models and generative UI combine to create dynamic, context-aware analytics dashboards. From automatically generated financial visualizations and interactive charts to real-time market data and adaptive filter controls, this demo showcases how generative UI transforms traditional analytics into an intelligent, visual, and highly engaging interface that understands and responds to your unique analytical queries.

Demo

Built with Thesys

Overview

This project reimagines what financial analytics could be if combined with Thesys GenUI:

  1. Comprehensive Financial Data - Access real-time and historical stock prices, cryptocurrency data, income statements, balance sheets, cash flow statements, forex, commodities, and economic indicators via Alpha Vantage
  2. Advanced LLM Analysis - Uses AI to analyze financial data, identify trends, and provide contextual insights through a conversational interface powered by Claude
  3. Generative UI Dashboards - Dynamic charts, filter bars, and analytics components created on-the-fly based on your queries using C1
  4. Interactive Visualizations - A responsive interface with adaptive filters and branching conversations that adapt to different types of financial analysis requests

Unlike traditional analytics platforms that show static charts or AI platforms that generate plain text, this project creates rich, visual, and interactive financial dashboards tailored to each analytical query.

Tech Stack

  • Frontend: Next.js 15 with App Router
  • UI: Tailwind CSS and Thesys GenUI SDK
  • Chat Shell: Crayon AI React components
  • AI Integration: Thesys C1 SDK, Anthropic Claude
  • Financial APIs: Alpha Vantage MCP for stocks, crypto, forex, commodities, and economic data
  • Streaming: Real-time response streaming using Server-Sent Events

Features

Financial Analytics Tools

  • Stock Analysis: Current prices, historical charts, technical indicators, and trend analysis
  • Company Financials: Income statements, balance sheets, cash flow analysis, and earnings reports
  • Cryptocurrency Data: Real-time crypto prices and historical performance
  • Forex & Commodities: Currency exchange rates, oil, gold, and agricultural commodity tracking
  • Economic Indicators: GDP, CPI, unemployment, treasury yields, and more
  • Alpha Intelligence: News sentiment, earnings call transcripts, insider transactions, and top gainers/losers

Generative UI Components

  • Dynamic charts and visualizations based on data type
  • Interactive filter bars with dropdowns, multi-selects, and toggles
  • Contextual analysis with structured page layouts
  • Responsive layouts that adapt to query complexity

Getting Started

Prerequisites

  • Node.js (v20+)
  • pnpm
  • API keys for required services

Setup

  1. Clone the repository:

    git clone https://github.com/thesysdev/generativeui-analytics.git
    cd generativeui-analytics
  2. Install dependencies:

    pnpm install
  3. Set up environment variables:

    cp .env.example .env
  4. Add your API keys to the .env file:

    THESYS_API_KEY=[your_thesys_api_key]
    ALPHA_VANTAGE_API_KEY=[your_alpha_vantage_api_key]
    

    API Key Sources:

    • Thesys API Key: Generate at Thesys Console
    • Alpha Vantage API Key: Get your key at Alpha Vantage for stock, crypto, forex, and economic data

Development

Run the development server:

pnpm dev

Open http://localhost:3000 in your browser.

How It Works

  1. User enters a financial analysis query
  2. The application sends the query to the Thesys C1 API
  3. C1 utilizes Alpha Vantage MCP tools to fetch relevant market data, company financials, and economic indicators
  4. C1 generates a dynamic analytics dashboard with a header, filter bar, and appropriate visualizations
  5. The response is streamed back to the client for a smooth user experience
  6. Users can refine results using interactive filters or follow-up questions

Example Queries

Try asking questions like:

  • "Show me AAPL's price history for the last month"
  • "Compare MSFT and GOOGL revenue"
  • "What are TSLA's key financial metrics?"
  • "Get the latest earnings report for NVDA"
  • "Show AMZN's balance sheet"

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

Analytics Agent with Generative UI powered by Thesys C1

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors