# giripsr769/autogen_customer_support architecture

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

- Interactive diagram: https://gitdiagram.com/giripsr769/autogen_customer_support
- Repository: https://github.com/giripsr769/autogen_customer_support

## Overview

This is a multi-agent customer-support application. A user submits a query in the React UI; the frontend streams events from FastAPI, whose workflow applies input safety checks, gathers direct and web-researched answers, finalizes and logs them, then checks the generated content before the UI presents the result and agent statuses. The README also identifies a Streamlit frontend, though its integration with the main backend is not shown. Edges reflect excerpts or explicit README descriptions; unsampled implementation details are not inferred.

Main entry points: [`backend/services/support_service.py`](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/services/support_service.py) (Support workflow), [`frontend/src/App.jsx`](https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/App.jsx) (React app), [`backend/agents/research_agent.py`](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/agents/research_agent.py) (Web research), [`backend/agents/logger_agent.py`](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/agents/logger_agent.py) (Finalizer and logger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interfaces"]
  node_app["React app<br/>[App.jsx]"]
  node_chat["Chat message<br/>[ChatMessage.jsx]"]
  node_sidebar["Agent status<br/>[AgentSidebar.jsx]"]
  node_responses["Agent responses<br/>[AgentResponse.jsx]"]
  node_api_client["SSE client<br/>[supportApi.js]"]
  node_streamlit["Streamlit interface<br/>[app.py]"]
end

subgraph group_api["API and workflow"]
  node_fastapi["FastAPI endpoints<br/>[main.py]"]
  node_workflow["Support workflow<br/>[support_service.py]"]
end

subgraph group_safety["Safety checks"]
  node_input_guard["Input guardrail<br/>[input_guardrail.py]"]
  node_output_guard["Output guardrail"]
end

subgraph group_agents["Support agents"]
  node_direct["Direct support<br/>[support_agent.py]"]
  node_research["Web research<br/>[research_agent.py]"]
  node_finalizer["Finalizer and logger<br/>[logger_agent.py]"]
end

subgraph group_integrations["External services and logging"]
  node_search["Web search tool<br/>[web_search.py]"]
  node_writer["Log writer<br/>[file_writer.py]"]
  node_openai["OpenAI"]
  node_serper["Serper search"]
  node_duckduckgo["DuckDuckGo search"]
  node_logfile[("Conversation log")]
end

node_user(("Customer"))

node_user -->|"asks"| node_app
node_app -->|"streams query"| node_api_client
node_api_client -->|"POSTs SSE request"| node_fastapi
node_fastapi -->|"dispatches workflow"| node_workflow
node_workflow -->|"validates query"| node_input_guard
node_workflow -->|"runs agent"| node_direct
node_workflow -->|"runs agent"| node_research
node_workflow -->|"runs agent"| node_finalizer
node_workflow -->|"validates outputs"| node_output_guard
node_research -->|"uses tool"| node_search
node_search -->|"searches first"| node_serper
node_search -->|"falls back"| node_duckduckgo
node_finalizer -->|"saves conversation"| node_writer
node_writer -->|"appends log"| node_logfile
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_chat
node_app -->|"renders"| node_responses
node_workflow -->|"streams statuses and results"| node_app
node_direct -.->|"uses model"| node_openai
node_research -.->|"uses model"| node_openai
node_finalizer -.->|"uses model"| node_openai
node_input_guard -.->|"classifies query"| node_openai
node_output_guard -.->|"checks response"| node_openai

click node_app "https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/App.jsx"
click node_chat "https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/components/ChatMessage.jsx"
click node_sidebar "https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/components/AgentSidebar.jsx"
click node_responses "https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/components/AgentResponse.jsx"
click node_api_client "https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/services/supportApi.js"
click node_streamlit "https://github.com/giripsr769/autogen_customer_support/blob/main/frontend_streamlit/app.py"
click node_fastapi "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/main.py"
click node_workflow "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/services/support_service.py"
click node_input_guard "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/guardrails/input_guardrail.py"
click node_output_guard "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/guardrails/output_guardrail.py"
click node_direct "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/agents/support_agent.py"
click node_research "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/agents/research_agent.py"
click node_finalizer "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/agents/logger_agent.py"
click node_search "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/tools/web_search.py"
click node_writer "https://github.com/giripsr769/autogen_customer_support/blob/main/backend/tools/file_writer.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_app,node_chat,node_sidebar,node_responses,node_api_client,node_streamlit toneBlue
class node_fastapi,node_workflow toneAmber
class node_input_guard,node_output_guard toneMint
class node_direct,node_research,node_finalizer toneRose
class node_search,node_writer,node_openai,node_serper,node_duckduckgo,node_logfile,node_user toneIndigo
```

## Components

### User interfaces

- [React app](https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Chat message](https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/components/ChatMessage.jsx): `frontend/src/components/ChatMessage.jsx`
- [Agent status](https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/components/AgentSidebar.jsx): `frontend/src/components/AgentSidebar.jsx`
- [Agent responses](https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/components/AgentResponse.jsx): `frontend/src/components/AgentResponse.jsx`
- [SSE client](https://github.com/giripsr769/autogen_customer_support/blob/main/frontend/src/services/supportApi.js): `frontend/src/services/supportApi.js`
- [Streamlit interface](https://github.com/giripsr769/autogen_customer_support/blob/main/frontend_streamlit/app.py): `frontend_streamlit/app.py`

### API and workflow

- [FastAPI endpoints](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/main.py): `backend/main.py`
- [Support workflow](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/services/support_service.py): `backend/services/support_service.py`

### Safety checks

- [Input guardrail](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/guardrails/input_guardrail.py): `backend/guardrails/input_guardrail.py`
- [Output guardrail](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/guardrails/output_guardrail.py): `backend/guardrails/output_guardrail.py`

### Support agents

- [Direct support](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/agents/support_agent.py): `backend/agents/support_agent.py`
- [Web research](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/agents/research_agent.py): `backend/agents/research_agent.py`
- [Finalizer and logger](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/agents/logger_agent.py): `backend/agents/logger_agent.py`

### External services and logging

- [Web search tool](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/tools/web_search.py): `backend/tools/web_search.py`
- [Log writer](https://github.com/giripsr769/autogen_customer_support/blob/main/backend/tools/file_writer.py): `backend/tools/file_writer.py`
- **OpenAI**
- **Serper search**
- **DuckDuckGo search**
- **Conversation log**

### Other components

- **Customer**

## Connections

- Customer → React app: asks (evidence: `README.md`)
- React app → SSE client: streams query (evidence: `frontend/src/App.jsx`)
- SSE client → FastAPI endpoints: POSTs SSE request (evidence: `frontend/src/services/supportApi.js`)
- FastAPI endpoints → Support workflow: dispatches workflow (evidence: `backend/main.py`)
- Support workflow → Input guardrail: validates query (evidence: `backend/services/support_service.py`)
- Support workflow → Direct support: runs agent (evidence: `backend/services/support_service.py`)
- Support workflow → Web research: runs agent (evidence: `backend/services/support_service.py`)
- Support workflow → Finalizer and logger: runs agent (evidence: `backend/services/support_service.py`)
- Support workflow → Output guardrail: validates outputs (evidence: `backend/services/support_service.py`)
- Web research → Web search tool: uses tool (evidence: `backend/agents/research_agent.py`)
- Web search tool → Serper search: searches first (evidence: `backend/tools/web_search.py`)
- Web search tool → DuckDuckGo search: falls back (evidence: `backend/tools/web_search.py`)
- Finalizer and logger → Log writer: saves conversation (evidence: `backend/agents/logger_agent.py`)
- Log writer → Conversation log: appends log (evidence: `backend/tools/file_writer.py`)
- React app → Agent status: renders (evidence: `frontend/src/App.jsx`)
- React app → Chat message: renders (evidence: `frontend/src/App.jsx`)
- React app → Agent responses: renders (evidence: `frontend/src/App.jsx`)
- Support workflow → React app: streams statuses and results (evidence: `README.md`)
- Direct support → OpenAI: uses model (evidence: `README.md`)
- Web research → OpenAI: uses model (evidence: `README.md`)
- Finalizer and logger → OpenAI: uses model (evidence: `README.md`)
- Input guardrail → OpenAI: classifies query (evidence: `README.md`)
- Output guardrail → OpenAI: checks response (evidence: `README.md`)
