nothingworry commited on
Commit
6818d41
Β·
1 Parent(s): c16e1c9

update the README.md file

Browse files
Files changed (1) hide show
  1. README.md +72 -47
README.md CHANGED
@@ -35,7 +35,7 @@
35
 
36
  **IntegraChat** is an enterprise-ready, multi-tenant AI platform built to demonstrate the full capabilities of the **Model Context Protocol (MCP)** in a real production-style environment.
37
 
38
- It combines **autonomous tool-using agents**, **RAG retrieval**, **live web search**, and **admin governance** under strict **tenant isolation**, powered by Groq's **Llama-3.1-8B**.
39
 
40
  IntegraChat is a complete **"MCP in Action"** ecosystem β€” ideal for enterprise demos, research, production scaffolds, and governance-focused AI deployments.
41
 
@@ -66,15 +66,16 @@ Agents can intelligently:
66
  - βœ… Retrieve tenant-private knowledge
67
  - βœ… Pull real-time data from the internet
68
  - βœ… Trigger admin alerts when needed
69
- - βœ… Respond using Groq's **Llama-3.1-8B**
70
 
71
  ### 2. πŸ“š Enterprise RAG System
72
 
73
- - **MiniLM embeddings** for semantic search
74
  - **Supabase + pgvector** for vector storage
75
- - **Strict multi-tenant RLS enforcement** for security
76
- - **Multiple format support**: PDF / DOCX / TXT / URL ingestion
77
- - **Intelligent chunking** + semantic search
 
78
 
79
  ### 3. 🌐 Live Web Search Tool
80
 
@@ -126,8 +127,9 @@ Isolation is guaranteed via **Supabase Row-Level Security (RLS)**.
126
  | **FastAPI** | High-performance API framework |
127
  | **MCP Client + Servers** | Model Context Protocol implementation |
128
  | **Supabase** | Auth + Storage + pgvector database |
129
- | **MiniLM Embeddings** | Semantic search embeddings |
130
- | **Groq Llama-3.1-8B** | LLM inference engine |
 
131
  | **DuckDuckGo Search** | Web search provider |
132
  | **Slack / Email** | Alerting system |
133
 
@@ -215,41 +217,14 @@ IntegraChat/
215
  β”‚ β”‚ β”‚ β”œβ”€β”€ logging.py
216
  β”‚ β”‚ β”‚ β”œβ”€β”€ supabase_client.py
217
  β”‚ β”‚ β”‚ β”œβ”€β”€ tenant_context.py
218
- β”‚ β”‚ β”‚ └── security.py
 
219
  β”‚ β”‚ └── config.py
220
  β”‚ β”‚
221
  β”‚ β”œβ”€β”€ mcp_servers/
222
- β”‚ β”‚ β”œβ”€β”€ rag_server/
223
- β”‚ β”‚ β”‚ β”œβ”€β”€ main.py
224
- β”‚ β”‚ β”‚ β”œβ”€β”€ chunker.py
225
- β”‚ β”‚ β”‚ β”œβ”€β”€ search.py
226
- β”‚ β”‚ β”‚ β”œβ”€β”€ embeddings.py
227
- β”‚ β”‚ β”‚ β”œβ”€β”€ ingestion/
228
- β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ingest_pdf.py
229
- β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ingest_docx.py
230
- β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ingest_txt.py
231
- β”‚ β”‚ β”‚ β”‚ └── ingest_url.py
232
- β”‚ β”‚ β”‚ β”œβ”€β”€ db/
233
- β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ documents_repo.py
234
- β”‚ β”‚ β”‚ β”‚ └── embeddings_repo.py
235
- β”‚ β”‚ β”‚ └── config.py
236
- β”‚ β”‚ β”‚
237
- β”‚ β”‚ β”œβ”€β”€ web_server/
238
- β”‚ β”‚ β”‚ β”œβ”€β”€ main.py
239
- β”‚ β”‚ β”‚ β”œβ”€β”€ providers/
240
- β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ddg.py
241
- β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ serpapi.py (optional)
242
- β”‚ β”‚ β”‚ β”‚ └── bing.py (optional)
243
- β”‚ β”‚ β”‚ └── utils.py
244
- β”‚ β”‚ β”‚
245
- β”‚ β”‚ └── admin_server/
246
- β”‚ β”‚ β”œβ”€β”€ main.py
247
- β”‚ β”‚ β”œβ”€β”€ redflag_rules.py
248
- β”‚ β”‚ β”œβ”€β”€ alerts/
249
- β”‚ β”‚ β”‚ β”œβ”€β”€ slack.py
250
- β”‚ β”‚ β”‚ β”œβ”€β”€ email.py
251
- β”‚ β”‚ β”‚ └── webhook.py
252
- β”‚ β”‚ └── audit_logs.py
253
  β”‚ β”‚
254
  β”‚ β”œβ”€β”€ workers/
255
  β”‚ β”‚ β”œβ”€β”€ ingestion_worker.py
@@ -341,9 +316,10 @@ IntegraChat/
341
  Before you begin, ensure you have the following installed:
342
 
343
  - βœ… **Python 3.10+**
344
- - βœ… **Node.js 18+**
345
- - βœ… **Supabase project** (with pgvector extension)
346
- - βœ… **Groq API key**
 
347
  - βœ… **DuckDuckGo Search key** (optional, if configured)
348
  - βœ… **Slack/Email webhook** for alerts (optional)
349
 
@@ -360,16 +336,65 @@ Before you begin, ensure you have the following installed:
360
  ```
361
 
362
  3. **Configure environment variables**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  ```bash
364
- cp .env.example .env
365
- # Edit .env and fill in your Supabase + Groq keys
366
  ```
 
 
 
367
 
368
- 4. **Run the development server**
369
  ```bash
 
370
  uvicorn api.main:app --reload
371
  ```
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  ### Frontend Setup
374
 
375
  1. **Navigate to frontend directory**
@@ -438,7 +463,7 @@ Contributions are welcome! Please feel free to submit a Pull Request.
438
  ## πŸ™ Acknowledgments
439
 
440
  - Built with [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)
441
- - Powered by [Groq](https://groq.com/) for LLM inference
442
  - Database powered by [Supabase](https://supabase.com/)
443
 
444
  ---
 
35
 
36
  **IntegraChat** is an enterprise-ready, multi-tenant AI platform built to demonstrate the full capabilities of the **Model Context Protocol (MCP)** in a real production-style environment.
37
 
38
+ It combines **autonomous tool-using agents**, **RAG retrieval**, **live web search**, and **admin governance** under strict **tenant isolation**, powered by **Ollama** (local) or **Groq** (cloud) LLM inference.
39
 
40
  IntegraChat is a complete **"MCP in Action"** ecosystem β€” ideal for enterprise demos, research, production scaffolds, and governance-focused AI deployments.
41
 
 
66
  - βœ… Retrieve tenant-private knowledge
67
  - βœ… Pull real-time data from the internet
68
  - βœ… Trigger admin alerts when needed
69
+ - βœ… Respond using **Ollama** (local) or **Groq** (cloud) LLM
70
 
71
  ### 2. πŸ“š Enterprise RAG System
72
 
73
+ - **MiniLM embeddings** (384-dim) for semantic search
74
  - **Supabase + pgvector** for vector storage
75
+ - **Automatic database schema initialization** on server startup
76
+ - **Strict multi-tenant isolation** with tenant_id filtering
77
+ - **Intelligent text chunking** (~300 words per chunk)
78
+ - **Vector similarity search** using cosine distance
79
 
80
  ### 3. 🌐 Live Web Search Tool
81
 
 
127
  | **FastAPI** | High-performance API framework |
128
  | **MCP Client + Servers** | Model Context Protocol implementation |
129
  | **Supabase** | Auth + Storage + pgvector database |
130
+ | **PostgreSQL + pgvector** | Vector database for embeddings |
131
+ | **MiniLM Embeddings** | Semantic search embeddings (384-dim) |
132
+ | **Ollama / Groq** | LLM inference engine (configurable) |
133
  | **DuckDuckGo Search** | Web search provider |
134
  | **Slack / Email** | Alerting system |
135
 
 
217
  β”‚ β”‚ β”‚ β”œβ”€β”€ logging.py
218
  β”‚ β”‚ β”‚ β”œβ”€β”€ supabase_client.py
219
  β”‚ β”‚ β”‚ β”œβ”€β”€ tenant_context.py
220
+ β”‚ β”‚ β”‚ β”œβ”€β”€ security.py
221
+ β”‚ β”‚ β”‚ └── text_extractor.py
222
  β”‚ β”‚ └── config.py
223
  β”‚ β”‚
224
  β”‚ β”œβ”€β”€ mcp_servers/
225
+ β”‚ β”‚ β”œβ”€β”€ main.py # RAG MCP Server (FastAPI)
226
+ β”‚ β”‚ β”œβ”€β”€ database.py # Supabase/PostgreSQL connection
227
+ β”‚ β”‚ └── embeddings.py # Sentence transformers embeddings
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  β”‚ β”‚
229
  β”‚ β”œβ”€β”€ workers/
230
  β”‚ β”‚ β”œβ”€β”€ ingestion_worker.py
 
316
  Before you begin, ensure you have the following installed:
317
 
318
  - βœ… **Python 3.10+**
319
+ - βœ… **Node.js 18+** (for frontend)
320
+ - βœ… **Supabase project** (with pgvector extension enabled)
321
+ - βœ… **PostgreSQL connection string** (from Supabase)
322
+ - βœ… **Ollama** (for local LLM) or **Groq API key** (for cloud LLM)
323
  - βœ… **DuckDuckGo Search key** (optional, if configured)
324
  - βœ… **Slack/Email webhook** for alerts (optional)
325
 
 
336
  ```
337
 
338
  3. **Configure environment variables**
339
+
340
+ Create a `.env` file in the project root with the following:
341
+ ```env
342
+ # Database Configuration
343
+ POSTGRESQL_URL=postgresql://user:password@host:port/database
344
+ SUPABASE_URL=https://your-project.supabase.co
345
+ SUPABASE_SERVICE_KEY=your_service_role_key
346
+
347
+ # MCP Server URLs
348
+ RAG_MCP_URL=http://localhost:8001
349
+ WEB_MCP_URL=http://localhost:8002
350
+ ADMIN_MCP_URL=http://localhost:8003
351
+
352
+ # LLM Configuration
353
+ OLLAMA_URL=http://localhost:11434
354
+ OLLAMA_MODEL=llama3
355
+ # Or use Groq instead:
356
+ # GROQ_API_KEY=your_groq_api_key
357
+ ```
358
+
359
+ 4. **Start the RAG MCP Server**
360
  ```bash
361
+ cd backend/mcp_servers
362
+ python main.py
363
  ```
364
+ The server will automatically initialize the database schema on startup.
365
+ - Server runs on `http://localhost:8001`
366
+ - API docs available at `http://localhost:8001/docs`
367
 
368
+ 5. **Run the main API server**
369
  ```bash
370
+ cd backend
371
  uvicorn api.main:app --reload
372
  ```
373
 
374
+ ### RAG MCP Server API
375
+
376
+ The RAG MCP Server provides two main endpoints:
377
+
378
+ **Ingest Documents:**
379
+ ```bash
380
+ curl -X POST http://localhost:8001/ingest \
381
+ -H "Content-Type: application/json" \
382
+ -d '{
383
+ "tenant_id": "tenant123",
384
+ "content": "Your document text here..."
385
+ }'
386
+ ```
387
+
388
+ **Semantic Search:**
389
+ ```bash
390
+ curl -X POST http://localhost:8001/search \
391
+ -H "Content-Type: application/json" \
392
+ -d '{
393
+ "tenant_id": "tenant123",
394
+ "query": "What are the HR policies?"
395
+ }'
396
+ ```
397
+
398
  ### Frontend Setup
399
 
400
  1. **Navigate to frontend directory**
 
463
  ## πŸ™ Acknowledgments
464
 
465
  - Built with [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)
466
+ - Powered by [Ollama](https://ollama.ai/) or [Groq](https://groq.com/) for LLM inference
467
  - Database powered by [Supabase](https://supabase.com/)
468
 
469
  ---