# dastakfatemeh/pet_vetclinic architecture

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

- Interactive diagram: https://gitdiagram.com/dastakfatemeh/pet_vetclinic
- Repository: https://github.com/dastakfatemeh/pet_vetclinic

## Overview

The product is a FastAPI pet-health assistant: an owner submits symptoms, the API classifies them, retrieves similar cases when confidence is sufficient, and generates plain-language findings. A separate response endpoint handles appointment intent and provides a scheduling link. The graph also shows Qdrant storage and the VetBERT embedding layer. Relationships reflect the excerpts and README; unsampled implementation details are omitted.

Main entry points: [`AI_Agents.py`](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/AI_Agents.py) (FastAPI application), [`Agents/RetrievalAgent.py`](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/RetrievalAgent.py) (Similar-case retrieval), [`Agents/ClassificationAgent.py`](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/ClassificationAgent.py) (Condition classification), [`Agents/VetBertMixin.py`](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/VetBertMixin.py) (VetBERT embeddings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and orchestration"]
  node_api["FastAPI application<br/>[AI_Agents.py]"]
  node_appointment["Appointment response<br/>[AI_Agents.py]"]
end

subgraph group_analysis["Clinical analysis"]
  node_classification["Condition classification"]
  node_retrieval["Similar-case retrieval<br/>[RetrievalAgent.py]"]
  node_embeddings["VetBERT embeddings<br/>[VetBertMixin.py]"]
end

subgraph group_language["Communication"]
  node_communication["Clinical explanations"]
end

subgraph group_integrations["External services"]
  node_qdrant[("Qdrant vector store")]
  node_modelhub["Hugging Face models"]
  node_calendar["Scheduling service"]
end

node_owner(("Pet owner"))

node_owner -->|"submits symptoms"| node_api
node_api -->|"classifies symptoms"| node_classification
node_api -->|"requests cases"| node_retrieval
node_retrieval -->|"generates vectors"| node_embeddings
node_retrieval -->|"searches cases"| node_qdrant
node_api -->|"explains findings"| node_communication
node_api -->|"loads models"| node_modelhub
node_owner -->|"answers prompt"| node_appointment
node_appointment -->|"provides booking link"| node_calendar

click node_api "https://github.com/dastakfatemeh/pet_vetclinic/blob/main/AI_Agents.py"
click node_classification "https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/ClassificationAgent.py"
click node_retrieval "https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/RetrievalAgent.py"
click node_embeddings "https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/VetBertMixin.py"
click node_communication "https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/CommunicationAgent.py"
click node_appointment "https://github.com/dastakfatemeh/pet_vetclinic/blob/main/AI_Agents.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_api,node_appointment toneBlue
class node_classification,node_retrieval,node_embeddings toneAmber
class node_communication toneMint
class node_qdrant,node_modelhub,node_calendar toneRose
class node_owner toneIndigo
```

## Components

### API and orchestration

- [FastAPI application](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/AI_Agents.py): `AI_Agents.py`
- [Appointment response](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/AI_Agents.py): `AI_Agents.py`

### Clinical analysis

- [Condition classification](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/ClassificationAgent.py): `Agents/ClassificationAgent.py`
- [Similar-case retrieval](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/RetrievalAgent.py): `Agents/RetrievalAgent.py`
- [VetBERT embeddings](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/VetBertMixin.py): `Agents/VetBertMixin.py`

### Communication

- [Clinical explanations](https://github.com/dastakfatemeh/pet_vetclinic/blob/main/Agents/CommunicationAgent.py): `Agents/CommunicationAgent.py`

### External services

- **Qdrant vector store**
- **Hugging Face models**
- **Scheduling service**

### Other components

- **Pet owner**

## Connections

- Pet owner → FastAPI application: submits symptoms (evidence: `README.md`)
- FastAPI application → Condition classification: classifies symptoms (evidence: `AI_Agents.py`)
- FastAPI application → Similar-case retrieval: requests cases (evidence: `AI_Agents.py`)
- Similar-case retrieval → VetBERT embeddings: generates vectors (evidence: `Agents/RetrievalAgent.py`)
- Similar-case retrieval → Qdrant vector store: searches cases (evidence: `Agents/RetrievalAgent.py`)
- FastAPI application → Clinical explanations: explains findings (evidence: `AI_Agents.py`)
- FastAPI application → Hugging Face models: loads models (evidence: `AI_Agents.py`)
- Pet owner → Appointment response: answers prompt (evidence: `README.md`)
- Appointment response → Scheduling service: provides booking link (evidence: `AI_Agents.py`)
