# multimodal-art-projection/autokaggle architecture

> Architecture diagram of the GitHub repository multimodal-art-projection/autokaggle, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/multimodal-art-projection/autokaggle
- Repository: https://github.com/multimodal-art-projection/autokaggle

## Overview

##### Main Components
a. Central Orchestrator & Pipeline Coordinator:
- Components like “sop.py,” “framework.py,” and the main script (“run_multi_agents.sh”) form the backbone that triggers and coordinates all activities.
b. Multi-Agent System:
- That these agents reside in the multi_agents/agents subdirectory, and their corresponding prompt implementations reside under multi_agents/prompts.
- That they follow a sequential or iterative process (as outlined in six key competition phases).
c. Competition Data Management:
- A component/module for handling competition data – this includes the “competition” directory (with subfolders for each Kaggle competition) and the configuration (multi_agents/config.json).
d. ML Tools & Libraries:
- A module for the ML tools (found in multi_agents/tools) which covers data cleaning, feature engineering, and model building.
- You might also show an external “ml_tools_doc” component that documents details about these tools.
e. Experimentation & Reporting:
- Exhibit the results and experiment history directories (multi_agents/experiments_history and multi_agents/example_results) where outcomes and logs are stored.
- Comprehensive reporting features that document the whole workflow.
f. External Integration & API Configuration:
- Nodes for the OpenAI API integration (referencing api_handler.py and the api_key.txt file) which the agents use for processing prompts.
- Use of external machine learning models like “gpt-4o” and “gpt-4o-mini”.

##### Relationships & Interactions
- The Reader agent initially ingests competition information (from “overview.txt”) from the competition dataset.
- Once the information is read, it is passed to the Planner, which designs the data science strategy.
- The Developer then utilizes this plan to generate code, employing the ML Tools library functions as needed.
- The Reviewer checks and validates the results, and finally, the Summarizer compiles the outcomes into a final report.
- Feedback loops typical in an iterative development cycle and unit testing (e.g., through debug tools in multi_agents/tools).

##### Architectural Patterns
- A pipeline or workflow pattern where each stage processes and passes information to the next.
- How iterative development and unit testing support effective data science competitions.
- That the architecture is highly modular – each agent and tool is clearly separated but can be orchestrated centrally.

##### Relevant Technologies and Frameworks
- Python is the fundamental language.
- The system makes use of OpenAI’s API and custom prompt handling to drive the agents.
- It leverages standard data science tools (as indicated by the ML Tools library) along with iterative testing (unit_test.py and related debugging scripts).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Central Orchestrator & Pipeline Coordinator
    subgraph "Central Orchestrator & Pipeline Coordinator"
        A1["run_multi_agents.sh"]:::central
        A2["framework.py"]:::central
        A3["sop.py"]:::central
    end

    %% Multi-Agent System
    subgraph "Multi-Agent System"
        subgraph "Agents"
            B1["Reader"]:::agent
            B2["Planner"]:::agent
            B3["Developer"]:::agent
            B4["Reviewer"]:::agent
            B5["Summarizer"]:::agent
        end
        subgraph "Prompts"
            C1["Reader Prompt"]:::prompt
            C2["Planner Prompt"]:::prompt
            C3["Developer Prompt"]:::prompt
            C4["Reviewer Prompt"]:::prompt
            C5["Summarizer Prompt"]:::prompt
            C6["UnitTestPrompt"]:::prompt
        end
    end

    %% Competition Data Management
    subgraph "Competition Data Management"
        D1["Competition Data"]:::data
        D2["Config"]:::data
    end

    %% ML Tools & Libraries
    subgraph "ML Tools & Libraries"
        E1["ML Tools"]:::mltools
        E2["ML Tools Doc"]:::mltools
    end

    %% Experimentation & Reporting
    subgraph "Experimentation & Reporting"
        F1["ExperimentsHistory/Results"]:::experiments
    end

    %% External Integration & API Configuration
    subgraph "External Integration & API Configuration"
        G1["API Handler"]:::integration
        G2["API Key"]:::integration
    end

    %% Shared State Management
    subgraph "Shared State Management"
        H1["Memory Module"]:::shared
        H2["State Module"]:::shared
    end

    %% Connections from Central Orchestrator to Multi-Agent System
    A1 -->|"triggers"| B1
    A2 -->|"triggers"| B1
    A3 -->|"triggers"| B1

    %% Data Ingestion from Competition Data Management to Reader
    D1 -->|"feeds"| B1
    D2 -->|"configures"| B1

    %% Sequential Flow between Agents
    B1 -->|"passes"| B2
    B2 -->|"passes"| B3
    B3 -->|"passes"| B4
    B4 -->|"validates"| B5

    %% Feedback loop from Reviewer to Developer (iterative development)
    B4 -->|"feedback"| B3

    %% Integration of ML Tools with Developer
    B3 -->|"utilizes"| E1

    %% Prompts connection (dashed lines)
    B1 -.->|"uses"| C1
    B2 -.->|"uses"| C2
    B3 -.->|"uses"| C3
    B4 -.->|"uses"| C4
    B5 -.->|"uses"| C5
    B3 -.->|"unit_test"| C6

    %% External Integration connected to all Agents
    G1 --- B1
    G1 --- B2
    G1 --- B3
    G1 --- B4
    G1 --- B5
    G2 --- B1
    G2 --- B2
    G2 --- B3
    G2 --- B4
    G2 --- B5

    %% Shared State Management connected to Agents
    H1 --- B1
    H1 --- B2
    H1 --- B3
    H1 --- B4
    H1 --- B5
    H2 --- B1
    H2 --- B2
    H2 --- B3
    H2 --- B4
    H2 --- B5

    %% Final output to Experimentation & Reporting
    B5 -->|"reports"| F1

    %% Click Events for Central Orchestrator
    click A1 "https://github.com/multimodal-art-projection/autokaggle/blob/main/run_multi_agents.sh"
    click A2 "https://github.com/multimodal-art-projection/autokaggle/blob/main/framework.py"
    click A3 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/sop.py"

    %% Click Events for Agents
    click B1 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/agents/reader.py"
    click B2 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/agents/planner.py"
    click B3 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/agents/developer.py"
    click B4 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/agents/reviewer.py"
    click B5 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/agents/summarizer.py"

    %% Click Events for Prompts
    click C1 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/prompts/prompt_reader.py"
    click C2 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/prompts/prompt_planner.py"
    click C3 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/prompts/prompt_developer.py"
    click C4 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/prompts/prompt_reviewer.py"
    click C5 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/prompts/prompt_summarizer.py"
    click C6 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/prompts/prompt_unit_test.py"

    %% Click Events for Competition Data Management
    click D1 "https://github.com/multimodal-art-projection/autokaggle/tree/main/multi_agents/competition"
    click D2 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/config.json"

    %% Click Events for ML Tools & Libraries
    click E1 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/tools/ml_tools.py"
    click E2 "https://github.com/multimodal-art-projection/autokaggle/tree/main/multi_agents/tools/ml_tools_doc"

    %% Click Events for Experimentation & Reporting
    click F1 "https://github.com/multimodal-art-projection/autokaggle/tree/main/multi_agents/experiments_history"

    %% Click Events for External Integration & API Configuration
    click G1 "https://github.com/multimodal-art-projection/autokaggle/blob/main/api_handler.py"
    click G2 "https://github.com/multimodal-art-projection/autokaggle/blob/main/api_key.txt"

    %% Click Events for Shared State Management
    click H1 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/memory.py"
    click H2 "https://github.com/multimodal-art-projection/autokaggle/blob/main/multi_agents/state.py"

    %% Styles
    classDef central fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef agent fill:#66CCFF,stroke:#333,stroke-width:2px;
    classDef prompt fill:#99FF99,stroke:#333,stroke-width:2px;
    classDef data fill:#FF9999,stroke:#333,stroke-width:2px;
    classDef mltools fill:#CCCCFF,stroke:#333,stroke-width:2px;
    classDef experiments fill:#FFCC99,stroke:#333,stroke-width:2px;
    classDef integration fill:#FFB6C1,stroke:#333,stroke-width:2px;
    classDef shared fill:#B0E0E6,stroke:#333,stroke-width:2px;
```
