# kevininocol/project-crewai-regression-pipeline-generator architecture

> Architecture diagram of the GitHub repository kevininocol/project-crewai-regression-pipeline-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kevininocol/project-crewai-regression-pipeline-generator
- Repository: https://github.com/kevininocol/project-crewai-regression-pipeline-generator

## Overview

1. This repository is a Python-based crewAI project: a multi-agent orchestration system where the “application” is defined by agent and task configuration rather than a traditional service stack.

2. The main runtime boundary is `src/proyecto_agentes_de_pipeline_ml/`. Inside it:
   - `main.py` is the execution entrypoint.
   - `crew.py` assembles the crew, wires agents to tasks, and registers tools.
   - `config/agents.yaml` and `config/tasks.yaml` define the behavior and work distribution.
   - `tools/` contains the custom capabilities agents can invoke.

3. The project is centered on ML pipeline generation/analysis, not just generic text generation. The presence of `data/train.csv`, `knowledge/pipeline_reference_style.md`, and `knowledge/preprocessors_reference.py` suggests the agents are expected to inspect tabular data, learn/imitate a pipeline style, and produce pipeline-related artifacts.

4. Data flow starts from local inputs:
   - CSV data in `data/train.csv`
   - reference material in `knowledge/`
   These are consumed by tools, then transformed into summaries, insights, or generated notebook content for downstream agent tasks.

5. The tool layer is the main I/O boundary:
   - `csv_profiler_tool.py` likely reads the training CSV and computes descriptive profiling.
   - `file_reader_tool.py` likely provides controlled file access to local reference files.
   - `notebook_writer_tool.py` likely writes generated outputs to a notebook-like artifact.
   - `custom_tool.py` appears to be a base or example extension point.
   This separation keeps agents from accessing the filesystem directly.

6. The agent/task configuration layer is the orchestration core. `agents.yaml` defines roles, goals, and possibly tool access; `tasks.yaml` defines the ordered work items and expected outputs. The architecture is therefore declarative: behavior is primarily changed by editing YAML rather than code.

7. `crew.py` is the integration point that binds configuration to executable objects. In architecture terms, it sits between static configuration and runtime execution, translating the YAML-defined plan into a runnable agent workflow.

8. The output boundary is likely artifact generation in the repository root or under a project-specific path, with the README explicitly mentioning a generated `report.md` in the default template. Given the notebook writer tool, the system may also emit notebook or notebook-like deliverables for ML workflows.

9. External dependency boundary: the project relies on crewAI and an LLM provider configured through `OPENAI_API_KEY` in `.env`. The LLM is the reasoning engine; everything else in the repo is scaffolding for data access, task decomposition, and output writing.

10. Tooling and packaging are lightweight and Python-native:
   - `pyproject.toml` and `uv.lock` indicate UV-managed dependency resolution.
   - Python version support is `>=3.10 <3.14`.
   There is no separate backend, database, or frontend in the repo.

11. The `knowledge/` directory is an important architecture element because it acts as a local context source, not just documentation. It likely provides reference constraints for how generated pipeline code or reports should be structured.

12. For an architecture diagram, the core flow is: user запускаes `crewai run` or the project entrypoint → `main.py` creates the run context → `crew.py` instantiates agents/tasks/tools from YAML → agents use tools to inspect CSV and reference files → LLM reasoning produces pipeline/report artifacts → outputs are written locally.

13. The overall system boundary is intentionally small: a single Python package plus local datasets and knowledge files. There are no visible network services, message queues, databases, or web servers in the repository; the main external dependency is the LLM API.

Main entry points: [`src/proyecto_agentes_de_pipeline_ml/crew.py`](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/crew.py) (Crew), [`src/proyecto_agentes_de_pipeline_ml/tools/file_reader_tool.py`](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/file_reader_tool.py) (File Reader), [`src/proyecto_agentes_de_pipeline_ml/config/agents.yaml`](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/config/agents.yaml) (Agents), [`src/proyecto_agentes_de_pipeline_ml/tools/csv_profiler_tool.py`](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/csv_profiler_tool.py) (CSV Profiler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_main["Main<br/>entrypoint<br/>[main.py]"]
  node_crew["Crew<br/>orchestrator<br/>[crew.py]"]
  node_pkg["Package<br/>[__init__.py]"]
  node_output["Artifacts<br/>generated output"]
end

subgraph group_config["Config"]
  node_agents_yaml["Agents<br/>agent config<br/>[agents.yaml]"]
  node_tasks_yaml["Tasks<br/>task config<br/>[tasks.yaml]"]
end

subgraph group_tools["Tools"]
  node_csv_tool["CSV Profiler<br/>data tool"]
  node_reader_tool["File Reader<br/>io tool"]
  node_notebook_tool["Notebook Writer<br/>output tool"]
  node_custom_tool["Custom Tool<br/>extension point<br/>[custom_tool.py]"]
end

subgraph group_inputs["Inputs"]
  node_train_csv[("Train CSV<br/>dataset<br/>[train.csv]")]
  node_style_ref["Style Ref<br/>knowledge"]
  node_preproc_ref["Preprocessor Ref<br/>knowledge"]
end

subgraph group_infra["Infra"]
  node_pyproject["Pyproject<br/>packaging<br/>[pyproject.toml]"]
  node_uvlock["UV Lock<br/>dependency lock<br/>[uv.lock]"]
  node_openai(("LLM API<br/>external service"))
  node_env["Env Vars<br/>runtime config"]
end

node_main -->|"launches"| node_crew
node_crew -->|"loads"| node_agents_yaml
node_crew -->|"loads"| node_tasks_yaml
node_crew -->|"registers"| node_csv_tool
node_crew -->|"registers"| node_reader_tool
node_crew -->|"registers"| node_notebook_tool
node_crew -->|"extends"| node_custom_tool
node_agents_yaml -.->|"uses"| node_csv_tool
node_agents_yaml -.->|"uses"| node_reader_tool
node_tasks_yaml -.->|"targets"| node_output
node_csv_tool -->|"reads"| node_train_csv
node_reader_tool -->|"reads"| node_style_ref
node_reader_tool -->|"reads"| node_preproc_ref
node_notebook_tool -->|"writes"| node_output
node_main -.->|"configures"| node_env
node_env -->|"authenticates"| node_openai
node_crew -->|"calls"| node_openai
node_pyproject -.->|"pins"| node_uvlock
node_pkg -.->|"contains"| node_crew

click node_main "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/main.py"
click node_crew "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/crew.py"
click node_agents_yaml "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/config/agents.yaml"
click node_tasks_yaml "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/config/tasks.yaml"
click node_csv_tool "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/csv_profiler_tool.py"
click node_reader_tool "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/file_reader_tool.py"
click node_notebook_tool "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/notebook_writer_tool.py"
click node_custom_tool "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/custom_tool.py"
click node_train_csv "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/data/train.csv"
click node_style_ref "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/knowledge/pipeline_reference_style.md"
click node_preproc_ref "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/knowledge/preprocessors_reference.py"
click node_pkg "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/__init__.py"
click node_pyproject "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/pyproject.toml"
click node_uvlock "https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/uv.lock"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_crew,node_pkg,node_output toneBlue
class node_agents_yaml,node_tasks_yaml toneAmber
class node_csv_tool,node_reader_tool,node_notebook_tool,node_custom_tool toneMint
class node_train_csv,node_style_ref,node_preproc_ref toneRose
class node_pyproject,node_uvlock,node_openai,node_env toneIndigo
```

## Components

### Runtime

Executable Python package and orchestration entrypoints

- [Main](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/main.py): entrypoint · Starts the crew run and hands off execution context · `src/proyecto_agentes_de_pipeline_ml/main.py`
- [Crew](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/crew.py): orchestrator · Builds the agent/task graph and binds tools to runtime · `src/proyecto_agentes_de_pipeline_ml/crew.py`
- [Package](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/__init__.py): python package · Top-level Python application package · `src/proyecto_agentes_de_pipeline_ml/__init__.py`
- **Artifacts**: generated output · Generated report, notebook, or pipeline deliverables

### Config

Declarative agent and task definitions

- [Agents](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/config/agents.yaml): agent config · Declarative agent roles, goals, and tool access · `src/proyecto_agentes_de_pipeline_ml/config/agents.yaml`
- [Tasks](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/config/tasks.yaml): task config · Ordered work items and expected outputs for the crew · `src/proyecto_agentes_de_pipeline_ml/config/tasks.yaml`

### Tools

Controlled I/O and generation capabilities used by agents

- [CSV Profiler](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/csv_profiler_tool.py): data tool · Profiles the training CSV and extracts tabular insights · `src/proyecto_agentes_de_pipeline_ml/tools/csv_profiler_tool.py`
- [File Reader](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/file_reader_tool.py): io tool · Provides controlled access to local reference files · `src/proyecto_agentes_de_pipeline_ml/tools/file_reader_tool.py`
- [Notebook Writer](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/notebook_writer_tool.py): output tool · Writes generated notebook-like artifacts or reports · `src/proyecto_agentes_de_pipeline_ml/tools/notebook_writer_tool.py`
- [Custom Tool](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/src/proyecto_agentes_de_pipeline_ml/tools/custom_tool.py): extension point · Base or example hook for adding new agent capabilities · `src/proyecto_agentes_de_pipeline_ml/tools/custom_tool.py`

### Inputs

Local data and reference material consumed by the workflow

- [Train CSV](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/data/train.csv): dataset · Primary tabular input used for profiling and pipeline analysis · `data/train.csv`
- [Style Ref](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/knowledge/pipeline_reference_style.md): knowledge · Reference describing the expected pipeline/report style · `knowledge/pipeline_reference_style.md`
- [Preprocessor Ref](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/knowledge/preprocessors_reference.py): knowledge · Reference Python preprocessing examples and constraints · `knowledge/preprocessors_reference.py`

### Infra

Packaging and external execution boundary

- [Pyproject](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/pyproject.toml): packaging · Project metadata and dependency declaration · `pyproject.toml`
- [UV Lock](https://github.com/kevininocol/project-crewai-regression-pipeline-generator/blob/main/uv.lock): dependency lock · Locked dependency resolution for the Python environment · `uv.lock`
- **LLM API**: external service · Language model provider configured through environment variables
- **Env Vars**: runtime config · Local secret and runtime configuration boundary

## Connections

- Main → Crew: launches · Main entrypoint initializes and starts the crew runtime
- Crew → Agents: loads · Crew binds agent definitions from YAML
- Crew → Tasks: loads · Crew binds task definitions from YAML
- Crew → CSV Profiler: registers · Crew exposes the CSV profiling capability to agents
- Crew → File Reader: registers · Crew exposes controlled file reading to agents
- Crew → Notebook Writer: registers · Crew exposes artifact writing to agents
- Crew → Custom Tool: extends · Crew can include additional custom capabilities
- Agents → CSV Profiler: uses · Agent definitions can assign the profiling tool
- Agents → File Reader: uses · Agent definitions can assign the file reader
- Tasks → Artifacts: targets · Tasks define the expected generated deliverables
- CSV Profiler → Train CSV: reads · Profiles the local training dataset
- File Reader → Style Ref: reads · Loads style and formatting guidance
- File Reader → Preprocessor Ref: reads · Loads preprocessing reference content
- Notebook Writer → Artifacts: writes · Persists generated artifacts to disk
- Main → Env Vars: configures · Runtime reads local environment settings
- Env Vars → LLM API: authenticates · LLM access depends on provider credentials
- Crew → LLM API: calls · Agents delegate reasoning and generation to the LLM provider
- Pyproject → UV Lock: pins · Dependency metadata is resolved into a lockfile
- Package → Crew: contains · Package namespaces the orchestration code
