# didntfindmyname/btp architecture

> Architecture diagram of the GitHub repository didntfindmyname/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/didntfindmyname/btp
- Repository: https://github.com/didntfindmyname/btp

## Overview

This repository is a research system for task-aware cloud-service selection: a user supplies a task and candidate services, then an agent infers QoS weights, chooses a deterministic ranking strategy, and returns ranked services with an auditable decision. Data preparation supports QWS and two distinct WS-DREAM releases; task profiles and static baselines enable comparisons. Separate evaluation capabilities cover stable selection, controlled drift, and real time-slice validation, with reports and an interactive Streamlit demo. The controller excerpt is partial, so links reflect only documented or sampled orchestration.

Main entry points: [`src/agentic_selection/agent/controller.py`](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/controller.py) (Agent controller), [`src/agentic_selection/evaluation/protocol.py`](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/protocol.py) (Evaluation protocol), [`app/streamlit_demo.py`](https://github.com/didntfindmyname/btp/blob/main/app/streamlit_demo.py) (Streamlit demo), [`src/agentic_selection/agent/llm_backends.py`](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/llm_backends.py) (LLM backends)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_demo["Streamlit demo<br/>[streamlit_demo.py]"]
end

subgraph group_agent["Agent decision"]
  node_controller["Agent controller<br/>[controller.py]"]
  node_perception["Pool perception<br/>[perception.py]"]
  node_reasoning["LLM reasoning<br/>[reasoning.py]"]
  node_backends["LLM backends<br/>[llm_backends.py]"]
  node_validation["Decision validation<br/>[validation.py]"]
  node_memory["Decision memory<br/>[memory.py]"]
  node_cache[("LLM cache<br/>[controller.py]")]
  node_results["Selection result<br/>[controller.py]"]
end

subgraph group_data["Data and profiles"]
  node_profiles["Task profiles<br/>[profiles.py]"]
  node_wsdream_profiles["WS-DREAM profiles"]
  node_qws["QWS loader<br/>[qws_loader.py]"]
  node_wsdream["WS-DREAM loader<br/>[wsdream_loader.py]"]
  node_preprocessing["Pool preprocessing<br/>[preprocessing.py]"]
end

subgraph group_ranking["Ranking methods"]
  node_baselines["Static baselines<br/>[lookup_table.py]"]
  node_ranking_methods["MCDM ranking"]
end

subgraph group_evaluation["Evaluation and analysis"]
  node_runner["Experiment runner<br/>[runner.py]"]
  node_protocol["Evaluation protocol<br/>[protocol.py]"]
  node_metrics["Evaluation metrics<br/>[metrics.py]"]
  node_storage[("Trial storage<br/>[storage.py]")]
  node_drift["Drift simulation<br/>[simulate.py]"]
  node_report["Analysis reports<br/>[report.py]"]
end

node_user(("Task requester"))
node_provider(("LLM provider"))

node_user -->|"provides task"| node_demo
node_demo -->|"requests decision"| node_controller
node_demo -->|"loads QWS"| node_qws
node_qws -->|"supplies data"| node_preprocessing
node_wsdream -->|"supplies data"| node_preprocessing
node_profiles -->|"offers tasks"| node_demo
node_wsdream_profiles -->|"offers tasks"| node_demo
node_controller -->|"summarizes pool"| node_perception
node_controller -->|"requests decision"| node_reasoning
node_reasoning -->|"prompts backend"| node_backends
node_backends -->|"sends prompt"| node_provider
node_provider -->|"returns completion"| node_backends
node_controller -->|"checks and stores"| node_cache
node_controller -->|"validates choice"| node_validation
node_controller -->|"dispatches strategy"| node_ranking_methods
node_controller -->|"records decision"| node_memory
node_controller -->|"returns ranking"| node_results
node_runner -->|"runs protocol"| node_protocol
node_protocol -->|"evaluates agent"| node_controller
node_protocol -->|"compares methods"| node_baselines
node_protocol -->|"records trials"| node_storage
node_protocol -->|"computes measures"| node_metrics
node_drift -->|"provides drift sequence"| node_protocol
node_report -->|"reads trials"| node_storage
node_runner -.->|"uses time-slice data"| node_wsdream

click node_demo "https://github.com/didntfindmyname/btp/blob/main/app/streamlit_demo.py"
click node_controller "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/controller.py"
click node_perception "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/perception.py"
click node_reasoning "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/reasoning.py"
click node_backends "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/llm_backends.py"
click node_validation "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/validation.py"
click node_memory "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/memory.py"
click node_cache "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/controller.py"
click node_profiles "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/tasks/profiles.py"
click node_wsdream_profiles "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/tasks/wsdream_profiles.py"
click node_qws "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/data/qws_loader.py"
click node_wsdream "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/data/wsdream_loader.py"
click node_preprocessing "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/data/preprocessing.py"
click node_baselines "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/baselines/lookup_table.py"
click node_ranking_methods "https://github.com/didntfindmyname/btp/tree/main/src/agentic_selection/baselines"
click node_results "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/agent/controller.py"
click node_runner "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/runner.py"
click node_protocol "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/protocol.py"
click node_metrics "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/metrics.py"
click node_storage "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/storage.py"
click node_drift "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/drift/simulate.py"
click node_report "https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/report.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_demo toneBlue
class node_controller,node_perception,node_reasoning,node_backends,node_validation,node_memory,node_cache,node_results toneAmber
class node_profiles,node_wsdream_profiles,node_qws,node_wsdream,node_preprocessing toneMint
class node_baselines,node_ranking_methods,node_user toneRose
class node_runner,node_protocol,node_metrics,node_storage,node_drift,node_report,node_provider toneIndigo
```

## Components

### User interface

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

### Agent decision

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

### Data and profiles

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

### Ranking methods

- [Static baselines](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/baselines/lookup_table.py): `src/agentic_selection/baselines/lookup_table.py`
- [MCDM ranking](https://github.com/didntfindmyname/btp/tree/main/src/agentic_selection/baselines): `src/agentic_selection/baselines`

### Evaluation and analysis

- [Experiment runner](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/runner.py): `src/agentic_selection/evaluation/runner.py`
- [Evaluation protocol](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/protocol.py): `src/agentic_selection/evaluation/protocol.py`
- [Evaluation metrics](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/metrics.py): `src/agentic_selection/evaluation/metrics.py`
- [Trial storage](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/storage.py): `src/agentic_selection/evaluation/storage.py`
- [Drift simulation](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/drift/simulate.py): `src/agentic_selection/drift/simulate.py`
- [Analysis reports](https://github.com/didntfindmyname/btp/blob/main/src/agentic_selection/evaluation/report.py): `src/agentic_selection/evaluation/report.py`

### Other components

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

## Connections

- Task requester → Streamlit demo: provides task
- Streamlit demo → Agent controller: requests decision
- Streamlit demo → QWS loader: loads QWS
- QWS loader → Pool preprocessing: supplies data
- WS-DREAM loader → Pool preprocessing: supplies data
- Task profiles → Streamlit demo: offers tasks
- WS-DREAM profiles → Streamlit demo: offers tasks
- Agent controller → Pool perception: summarizes pool
- Agent controller → LLM reasoning: requests decision
- LLM reasoning → LLM backends: prompts backend
- LLM backends → LLM provider: sends prompt
- LLM provider → LLM backends: returns completion
- Agent controller → LLM cache: checks and stores
- Agent controller → Decision validation: validates choice
- Agent controller → MCDM ranking: dispatches strategy
- Agent controller → Decision memory: records decision
- Agent controller → Selection result: returns ranking
- Experiment runner → Evaluation protocol: runs protocol
- Evaluation protocol → Agent controller: evaluates agent
- Evaluation protocol → Static baselines: compares methods
- Evaluation protocol → Trial storage: records trials
- Evaluation protocol → Evaluation metrics: computes measures
- Drift simulation → Evaluation protocol: provides drift sequence
- Analysis reports → Trial storage: reads trials
- Experiment runner → WS-DREAM loader: uses time-slice data
