Production-grade multi-agent AI veterinary platform for Egypt. Bilingual chatbot for animal owners + clinical AI copilot for veterinary doctors — built with FastAPI, LangGraph, Advanced RAG (Qdrant + Jina + Cohere), and Playwright PDF reports.
# VetVision AI Agnets
**Production-grade, multi-agent AI platform for veterinary care in Egypt.**
*Two AI agents. One backend. Built for Egyptian veterinary care.*
---
## Table of Contents
- Overview
- System Architecture
- Agents
- VITO — User Agent
- Vet Copilot — Doctor Agent
- Advanced RAG Pipeline
- PDF Report Generation
- Data Model
- API Reference
- Project Structure
- Setup & Local Development
- Deployment
- Environment Variables
- Indexing the Knowledge Base
- Author
---
## Overview
VetVision is a bilingual (Arabic/English) AI veterinary platform built for the Egyptian market. It unifies two previously separate projects into a single, modular FastAPI service (`v2.0.0`).
**Two users. Two agents. One backend.**
| Audience | Agent | Endpoint |
|---|---|---|
| Pet owners | **VITO** — warm, bilingual conversational assistant | `POST /chat` |
| Veterinary doctors | **Vet Copilot** — clinical decision support + EHR management | `POST /copilot/chat` |
**Core capabilities:**
| Feature | Details |
|---|---|
| 🔍 Advanced RAG | 6-step retrieval over 4 veterinary knowledge bases — Qdrant + Jina + Cohere |
| 🤖 LangGraph Agents | ReAct loop (VITO) · Router→Tools loop (Vet Copilot) · Sliding-window memory |
| 🗃️ Electronic Health Records | SQLite patient registry · 6-char Animal IDs · per-visit weight tracking · audit-safe writes |
| 📄 Bilingual PDF Reports | Arabic-RTL + English via Jinja2 → Playwright/Chromium |
| 📡 SSE Streaming | Token-by-token response delivery for both agents |
| 🔁 LLM Fallback | VITO auto-switches OpenRouter → Gemini on failure |
---
## System Architecture
```
┌──────────────────────────────────────────────────────────────────────┐
│ FastAPI Application │
│ (main.py) │
│ │
│ ┌────────────────────────┐ ┌──────────────────────────────────┐ │
│ │ …