How abdullahsezdi/happyllm works
Project type and purpose
• HappyLLM is a Python-based, LLM-enabled data-analysis platform built on Streamlit.
• It provides an interactive UI for well-being and happiness analysis of countries via a multi-agent LLM system (Data Analysis Agent, Causal Analysis Agent, General Q&A Agent).
File structure
• Top-level:
• .devcontainer/ – development container config
• README.md, requirements.txt – project metadata
• src/ – application code and data
• src/ contains:
• ana_script.py – Streamlit entry point & orchestration layer
• llm_agents.py – definitions of the three LLM agents
• cleaned_dataset.csv – the well-being data store
README insights
• Streamlit is used as the UI framework.
• Google API is called for LLM inference.
• Key features: multi-agent architecture, interactive charts, natural-language queries.
Main components and their interactions
a. Frontend (Presentation Layer)
– Component: Streamlit UI (ana_script.py)
– Responsibility: accept user queries, render visualizations and tables
b. Orchestration / Business Logic
– Component: Controller in ana_script.py
– Responsibility: route user requests to the correct LLM agent
c. Agents (Compute Layer)
– Components in llm_agents.py:
• Data Analysis Agent
• Causal Analysis Agent
• General Q&A Agent
– Responsibility: generate prompts, call Google LLM API, post-process responses
d. Data Store
– Component: cleaned_dataset.csv
– Responsibility: hold well-being metrics used by Data Analysis Agent for charting
e. External Service
– Component: Google LLM API
– Responsibility: perform model inference
f. Visualization Module
– Implicit in ana_script.py via Streamlit’s charting libraries
Architectural patterns and design principles
• Multi-agent pattern: each agent encapsulates a distinct analysis responsibility
• Layered separation: Presentation (UI), Business (orchestration), Compute (agents), Data (CSV), External Services
• Single-page application style using Streamlit’s reactive model