# leonardltk/data-analytics-agent-smol architecture

> Architecture diagram of the GitHub repository leonardltk/data-analytics-agent-smol, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/leonardltk/data-analytics-agent-smol
- Repository: https://github.com/leonardltk/data-analytics-agent-smol

## Overview

##### Project type and purpose
- From the file tree and README we can see this is a standalone data‐analytics pipeline/agent written in Python. It ingests tabular CSV data, orchestrates calls to multiple external AI/ML services (jigsawstack, Groq, Menlo.ai, E2B), applies transformations or analyses, and produces outputs (visualizations or prompt‐based reports). The slideshow and demo.py drive a small “Data Analytics Agent” proof of concept.

##### File structure
- Top‐level files:
- demo.py            ← orchestration/entrypoint for the pipeline
- requirements.txt   ← Python dependencies
- README.md, LICENSE
- data/tables: contains the raw CSVs (Address, Invoice, Outlet, Product, Warehouse)
- images: holds the Pipeline.png and prompt screenshots – documentation of flow
- slideshow: PDF/PPTX decks for presentation

##### README for additional insights
- Installation step is a simple pip install.
- The “Create API key” section lists four external AI/ML service providers.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Data Sources
    subgraph "Data Sources"
        DS["CSV Data Tables"]:::internal
    end

    %% Orchestration Layer
    subgraph "Orchestration Layer"
        DL["Data Loader"]:::internal
        AL["Agent Logic"]:::internal
        AD["API Adapters"]:::internal
        RA["Result Aggregator"]:::internal
    end

    %% External Services
    subgraph "External AI/ML Services"
        JS["Jigsawstack"]:::external
        GR["Groq"]:::external
        MA["Menlo.ai"]:::external
        E2["E2B"]:::external
    end

    %% Presentation Layer
    subgraph "Output/Presentation"
        CO["Console Output"]:::output
        SS["Slideshow Reports"]:::output
    end

    %% Documentation & Config
    subgraph "Project Docs & Config"
        RM["README.md"]:::doc
        RT["requirements.txt"]:::internal
        LI["LICENSE"]:::doc
        PD["Pipeline Docs"]:::doc
    end

    %% Flow
    DS -->|"reads (CSV)"| DL
    DL -->|"processes"| AL
    AL -->|"routes calls"| AD
    AD -->|"requests (JSON/HTTPS)"| JS
    AD -->|"requests (JSON/HTTPS)"| GR
    AD -->|"requests (JSON/HTTPS)"| MA
    AD -->|"requests (JSON/HTTPS)"| E2
    JS -->|"responses"| AD
    GR -->|"responses"| AD
    MA -->|"responses"| AD
    E2 -->|"responses"| AD
    AD -->|"aggregates results"| RA
    RA -->|"renders"| CO
    RA -->|"exports"| SS

    %% Dependencies & Docs Links
    RM -.->|setup instructions| DL
    RT -.->|dependencies| DL
    LI -.->|license| DL
    PD -.->|architecture reference| DS

    %% Click Events
    click DS "https://github.com/leonardltk/data-analytics-agent-smol/tree/main/data/tables/"
    click DL "https://github.com/leonardltk/data-analytics-agent-smol/blob/main/demo.py"
    click AL "https://github.com/leonardltk/data-analytics-agent-smol/blob/main/demo.py"
    click AD "https://github.com/leonardltk/data-analytics-agent-smol/blob/main/demo.py"
    click RA "https://github.com/leonardltk/data-analytics-agent-smol/blob/main/demo.py"
    click RT "https://github.com/leonardltk/data-analytics-agent-smol/blob/main/requirements.txt"
    click RM "https://github.com/leonardltk/data-analytics-agent-smol/blob/main/README.md"
    click LI "https://github.com/leonardltk/data-analytics-agent-smol/tree/main/LICENSE"
    click PD "https://github.com/leonardltk/data-analytics-agent-smol/tree/main/images/"
    click SS "https://github.com/leonardltk/data-analytics-agent-smol/tree/main/slideshow/"

    %% Styles
    classDef internal fill:#D0E8FF,stroke:#0366D6,color:#0366D6
    classDef external fill:#E2F0D9,stroke:#34A853,color:#34A853
    classDef output fill:#FFE4B5,stroke:#DAA520,color:#DAA520
    classDef doc fill:#F9E79F,stroke:#B7950B,color:#B7950B
```
