# rushikiran/doordash-ai-agent architecture

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

- Interactive diagram: https://gitdiagram.com/rushikiran/doordash-ai-agent
- Repository: https://github.com/rushikiran/doordash-ai-agent

## Overview

This is a Streamlit customer-support automation app. An operator configures an OpenAI key, enters a customer message, and starts a transaction; the LangGraph workflow classifies it, optionally looks up order data, applies support policy, and displays a reply with telemetry. The runtime and its domain stages are implemented together in app.py. The README describes the same capabilities; evidence for the graph below comes from the sampled app.py and README, not separately inspected modules.

Main entry points: [`app.py`](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py) (Graph Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_streamlit_ui["Streamlit Interface<br/>[app.py]"]
  node_input_checks["Input Validation<br/>[app.py]"]
  node_telemetry["Telemetry Console<br/>[app.py]"]
  node_response_display["Response Display<br/>[app.py]"]
  node_llm_setup["LLM Setup<br/>[app.py]"]
end

subgraph group_workflow["Workflow Orchestration"]
  node_graph_runtime["Graph Runtime<br/>[app.py]"]
  node_agent_state["Agent State<br/>[app.py]"]
end

subgraph group_support["Support Domain"]
  node_triage["Cognitive Triage<br/>[app.py]"]
  node_semantic_lookup["Item Keyword Lookup<br/>[app.py]"]
  node_metrics_node["Database Metrics<br/>[app.py]"]
  node_enterprise_records[("Order Records<br/>[app.py]")]
  node_policy_engine["Policy and Retention<br/>[app.py]"]
  node_openai_model["OpenAI Model"]
end

node_customer(("Customer"))
node_operator(("Operator"))

node_customer -->|"sends message"| node_streamlit_ui
node_operator -->|"enters key"| node_streamlit_ui
node_streamlit_ui -->|"submits input"| node_input_checks
node_input_checks -->|"invokes workflow"| node_graph_runtime
node_streamlit_ui -->|"configures model"| node_llm_setup
node_llm_setup -->|"creates client"| node_openai_model
node_graph_runtime -->|"dispatches first"| node_triage
node_graph_runtime -->|"routes with order"| node_metrics_node
node_graph_runtime -->|"routes without order"| node_policy_engine
node_graph_runtime -->|"continues after lookup"| node_policy_engine
node_triage -->|"classifies message"| node_openai_model
node_triage -->|"resolves missing ID"| node_semantic_lookup
node_metrics_node -->|"queries order"| node_enterprise_records
node_policy_engine -->|"generates reply"| node_openai_model
node_graph_runtime -->|"runs with state"| node_agent_state
node_graph_runtime -->|"returns final message"| node_response_display
node_triage -->|"appends logs"| node_telemetry
node_metrics_node -->|"appends logs"| node_telemetry
node_policy_engine -->|"appends logs"| node_telemetry
node_streamlit_ui -->|"renders logs"| node_telemetry

click node_streamlit_ui "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_input_checks "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_telemetry "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_response_display "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_llm_setup "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_graph_runtime "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_agent_state "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_triage "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_semantic_lookup "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_metrics_node "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_enterprise_records "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py"
click node_policy_engine "https://github.com/rushikiran/doordash-ai-agent/blob/main/app.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_streamlit_ui,node_input_checks,node_telemetry,node_response_display,node_llm_setup toneBlue
class node_graph_runtime,node_agent_state toneAmber
class node_triage,node_semantic_lookup,node_metrics_node,node_enterprise_records,node_policy_engine,node_openai_model toneMint
class node_customer,node_operator toneIndigo
```

## Components

### User Interface

- [Streamlit Interface](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [Input Validation](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [Telemetry Console](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [Response Display](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [LLM Setup](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`

### Workflow Orchestration

- [Graph Runtime](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [Agent State](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`

### Support Domain

- [Cognitive Triage](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [Item Keyword Lookup](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [Database Metrics](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [Order Records](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- [Policy and Retention](https://github.com/rushikiran/doordash-ai-agent/blob/main/app.py): `app.py`
- **OpenAI Model**

### Other components

- **Customer**
- **Operator**

## Connections

- Customer → Streamlit Interface: sends message (evidence: `app.py`)
- Operator → Streamlit Interface: enters key (evidence: `app.py`)
- Streamlit Interface → Input Validation: submits input (evidence: `app.py`)
- Input Validation → Graph Runtime: invokes workflow (evidence: `app.py`)
- Streamlit Interface → LLM Setup: configures model (evidence: `app.py`)
- LLM Setup → OpenAI Model: creates client (evidence: `app.py`)
- Graph Runtime → Cognitive Triage: dispatches first (evidence: `app.py`)
- Graph Runtime → Database Metrics: routes with order (evidence: `app.py`)
- Graph Runtime → Policy and Retention: routes without order (evidence: `app.py`)
- Graph Runtime → Policy and Retention: continues after lookup (evidence: `app.py`)
- Cognitive Triage → OpenAI Model: classifies message (evidence: `app.py`)
- Cognitive Triage → Item Keyword Lookup: resolves missing ID (evidence: `app.py`)
- Database Metrics → Order Records: queries order (evidence: `app.py`)
- Policy and Retention → OpenAI Model: generates reply (evidence: `app.py`)
- Graph Runtime → Agent State: runs with state (evidence: `app.py`)
- Graph Runtime → Response Display: returns final message (evidence: `app.py`)
- Cognitive Triage → Telemetry Console: appends logs (evidence: `app.py`)
- Database Metrics → Telemetry Console: appends logs (evidence: `app.py`)
- Policy and Retention → Telemetry Console: appends logs (evidence: `app.py`)
- Streamlit Interface → Telemetry Console: renders logs (evidence: `app.py`)
