# muthukumar-selvarasu/agentic-customer-support architecture

> Architecture diagram of the GitHub repository muthukumar-selvarasu/agentic-customer-support, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/muthukumar-selvarasu/agentic-customer-support
- Repository: https://github.com/muthukumar-selvarasu/agentic-customer-support

## Overview

This repository implements an online-shop support desk, with terminal and web interfaces that expose each turn’s decisions. The principal workflow accepts a customer message, applies security checks, consults the support agent and shop tools, masks sensitive reply data, saves customer memory, and records a trace. The README also identifies MCP tools, A2A security services, and evaluation as product capabilities. Several pipeline sections and the web implementation are unsampled, so edges that depend on their internal calls are omitted or marked unverified.

Main entry points: [`support/pipeline.py`](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/pipeline.py) (Turn pipeline), [`support/web.py`](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/web.py) (Web app), [`eval/run.py`](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/eval/run.py) (Evaluation runner), [`support/cli.py`](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/cli.py) (Terminal app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Customer interfaces"]
  node_cli["Terminal app<br/>[cli.py]"]
  node_web["Web app<br/>[web.py]"]
end

subgraph group_orchestration["Turn orchestration"]
  node_pipeline["Turn pipeline<br/>[pipeline.py]"]
  node_support_agent["Support agent<br/>[pipeline.py]"]
end

subgraph group_security["Security services"]
  node_sanitizer["Input sanitizer<br/>[sanitizer.py]"]
  node_judge_service["Security Judge<br/>[app.py]"]
  node_patterns["Attack patterns<br/>[patterns.py]"]
  node_guardrail["Topic guardrail<br/>[guardrail.py]"]
  node_masker_service["Data Masker<br/>[app.py]"]
  node_masker["Masking logic<br/>[mask.py]"]
end

subgraph group_shop["Shop data and tools"]
  node_tool_config["MCP shop tools<br/>[tools.yaml]"]
  node_shop_database[("Shop database<br/>[seed.sql]")]
end

subgraph group_observability["Memory and evaluation"]
  node_memory["Customer memory<br/>[memory.py]"]
  node_telemetry["Trace telemetry<br/>[telemetry.py]"]
  node_eval_runner["Evaluation runner<br/>[run.py]"]
  node_eval_cases["Evaluation cases<br/>[gold.py]"]
  node_eval_score["Evaluation scoring<br/>[score.py]"]
end

node_customer(("Customer"))

node_customer -->|"sends message"| node_cli
node_customer -->|"sends message"| node_web
node_cli -->|"runs turn"| node_pipeline
node_web -.->|"runs turn"| node_pipeline
node_pipeline -->|"checks input"| node_sanitizer
node_pipeline -->|"requests verdict"| node_judge_service
node_judge_service -->|"scans message"| node_patterns
node_pipeline -.->|"checks topic"| node_guardrail
node_pipeline -->|"dispatches turn"| node_support_agent
node_support_agent -->|"calls tools"| node_tool_config
node_tool_config -->|"reads or updates"| node_shop_database
node_pipeline -->|"requests masking"| node_masker_service
node_masker_service -->|"masks reply"| node_masker
node_pipeline -->|"recalls and saves"| node_memory
node_pipeline -->|"records trace"| node_telemetry
node_cli -->|"sets up tracing"| node_telemetry
node_web -->|"uses tracing"| node_telemetry
node_eval_runner -->|"drives scenarios"| node_web
node_eval_runner -->|"loads cases"| node_eval_cases
node_eval_runner -->|"scores results"| node_eval_score
node_eval_score -->|"uses expected outcomes"| node_eval_cases
node_eval_score -->|"checks memory"| node_memory

click node_cli "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/cli.py"
click node_web "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/web.py"
click node_pipeline "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/pipeline.py"
click node_sanitizer "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/sanitizer.py"
click node_judge_service "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/judge/app.py"
click node_patterns "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/judge/patterns.py"
click node_guardrail "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/guardrail.py"
click node_masker_service "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/masker/app.py"
click node_masker "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/masker/mask.py"
click node_support_agent "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/pipeline.py"
click node_tool_config "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/mcp_toolbox/tools.yaml"
click node_shop_database "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/db/seed.sql"
click node_memory "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/memory.py"
click node_telemetry "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/telemetry.py"
click node_eval_runner "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/eval/run.py"
click node_eval_cases "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/eval/gold.py"
click node_eval_score "https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/eval/score.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_web toneBlue
class node_pipeline,node_support_agent toneAmber
class node_sanitizer,node_judge_service,node_patterns,node_guardrail,node_masker_service,node_masker toneMint
class node_tool_config,node_shop_database toneRose
class node_memory,node_telemetry,node_eval_runner,node_eval_cases,node_eval_score,node_customer toneIndigo
```

## Components

### Customer interfaces

- [Terminal app](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/cli.py): `support/cli.py`
- [Web app](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/web.py): `support/web.py`

### Turn orchestration

- [Turn pipeline](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/pipeline.py): `support/pipeline.py`
- [Support agent](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/pipeline.py): `support/pipeline.py`

### Security services

- [Input sanitizer](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/sanitizer.py): `guards/sanitizer.py`
- [Security Judge](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/judge/app.py): `guards/judge/app.py`
- [Attack patterns](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/judge/patterns.py): `guards/judge/patterns.py`
- [Topic guardrail](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/guardrail.py): `guards/guardrail.py`
- [Data Masker](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/masker/app.py): `guards/masker/app.py`
- [Masking logic](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/guards/masker/mask.py): `guards/masker/mask.py`

### Shop data and tools

- [MCP shop tools](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/mcp_toolbox/tools.yaml): `mcp_toolbox/tools.yaml`
- [Shop database](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/db/seed.sql): `db/seed.sql`

### Memory and evaluation

- [Customer memory](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/memory.py): `support/memory.py`
- [Trace telemetry](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/support/telemetry.py): `support/telemetry.py`
- [Evaluation runner](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/eval/run.py): `eval/run.py`
- [Evaluation cases](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/eval/gold.py): `eval/gold.py`
- [Evaluation scoring](https://github.com/muthukumar-selvarasu/agentic-customer-support/blob/master/eval/score.py): `eval/score.py`

### Other components

- **Customer**

## Connections

- Customer → Terminal app: sends message (evidence: `README.md`)
- Customer → Web app: sends message (evidence: `README.md`)
- Terminal app → Turn pipeline: runs turn (evidence: `support/cli.py`)
- Web app → Turn pipeline: runs turn (evidence: `support/web.py`)
- Turn pipeline → Input sanitizer: checks input (evidence: `README.md`)
- Turn pipeline → Security Judge: requests verdict (evidence: `support/pipeline.py`)
- Security Judge → Attack patterns: scans message (evidence: `guards/judge/app.py`)
- Turn pipeline → Topic guardrail: checks topic (evidence: `support/pipeline.py`)
- Turn pipeline → Support agent: dispatches turn (evidence: `README.md`)
- Support agent → MCP shop tools: calls tools (evidence: `README.md`)
- MCP shop tools → Shop database: reads or updates (evidence: `README.md`)
- Turn pipeline → Data Masker: requests masking (evidence: `README.md`)
- Data Masker → Masking logic: masks reply (evidence: `guards/masker/app.py`)
- Turn pipeline → Customer memory: recalls and saves (evidence: `README.md`)
- Turn pipeline → Trace telemetry: records trace (evidence: `support/pipeline.py`)
- Terminal app → Trace telemetry: sets up tracing (evidence: `support/cli.py`)
- Web app → Trace telemetry: uses tracing (evidence: `README.md`)
- Evaluation runner → Web app: drives scenarios (evidence: `eval/run.py`)
- Evaluation runner → Evaluation cases: loads cases (evidence: `eval/run.py`)
- Evaluation runner → Evaluation scoring: scores results (evidence: `eval/run.py`)
- Evaluation scoring → Evaluation cases: uses expected outcomes (evidence: `eval/score.py`)
- Evaluation scoring → Customer memory: checks memory (evidence: `eval/score.py`)
