# naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction architecture

> Architecture diagram of the GitHub repository naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction
- Repository: https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction

## Overview

The product is an autonomous deal-hunting application: it finds online listings, estimates their value, selects promising opportunities, and alerts users, with a Gradio dashboard for reviewing results. The documented pricing capabilities include a fine-tuned Llama service, ChromaDB-backed RAG, Random Forest, and an ensemble. The core call edges below are supported by excerpts or README statements; unsampled dashboard, service, and autonomous-agent relationships are shown only where documented.

Main entry points: [`agents/ensemble_agent.py`](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/ensemble_agent.py) (Pricing Ensemble), [`agents/messaging_agent.py`](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/messaging_agent.py) (Messaging Agent), [`price_is_right.py`](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/price_is_right.py) (Gradio Dashboard), [`deal_agent_framework.py`](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/deal_agent_framework.py) (Framework Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_ui["Gradio Dashboard<br/>[price_is_right.py]"]
  node_framework["Framework Runtime"]
  node_history[("Deal History")]
  node_logs["Log Formatting<br/>[log_utils.py]"]
  node_planner["Planning Agent<br/>[planning_agent.py]"]
  node_autoplanner["Autonomous Planner"]
  node_agentbase["Agent Logging Base<br/>[agent.py]"]
end

subgraph group_discovery["Deal Discovery"]
  node_scanner["Deal Scanner<br/>[scanner_agent.py]"]
  node_dealdata["Deal Models and RSS<br/>[deals.py]"]
end

subgraph group_pricing["Price Estimation"]
  node_ensemble["Pricing Ensemble<br/>[ensemble_agent.py]"]
  node_specialist["Fine-tuned Llama"]
  node_randomforest["Random Forest"]
  node_frontier["RAG Price Estimator<br/>[frontier_agent.py]"]
  node_vectorstore[("Product Vector Store")]
  node_itemdata["Training Item Model<br/>[items.py]"]
end

subgraph group_alerts["Opportunity Alerts"]
  node_messenger["Messaging Agent<br/>[messaging_agent.py]"]
  node_pushover["Pushover"]
end

subgraph group_platform["Pricing Services"]
  node_modalservice["Modal Pricing Services<br/>[pricer_service2.py]"]
  node_base_llama["Base Llama Inference<br/>[llama.py]"]
end

node_user(("User"))
node_feeds["RSS Feeds and Listings"]
node_openai["OpenAI"]
node_anthropic["Anthropic Model"]

node_user -->|"uses"| node_ui
node_ui -->|"runs"| node_framework
node_framework -->|"invokes"| node_planner
node_framework -->|"reads and writes"| node_history
node_framework -->|"opens"| node_vectorstore
node_ui -->|"formats"| node_logs
node_ui -->|"requests alert"| node_messenger
node_planner -->|"scans"| node_scanner
node_scanner -->|"fetches deals"| node_dealdata
node_dealdata -->|"reads listings"| node_feeds
node_scanner -->|"selects deals"| node_openai
node_planner -->|"estimates prices"| node_ensemble
node_ensemble -->|"requests estimate"| node_specialist
node_ensemble -->|"requests estimate"| node_frontier
node_ensemble -->|"requests estimate"| node_randomforest
node_frontier -->|"queries similar items"| node_vectorstore
node_frontier -->|"estimates with context"| node_openai
node_planner -->|"alerts best deal"| node_messenger
node_messenger -->|"sends notification"| node_pushover
node_messenger -->|"drafts alert text"| node_anthropic
node_autoplanner -->|"tool dispatches"| node_scanner
node_autoplanner -->|"tool dispatches"| node_ensemble
node_autoplanner -->|"tool dispatches"| node_messenger
node_ensemble -->|"inherits logging"| node_agentbase
node_specialist -.->|"calls remotely"| node_modalservice
node_base_llama -.->|"related inference service"| node_modalservice
node_itemdata -.->|"training data"| node_randomforest

click node_ui "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/price_is_right.py"
click node_framework "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/deal_agent_framework.py"
click node_history "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/deal_agent_framework.py"
click node_logs "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/log_utils.py"
click node_planner "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/planning_agent.py"
click node_autoplanner "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/autonomous_planning_agent.py"
click node_agentbase "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/agent.py"
click node_scanner "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/scanner_agent.py"
click node_dealdata "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/deals.py"
click node_ensemble "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/ensemble_agent.py"
click node_specialist "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/specialist_agent.py"
click node_randomforest "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/random_forest_agent.py"
click node_frontier "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/frontier_agent.py"
click node_vectorstore "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/deal_agent_framework.py"
click node_itemdata "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/items.py"
click node_messenger "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/messaging_agent.py"
click node_modalservice "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/pricer_service2.py"
click node_base_llama "https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/llama.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_ui,node_framework,node_history,node_logs,node_planner,node_autoplanner,node_agentbase,node_user toneBlue
class node_scanner,node_dealdata toneAmber
class node_ensemble,node_specialist,node_randomforest,node_frontier,node_vectorstore,node_itemdata toneMint
class node_messenger,node_pushover toneRose
class node_modalservice,node_base_llama,node_feeds,node_openai,node_anthropic toneIndigo
```

## Components

### Application

- [Gradio Dashboard](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/price_is_right.py): `price_is_right.py`
- [Framework Runtime](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/deal_agent_framework.py): `deal_agent_framework.py`
- [Deal History](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/deal_agent_framework.py): `deal_agent_framework.py`
- [Log Formatting](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/log_utils.py): `log_utils.py`
- [Planning Agent](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/planning_agent.py): `agents/planning_agent.py`
- [Autonomous Planner](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/autonomous_planning_agent.py): `agents/autonomous_planning_agent.py`
- [Agent Logging Base](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/agent.py): `agents/agent.py`

### Deal Discovery

- [Deal Scanner](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/scanner_agent.py): `agents/scanner_agent.py`
- [Deal Models and RSS](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/deals.py): `agents/deals.py`

### Price Estimation

- [Pricing Ensemble](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/ensemble_agent.py): `agents/ensemble_agent.py`
- [Fine-tuned Llama](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/specialist_agent.py): `agents/specialist_agent.py`
- [Random Forest](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/random_forest_agent.py): `agents/random_forest_agent.py`
- [RAG Price Estimator](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/frontier_agent.py): `agents/frontier_agent.py`
- [Product Vector Store](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/deal_agent_framework.py): `deal_agent_framework.py`
- [Training Item Model](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/items.py): `agents/items.py`

### Opportunity Alerts

- [Messaging Agent](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/agents/messaging_agent.py): `agents/messaging_agent.py`
- **Pushover**

### Pricing Services

- [Modal Pricing Services](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/pricer_service2.py): `pricer_service2.py`
- [Base Llama Inference](https://github.com/naresh-naik/agentic-framework-for-ecommerce-deal-discovery-and-price-prediction/blob/main/llama.py): `llama.py`

### Other components

- **User**
- **RSS Feeds and Listings**
- **OpenAI**
- **Anthropic Model**

## Connections

- User → Gradio Dashboard: uses (evidence: `README.md`)
- Gradio Dashboard → Framework Runtime: runs (evidence: `price_is_right.py`)
- Framework Runtime → Planning Agent: invokes (evidence: `deal_agent_framework.py`)
- Framework Runtime → Deal History: reads and writes (evidence: `deal_agent_framework.py`)
- Framework Runtime → Product Vector Store: opens (evidence: `deal_agent_framework.py`)
- Gradio Dashboard → Log Formatting: formats (evidence: `price_is_right.py`)
- Gradio Dashboard → Messaging Agent: requests alert (evidence: `price_is_right.py`)
- Planning Agent → Deal Scanner: scans (evidence: `agents/planning_agent.py`)
- Deal Scanner → Deal Models and RSS: fetches deals (evidence: `agents/scanner_agent.py`)
- Deal Models and RSS → RSS Feeds and Listings: reads listings (evidence: `agents/deals.py`)
- Deal Scanner → OpenAI: selects deals (evidence: `agents/scanner_agent.py`)
- Planning Agent → Pricing Ensemble: estimates prices (evidence: `agents/planning_agent.py`)
- Pricing Ensemble → Fine-tuned Llama: requests estimate (evidence: `agents/ensemble_agent.py`)
- Pricing Ensemble → RAG Price Estimator: requests estimate (evidence: `agents/ensemble_agent.py`)
- Pricing Ensemble → Random Forest: requests estimate (evidence: `agents/ensemble_agent.py`)
- RAG Price Estimator → Product Vector Store: queries similar items (evidence: `agents/frontier_agent.py`)
- RAG Price Estimator → OpenAI: estimates with context (evidence: `agents/frontier_agent.py`)
- Planning Agent → Messaging Agent: alerts best deal (evidence: `agents/planning_agent.py`)
- Messaging Agent → Pushover: sends notification (evidence: `agents/messaging_agent.py`)
- Messaging Agent → Anthropic Model: drafts alert text (evidence: `README.md`)
- Autonomous Planner → Deal Scanner: tool dispatches (evidence: `agents/autonomous_planning_agent.py`)
- Autonomous Planner → Pricing Ensemble: tool dispatches (evidence: `agents/autonomous_planning_agent.py`)
- Autonomous Planner → Messaging Agent: tool dispatches (evidence: `agents/autonomous_planning_agent.py`)
- Pricing Ensemble → Agent Logging Base: inherits logging (evidence: `agents/ensemble_agent.py`)
- Fine-tuned Llama → Modal Pricing Services: calls remotely (evidence: `README.md`)
- Base Llama Inference → Modal Pricing Services: related inference service
- Training Item Model → Random Forest: training data (evidence: `README.md`)
