nothingworry commited on
Commit
0073bf0
Β·
1 Parent(s): e4abb85

updated the readme files

Browse files
Files changed (1) hide show
  1. README.md +28 -38
README.md CHANGED
@@ -16,13 +16,13 @@ This Hugging Face Space provides a Gradio interface to interact with the Integra
16
 
17
  ## Features
18
 
19
- - πŸ€– **Autonomous MCP Agents** - Intelligent tool selection and execution
20
- - πŸ“š **Enterprise RAG System** - Multi-tenant knowledge base with semantic search
21
- - 🌐 **Live Web Search** - Real-time information retrieval
22
- - πŸ›‘οΈ **Red-Flag Governance** - Automated safety monitoring and compliance
23
- - 🏒 **Multi-Tenant Isolation** - Strict tenant separation with secure access control
24
- - πŸ“Š **Analytics Dashboard** - Comprehensive system insights and observability
25
- - πŸ”„ **Multi-Tool Selection** - Dynamic tool combinations (RAG + Web + LLM)
26
 
27
  ---
28
 
@@ -30,11 +30,11 @@ This Hugging Face Space provides a Gradio interface to interact with the Integra
30
 
31
  ### Prerequisites
32
 
33
- 1. **Backend Server Running**: The IntegraChat FastAPI backend must be running at `http://localhost:8000`
34
- - See the [backend README](backend/README.md) for setup instructions
35
- - The backend provides the MCP agent endpoint at `/agent/chat`
36
-
37
- 2. **Python 3.10+** installed
38
 
39
  ### Installation
40
 
@@ -54,38 +54,28 @@ This Hugging Face Space provides a Gradio interface to interact with the Integra
54
 
55
  ### Usage
56
 
57
- 1. Enter your **Tenant ID** in the textbox (e.g., `tenant123`)
58
- 2. Type your message in the chat interface
59
- 3. Click **Send** or press Enter
60
- 4. The agent will process your message using MCP tools and respond
61
-
62
- ---
63
 
64
- ## API Endpoint
 
 
 
65
 
66
- The Gradio interface communicates with the backend MCP agent via:
67
 
68
- **Endpoint:** `POST http://localhost:8000/agent/chat`
69
-
70
- **Headers:**
71
- - `Content-Type: application/json`
72
- - `x-tenant-id: <your-tenant-id>`
73
 
74
- **Request Body:**
75
- ```json
76
- {
77
- "message": "Your message here"
78
- }
79
- ```
80
 
81
- **Response:**
82
- ```json
83
- {
84
- "response": "Agent's response text"
85
- }
86
- ```
 
87
 
88
- **Note:** The backend MCP system must be running separately. This Space provides only the frontend interface. See the [backend documentation](backend/README.md) for full setup instructions.
89
 
90
  ---
91
 
 
16
 
17
  ## Features
18
 
19
+ - πŸ€– **Autonomous MCP Agents** – Tool-aware FastAPI agent that plans across RAG, Web, Admin, and LLM actions
20
+ - πŸ“š **Knowledge Base Ingestion** – Upload raw text, URLs, or documents (PDF/DOCX/TXT/MD) directly from the Gradio UI
21
+ - πŸ›‘οΈ **Admin Rules Management** – Dedicated tab to add/delete governance rules; all rules are persisted in SQLite for demo purposes
22
+ - πŸ“Š **Admin Analytics** – Snapshot of tenant activity, tool usage, red-flag triggers, and overall query volume
23
+ - 🌐 **Live Web Search** – DuckDuckGo-based MCP server with English-biased results
24
+ - 🏒 **Multi-Tenant Isolation** – Every request requires a tenant ID; backend enforces isolation for chat, ingestion, and admin ops
25
+ - πŸ”„ **Multi-Tool Selection** – MCP agent orchestrator picks the right tool chain (RAG + Web + LLM, etc.)
26
 
27
  ---
28
 
 
30
 
31
  ### Prerequisites
32
 
33
+ 1. **Backend services running**:
34
+ - FastAPI API (`uvicorn backend.api.main:app --port 8000`)
35
+ - MCP servers (RAG 8001, Web 8002, Admin 8003) as described in `backend/README.md`
36
+ - Optional: Ollama / Groq credentials for the LLM client
37
+ 2. **Python 3.10+** with the dependencies in `requirements.txt`
38
 
39
  ### Installation
40
 
 
54
 
55
  ### Usage
56
 
57
+ The Gradio UI exposes four tabs once you launch `app.py`:
 
 
 
 
 
58
 
59
+ 1. **Chat** – enter your Tenant ID, ask questions, and see multi-tool MCP responses.
60
+ 2. **Document Ingestion** – toggle between Raw Text, URL, or File Upload to populate the tenant RAG index.
61
+ 3. **Admin Analytics** – click β€œFetch Analytics Snapshot” to view overview/tool-usage/red-flag/activity metrics.
62
+ 4. **Admin Rules & Compliance** – upload/delete governance rules that are stored via the backend `/admin/rules` API.
63
 
64
+ **Tip:** Every action requires a tenant ID, so fill that field before using any tab.
65
 
66
+ ---
 
 
 
 
67
 
68
+ ## API endpoints used by the Space
 
 
 
 
 
69
 
70
+ | Purpose | Method & Path | Notes |
71
+ | --- | --- | --- |
72
+ | Chat with agent | `POST /agent/message` | Body includes `tenant_id`, `message`, optional history |
73
+ | Ingest document (text/URL) | `POST /rag/ingest-document` | Accepts `source_type`, `content`, metadata |
74
+ | Ingest file | `POST /rag/ingest-file` | Multipart upload with `x-tenant-id` header |
75
+ | List analytics | `GET /analytics/overview` etc. | Used for Admin Analytics tab |
76
+ | Manage rules | `GET/POST/DELETE /admin/rules` | Backend now persists rules in SQLite demo store |
77
 
78
+ All calls are proxied through the FastAPI backend running at `http://localhost:8000`. Ensure those services are online before launching the Space.
79
 
80
  ---
81