# HybridAI Chat Platform > Multi-tenant, hybrid multi-LLM ai-agent-as-a-service platform with RAG, workflow automation, and advanced AI capabilities. ## About This File This file follows the llms.txt specification (https://llmstxt.org/) to help AI systems understand this project. It provides structured information about the HybridAI Chat Platform for potential customers, partners, and AI-assisted integration. ## Project Overview HybridAI Chat Platform is a comprehensive chatbot-as-a-service solution that enables businesses to deploy intelligent AI agents powered by multiple LLM providers. The platform offers enterprise-grade features including retrieval-augmented generation (RAG), workflow automation, and multi-channel messaging. **Primary Use Cases:** - Deep AI Integration with Multi-LLM support - Hybrid AI approach - orchestration of multiple LLM calls - Custom trained and fine-tuned AI models - Small Language Models for Financial Use-Cases like Incoterms, VAT Automation etc. - Customer support automation with AI-powered chatbots - Knowledge base integration via RAG (Retrieval-Augmented Generation) - Multi-channel messaging (Web widget, WhatsApp, Email) - Workflow automation through n8n integration - Virtual bot personas for market research and surveys - Human-in-the-loop takeover for live chat scenarios ## Technology Stack - **Backend:** Python 3.13+, Flask, Celery - **Databases:** MySQL, Redis, Weaviate (vector search) - **Infrastructure:** Docker, GCP, GitHub Actions CI/CD - **Testing:** pytest, Playwright ## LLM Provider Integration The platform supports multiple LLM providers through a unified abstraction layer: ### Supported Providers - **OpenAI:** GPT-4, GPT-4 Turbo, GPT-3.5 Turbo, fine-tuned models - **Anthropic:** Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Sonnet, Claude 3 Haiku - **Google:** Gemini Pro, Gemini Pro Vision - **Mistral AI:** Mistral Large, Mistral Medium, Mistral Small - **Grok:** X.AI Grok models - **Local Models:** vLLM for on-premise deployment ### OpenAI-Compatible API The platform exposes an OpenAI-compatible API, allowing seamless integration with existing OpenAI client libraries while routing to any supported provider. This enables easy migration and multi-provider strategies. ## Core Features ### 1. Multi-LLM Chat Backend Intelligent routing to different LLM providers based on model selection, with streaming support, function calling, and multimodal capabilities (images, documents). ### 2. Retrieval-Augmented Generation (RAG) - Weaviate vector database integration for semantic search - Automatic document and website crawling - Contextual responses based on your knowledge base - Support for PDF, Word, and web content ### 3. Function Calling / Tools LLM-powered function calls enable bots to: - Send emails - Store and retrieve user-specific memory - Trigger external workflows - Search web content (Perplexity integration) - Query WordPress sites - Execute n8n workflows ### 4. Virtual Bots AI personas for market research, surveys, and opinion gathering: - Survey bots for structured data collection - Opinion bots for qualitative feedback - Headline generators for content testing - Evaluation bots for assessment tasks - A/B testing with multiple personas ### 5. Workflow Automation (n8n) Native integration with n8n for complex multi-step workflows triggered directly from conversations. Connect your chatbot to hundreds of services. ### 6. Human Takeover Real-time dashboard for monitoring conversations and enabling seamless human agent intervention when needed. ### 7. Sensing System Automatic message analysis for: - Sentiment analysis (positive/negative/neutral) - Content moderation - Business intent extraction - Lead qualification ### 8. Bot Memory Persistent knowledge storage for individual bots, enabling information retention across conversations and personalized user experiences. ### 9. Multi-Channel Support - **Web Widget:** Embeddable chat widget for websites - **WhatsApp:** Business messaging integration - **Email:** Email-based conversation handling - **API:** Direct API access for custom integrations ## API Overview ### OpenAI-Compatible API ``` POST /api/openai/v1/chat/completions - Chat completions (streaming supported) GET /api/openai/v1/models - List available models ``` ### Bot Memory API ``` POST /api/bot-memory/{bot_id}/memories - Store memory GET /api/bot-memory/{bot_id}/memories - List all memories GET /api/bot-memory/{bot_id}/memories/{key} - Get specific memory PUT /api/bot-memory/{bot_id}/memories/{key} - Update memory DELETE /api/bot-memory/{bot_id}/memories/{key} - Delete memory ``` ### Virtual Bots API ``` POST /api/virtual-bots - Create virtual bot persona GET /api/virtual-bots - List virtual bots POST /api/virtual-bots/{bot_id}/opinion - Get opinion from virtual bot POST /api/virtual-bots/ab-test - A/B test with multiple personas ``` ### Chat Endpoints ``` GET /answer - Chat completions POST /api/text-to-speech - Text-to-speech conversion POST /api/voice_transcribe - Voice transcription (speech-to-text) ``` For complete API documentation, see [docs/API.md](docs/API.md). ## Security & Compliance - SQL injection prevention with parameterized queries - XSS protection with automatic template escaping - Secure session management - Rate limiting per endpoint and user - Environment-based secret management - HTTPS enforced in production - GDPR-compliant data handling ## Internationalization The platform supports multiple languages: - English (EN) - German (DE) - French (FR) All user-facing text is translatable via Flask-Babel. ## External Integrations - **LLM Providers:** OpenAI, Anthropic, Google, Mistral, Grok, vLLM, Ollama - **Vector Database:** Weaviate - **Workflow Automation:** n8n - **Communication:** Brevo (SMS/Email), Twilio - **CRM:** Brevo, HubSpot - **Payments:** PayPal, Stripe - **Authentication:** Google OAuth - **Monitoring:** Langfuse (LLM observability), Sentry (error tracking) - **Messaging:** WhatsApp (WHAPI), Discord ## Documentation & API Reference **Live API Documentation (OpenAPI/Swagger):** - OpenAI-Compatible API: `https://hybridai.one/v1/openai/openapi.json` - Bot Memory API: `https://hybridai.one/v1/bot-memory/openapi.json` - Virtual Bots API: `https://hybridai.one/api/v1/virtual-bots/openapi.json` **Product Documentation:** - `https://hybridai.one/documentation` - Full documentation ## License Proprietary - All rights reserved ## Contact - **Company:** HybridAI - **Email:** support@hybridai.one - **Website:** https://hybridai.one