# singhsidhukuldeep/axiomcart-ai-assistant architecture

> Architecture diagram of the GitHub repository singhsidhukuldeep/axiomcart-ai-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/singhsidhukuldeep/axiomcart-ai-assistant
- Repository: https://github.com/singhsidhukuldeep/axiomcart-ai-assistant

## Overview

AxiomCart is a voice-optional shopping and customer-support assistant. A user submits text or speech through the CLI; the assistant invokes a checkpointed LangGraph workflow that classifies the request, dispatches product and/or support agents, and returns a synthesized answer. Product discovery uses catalog-backed semantic search; support can look up orders, request missing details through HITL, or escalate. The README documents parallel dispatch, memory, and optional email; email delivery is shown as optional but not active in the sampled tool excerpt.

Main entry points: [`src/graph.py`](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/graph.py) (Workflow Graph), [`src/tools.py`](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/tools.py) (Human Escalation), [`src/main.py`](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/main.py) (Assistant Interface), [`src/nodes.py`](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py) (Support Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User Interaction"]
  node_assistant["Assistant Interface<br/>[main.py]"]
  node_voice_io["Voice I/O<br/>[voice.py]"]
end

subgraph group_workflow["Agent Workflow"]
  node_graph["Workflow Graph<br/>[graph.py]"]
  node_state["Conversation State<br/>[state.py]"]
  node_router["Request Orchestrator<br/>[nodes.py]"]
  node_product_agent["Product Agent<br/>[nodes.py]"]
  node_product_loop["Product Model Loop<br/>[nodes.py]"]
  node_support_agent["Support Agent<br/>[nodes.py]"]
  node_support_loop["Support Model Loop<br/>[nodes.py]"]
  node_synthesizer["Response Synthesizer<br/>[nodes.py]"]
end

subgraph group_commerce["Commerce Services"]
  node_search_tool["Catalog Search Tool<br/>[tools.py]"]
  node_vectorstore[("Product Vector Store<br/>[rag.py]")]
  node_catalog[("Product Catalog<br/>[data.py]")]
  node_order_tool["Order Lookup<br/>[tools.py]"]
  node_order_db[("Order Records<br/>[data.py]")]
  node_escalation_tool["Human Escalation<br/>[tools.py]"]
  node_ticket_queue["Escalation Queue<br/>[data.py]"]
  node_support_policy["Support Policies<br/>[data.py]"]
end

subgraph group_platform["AI and State"]
  node_openai["OpenAI Services"]
  node_memory[("Memory Checkpointer<br/>[graph.py]")]
end

node_customer(("Customer"))
node_human_support(("Human Support"))
node_email_service["Resend Email"]

node_customer -->|"submits query"| node_assistant
node_assistant -->|"records or speaks"| node_voice_io
node_voice_io -->|"transcribes and synthesizes"| node_openai
node_assistant -->|"invokes and resumes"| node_graph
node_graph -->|"registers node"| node_router
node_graph -->|"registers node"| node_product_agent
node_graph -->|"registers node"| node_support_agent
node_graph -->|"registers node"| node_synthesizer
node_graph -->|"uses state schema"| node_state
node_graph -->|"checkpoints state"| node_memory
node_router -->|"classifies query"| node_openai
node_router -->|"dispatches tasks"| node_product_agent
node_router -->|"dispatches tasks"| node_support_agent
node_product_agent -->|"invokes subgraph"| node_product_loop
node_support_agent -->|"invokes subgraph"| node_support_loop
node_product_loop -->|"calls model"| node_openai
node_support_loop -->|"calls model"| node_openai
node_product_loop -->|"executes tool calls"| node_search_tool
node_support_loop -->|"executes tool calls"| node_order_tool
node_support_loop -->|"executes tool calls"| node_escalation_tool
node_product_agent -->|"sends result"| node_synthesizer
node_support_agent -->|"sends result"| node_synthesizer
node_synthesizer -->|"merges answers"| node_openai
node_synthesizer -->|"returns final answer"| node_assistant
node_search_tool -->|"similarity searches"| node_vectorstore
node_vectorstore -->|"indexes catalog"| node_catalog
node_order_tool -->|"reads order records"| node_order_db
node_escalation_tool -->|"reads customer details"| node_order_db
node_escalation_tool -->|"appends ticket"| node_ticket_queue
node_support_agent -->|"uses policy prompt"| node_support_policy
node_assistant -->|"asks and receives HITL"| node_customer
node_escalation_tool -->|"creates follow-up"| node_human_support
node_escalation_tool -.->|"may notify"| node_email_service

click node_assistant "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/main.py"
click node_voice_io "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/voice.py"
click node_graph "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/graph.py"
click node_state "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/state.py"
click node_router "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py"
click node_product_agent "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py"
click node_product_loop "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py"
click node_support_agent "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py"
click node_support_loop "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py"
click node_synthesizer "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py"
click node_search_tool "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/tools.py"
click node_vectorstore "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/rag.py"
click node_catalog "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/data.py"
click node_order_tool "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/tools.py"
click node_order_db "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/data.py"
click node_escalation_tool "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/tools.py"
click node_ticket_queue "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/data.py"
click node_support_policy "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/data.py"
click node_memory "https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/graph.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_assistant,node_voice_io toneBlue
class node_graph,node_state,node_router,node_product_agent,node_product_loop,node_support_agent,node_support_loop,node_synthesizer toneAmber
class node_search_tool,node_vectorstore,node_catalog,node_order_tool,node_order_db,node_escalation_tool,node_ticket_queue,node_support_policy toneMint
class node_openai,node_memory toneRose
class node_customer,node_human_support,node_email_service toneIndigo
```

## Components

### User Interaction

- [Assistant Interface](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/main.py): `src/main.py`
- [Voice I/O](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/voice.py): `src/voice.py`

### Agent Workflow

- [Workflow Graph](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/graph.py): `src/graph.py`
- [Conversation State](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/state.py): `src/state.py`
- [Request Orchestrator](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py): `src/nodes.py`
- [Product Agent](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py): `src/nodes.py`
- [Product Model Loop](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py): `src/nodes.py`
- [Support Agent](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py): `src/nodes.py`
- [Support Model Loop](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py): `src/nodes.py`
- [Response Synthesizer](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/nodes.py): `src/nodes.py`

### Commerce Services

- [Catalog Search Tool](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/tools.py): `src/tools.py`
- [Product Vector Store](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/rag.py): `src/rag.py`
- [Product Catalog](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/data.py): `src/data.py`
- [Order Lookup](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/tools.py): `src/tools.py`
- [Order Records](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/data.py): `src/data.py`
- [Human Escalation](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/tools.py): `src/tools.py`
- [Escalation Queue](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/data.py): `src/data.py`
- [Support Policies](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/data.py): `src/data.py`

### AI and State

- **OpenAI Services**
- [Memory Checkpointer](https://github.com/singhsidhukuldeep/axiomcart-ai-assistant/blob/main/src/graph.py): `src/graph.py`

### Other components

- **Customer**
- **Human Support**
- **Resend Email**

## Connections

- Customer → Assistant Interface: submits query (evidence: `README.md`)
- Assistant Interface → Voice I/O: records or speaks (evidence: `src/main.py`)
- Voice I/O → OpenAI Services: transcribes and synthesizes (evidence: `src/voice.py`)
- Assistant Interface → Workflow Graph: invokes and resumes (evidence: `src/main.py`)
- Workflow Graph → Request Orchestrator: registers node (evidence: `src/graph.py`)
- Workflow Graph → Product Agent: registers node (evidence: `src/graph.py`)
- Workflow Graph → Support Agent: registers node (evidence: `src/graph.py`)
- Workflow Graph → Response Synthesizer: registers node (evidence: `src/graph.py`)
- Workflow Graph → Conversation State: uses state schema (evidence: `src/graph.py`)
- Workflow Graph → Memory Checkpointer: checkpoints state (evidence: `src/graph.py`)
- Request Orchestrator → OpenAI Services: classifies query (evidence: `src/nodes.py`)
- Request Orchestrator → Product Agent: dispatches tasks (evidence: `src/nodes.py`)
- Request Orchestrator → Support Agent: dispatches tasks (evidence: `src/nodes.py`)
- Product Agent → Product Model Loop: invokes subgraph (evidence: `src/nodes.py`)
- Support Agent → Support Model Loop: invokes subgraph (evidence: `src/nodes.py`)
- Product Model Loop → OpenAI Services: calls model (evidence: `src/nodes.py`)
- Support Model Loop → OpenAI Services: calls model (evidence: `src/nodes.py`)
- Product Model Loop → Catalog Search Tool: executes tool calls (evidence: `src/nodes.py`)
- Support Model Loop → Order Lookup: executes tool calls (evidence: `src/nodes.py`)
- Support Model Loop → Human Escalation: executes tool calls (evidence: `src/nodes.py`)
- Product Agent → Response Synthesizer: sends result (evidence: `src/nodes.py`)
- Support Agent → Response Synthesizer: sends result (evidence: `src/nodes.py`)
- Response Synthesizer → OpenAI Services: merges answers (evidence: `src/nodes.py`)
- Response Synthesizer → Assistant Interface: returns final answer (evidence: `README.md`)
- Catalog Search Tool → Product Vector Store: similarity searches (evidence: `src/tools.py`)
- Product Vector Store → Product Catalog: indexes catalog (evidence: `src/rag.py`)
- Order Lookup → Order Records: reads order records (evidence: `src/tools.py`)
- Human Escalation → Order Records: reads customer details (evidence: `src/tools.py`)
- Human Escalation → Escalation Queue: appends ticket (evidence: `src/tools.py`)
- Support Agent → Support Policies: uses policy prompt (evidence: `src/nodes.py`)
- Assistant Interface → Customer: asks and receives HITL (evidence: `src/main.py`)
- Human Escalation → Human Support: creates follow-up (evidence: `README.md`)
- Human Escalation → Resend Email: may notify (evidence: `README.md`)
