# callobuzz/cob-rag-engine architecture

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

- Interactive diagram: https://gitdiagram.com/callobuzz/cob-rag-engine
- Repository: https://github.com/callobuzz/cob-rag-engine

## Overview

cob-rag-engine is a self-hosted, multi-tenant platform for running branded, document-grounded AI assistants. A business configures an assistant and supplies documents or a website; content is ingested into tenant knowledge bases, then user questions are answered through retrieval and a language model, with cited evidence and validation. The platform also exposes a REST API and client libraries, a website widget, and WhatsApp support, alongside operator and business dashboards for setup, usage, and billing. Some domain links come from the README; unsampled implementation details are not asserted.

Main entry points: [`src/callobuzz_rag/api`](https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/api) (Engine API), [`src/callobuzz_rag/retrieval`](https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/retrieval) (Answer and retrieval), [`src/callobuzz_rag/website/ingest.py`](https://github.com/callobuzz/cob-rag-engine/blob/main/src/callobuzz_rag/website/ingest.py) (Website ingestion), [`services/dashboard/src/features/assistant-setup`](https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/src/features/assistant-setup) (Assistant setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_product["Assistant runtime"]
  node_api["Engine API"]
  node_answer["Answer and retrieval"]
  node_validation["Answer validation<br/>[pipeline.py]"]
  node_models["Language models"]
  node_vectordb[("Vector collections")]
end

subgraph group_content["Knowledge ingestion"]
  node_website_ingest["Website ingestion<br/>[ingest.py]"]
  node_scraper_api["Scraper service<br/>[routes.py]"]
  node_crawl["Crawl and verify<br/>[orchestrator.py]"]
  node_scrape_store[("Scrape job store<br/>[database.py]")]
  node_upload["Document ingestion"]
end

subgraph group_experience["User interfaces"]
  node_dashboard["Business dashboard"]
  node_setup["Assistant setup"]
  node_widget["Website widget"]
  node_public_site["Branded public site"]
  node_whatsapp["WhatsApp channel"]
end

subgraph group_operations["Platform operations"]
  node_platform_admin["Operator controls"]
  node_billing["Plans and billing"]
end

subgraph group_integration["Developer access"]
  node_clients["Python and JS clients"]
  node_mcp["MCP server"]
end

node_business(("Business owner"))
node_enduser(("Assistant user"))
node_external_services["Model and payment providers"]

node_business -->|"signs up"| node_public_site
node_business -->|"configures assistant"| node_setup
node_setup -->|"adds documents"| node_upload
node_setup -->|"adds website"| node_website_ingest
node_website_ingest -.->|"submits crawl"| node_scraper_api
node_scraper_api -->|"starts crawl"| node_crawl
node_crawl -->|"persists jobs"| node_scrape_store
node_upload -.->|"stores knowledge"| node_vectordb
node_website_ingest -.->|"indexes content"| node_vectordb
node_enduser -->|"asks question"| node_widget
node_enduser -->|"asks question"| node_whatsapp
node_widget -->|"sends query"| node_api
node_whatsapp -->|"sends query"| node_api
node_api -.->|"runs retrieval"| node_answer
node_answer -.->|"retrieves passages"| node_vectordb
node_answer -.->|"generates answer"| node_models
node_answer -.->|"validates response"| node_validation
node_api -->|"returns answer"| node_enduser
node_business -->|"manages assistant"| node_dashboard
node_dashboard -.->|"uses REST API"| node_api
node_platform_admin -->|"manages plans"| node_billing
node_clients -->|"calls REST API"| node_api
node_mcp -->|"uses knowledge API"| node_api
node_models -.->|"calls providers"| node_external_services
node_billing -->|"charges payments"| node_external_services

click node_dashboard "https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/src/features"
click node_setup "https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/src/features/assistant-setup"
click node_widget "https://github.com/callobuzz/cob-rag-engine/tree/main/services/chat"
click node_public_site "https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/landing/src"
click node_whatsapp "https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag"
click node_api "https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/api"
click node_answer "https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/retrieval"
click node_validation "https://github.com/callobuzz/cob-rag-engine/blob/main/src/callobuzz_rag/retrieval/validation/pipeline.py"
click node_models "https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/llm"
click node_vectordb "https://github.com/callobuzz/cob-rag-engine/blob/main/src/callobuzz_rag/vectordb/collection_manager.py"
click node_website_ingest "https://github.com/callobuzz/cob-rag-engine/blob/main/src/callobuzz_rag/website/ingest.py"
click node_scraper_api "https://github.com/callobuzz/cob-rag-engine/blob/main/services/scraper/scraper/api/routes.py"
click node_crawl "https://github.com/callobuzz/cob-rag-engine/blob/main/services/scraper/scraper/crawl/orchestrator.py"
click node_scrape_store "https://github.com/callobuzz/cob-rag-engine/blob/main/services/scraper/scraper/storage/database.py"
click node_upload "https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag"
click node_platform_admin "https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/src/features"
click node_billing "https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/billing"
click node_clients "https://github.com/callobuzz/cob-rag-engine/tree/main/clients"

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_answer,node_validation,node_models,node_vectordb,node_enduser toneBlue
class node_website_ingest,node_scraper_api,node_crawl,node_scrape_store,node_upload toneAmber
class node_dashboard,node_setup,node_widget,node_public_site,node_whatsapp toneMint
class node_platform_admin,node_billing toneRose
class node_clients,node_mcp,node_business,node_external_services toneIndigo
```

## Components

### Assistant runtime

- [Engine API](https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/api): `src/callobuzz_rag/api`
- [Answer and retrieval](https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/retrieval): `src/callobuzz_rag/retrieval`
- [Answer validation](https://github.com/callobuzz/cob-rag-engine/blob/main/src/callobuzz_rag/retrieval/validation/pipeline.py): `src/callobuzz_rag/retrieval/validation/pipeline.py`
- [Language models](https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/llm): `src/callobuzz_rag/llm`
- [Vector collections](https://github.com/callobuzz/cob-rag-engine/blob/main/src/callobuzz_rag/vectordb/collection_manager.py): `src/callobuzz_rag/vectordb/collection_manager.py`

### Knowledge ingestion

- [Website ingestion](https://github.com/callobuzz/cob-rag-engine/blob/main/src/callobuzz_rag/website/ingest.py): `src/callobuzz_rag/website/ingest.py`
- [Scraper service](https://github.com/callobuzz/cob-rag-engine/blob/main/services/scraper/scraper/api/routes.py): `services/scraper/scraper/api/routes.py`
- [Crawl and verify](https://github.com/callobuzz/cob-rag-engine/blob/main/services/scraper/scraper/crawl/orchestrator.py): `services/scraper/scraper/crawl/orchestrator.py`
- [Scrape job store](https://github.com/callobuzz/cob-rag-engine/blob/main/services/scraper/scraper/storage/database.py): `services/scraper/scraper/storage/database.py`
- [Document ingestion](https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag): `src/callobuzz_rag`

### User interfaces

- [Business dashboard](https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/src/features): `services/dashboard/src/features`
- [Assistant setup](https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/src/features/assistant-setup): `services/dashboard/src/features/assistant-setup`
- [Website widget](https://github.com/callobuzz/cob-rag-engine/tree/main/services/chat): `services/chat`
- [Branded public site](https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/landing/src): `services/dashboard/landing/src`
- [WhatsApp channel](https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag): `src/callobuzz_rag`

### Platform operations

- [Operator controls](https://github.com/callobuzz/cob-rag-engine/tree/main/services/dashboard/src/features): `services/dashboard/src/features`
- [Plans and billing](https://github.com/callobuzz/cob-rag-engine/tree/main/src/callobuzz_rag/billing): `src/callobuzz_rag/billing`

### Developer access

- [Python and JS clients](https://github.com/callobuzz/cob-rag-engine/tree/main/clients): `clients`
- **MCP server**

### Other components

- **Business owner**
- **Assistant user**
- **Model and payment providers**

## Connections

- Business owner → Branded public site: signs up
- Business owner → Assistant setup: configures assistant
- Assistant setup → Document ingestion: adds documents
- Assistant setup → Website ingestion: adds website
- Website ingestion → Scraper service: submits crawl
- Scraper service → Crawl and verify: starts crawl (evidence: `services/scraper/scraper/api/routes.py`)
- Crawl and verify → Scrape job store: persists jobs (evidence: `services/scraper/scraper/crawl/orchestrator.py`)
- Document ingestion → Vector collections: stores knowledge (evidence: `src/callobuzz_rag/vectordb/collection_manager.py`)
- Website ingestion → Vector collections: indexes content
- Assistant user → Website widget: asks question
- Assistant user → WhatsApp channel: asks question
- Website widget → Engine API: sends query
- WhatsApp channel → Engine API: sends query (evidence: `src/callobuzz_rag/api/routes/engine_settings.py`)
- Engine API → Answer and retrieval: runs retrieval
- Answer and retrieval → Vector collections: retrieves passages
- Answer and retrieval → Language models: generates answer
- Answer and retrieval → Answer validation: validates response (evidence: `src/callobuzz_rag/retrieval/validation/pipeline.py`)
- Engine API → Assistant user: returns answer
- Business owner → Business dashboard: manages assistant
- Business dashboard → Engine API: uses REST API
- Operator controls → Plans and billing: manages plans
- Python and JS clients → Engine API: calls REST API
- MCP server → Engine API: uses knowledge API
- Language models → Model and payment providers: calls providers
- Plans and billing → Model and payment providers: charges payments
