Spaces:
Sleeping
Sleeping
File size: 3,983 Bytes
916e12b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
---
title: IntegraChat
emoji: π€
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
license: mit
---
# IntegraChat β Enterprise MCP Autonomous Agent Platform
**IntegraChat** is an enterprise-grade, multi-tenant AI platform that demonstrates the full capabilities of the **Model Context Protocol (MCP)** in a production-style environment.
## π Quick Start
This Hugging Face Space runs the complete IntegraChat stack:
- **Gradio UI** on port 7860 (main interface)
- **FastAPI Backend** on port 8000 (API endpoints)
- **Unified MCP Server** on port 8900 (RAG/Web/Admin tools)
## β¨ Features
- π€ **Autonomous Multi-Step MCP Agents** β Intelligent tool-aware agent with conversation memory
- π **Enhanced Knowledge Base Management** β Upload documents (PDF/DOCX/TXT/MD) with AI-generated metadata
- π **Optimized RAG Search** β Cross-encoder re-ranking for improved accuracy
- π‘οΈ **Enterprise Admin Governance** β Regex-based red-flag detection with LLM enhancement
- π **Comprehensive Analytics** β Real-time visualizations and tenant-level metrics
- π **Live Web Search** β Google Programmable Search integration
- π’ **Multi-Tenant Isolation** β Complete tenant isolation with role-based access control
## π Usage
1. **Enter Tenant ID**: Set your tenant ID in the UI (top of the page)
2. **Select Role**: Choose your role (viewer, editor, admin, owner) from the dropdown
3. **Start Chatting**: Use the Chat tab to interact with the agent
4. **Ingest Documents**: Upload documents in the Document Ingestion tab (requires editor+ role)
5. **Manage Rules**: Add admin rules in the Admin Rules tab (requires admin+ role)
6. **View Analytics**: Check analytics in the Admin Analytics tab
## π§ Configuration
Set these environment variables in your Hugging Face Space settings:
### Required
- `POSTGRESQL_URL` - PostgreSQL connection string with pgvector extension
- `OLLAMA_URL` - Ollama server URL (or use Groq API)
- `OLLAMA_MODEL` - Model name (e.g., `llama3.1:latest`)
### Optional
- `SUPABASE_URL` - Supabase project URL (for production storage)
- `SUPABASE_SERVICE_KEY` - Supabase service role key
- `GOOGLE_SEARCH_API_KEY` - Google Custom Search API key
- `GOOGLE_SEARCH_CX_ID` - Google Custom Search Engine ID
- `GROQ_API_KEY` - Groq API key (alternative to Ollama)
- `LLM_BACKEND` - `ollama` or `groq` (default: `ollama`)
## π API Endpoints
The FastAPI backend is available at `/api` (relative to the Space URL):
- `POST /api/agent/message` - Main chat endpoint
- `POST /api/rag/ingest-document` - Ingest documents
- `GET /api/rag/list` - List documents
- `POST /api/admin/rules` - Manage admin rules
- `GET /api/analytics/overview` - View analytics
Full API docs available at `/api/docs` when the backend is running.
## ποΈ Architecture
```
βββββββββββββββββββ
β Gradio UI β Port 7860
β (Main Entry) β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β FastAPI Backendβ Port 8000
ββββββββββ¬βββββββββ
β
ββββΊ MCP Server (Port 8900)
β βββ RAG Tools
β βββ Web Tools
β βββ Admin Tools
β
ββββΊ PostgreSQL (RAG)
ββββΊ Supabase/SQLite (Rules & Analytics)
ββββΊ LLM (Ollama/Groq)
```
## π Role-Based Access Control
- **viewer** - Basic chat access
- **editor** - Can ingest documents
- **admin** - Can manage rules and delete documents
- **owner** - Full system access
## π License
MIT License - see [LICENSE](LICENSE) file for details.
## π Links
- [Model Context Protocol](https://modelcontextprotocol.io/)
- [Full Documentation](README.md)
- [Backend Documentation](backend/README.md)
---
**Made with β€οΈ for the MCP Hackathon**
|