Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.1.0
metadata
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
- Enter Tenant ID: Set your tenant ID in the UI (top of the page)
- Select Role: Choose your role (viewer, editor, admin, owner) from the dropdown
- Start Chatting: Use the Chat tab to interact with the agent
- Ingest Documents: Upload documents in the Document Ingestion tab (requires editor+ role)
- Manage Rules: Add admin rules in the Admin Rules tab (requires admin+ role)
- 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 extensionOLLAMA_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 keyGOOGLE_SEARCH_API_KEY- Google Custom Search API keyGOOGLE_SEARCH_CX_ID- Google Custom Search Engine IDGROQ_API_KEY- Groq API key (alternative to Ollama)LLM_BACKEND-ollamaorgroq(default:ollama)
π API Endpoints
The FastAPI backend is available at /api (relative to the Space URL):
POST /api/agent/message- Main chat endpointPOST /api/rag/ingest-document- Ingest documentsGET /api/rag/list- List documentsPOST /api/admin/rules- Manage admin rulesGET /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 file for details.
π Links
Made with β€οΈ for the MCP Hackathon