# sushantmanitripathi/multi-agent_rag_system architecture

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

- Interactive diagram: https://gitdiagram.com/sushantmanitripathi/multi-agent_rag_system
- Repository: https://github.com/sushantmanitripathi/multi-agent_rag_system

## Overview

The README describes a single-process Telegram community RAG assistant, but the provided tree contains no application source—only the README, dependency list, and data/session files. The graph therefore maps documented product stages and capabilities; implementation paths are unavailable, and relationships are supported by the README rather than inspected code.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingress["Message Intake"]
  node_listener["Curious Listener"]
  node_guards["Message Guards"]
end

subgraph group_answers["Answer Pipeline"]
  node_intent["Intent Classifier"]
  node_expansion["Query Expansion"]
  node_retrieval["Vector Retrieval"]
  node_context["Context Builder"]
  node_generation["GPT Generation"]
  node_validation["Answer Validation"]
end

subgraph group_knowledge["Knowledge System"]
  node_qdrant[("Qdrant Index")]
  node_sources["Knowledge Sources"]
  node_logging[("Live Conversation Log")]
end

subgraph group_agents["Community Agents"]
  node_persona["Persona Response"]
  node_telegram["Telegram Bots"]
  node_price["Price Lookup"]
end

subgraph group_automation["Background Capabilities"]
  node_reactions["Announcement Reactions"]
  node_engagement["Idle Engagement"]
  node_history["History Scraper"]
  node_watcher["Index Watcher"]
end

node_member(("Group Member"))
node_llm["OpenAI Services"]
node_cmc["CoinMarketCap"]

node_member -->|"sends message"| node_listener
node_listener -->|"routes messages"| node_guards
node_guards -->|"passes valid questions"| node_intent
node_intent -->|"classifies query"| node_expansion
node_expansion -->|"expands query"| node_retrieval
node_retrieval -->|"searches vectors"| node_qdrant
node_sources -->|"indexes knowledge"| node_qdrant
node_retrieval -->|"supplies results"| node_context
node_context -->|"builds prompt"| node_generation
node_generation -->|"requests completion"| node_llm
node_generation -->|"produces answer"| node_validation
node_validation -->|"approves answer"| node_persona
node_persona -->|"selects bot style"| node_telegram
node_telegram -->|"sends reply"| node_member
node_listener -->|"logs conversations"| node_logging
node_listener -->|"looks up prices"| node_price
node_price -->|"fetches prices"| node_cmc
node_listener -->|"handles announcements"| node_reactions
node_listener -->|"triggers when idle"| node_engagement
node_history -->|"updates history data"| node_sources
node_watcher -->|"rebuilds index"| node_qdrant

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_listener,node_guards toneBlue
class node_intent,node_expansion,node_retrieval,node_context,node_generation,node_validation toneAmber
class node_qdrant,node_sources,node_logging toneMint
class node_persona,node_telegram,node_price toneRose
class node_reactions,node_engagement,node_history,node_watcher,node_member,node_llm,node_cmc toneIndigo
```

## Components

### Message Intake

- **Curious Listener**
- **Message Guards**

### Answer Pipeline

- **Intent Classifier**
- **Query Expansion**
- **Vector Retrieval**
- **Context Builder**
- **GPT Generation**
- **Answer Validation**

### Knowledge System

- **Qdrant Index**
- **Knowledge Sources**
- **Live Conversation Log**

### Community Agents

- **Persona Response**
- **Telegram Bots**
- **Price Lookup**

### Background Capabilities

- **Announcement Reactions**
- **Idle Engagement**
- **History Scraper**
- **Index Watcher**

### Other components

- **Group Member**
- **OpenAI Services**
- **CoinMarketCap**

## Connections

- Group Member → Curious Listener: sends message (evidence: `README.md`)
- Curious Listener → Message Guards: routes messages (evidence: `README.md`)
- Message Guards → Intent Classifier: passes valid questions (evidence: `README.md`)
- Intent Classifier → Query Expansion: classifies query (evidence: `README.md`)
- Query Expansion → Vector Retrieval: expands query (evidence: `README.md`)
- Vector Retrieval → Qdrant Index: searches vectors (evidence: `README.md`)
- Knowledge Sources → Qdrant Index: indexes knowledge (evidence: `README.md`)
- Vector Retrieval → Context Builder: supplies results (evidence: `README.md`)
- Context Builder → GPT Generation: builds prompt (evidence: `README.md`)
- GPT Generation → OpenAI Services: requests completion (evidence: `README.md`)
- GPT Generation → Answer Validation: produces answer (evidence: `README.md`)
- Answer Validation → Persona Response: approves answer (evidence: `README.md`)
- Persona Response → Telegram Bots: selects bot style (evidence: `README.md`)
- Telegram Bots → Group Member: sends reply (evidence: `README.md`)
- Curious Listener → Live Conversation Log: logs conversations (evidence: `README.md`)
- Curious Listener → Price Lookup: looks up prices (evidence: `README.md`)
- Price Lookup → CoinMarketCap: fetches prices (evidence: `README.md`)
- Curious Listener → Announcement Reactions: handles announcements (evidence: `README.md`)
- Curious Listener → Idle Engagement: triggers when idle (evidence: `README.md`)
- History Scraper → Knowledge Sources: updates history data (evidence: `README.md`)
- Index Watcher → Qdrant Index: rebuilds index (evidence: `README.md`)
