Spaces:
Sleeping
Sleeping
Commit
Β·
0073bf0
1
Parent(s):
e4abb85
updated the readme files
Browse files
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** -
|
| 20 |
-
- π **
|
| 21 |
-
-
|
| 22 |
-
-
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
-
- π **Multi-Tool Selection**
|
| 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
|
| 34 |
-
-
|
| 35 |
-
-
|
| 36 |
-
|
| 37 |
-
2. **Python 3.10+**
|
| 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 |
-
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
-
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
**Headers:**
|
| 71 |
-
- `Content-Type: application/json`
|
| 72 |
-
- `x-tenant-id: <your-tenant-id>`
|
| 73 |
|
| 74 |
-
|
| 75 |
-
```json
|
| 76 |
-
{
|
| 77 |
-
"message": "Your message here"
|
| 78 |
-
}
|
| 79 |
-
```
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
| 87 |
|
| 88 |
-
|
| 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 |
|