shivagoelISB/Enterprise_AI

E Library, AI Search and Meeting Intelligence

Python

0

1 commits

updated Jun 14, 2026

See the code

README

Enterprise AI Platform

An on-premise, containerized Enterprise AI Platform with multimodal input processing, a Meeting Intelligence module, agentic orchestration, RAG pipelines, and enterprise-grade observability. No external API calls at runtime — all models and services run inside an isolated Docker network.

Architecture reference: Project_Files/High Level design Diagram.png


Capabilities

ModuleDescription
RAG (Document Q&A)Hybrid semantic + keyword search over enterprise documents (PDF, DOCX, XLSX). Arabic + English OCR.
Meeting IntelligenceUpload recordings → auto-transcription (Whisper) → speaker diarization (pyannote) → AI summary + action items
RBACRole-based document access control enforced at query time
ObservabilityStructured JSON logs → Elasticsearch, distributed traces → Grafana Tempo, Prometheus metrics
Living DocsAuto-generated platform documentation (Markdown, PPTX, DOCX) from live system introspection

Data Export Utility

This repo includes a migration/export CLI in export_tool/ for exporting PostgreSQL, Neo4j, Milvus, and Elasticsearch data into portable filesystem artifacts with manifests and SHA256 checksums.

cd export_tool
python main.py --output-dir ./exports

See export_tool/README.md for setup, filtering, compression, incremental export, and restore notes.

The matching import CLI lives in import_tool/ and restores those artifacts into target PostgreSQL, Neo4j, Milvus, and Elasticsearch environments:

cd import_tool
python main.py --input-dir ./exports --dry-run

Setup Paths

Developer LaptopFull Stack (VM / Workstation)
RAM4 GB minimum16 GB recommended
Disk~8 GB~30 GB (includes ML models)
Ollama (LLM)opt-in (--profile llm) or nativealways on
Monitoring stackopt-in (--profile monitoring)opt-in (--profile monitoring)
Live reloadyes (src/ mounted read-write)no (read-only mount)
Image size~1 GB (slim, no PyTorch)~11 GB (full ML stack)
Commandmake dev-updocker compose up -d

Jump to: Developer Laptop Setup · Full Stack Setup


Prerequisites

RequirementMinimum VersionNotes
Docker Engine24.xInstall guide
Docker Composev2.24Bundled with Docker Desktop
Python3.11For local dev / venv only
Free disk space~20 GBMore if downloading Whisper/pyannote models
Free RAM8 GB16 GB recommended for LLM + Meeting Intelligence
NVIDIA GPUoptionalRequired for WHISPER_DEVICE=cuda in Meeting Intelligence

Ports that must be free before starting:

PortService
8000API
9000, 9001MinIO
9090Prometheus
9091Milvus health
11434Ollama
19530Milvus gRPC
3000Grafana
3001Attu (Milvus UI)
4317, 4318OTel Collector
5432PostgreSQL
6379Redis
2379etcd

Quick Start

1. Prepare the environment file

cp .env.example .env

Open .env and replace every change_me_* placeholder with real values:

POSTGRES_PASSWORD=<strong-password>
REDIS_PASSWORD=<strong-password>
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=<strong-password>
GRAFANA_ADMIN_PASSWORD=<strong-password>
SECRET_KEY=<random-32-char-string>

Generate a strong SECRET_KEY:

python3 -c "import secrets; print(secrets.token_hex(32))"

2. Build and start the stack

docker compose up --build -d

First run pulls all images and builds the application image — allow several minutes. Subsequent starts are fast.

docker compose logs -f api   # watch startup

3. Pull LLM models into Ollama

# Document RAG (light model)
docker exec enterprise_ai_ollama ollama pull qwen2.5:3b

# Meeting Intelligence (better quality, more RAM)
docker exec enterprise_ai_ollama ollama pull llama3.1:8b

4. Apply the database schema

The PostgreSQL init scripts in infra/docker/postgres/ run automatically on first container start. For an existing database, apply any new DDL files manually:

docker exec -i enterprise_ai_postgres psql -U aiuser -d enterprise_ai \
  < infra/docker/postgres/05_meeting_intelligence_ddl.sql

5. Upload documents and run the pipeline

# Upload PDFs from data/ to MinIO
make upload-data

# Extract → embed → index documents
make run-pipeline

Verifying the Stack

# API health
curl http://localhost:8000/health
# Expected: {"status":"ok"}

# Interactive API docs
open http://localhost:8000/docs

# Milvus health
curl http://localhost:9091/healthz

# PostgreSQL
docker exec enterprise_ai_postgres pg_isready -U aiuser -d enterprise_ai

# Redis
docker exec enterprise_ai_redis redis-cli -a <REDIS_PASSWORD> ping

# Ollama — list available models
curl http://localhost:11434/api/tags

# All containers at once
docker compose ps

Service Reference

ServiceURL / PortCredentials
APIhttp://localhost:8000—
API Docshttp://localhost:8000/docs—
Grafanahttp://localhost:3000admin / GRAFANA_ADMIN_PASSWORD
Prometheushttp://localhost:9090—
Attu (Milvus UI)http://localhost:3001—
MinIO Consolehttp://localhost:9001MINIO_ROOT_USER / MINIO_ROOT_PASSWORD
Milvus gRPClocalhost:19530—
PostgreSQLlocalhost:5432aiuser / POSTGRES_PASSWORD
Redislocalhost:6379REDIS_PASSWORD
Ollamahttp://localhost:11434—
pgAdmin (monitoring profile)http://localhost:5050[email protected] / admin
Kibana (monitoring profile)http://localhost:5601—
Tempo (monitoring profile)http://localhost:3200—

Environment Variables

All variables are set in .env (copied from .env.example). Key variables:

VariableDescription
POSTGRES_PASSWORDPostgreSQL password for the aiuser account
REDIS_PASSWORDRedis auth password
MINIO_ROOT_USERMinIO admin username
MINIO_ROOT_PASSWORDMinIO admin password
GRAFANA_ADMIN_PASSWORDGrafana admin user password
SECRET_KEY32-char secret for JWT signing
LLM_MODELOllama model for document RAG (default: qwen2.5:3b)
MEETING_LLM_MODELOllama model for meeting analysis (default: qwen2.5:3b)
EMBEDDING_MODELDocument embedding model (default: paraphrase-multilingual-MiniLM-L12-v2)
MEETING_EMBEDDING_MODELMeeting embedding model (default: BAAI/bge-large-en-v1.5)
WHISPER_MODELWhisper model for transcription (default: whisper-large-v3)
WHISPER_DEVICEcuda or cpu
PYANNOTE_MODELpyannote model path or HF ID
PYANNOTE_HF_TOKENHuggingFace token (needed for initial model download only)

See .env.example for the full list including development overrides.


Developer Laptop Setup

A slim Docker Compose override (docker-compose.dev.yaml) is provided for laptops. It:

  • Uses a lighter image (~1 GB) — PyTorch, speechbrain, and heavy ML libs excluded
  • Caps memory per service so the full stack fits in ~3–4 GB RAM
  • Mounts src/ read-write for live reload (no rebuild on code changes)
  • Makes Ollama and the monitoring stack opt-in via Docker Compose profiles

Prerequisites (laptop)

RequirementNotes
Docker Engine 24.xDocker Desktop is fine
4 GB free RAM8 GB recommended
8 GB free diskNo Ollama models or ML models by default
make (optional)winget install GnuWin32.Make on Windows

1. Environment file

cp .env.example .env

The example file includes inline dev/prod guidance. For a developer laptop, use the "Dev:" values noted in the comments (weak passwords, CPU models, lighter LLM).

2. Start the dev stack

make dev-up

First build takes a few minutes. Subsequent starts are fast.

3. Default services (dev)

ServicePortmem_limit
api (uvicorn --reload)8000512 MB
worker (concurrency 1)—256 MB
postgres5432256 MB
redis6379128 MB
etcd2379128 MB
milvus19530512 MB
minio9000, 9001128 MB
elasticsearch9200512 MB

Total: ~2.4 GB RAM cap across all containers.

4. Opt-in profiles

ProfileWhat it addsCommand
llmOllama (local LLM inference)make dev-up PROFILES=llm
monitoringOTel Collector, Prometheus, Grafana, Attu, Kibana, Filebeat, Tempomake dev-up PROFILES=monitoring
frontendReact app (nginx, port 3010)make dev-up PROFILES=frontend
allEverythingmake dev-up PROFILES=llm,monitoring,frontend

Tip: For Meeting Intelligence on a laptop, set dev-friendly model overrides in .env:

WHISPER_MODEL=whisper-base
WHISPER_DEVICE=cpu
WHISPER_COMPUTE=int8
MEETING_LLM_MODEL=qwen2.5:3b
MEETING_EMBEDDING_MODEL=all-MiniLM-L6-v2

5. Live reload

Edit any Python file under src/ — the API reloads automatically within 1–2 seconds.

make dev-logs   # watch reloads

Stopping

make dev-down   # stops everything including monitoring-profile containers

Meeting Intelligence

Upload any meeting recording and the platform processes it end-to-end in the background.

Supported formats

MP4, MKV, MOV, MP3, WAV, M4A, WEBM

Pipeline (8 stages)

  1. Audio extraction — FFmpeg extracts 16kHz mono WAV from recording
  2. Transcription — faster-whisper with VAD and hallucination filtering
  3. Speaker diarization — pyannote assigns speaker labels per time segment
  4. Merge — Whisper transcript segments are assigned speaker labels
  5. Chunking — Sliding-window chunking with speaker-prefixed text
  6. Vector indexing — BAAI/bge-large-en-v1.5 embeddings → Milvus (meeting_transcript_chunks, 1024-dim)
  7. Text indexing — Chunks indexed in Elasticsearch (meeting_chunks)
  8. LLM analysis — Summary (brief + key topics + decisions + open questions) and action items extracted

API endpoints

MethodPathDescription
POST/api/meetings/uploadUpload recording (returns immediately, processing is async)
GET/api/meetings/List all meetings with status
GET/api/meetings/{id}Meeting detail
GET/api/meetings/{id}/transcriptFull transcript + per-segment speaker/timing data
GET/api/meetings/{id}/summaryAI-generated summary
GET/api/meetings/{id}/action-itemsExtracted action items

Offline / air-gapped deployment

pyannote models can be pre-downloaded and served from a local directory:

# Download once on an internet-connected machine
huggingface-cli download pyannote/speaker-diarization-3.1 \
    --local-dir /models/speaker-diarization-3.1 --token hf_...
huggingface-cli download pyannote/segmentation-3.0 \
    --local-dir /models/segmentation-3.0 --token hf_...

Then update config.yaml inside the pipeline dir to reference local model paths, and set:

PYANNOTE_MODEL=/models/speaker-diarization-3.1

No HuggingFace token is needed at runtime.


Document Pipeline Flow

data/ (PDFs, DOCX, XLSX)
  → MinIO (enterprise-ai-docs bucket)
  → Text extraction (pypdf / python-docx / openpyxl)
  → OCR on embedded images (tesseract ara+eng)
  → Embeddings (paraphrase-multilingual-MiniLM-L12-v2, 384-dim)
  → Milvus  — vector embeddings for semantic search  (document_chunks)
  → Elasticsearch — keywords + BM25 full-text search (document_chunks)
  → Postgres — document registry, pipeline run status, audit events

Project Structure

Enterprise_AI/
├── CLAUDE.md                  # Architecture and developer guide
├── Dockerfile                 # Multi-stage Python 3.11 build (dev + prod paths)
├── docker-compose.yaml        # Full on-premise service stack
├── docker-compose.dev.yaml    # Developer laptop override (slim, memory-capped)
├── Makefile                   # Convenience targets
├── requirements.txt           # Full Python dependencies (includes PyTorch, ML libs)
├── requirements.dev.txt       # Slim dependencies for dev image (no PyTorch/CV)
├── .env.example               # Environment variable template (includes dev/prod guidance inline)
├── src/
│   ├── api/                   # FastAPI application (docs, meetings, query, pipeline routes)
│   ├── agents/                # Agent orchestration
│   ├── multimodal/            # Audio / video / document processing
│   ├── services/              # LLM, RAG, embeddings, Meeting Intelligence pipeline
│   ├── workers/               # Celery task workers (meeting_pipeline.py)
│   ├── data/                  # Milvus, Elasticsearch, PostgreSQL, Redis adapters
│   └── observability/         # Logging, tracing, metrics
├── infra/docker/              # Service config files (OTel, Prometheus, Grafana, Tempo)
├── scripts/                   # Data management + living documentation pipeline
├── templates/                 # Jinja2 templates for doc generation
└── tests/                     # Unit, integration, e2e

Frontend (React + Vite)

The frontend/ directory contains a React 18 + TypeScript + Tailwind UI.

Local development (recommended):

make frontend-install   # first time
make frontend           # http://localhost:3002

Production (Docker, port 3010):

docker compose --profile frontend up -d frontend

Features

  • Streaming responses via SSE
  • Arabic RTL auto-detection
  • Source citation cards with document name, page, relevance score
  • Document browser sidebar
  • Top-K slider for retrieved context chunks

Stopping and Resetting

# Stop all services (preserves data volumes)
make full-down

# Stop and wipe all data volumes (full reset)
docker compose down -v

Warning: -v permanently deletes all stored data including the vector store, database, and uploaded files.


Troubleshooting

Milvus takes a long time to become healthy Allow up to 60 seconds on first start. If it never becomes healthy:

docker compose logs milvus
docker compose logs etcd

Port already in use

# Linux/macOS
lsof -i :<PORT>
# Windows
netstat -ano | findstr :<PORT>

Meeting processing stuck at "processing"

make dev-logs   # check worker output
docker logs enterprise_ai_worker

api container exits immediately The API depends on PostgreSQL, Redis, Milvus, and Elasticsearch being healthy:

docker compose ps
docker compose logs postgres redis milvus elasticsearch

MinIO bucket not found

docker exec enterprise_ai_minio mc alias set local http://localhost:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD
docker exec enterprise_ai_minio mc mb local/enterprise-ai-docs
docker exec enterprise_ai_minio mc mb local/enterprise-ai-meetings

Ollama model not found

docker exec enterprise_ai_ollama ollama pull qwen2.5:3b
docker exec enterprise_ai_ollama ollama pull llama3.1:8b

shivagoelISB/Enterprise_AI

E Library, AI Search and Meeting Intelligence

Python

0

1 commits

updated Jun 14, 2026

See the code

README

Enterprise AI Platform

An on-premise, containerized Enterprise AI Platform with multimodal input processing, a Meeting Intelligence module, agentic orchestration, RAG pipelines, and enterprise-grade observability. No external API calls at runtime — all models and services run inside an isolated Docker network.

Architecture reference: Project_Files/High Level design Diagram.png


Capabilities

ModuleDescription
RAG (Document Q&A)Hybrid semantic + keyword search over enterprise documents (PDF, DOCX, XLSX). Arabic + English OCR.
Meeting IntelligenceUpload recordings → auto-transcription (Whisper) → speaker diarization (pyannote) → AI summary + action items
RBACRole-based document access control enforced at query time
ObservabilityStructured JSON logs → Elasticsearch, distributed traces → Grafana Tempo, Prometheus metrics
Living DocsAuto-generated platform documentation (Markdown, PPTX, DOCX) from live system introspection

Data Export Utility

This repo includes a migration/export CLI in export_tool/ for exporting PostgreSQL, Neo4j, Milvus, and Elasticsearch data into portable filesystem artifacts with manifests and SHA256 checksums.

cd export_tool
python main.py --output-dir ./exports

See export_tool/README.md for setup, filtering, compression, incremental export, and restore notes.

The matching import CLI lives in import_tool/ and restores those artifacts into target PostgreSQL, Neo4j, Milvus, and Elasticsearch environments:

cd import_tool
python main.py --input-dir ./exports --dry-run

Setup Paths

Developer LaptopFull Stack (VM / Workstation)
RAM4 GB minimum16 GB recommended
Disk~8 GB~30 GB (includes ML models)
Ollama (LLM)opt-in (--profile llm) or nativealways on
Monitoring stackopt-in (--profile monitoring)opt-in (--profile monitoring)
Live reloadyes (src/ mounted read-write)no (read-only mount)
Image size~1 GB (slim, no PyTorch)~11 GB (full ML stack)
Commandmake dev-updocker compose up -d

Jump to: Developer Laptop Setup · Full Stack Setup


Prerequisites

RequirementMinimum VersionNotes
Docker Engine24.xInstall guide
Docker Composev2.24Bundled with Docker Desktop
Python3.11For local dev / venv only
Free disk space~20 GBMore if downloading Whisper/pyannote models
Free RAM8 GB16 GB recommended for LLM + Meeting Intelligence
NVIDIA GPUoptionalRequired for WHISPER_DEVICE=cuda in Meeting Intelligence

Ports that must be free before starting:

PortService
8000API
9000, 9001MinIO
9090Prometheus
9091Milvus health
11434Ollama
19530Milvus gRPC
3000Grafana
3001Attu (Milvus UI)
4317, 4318OTel Collector
5432PostgreSQL
6379Redis
2379etcd

Quick Start

1. Prepare the environment file

cp .env.example .env

Open .env and replace every change_me_* placeholder with real values:

POSTGRES_PASSWORD=<strong-password>
REDIS_PASSWORD=<strong-password>
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=<strong-password>
GRAFANA_ADMIN_PASSWORD=<strong-password>
SECRET_KEY=<random-32-char-string>

Generate a strong SECRET_KEY:

python3 -c "import secrets; print(secrets.token_hex(32))"

2. Build and start the stack

docker compose up --build -d

First run pulls all images and builds the application image — allow several minutes. Subsequent starts are fast.

docker compose logs -f api   # watch startup

3. Pull LLM models into Ollama

# Document RAG (light model)
docker exec enterprise_ai_ollama ollama pull qwen2.5:3b

# Meeting Intelligence (better quality, more RAM)
docker exec enterprise_ai_ollama ollama pull llama3.1:8b

4. Apply the database schema

The PostgreSQL init scripts in infra/docker/postgres/ run automatically on first container start. For an existing database, apply any new DDL files manually:

docker exec -i enterprise_ai_postgres psql -U aiuser -d enterprise_ai \
  < infra/docker/postgres/05_meeting_intelligence_ddl.sql

5. Upload documents and run the pipeline

# Upload PDFs from data/ to MinIO
make upload-data

# Extract → embed → index documents
make run-pipeline

Verifying the Stack

# API health
curl http://localhost:8000/health
# Expected: {"status":"ok"}

# Interactive API docs
open http://localhost:8000/docs

# Milvus health
curl http://localhost:9091/healthz

# PostgreSQL
docker exec enterprise_ai_postgres pg_isready -U aiuser -d enterprise_ai

# Redis
docker exec enterprise_ai_redis redis-cli -a <REDIS_PASSWORD> ping

# Ollama — list available models
curl http://localhost:11434/api/tags

# All containers at once
docker compose ps

Service Reference

ServiceURL / PortCredentials
APIhttp://localhost:8000—
API Docshttp://localhost:8000/docs—
Grafanahttp://localhost:3000admin / GRAFANA_ADMIN_PASSWORD
Prometheushttp://localhost:9090—
Attu (Milvus UI)http://localhost:3001—
MinIO Consolehttp://localhost:9001MINIO_ROOT_USER / MINIO_ROOT_PASSWORD
Milvus gRPClocalhost:19530—
PostgreSQLlocalhost:5432aiuser / POSTGRES_PASSWORD
Redislocalhost:6379REDIS_PASSWORD
Ollamahttp://localhost:11434—
pgAdmin (monitoring profile)http://localhost:5050[email protected] / admin
Kibana (monitoring profile)http://localhost:5601—
Tempo (monitoring profile)http://localhost:3200—

Environment Variables

All variables are set in .env (copied from .env.example). Key variables:

VariableDescription
POSTGRES_PASSWORDPostgreSQL password for the aiuser account
REDIS_PASSWORDRedis auth password
MINIO_ROOT_USERMinIO admin username
MINIO_ROOT_PASSWORDMinIO admin password
GRAFANA_ADMIN_PASSWORDGrafana admin user password
SECRET_KEY32-char secret for JWT signing
LLM_MODELOllama model for document RAG (default: qwen2.5:3b)
MEETING_LLM_MODELOllama model for meeting analysis (default: qwen2.5:3b)
EMBEDDING_MODELDocument embedding model (default: paraphrase-multilingual-MiniLM-L12-v2)
MEETING_EMBEDDING_MODELMeeting embedding model (default: BAAI/bge-large-en-v1.5)
WHISPER_MODELWhisper model for transcription (default: whisper-large-v3)
WHISPER_DEVICEcuda or cpu
PYANNOTE_MODELpyannote model path or HF ID
PYANNOTE_HF_TOKENHuggingFace token (needed for initial model download only)

See .env.example for the full list including development overrides.


Developer Laptop Setup

A slim Docker Compose override (docker-compose.dev.yaml) is provided for laptops. It:

  • Uses a lighter image (~1 GB) — PyTorch, speechbrain, and heavy ML libs excluded
  • Caps memory per service so the full stack fits in ~3–4 GB RAM
  • Mounts src/ read-write for live reload (no rebuild on code changes)
  • Makes Ollama and the monitoring stack opt-in via Docker Compose profiles

Prerequisites (laptop)

RequirementNotes
Docker Engine 24.xDocker Desktop is fine
4 GB free RAM8 GB recommended
8 GB free diskNo Ollama models or ML models by default
make (optional)winget install GnuWin32.Make on Windows

1. Environment file

cp .env.example .env

The example file includes inline dev/prod guidance. For a developer laptop, use the "Dev:" values noted in the comments (weak passwords, CPU models, lighter LLM).

2. Start the dev stack

make dev-up

First build takes a few minutes. Subsequent starts are fast.

3. Default services (dev)

ServicePortmem_limit
api (uvicorn --reload)8000512 MB
worker (concurrency 1)—256 MB
postgres5432256 MB
redis6379128 MB
etcd2379128 MB
milvus19530512 MB
minio9000, 9001128 MB
elasticsearch9200512 MB

Total: ~2.4 GB RAM cap across all containers.

4. Opt-in profiles

ProfileWhat it addsCommand
llmOllama (local LLM inference)make dev-up PROFILES=llm
monitoringOTel Collector, Prometheus, Grafana, Attu, Kibana, Filebeat, Tempomake dev-up PROFILES=monitoring
frontendReact app (nginx, port 3010)make dev-up PROFILES=frontend
allEverythingmake dev-up PROFILES=llm,monitoring,frontend

Tip: For Meeting Intelligence on a laptop, set dev-friendly model overrides in .env:

WHISPER_MODEL=whisper-base
WHISPER_DEVICE=cpu
WHISPER_COMPUTE=int8
MEETING_LLM_MODEL=qwen2.5:3b
MEETING_EMBEDDING_MODEL=all-MiniLM-L6-v2

5. Live reload

Edit any Python file under src/ — the API reloads automatically within 1–2 seconds.

make dev-logs   # watch reloads

Stopping

make dev-down   # stops everything including monitoring-profile containers

Meeting Intelligence

Upload any meeting recording and the platform processes it end-to-end in the background.

Supported formats

MP4, MKV, MOV, MP3, WAV, M4A, WEBM

Pipeline (8 stages)

  1. Audio extraction — FFmpeg extracts 16kHz mono WAV from recording
  2. Transcription — faster-whisper with VAD and hallucination filtering
  3. Speaker diarization — pyannote assigns speaker labels per time segment
  4. Merge — Whisper transcript segments are assigned speaker labels
  5. Chunking — Sliding-window chunking with speaker-prefixed text
  6. Vector indexing — BAAI/bge-large-en-v1.5 embeddings → Milvus (meeting_transcript_chunks, 1024-dim)
  7. Text indexing — Chunks indexed in Elasticsearch (meeting_chunks)
  8. LLM analysis — Summary (brief + key topics + decisions + open questions) and action items extracted

API endpoints

MethodPathDescription
POST/api/meetings/uploadUpload recording (returns immediately, processing is async)
GET/api/meetings/List all meetings with status
GET/api/meetings/{id}Meeting detail
GET/api/meetings/{id}/transcriptFull transcript + per-segment speaker/timing data
GET/api/meetings/{id}/summaryAI-generated summary
GET/api/meetings/{id}/action-itemsExtracted action items

Offline / air-gapped deployment

pyannote models can be pre-downloaded and served from a local directory:

# Download once on an internet-connected machine
huggingface-cli download pyannote/speaker-diarization-3.1 \
    --local-dir /models/speaker-diarization-3.1 --token hf_...
huggingface-cli download pyannote/segmentation-3.0 \
    --local-dir /models/segmentation-3.0 --token hf_...

Then update config.yaml inside the pipeline dir to reference local model paths, and set:

PYANNOTE_MODEL=/models/speaker-diarization-3.1

No HuggingFace token is needed at runtime.


Document Pipeline Flow

data/ (PDFs, DOCX, XLSX)
  → MinIO (enterprise-ai-docs bucket)
  → Text extraction (pypdf / python-docx / openpyxl)
  → OCR on embedded images (tesseract ara+eng)
  → Embeddings (paraphrase-multilingual-MiniLM-L12-v2, 384-dim)
  → Milvus  — vector embeddings for semantic search  (document_chunks)
  → Elasticsearch — keywords + BM25 full-text search (document_chunks)
  → Postgres — document registry, pipeline run status, audit events

Project Structure

Enterprise_AI/
├── CLAUDE.md                  # Architecture and developer guide
├── Dockerfile                 # Multi-stage Python 3.11 build (dev + prod paths)
├── docker-compose.yaml        # Full on-premise service stack
├── docker-compose.dev.yaml    # Developer laptop override (slim, memory-capped)
├── Makefile                   # Convenience targets
├── requirements.txt           # Full Python dependencies (includes PyTorch, ML libs)
├── requirements.dev.txt       # Slim dependencies for dev image (no PyTorch/CV)
├── .env.example               # Environment variable template (includes dev/prod guidance inline)
├── src/
│   ├── api/                   # FastAPI application (docs, meetings, query, pipeline routes)
│   ├── agents/                # Agent orchestration
│   ├── multimodal/            # Audio / video / document processing
│   ├── services/              # LLM, RAG, embeddings, Meeting Intelligence pipeline
│   ├── workers/               # Celery task workers (meeting_pipeline.py)
│   ├── data/                  # Milvus, Elasticsearch, PostgreSQL, Redis adapters
│   └── observability/         # Logging, tracing, metrics
├── infra/docker/              # Service config files (OTel, Prometheus, Grafana, Tempo)
├── scripts/                   # Data management + living documentation pipeline
├── templates/                 # Jinja2 templates for doc generation
└── tests/                     # Unit, integration, e2e

Frontend (React + Vite)

The frontend/ directory contains a React 18 + TypeScript + Tailwind UI.

Local development (recommended):

make frontend-install   # first time
make frontend           # http://localhost:3002

Production (Docker, port 3010):

docker compose --profile frontend up -d frontend

Features

  • Streaming responses via SSE
  • Arabic RTL auto-detection
  • Source citation cards with document name, page, relevance score
  • Document browser sidebar
  • Top-K slider for retrieved context chunks

Stopping and Resetting

# Stop all services (preserves data volumes)
make full-down

# Stop and wipe all data volumes (full reset)
docker compose down -v

Warning: -v permanently deletes all stored data including the vector store, database, and uploaded files.


Troubleshooting

Milvus takes a long time to become healthy Allow up to 60 seconds on first start. If it never becomes healthy:

docker compose logs milvus
docker compose logs etcd

Port already in use

# Linux/macOS
lsof -i :<PORT>
# Windows
netstat -ano | findstr :<PORT>

Meeting processing stuck at "processing"

make dev-logs   # check worker output
docker logs enterprise_ai_worker

api container exits immediately The API depends on PostgreSQL, Redis, Milvus, and Elasticsearch being healthy:

docker compose ps
docker compose logs postgres redis milvus elasticsearch

MinIO bucket not found

docker exec enterprise_ai_minio mc alias set local http://localhost:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD
docker exec enterprise_ai_minio mc mb local/enterprise-ai-docs
docker exec enterprise_ai_minio mc mb local/enterprise-ai-meetings

Ollama model not found

docker exec enterprise_ai_ollama ollama pull qwen2.5:3b
docker exec enterprise_ai_ollama ollama pull llama3.1:8b