# allaeldeneilou/customersupport architecture

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

- Interactive diagram: https://gitdiagram.com/allaeldeneilou/customersupport
- Repository: https://github.com/allaeldeneilou/customersupport

## Overview

This repository combines a deployable AgentCore project with two customer-support agent variants and an OrderResearch harness. In the sampled primary workflow, a customer request enters the AgentCore runtime, which resolves identity and session context, assembles model and MCP tools, and streams a response. A separate CDK path reads project configuration and synthesizes AWS resources. The tree and README indicate broader AgentCore resource support, but its CLI implementation is not present here; unsampled or weakly evidenced integrations are left unconnected.

Main entry points: [`app/CustomerSupport/main.py`](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py) (Support runtime), [`app/CustomerSupport/mcp_client/client.py`](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/mcp_client/client.py) (MCP clients), [`agentcore/cdk/bin/cdk.ts`](https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/cdk/bin/cdk.ts) (CDK synthesis entry), [`agentcore/cdk/lib/cdk-stack.ts`](https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/cdk/lib/cdk-stack.ts) (AgentCore stack)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_support["Customer support"]
  node_runtime["Support runtime<br/>[main.py]"]
  node_identity["Session identity<br/>[main.py]"]
  node_model["Bedrock model<br/>[load.py]"]
  node_session["Memory session<br/>[session.py]"]
  node_policy["Return policies<br/>[main.py]"]
  node_products["Product lookup<br/>[main.py]"]
  node_mcp["MCP clients<br/>[client.py]"]
  node_exa{{"Exa search"}}
  node_gateway{{"AgentCore gateway"}}
  node_frontend["Web frontend<br/>[frontend.py]"]
  node_skillfetch["Skill fetcher<br/>[fetcher.py]"]
end

subgraph group_variants["Agent variants"]
  node_abruntime["Support AB runtime<br/>[main.py]"]
  node_abmodel["Mantle compatibility<br/>[mantle_compat.py]"]
  node_abmcp["AB gateway client<br/>[client.py]"]
end

subgraph group_deployment["AWS deployment"]
  node_projectconfig["Project configuration<br/>[agentcore.json]"]
  node_targets["AWS targets<br/>[aws-targets.json]"]
  node_cdkentry["CDK synthesis entry<br/>[cdk.ts]"]
  node_stack["AgentCore stack<br/>[cdk-stack.ts]"]
  node_awsresources{{"AgentCore resources"}}
end

subgraph group_other["Additional agents"]
  node_orderresearch["Order research harness<br/>[harness.json]"]
  node_harnessprompt["Harness instructions<br/>[system-prompt.md]"]
end

node_customer(("Customer"))

node_customer -->|"submits prompt"| node_runtime
node_runtime -->|"extracts user"| node_identity
node_runtime -->|"creates session"| node_session
node_runtime -->|"loads model"| node_model
node_runtime -->|"offers tool"| node_policy
node_runtime -->|"offers tool"| node_products
node_runtime -->|"creates clients"| node_mcp
node_mcp -->|"connects search"| node_exa
node_mcp -->|"connects gateway"| node_gateway
node_runtime -->|"streams response"| node_customer
node_skillfetch -.->|"provides skill paths"| node_runtime
node_abruntime -.->|"uses model variant"| node_abmodel
node_abmcp -->|"connects gateway"| node_gateway
node_projectconfig -->|"read by"| node_cdkentry
node_targets -->|"read by"| node_cdkentry
node_cdkentry -->|"instantiates"| node_stack
node_stack -->|"defines resources"| node_awsresources

click node_runtime "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py"
click node_identity "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py"
click node_model "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/model/load.py"
click node_session "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/memory/session.py"
click node_policy "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py"
click node_products "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py"
click node_mcp "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/mcp_client/client.py"
click node_frontend "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/frontend/frontend.py"
click node_skillfetch "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/skills/fetcher.py"
click node_abruntime "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupportAB/main.py"
click node_abmodel "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupportAB/model/mantle_compat.py"
click node_abmcp "https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupportAB/mcp_client/client.py"
click node_projectconfig "https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/agentcore.json"
click node_targets "https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/aws-targets.json"
click node_cdkentry "https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/cdk/bin/cdk.ts"
click node_stack "https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/cdk/lib/cdk-stack.ts"
click node_orderresearch "https://github.com/allaeldeneilou/customersupport/blob/main/app/OrderResearchAgent/harness.json"
click node_harnessprompt "https://github.com/allaeldeneilou/customersupport/blob/main/app/OrderResearchAgent/system-prompt.md"

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_runtime,node_identity,node_model,node_session,node_policy,node_products,node_mcp,node_exa,node_gateway,node_frontend,node_skillfetch toneBlue
class node_abruntime,node_abmodel,node_abmcp toneAmber
class node_projectconfig,node_targets,node_cdkentry,node_stack,node_awsresources toneMint
class node_orderresearch,node_harnessprompt toneRose
class node_customer toneIndigo
```

## Components

### Customer support

- [Support runtime](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py): `app/CustomerSupport/main.py`
- [Session identity](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py): `app/CustomerSupport/main.py`
- [Bedrock model](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/model/load.py): `app/CustomerSupport/model/load.py`
- [Memory session](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/memory/session.py): `app/CustomerSupport/memory/session.py`
- [Return policies](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py): `app/CustomerSupport/main.py`
- [Product lookup](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/main.py): `app/CustomerSupport/main.py`
- [MCP clients](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/mcp_client/client.py): `app/CustomerSupport/mcp_client/client.py`
- **Exa search**
- **AgentCore gateway**
- [Web frontend](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/frontend/frontend.py): `app/CustomerSupport/frontend/frontend.py`
- [Skill fetcher](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupport/skills/fetcher.py): `app/CustomerSupport/skills/fetcher.py`

### Agent variants

- [Support AB runtime](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupportAB/main.py): `app/CustomerSupportAB/main.py`
- [Mantle compatibility](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupportAB/model/mantle_compat.py): `app/CustomerSupportAB/model/mantle_compat.py`
- [AB gateway client](https://github.com/allaeldeneilou/customersupport/blob/main/app/CustomerSupportAB/mcp_client/client.py): `app/CustomerSupportAB/mcp_client/client.py`

### AWS deployment

- [Project configuration](https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/agentcore.json): `agentcore/agentcore.json`
- [AWS targets](https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/aws-targets.json): `agentcore/aws-targets.json`
- [CDK synthesis entry](https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/cdk/bin/cdk.ts): `agentcore/cdk/bin/cdk.ts`
- [AgentCore stack](https://github.com/allaeldeneilou/customersupport/blob/main/agentcore/cdk/lib/cdk-stack.ts): `agentcore/cdk/lib/cdk-stack.ts`
- **AgentCore resources**

### Additional agents

- [Order research harness](https://github.com/allaeldeneilou/customersupport/blob/main/app/OrderResearchAgent/harness.json): `app/OrderResearchAgent/harness.json`
- [Harness instructions](https://github.com/allaeldeneilou/customersupport/blob/main/app/OrderResearchAgent/system-prompt.md): `app/OrderResearchAgent/system-prompt.md`

### Other components

- **Customer**

## Connections

- Customer → Support runtime: submits prompt (evidence: `app/CustomerSupport/main.py`)
- Support runtime → Session identity: extracts user (evidence: `app/CustomerSupport/main.py`)
- Support runtime → Memory session: creates session (evidence: `app/CustomerSupport/main.py`)
- Support runtime → Bedrock model: loads model (evidence: `app/CustomerSupport/main.py`)
- Support runtime → Return policies: offers tool (evidence: `app/CustomerSupport/main.py`)
- Support runtime → Product lookup: offers tool (evidence: `app/CustomerSupport/main.py`)
- Support runtime → MCP clients: creates clients (evidence: `app/CustomerSupport/main.py`)
- MCP clients → Exa search: connects search (evidence: `app/CustomerSupport/mcp_client/client.py`)
- MCP clients → AgentCore gateway: connects gateway (evidence: `app/CustomerSupport/mcp_client/client.py`)
- Support runtime → Customer: streams response (evidence: `app/CustomerSupport/main.py`)
- Skill fetcher → Support runtime: provides skill paths (evidence: `app/CustomerSupport/skills/fetcher.py`)
- Support AB runtime → Mantle compatibility: uses model variant
- AB gateway client → AgentCore gateway: connects gateway (evidence: `app/CustomerSupportAB/mcp_client/client.py`)
- Project configuration → CDK synthesis entry: read by (evidence: `agentcore/cdk/bin/cdk.ts`)
- AWS targets → CDK synthesis entry: read by (evidence: `agentcore/cdk/bin/cdk.ts`)
- CDK synthesis entry → AgentCore stack: instantiates (evidence: `agentcore/cdk/bin/cdk.ts`)
- AgentCore stack → AgentCore resources: defines resources (evidence: `agentcore/cdk/lib/cdk-stack.ts`)
