# idkhowtocodefr/btp architecture

> Architecture diagram of the GitHub repository idkhowtocodefr/btp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/idkhowtocodefr/btp
- Repository: https://github.com/idkhowtocodefr/btp

## Overview

Agentic Cloud Service Selection is a research system for choosing and ranking cloud services from task-specific QoS requirements. Its main workflow takes a task and candidate pool, perceives the pool, asks an LLM-backed reasoner for attribute weights and a ranking strategy, validates that decision, then dispatches deterministic MCDM scoring and records the result. Data preparation, task profiles, baselines, drift simulation, and stable and WS-DREAM evaluation support the paper’s experiments; the Streamlit demo exposes the decision loop and experiment results. Paths for some documented capabilities are included from the tree, but their internal wiring is not inferred where source excerpts were unavailable.

Main entry points: [`src/agentic_selection/evaluation/protocol.py`](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/protocol.py) (Evaluation protocol), [`src/agentic_selection/agent/controller.py`](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/controller.py) (Agent controller), [`src/agentic_selection/data/preprocessing.py`](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/data/preprocessing.py) (Normalize and sample), [`src/agentic_selection/evaluation/storage.py`](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/storage.py) (Trial CSV storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_selection["Selection runtime"]
  node_controller["Agent controller<br/>[controller.py]"]
  node_perception["Pool perception<br/>[perception.py]"]
  node_reasoning["LLM reasoning<br/>[reasoning.py]"]
  node_validation["Decision validation<br/>[validation.py]"]
  node_memory["Agent memory<br/>[memory.py]"]
  node_backends["LLM backends<br/>[llm_backends.py]"]
end

subgraph group_data["Data and profiles"]
  node_qws_loader["QWS loader<br/>[qws_loader.py]"]
  node_wsdream_loader["WS-DREAM loaders<br/>[wsdream_loader.py]"]
  node_preprocessing["Normalize and sample<br/>[preprocessing.py]"]
  node_profiles["Task profiles<br/>[profiles.py]"]
  node_wsdream_profiles["WS-DREAM profiles"]
end

subgraph group_methods["Decision methods"]
  node_lookup["Weight lookup<br/>[lookup_table.py]"]
  node_ranking["MCDM rankers"]
end

subgraph group_experiments["Experiments"]
  node_drift["Drift simulation<br/>[simulate.py]"]
  node_protocol["Evaluation protocol<br/>[protocol.py]"]
  node_metrics["Evaluation metrics<br/>[metrics.py]"]
  node_storage[("Trial CSV storage<br/>[storage.py]")]
  node_report["Reports and plots<br/>[report.py]"]
end

subgraph group_interface["Demo and analysis"]
  node_demo["Streamlit demo<br/>[streamlit_demo.py]"]
end

node_requester(("Task requester"))
node_llm_service(("LLM provider"))

node_requester -->|"provides task"| node_controller
node_controller -->|"perceives pool"| node_perception
node_controller -->|"requests decision"| node_reasoning
node_reasoning -->|"completes prompt"| node_backends
node_backends -.->|"calls provider"| node_llm_service
node_controller -->|"validates output"| node_validation
node_controller -->|"records decision"| node_memory
node_controller -->|"dispatches strategy"| node_ranking
node_qws_loader -->|"loads for normalization"| node_preprocessing
node_wsdream_loader -->|"loads for normalization"| node_preprocessing
node_profiles -->|"defines tasks"| node_protocol
node_wsdream_profiles -->|"defines tasks"| node_protocol
node_lookup -->|"supplies baseline weights"| node_protocol
node_preprocessing -->|"supplies candidate pools"| node_protocol
node_protocol -->|"runs agent conditions"| node_controller
node_protocol -->|"runs baseline conditions"| node_ranking
node_protocol -->|"simulates degradation"| node_drift
node_protocol -->|"evaluates trials"| node_metrics
node_protocol -->|"records trials"| node_storage
node_report -->|"reads results"| node_storage
node_demo -->|"runs decision loop"| node_controller
node_demo -->|"reads experiment results"| node_storage

click node_controller "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/controller.py"
click node_perception "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/perception.py"
click node_reasoning "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/reasoning.py"
click node_validation "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/validation.py"
click node_memory "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/memory.py"
click node_backends "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/llm_backends.py"
click node_qws_loader "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/data/qws_loader.py"
click node_wsdream_loader "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/data/wsdream_loader.py"
click node_preprocessing "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/data/preprocessing.py"
click node_profiles "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/tasks/profiles.py"
click node_wsdream_profiles "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/tasks/wsdream_profiles.py"
click node_lookup "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/baselines/lookup_table.py"
click node_ranking "https://github.com/idkhowtocodefr/btp/tree/main/src/agentic_selection/baselines"
click node_drift "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/drift/simulate.py"
click node_protocol "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/protocol.py"
click node_metrics "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/metrics.py"
click node_storage "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/storage.py"
click node_report "https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/report.py"
click node_demo "https://github.com/idkhowtocodefr/btp/blob/main/app/streamlit_demo.py"

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_controller,node_perception,node_reasoning,node_validation,node_memory,node_backends toneBlue
class node_qws_loader,node_wsdream_loader,node_preprocessing,node_profiles,node_wsdream_profiles toneAmber
class node_lookup,node_ranking toneMint
class node_drift,node_protocol,node_metrics,node_storage,node_report,node_requester toneRose
class node_demo,node_llm_service toneIndigo
```

## Components

### Selection runtime

- [Agent controller](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/controller.py): `src/agentic_selection/agent/controller.py`
- [Pool perception](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/perception.py): `src/agentic_selection/agent/perception.py`
- [LLM reasoning](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/reasoning.py): `src/agentic_selection/agent/reasoning.py`
- [Decision validation](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/validation.py): `src/agentic_selection/agent/validation.py`
- [Agent memory](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/memory.py): `src/agentic_selection/agent/memory.py`
- [LLM backends](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/agent/llm_backends.py): `src/agentic_selection/agent/llm_backends.py`

### Data and profiles

- [QWS loader](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/data/qws_loader.py): `src/agentic_selection/data/qws_loader.py`
- [WS-DREAM loaders](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/data/wsdream_loader.py): `src/agentic_selection/data/wsdream_loader.py`
- [Normalize and sample](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/data/preprocessing.py): `src/agentic_selection/data/preprocessing.py`
- [Task profiles](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/tasks/profiles.py): `src/agentic_selection/tasks/profiles.py`
- [WS-DREAM profiles](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/tasks/wsdream_profiles.py): `src/agentic_selection/tasks/wsdream_profiles.py`

### Decision methods

- [Weight lookup](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/baselines/lookup_table.py): `src/agentic_selection/baselines/lookup_table.py`
- [MCDM rankers](https://github.com/idkhowtocodefr/btp/tree/main/src/agentic_selection/baselines): `src/agentic_selection/baselines`

### Experiments

- [Drift simulation](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/drift/simulate.py): `src/agentic_selection/drift/simulate.py`
- [Evaluation protocol](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/protocol.py): `src/agentic_selection/evaluation/protocol.py`
- [Evaluation metrics](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/metrics.py): `src/agentic_selection/evaluation/metrics.py`
- [Trial CSV storage](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/storage.py): `src/agentic_selection/evaluation/storage.py`
- [Reports and plots](https://github.com/idkhowtocodefr/btp/blob/main/src/agentic_selection/evaluation/report.py): `src/agentic_selection/evaluation/report.py`

### Demo and analysis

- [Streamlit demo](https://github.com/idkhowtocodefr/btp/blob/main/app/streamlit_demo.py): `app/streamlit_demo.py`

### Other components

- **Task requester**
- **LLM provider**

## Connections

- Task requester → Agent controller: provides task
- Agent controller → Pool perception: perceives pool
- Agent controller → LLM reasoning: requests decision
- LLM reasoning → LLM backends: completes prompt
- LLM backends → LLM provider: calls provider
- Agent controller → Decision validation: validates output
- Agent controller → Agent memory: records decision
- Agent controller → MCDM rankers: dispatches strategy
- QWS loader → Normalize and sample: loads for normalization
- WS-DREAM loaders → Normalize and sample: loads for normalization
- Task profiles → Evaluation protocol: defines tasks
- WS-DREAM profiles → Evaluation protocol: defines tasks
- Weight lookup → Evaluation protocol: supplies baseline weights
- Normalize and sample → Evaluation protocol: supplies candidate pools
- Evaluation protocol → Agent controller: runs agent conditions
- Evaluation protocol → MCDM rankers: runs baseline conditions
- Evaluation protocol → Drift simulation: simulates degradation
- Evaluation protocol → Evaluation metrics: evaluates trials
- Evaluation protocol → Trial CSV storage: records trials
- Reports and plots → Trial CSV storage: reads results
- Streamlit demo → Agent controller: runs decision loop
- Streamlit demo → Trial CSV storage: reads experiment results
