Skip to content

ssabrut/zenith-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Zenith AI - Intelligent Front Desk Agent

An intelligent multi-agent system for healthcare front desk operations, powered by LangGraph, RAG, and advanced ML models.

Features β€’ Quick Start β€’ Architecture β€’ API Documentation β€’ Development


πŸ“‹ Table of Contents

🎯 Overview

Zenith AI is a production-ready intelligent agent system designed for healthcare front desk operations. It combines the power of Large Language Models (LLMs), Retrieval-Augmented Generation (RAG), and multi-agent orchestration to handle inquiries, bookings, and database queries with human-like understanding and efficiency.

Key Capabilities

  • πŸ€– Multi-Agent Orchestration: Intelligent routing and task delegation using LangGraph
  • πŸ” Semantic Search: Advanced RAG with vector embeddings and XGBoost reranking
  • πŸ’¬ Natural Conversations: Context-aware chat interface with streaming responses
  • πŸ“… Booking Management: Automated appointment scheduling and management
  • πŸ—„οΈ Database Integration: Direct SQL query execution for real-time data access
  • πŸ“Š ML Model Tracking: MLflow integration for model versioning and monitoring

✨ Features

Core Features

  • Intelligent Routing: Manager agent intelligently routes queries to specialized agents
  • RAG-Powered Knowledge Base: Semantic search over document collections with reranking
  • Streaming Responses: Real-time streaming for responsive user experience
  • Multi-Thread Conversations: Session management with thread-based context
  • Model Versioning: MLflow integration for tracking and deploying ML models
  • Dockerized Deployment: Complete containerization with Docker Compose

Agent Capabilities

  1. Manager Agent: Orchestrates workflow and routes to appropriate specialists
  2. Inquiry Agent: Handles information requests using RAG
  3. Booking Agent: Manages appointment scheduling and modifications
  4. General Agent: Handles general conversations and FAQs
  5. SQL Agent: Executes database queries for real-time data retrieval

πŸ› οΈ Tech Stack

Core Framework

  • FastAPI - Modern, fast web framework for building APIs
  • LangGraph - Multi-agent workflow orchestration
  • LangChain - LLM application framework
  • Pydantic - Data validation and settings management

AI/ML

  • DeepInfra - LLM and embedding model hosting
  • Qdrant - Vector database for semantic search
  • XGBoost - Reranking model for search optimization
  • MLflow - Model lifecycle management

Data & Storage

  • PostgreSQL - Primary relational database
  • MinIO - S3-compatible object storage for ML artifacts
  • Qdrant - Vector database for embeddings

Frontend

  • Gradio - Interactive web UI for chat interface

Infrastructure

  • Docker & Docker Compose - Containerization and orchestration
  • uv - Fast Python package manager

πŸ—οΈ Architecture

Zenith AI follows a microservices architecture with clear separation of concerns:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Gradio    β”‚  Frontend UI (Port 7860)
β”‚   Frontend  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚ HTTP
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”‚   FastAPI   β”‚  REST API (Port 8000)
β”‚   Backend   β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         LangGraph Workflow              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚ Manager  β”‚β†’ β”‚ Inquiry  β”‚  β”‚Booking β”‚β”‚
β”‚  β”‚  Agent   β”‚  β”‚  Agent   β”‚  β”‚ Agent  β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚   Qdrant   β”‚PostgreSQLβ”‚  MLflow  β”‚DeepInfra
β”‚  (Vector)  β”‚   (SQL)  β”‚ (Models) β”‚  (LLM)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

For detailed architecture documentation, see ARCHITECTURE.md.

πŸš€ Quick Start

Prerequisites

  • Python 3.10, 3.11, or 3.12
  • Docker and Docker Compose
  • uv package manager (recommended) or pip
  • DeepInfra API Token (Get one here)

Installation

  1. Clone the repository

    git clone https://github.com/ssabrut/zenith-ai.git
    cd zenith-ai
  2. Install dependencies

    # Using uv (recommended)
    uv pip install -r requirements.txt
    
    # Or using pip
    pip install -r requirements.txt
  3. Configure environment variables

    cp .env.example .env
    # Edit .env with your configuration
  4. Start services with Docker Compose

    make deploy
    # Or manually:
    docker compose up -d
  5. Access the application

Local Development Setup

For local development without Docker:

  1. Set environment variables

    export IS_DOCKER=false
    # ... other environment variables
  2. Start infrastructure services

    docker compose up -d qdrant db mlflow_db s3
  3. Run the FastAPI server

    uvicorn core.main:app --reload --port 8000
  4. Run the Gradio frontend (in another terminal)

    python frontend/main.py

βš™οΈ Configuration

Environment Variables

Create a .env file in the root directory with the following variables:

# Application
IS_DOCKER=false
SERVICE_NAME=front-desk-agent
APP_VERSION=0.1.0

# DeepInfra (LLM & Embeddings)
DEEPINFRA_API_TOKEN=your_token_here
DEEPINFRA_EMBEDDING_MODEL=Qwen/Qwen3-Embedding-8B
DEEPINFRA_CHAT_MODEL=your_chat_model

# Qdrant (Vector Database)
QDRANT_HOST=localhost
QDRANT_PORT=6333
QDRANT_COLLECTION=zenith_collection

# PostgreSQL
POSTGRES_USER=zenith_user
POSTGRES_PASSWORD=zenith_password
POSTGRES_DB=zenith_db

# MLflow
MLFLOW_TRACKING_URI=http://localhost:5050
MLFLOW_DB_USER=mlflow_user
MLFLOW_DB_PASSWORD=mlflow_password
MLFLOW_DB_NAME=mlflow_db

# MinIO (S3-compatible)
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
MLFLOW_S3_ENDPOINT_URL=http://localhost:9002
MLFLOW_S3_IGNORE_TLS=true

# MCP Server (Optional)
MCP_SERVER_URL=http://localhost:8001/sse

πŸ“š API Documentation

Endpoints

Health Check

GET /api/v1/health

Chat Endpoint

POST /api/v1/chat
Content-Type: application/json

{
  "query": "What is the price of facial treatment?",
  "thread_id": "unique-thread-id"
}

Response: Streaming text/plain

Interactive API Documentation

Once the server is running, visit:

πŸ’» Development

Project Structure

zenith-ai/
β”œβ”€β”€ core/                    # Core application logic
β”‚   β”œβ”€β”€ main.py             # FastAPI application entry point
β”‚   β”œβ”€β”€ config.py           # Configuration management
β”‚   β”œβ”€β”€ routers/            # API route handlers
β”‚   β”‚   β”œβ”€β”€ chat.py        # Chat endpoint
β”‚   β”‚   └── health.py      # Health check endpoint
β”‚   β”œβ”€β”€ schemas/            # Pydantic models
β”‚   └── services/           # External service clients
β”‚       β”œβ”€β”€ deepinfra/      # LLM service integration
β”‚       β”œβ”€β”€ qdrant/         # Vector database client
β”‚       └── mlflow/         # MLflow client
β”œβ”€β”€ graph/                   # LangGraph workflow
β”‚   β”œβ”€β”€ workflow.py         # Graph definition
β”‚   β”œβ”€β”€ state.py            # State management
β”‚   β”œβ”€β”€ agent/              # Agent implementations
β”‚   β”œβ”€β”€ node/               # Graph nodes
β”‚   └── tools/               # Agent tools
β”œβ”€β”€ frontend/                # Gradio UI
β”‚   └── main.py             # Gradio application
β”œβ”€β”€ notebooks/               # Jupyter notebooks for development
β”œβ”€β”€ data/                    # Data storage (gitignored)
β”œβ”€β”€ docker/                  # Dockerfiles
β”œβ”€β”€ scripts/                 # Utility scripts
β”œβ”€β”€ docker-compose.yml       # Service orchestration
β”œβ”€β”€ pyproject.toml          # Project dependencies
└── requirements.txt        # Compiled dependencies

Code Quality

The project uses:

  • Black for code formatting
  • isort for import sorting
  • Pydantic for type validation

Format code:

black .
isort .

Running Tests

# Add your test commands here
pytest tests/

Adding New Agents

  1. Create agent class in graph/agent/
  2. Create node class in graph/node/
  3. Add node to workflow in graph/workflow.py
  4. Update routing logic in manager agent

Database Migrations

# Using Alembic (if configured)
alembic upgrade head

πŸ“Š Monitoring & Observability

  • MLflow: Track model versions, metrics, and artifacts
  • Health Checks: Built-in health endpoints for monitoring
  • Logging: Structured logging with Loguru

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow PEP 8 style guidelines
  • Write docstrings for all public functions
  • Add type hints to function signatures
  • Update documentation for new features
  • Write tests for new functionality

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“§ Contact

For questions, issues, or contributions, please open an issue on GitHub.


Built with ❀️ using LangGraph, FastAPI, and modern AI technologies

⭐ Star this repo if you find it helpful!

About

An intelligent multi-agent system designed to automate healthcare front desk operations, capable of handling real-time patient inquiries and managing appointment bookings through a graph-based workflow

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors