# ys-pundir/agentic-support-system architecture

> Architecture diagram of the GitHub repository ys-pundir/agentic-support-system, 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/ys-pundir/agentic-support-system
- Repository: https://github.com/ys-pundir/agentic-support-system

## Overview

This repository is a CLI e-commerce support system: a customer message enters the support-agent workflow, which can use policy retrieval, order-data queries, delivery-day calculations, feedback logging, or human escalation before returning a response. The graph preserves these documented branches and the configuration/LLM layer. Source excerpts support the sampled tool and storage connections; broader conversation policies and routing details are documented in the README rather than independently verified here.

Main entry points: [`src/agent/workflow.py`](https://github.com/ys-pundir/agentic-support-system/blob/main/src/agent/workflow.py) (Support Workflow), [`src/config.py`](https://github.com/ys-pundir/agentic-support-system/blob/main/src/config.py) (Agent Configuration), [`src/tools/rag_tool.py`](https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/rag_tool.py) (Policy Retrieval), [`src/tools/sql_tool.py`](https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/sql_tool.py) (Order Query Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_conversation["Conversation"]
  node_cli["CLI Entry<br/>[main.py]"]
  node_workflow["Support Workflow<br/>[workflow.py]"]
  node_history["Conversation History"]
  node_response(("Support Response"))
end

subgraph group_knowledge["Policy Answers"]
  node_rag["Policy Retrieval<br/>[rag_tool.py]"]
  node_vectorstore[("Policy Vector Store")]
end

subgraph group_orders["Order Support"]
  node_sql["Order Query Agent<br/>[sql_tool.py]"]
  node_daycount["Delivery Day Count<br/>[daycount_tool.py]"]
  node_ordersdb[("E-commerce Database<br/>[ecomm.db]")]
end

subgraph group_outcomes["Support Outcomes"]
  node_feedback["Feedback Logger<br/>[feedback_tool.py]"]
  node_feedbacklog[("Feedback Log")]
  node_escalation["Human Escalation<br/>[deffered_tool.py]"]
  node_cases[("Deferred Cases<br/>[deffered_cases.csv]")]
end

subgraph group_foundation["Agent Foundation"]
  node_config["Agent Configuration<br/>[config.py]"]
  node_llm["LLM Clients<br/>[llm.py]"]
end

node_customer(("Customer"))
node_groq{{"Groq Inference"}}

node_customer -->|"enters message"| node_cli
node_cli -->|"starts"| node_workflow
node_workflow -->|"returns response"| node_customer
node_workflow -->|"appends conversation"| node_history
node_workflow -->|"dispatches"| node_rag
node_workflow -->|"dispatches"| node_sql
node_workflow -->|"dispatches"| node_daycount
node_workflow -->|"dispatches"| node_feedback
node_workflow -->|"dispatches"| node_escalation
node_rag -->|"retrieves context"| node_vectorstore
node_rag -->|"requests completion"| node_groq
node_sql -->|"queries"| node_ordersdb
node_sql -->|"uses model"| node_llm
node_workflow -->|"uses model"| node_llm
node_llm -->|"calls"| node_groq
node_feedback -->|"appends entries"| node_feedbacklog
node_escalation -->|"writes case"| node_cases
node_config -->|"supplies settings"| node_llm
node_config -->|"supplies prompt"| node_workflow
node_config -->|"supplies settings"| node_rag
node_config -->|"supplies settings"| node_sql

click node_cli "https://github.com/ys-pundir/agentic-support-system/blob/main/src/main.py"
click node_workflow "https://github.com/ys-pundir/agentic-support-system/blob/main/src/agent/workflow.py"
click node_history "https://github.com/ys-pundir/agentic-support-system/blob/main/Storage/support_agent_conversation.json"
click node_rag "https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/rag_tool.py"
click node_vectorstore "https://github.com/ys-pundir/agentic-support-system/tree/main/Database/policy_docs"
click node_sql "https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/sql_tool.py"
click node_daycount "https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/daycount_tool.py"
click node_ordersdb "https://github.com/ys-pundir/agentic-support-system/blob/main/Database/ecomm.db"
click node_feedback "https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/feedback_tool.py"
click node_feedbacklog "https://github.com/ys-pundir/agentic-support-system/blob/main/Storage/agent_feedbacks.csv"
click node_escalation "https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/deffered_tool.py"
click node_cases "https://github.com/ys-pundir/agentic-support-system/blob/main/Storage/deffered_cases.csv"
click node_config "https://github.com/ys-pundir/agentic-support-system/blob/main/src/config.py"
click node_llm "https://github.com/ys-pundir/agentic-support-system/blob/main/src/sources/llm.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_cli,node_workflow,node_history,node_response toneBlue
class node_rag,node_vectorstore toneAmber
class node_sql,node_daycount,node_ordersdb toneMint
class node_feedback,node_feedbacklog,node_escalation,node_cases toneRose
class node_config,node_llm,node_customer,node_groq toneIndigo
```

## Components

### Conversation

- [CLI Entry](https://github.com/ys-pundir/agentic-support-system/blob/main/src/main.py): `src/main.py`
- [Support Workflow](https://github.com/ys-pundir/agentic-support-system/blob/main/src/agent/workflow.py): `src/agent/workflow.py`
- [Conversation History](https://github.com/ys-pundir/agentic-support-system/blob/main/Storage/support_agent_conversation.json): `Storage/support_agent_conversation.json`
- **Support Response**

### Policy Answers

- [Policy Retrieval](https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/rag_tool.py): `src/tools/rag_tool.py`
- [Policy Vector Store](https://github.com/ys-pundir/agentic-support-system/tree/main/Database/policy_docs): `Database/policy_docs`

### Order Support

- [Order Query Agent](https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/sql_tool.py): `src/tools/sql_tool.py`
- [Delivery Day Count](https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/daycount_tool.py): `src/tools/daycount_tool.py`
- [E-commerce Database](https://github.com/ys-pundir/agentic-support-system/blob/main/Database/ecomm.db): `Database/ecomm.db`

### Support Outcomes

- [Feedback Logger](https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/feedback_tool.py): `src/tools/feedback_tool.py`
- [Feedback Log](https://github.com/ys-pundir/agentic-support-system/blob/main/Storage/agent_feedbacks.csv): `Storage/agent_feedbacks.csv`
- [Human Escalation](https://github.com/ys-pundir/agentic-support-system/blob/main/src/tools/deffered_tool.py): `src/tools/deffered_tool.py`
- [Deferred Cases](https://github.com/ys-pundir/agentic-support-system/blob/main/Storage/deffered_cases.csv): `Storage/deffered_cases.csv`

### Agent Foundation

- [Agent Configuration](https://github.com/ys-pundir/agentic-support-system/blob/main/src/config.py): `src/config.py`
- [LLM Clients](https://github.com/ys-pundir/agentic-support-system/blob/main/src/sources/llm.py): `src/sources/llm.py`

### Other components

- **Customer**
- **Groq Inference**

## Connections

- Customer → CLI Entry: enters message
- CLI Entry → Support Workflow: starts
- Support Workflow → Customer: returns response
- Support Workflow → Conversation History: appends conversation
- Support Workflow → Policy Retrieval: dispatches
- Support Workflow → Order Query Agent: dispatches
- Support Workflow → Delivery Day Count: dispatches
- Support Workflow → Feedback Logger: dispatches
- Support Workflow → Human Escalation: dispatches
- Policy Retrieval → Policy Vector Store: retrieves context
- Policy Retrieval → Groq Inference: requests completion
- Order Query Agent → E-commerce Database: queries
- Order Query Agent → LLM Clients: uses model
- Support Workflow → LLM Clients: uses model
- LLM Clients → Groq Inference: calls
- Feedback Logger → Feedback Log: appends entries
- Human Escalation → Deferred Cases: writes case
- Agent Configuration → LLM Clients: supplies settings
- Agent Configuration → Support Workflow: supplies prompt
- Agent Configuration → Policy Retrieval: supplies settings
- Agent Configuration → Order Query Agent: supplies settings
