{"id":"c5ec2682-e2ba-4b0a-9920-922026f1139d","entityType":"agent","slug":"crewai-marwanabdellah-arabmedrag","name":"ArabMedRAG","canonicalUrl":"https://www.xpersona.co/agent/crewai-marwanabdellah-arabmedrag","canonicalPath":"/agent/crewai-marwanabdellah-arabmedrag","generatedAt":"2026-10-09T17:03:37.582Z","source":"GITHUB_REPOS","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T03:20:45.792Z","emptyReason":null},"description":"Production Arabic medical chatbot powered by a 6-agent CrewAI pipeline, hybrid RAG (FAISS + BM25), grounded on 341,476 Arabic medical Q&A pairs, with Streamlit, FastAPI, and Telegram interfaces. 🏥 ArabMedRAG - Arabic Medical AI Assistant $1 $1 $1 $1 $1 **ArabMedRAG** is a production-ready Arabic Medical Chatbot powered by CrewAI, Hybrid RAG (FAISS + BM25), and AraBERT/E5 embeddings, grounded on 341,476 Arabic medical Q&A pairs. It routes user queries through six AI agents — language detection, medical classification, hybrid retrieval, citation grounding, Arabic response generation, and hallucination detecti","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1 GitHub stars reported by the source. Last updated 10/9/2026.","installCommand":null,"sourceUrl":"https://github.com/MarwanAbdellah/ArabMedRAG","homepage":null,"primaryLinks":[{"label":"View Source","url":"https://github.com/MarwanAbdellah/ArabMedRAG","kind":"source"}],"safetyScore":66,"overallRank":22,"popularityScore":8,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Production Arabic medical chatbot powered by a 6-agent CrewAI pipeline, hybrid RAG (FAISS + BM25), grounded on 341,476 Arabic medical Q&A pairs, with Streamlit,"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T03:20:45.792Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[{"label":"crewai","status":"self-declared"},{"label":"multi-agent","status":"self-declared"}],"verifiedCount":0,"selfDeclaredCount":3,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"},{"key":"crewai","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"multi-agent","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile capability:crewai|supported|profile capability:multi-agent|supported|profile"}},"adoption":{"evidence":{"source":"GITHUB REPOS","verified":false,"confidence":"medium","updatedAt":"2026-10-09T03:20:45.792Z","emptyReason":null},"stars":1,"forks":2,"downloads":null,"packageName":null,"latestVersion":null,"tractionLabel":"1 GitHub stars"},"release":{"evidence":{"source":"agent-index","verified":false,"confidence":"medium","updatedAt":"2026-10-09T03:20:45.776Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T03:20:45.792Z","lastCrawledAt":"2026-10-09T03:20:45.776Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-16T03:20:45.776Z","lastVerifiedAt":null,"highlights":[]},"execution":{"evidence":{"source":"GITHUB REPOS","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":null,"setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"GITHUB_REPOS","generatedAt":"2026-10-09T17:03:37.582Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/crewai-marwanabdellah-arabmedrag/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"GITHUB REPOS","verified":false,"confidence":"high","updatedAt":"2026-10-09T03:20:45.792Z","emptyReason":null},"readme":"# 🏥 ArabMedRAG - Arabic Medical AI Assistant\n\n[![Python](https://img.shields.io/badge/Python-3.10-blue.svg)](https://www.python.org/)\n[![CrewAI](https://img.shields.io/badge/CrewAI-0.80-red.svg)](https://crewai.com/)\n[![FAISS](https://img.shields.io/badge/FAISS-VectorDB-green.svg)](https://github.com/facebookresearch/faiss)\n[![FastAPI](https://img.shields.io/badge/FastAPI-0.104-teal.svg)](https://fastapi.tiangolo.com/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n**ArabMedRAG** is a production-ready Arabic Medical Chatbot powered by CrewAI, Hybrid RAG (FAISS + BM25), and AraBERT/E5 embeddings, grounded on 341,476 Arabic medical Q&A pairs. It routes user queries through six AI agents — language detection, medical classification, hybrid retrieval, citation grounding, Arabic response generation, and hallucination detection — and is accessible via a Streamlit web UI, a FastAPI REST API, and a Telegram bot.\n\n---\n\n## ✨ Key Features\n\n### 🎯 1. Multi-Agent CrewAI Pipeline\n- Six agents run sequentially: Language Detection → Medical Classification → Hybrid Retrieval → Citation Grounding → Arabic Medical Response → Hallucination Detection.\n- Emergency routing instantly responds to life-threatening symptoms (chest pain, difficulty breathing, loss of consciousness, stroke, severe bleeding) with a fast-path Arabic alert.\n\n### ⚡ 2. Hybrid RAG (FAISS + BM25)\n- Vector search (FAISS `IndexFlatIP`, cosine similarity) always runs first for top-5 results.\n- BM25 keyword search (rank-bm25) kicks in as a fallback when max similarity < 0.50; results are merged, deduplicated, and reranked.\n\n### 🔍 3. Grounded, Cited, Verified Answers\n- Citation Grounding Agent formats numbered citations from retrieved chunks.\n- Hallucination Detection Agent checks content-word overlap and flags unsupported claims.\n\n### 📊 4. Web UI, REST API & Telegram Bot\n- Streamlit web app with Arabic RTL chat interface, live pipeline progress, session stats, and retrieval-mode selector (rag / bm25 / internet / hybrid / all).\n- FastAPI server (`api_server.py`) with X-API-Key authentication and `/api/v1/query`, `/api/v1/health`, and `/api/v1/categories` endpoints.\n- Optional `telegram_bot/` interface using python-telegram-bot.\n\n---\n\n## 🏗️ System Architecture\n\n```mermaid\ngraph TD\n    A[User Arabic Query] --> B[Language Detection Agent]\n    B --> C[Medical Classification Agent]\n    C --> D{Emergency Detected?}\n    D -->|Yes| E[Immediate Emergency Alert]\n    D -->|No| F[Hybrid Retrieval Agent FAISS + BM25]\n    F --> G[Citation Grounding Agent]\n    G --> H[Arabic Medical Response Agent]\n    H --> I[Hallucination Detection Agent]\n    I --> J[Final Arabic Answer + Citations + Disclaimer]\n```\n\n---\n\n## 🛠️ Technology Stack\n\n### Backend / Core\n- **Language**: Python 3.10 (conda/pip)\n- **Agent Framework**: CrewAI ≥ 0.80\n- **LLM**: Any API-based or local LLM via LiteLLM (e.g. `groq/llama-3.3-70b-versatile`, Qwen, Ollama)\n\n### Data & Processing\n- **Embeddings**: AraBERT (`aubmindlab/bert-base-arabertv2`) / E5 base via SentenceTransformers\n- **Vector Store**: FAISS `IndexFlatIP` (cosine similarity)\n- **Keyword Search**: BM25 (`rank-bm25`)\n- **Dataset**: 341,476 Arabic medical Q&A pairs (`data/concatenated_df.csv`) with 500-token chunks / 100-token overlap\n\n### Frontend / Interface\n- **Web UI**: Streamlit (RTL Arabic chat interface)\n- **REST API**: FastAPI + uvicorn with API-key auth and CORS\n- **Telegram Bot**: python-telegram-bot (webhooks)\n- **Tracing**: MLflow (optional GenAI tracing)\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n- **Python 3.10**\n- **LLM API key** (any provider supported by LiteLLM, or a local Ollama model)\n- Optional: **Serper API key** for internet search mode\n\n### 1. Repository Setup\n```bash\ngit clone https://github.com/MarwanAbdellah/ArabMedRAG.git\ncd ArabMedRAG\n```\n\n### 2. Install Dependencies\n```bash\npip install -r requirements.txt\n```\n\n### 3. Configure Environment\nCopy the example environment file and edit the values:\n```bash\ncp .env.example .env\n```\n```env\nLLM_MODEL=groq/llama-3.3-70b-versatile\nLLM_API_KEY=your_api_key_here\nEMBEDDING_MODEL=aubmindlab/bert-base-arabertv2\nTOP_K=5\nVECTOR_THRESHOLD=0.50\nDATA_PATH=data/concatenated_df.csv\nAPI_KEYS=med-api-key-change-me-123\n```\n\n### 4. Build the Search Indexes\n```bash\n# Quick test - sample 1,000 rows (~2 min)\npython src/medical_chatbot/rag/build_index.py --sample 1000\n\n# Full dataset - 341,476 rows (~20-30 min on CPU)\npython src/medical_chatbot/rag/build_index.py\n```\n\n### 5. Run\n```bash\n# Web UI (recommended)\nstreamlit run app.py\n\n# CLI - interactive mode\npython src/medical_chatbot/main.py\n\n# CLI - single query\npython src/medical_chatbot/main.py --query \"ما هي أعراض ارتفاع ضغط الدم؟\"\n\n# REST API\nuvicorn api_server:app --host 0.0.0.0 --port 8000\n```\n\n---\n\n## 🧪 Testing & Verification\n\nThere are no unit tests in this repository. Verify the system by:\n1. Building the indexes with `--sample 1000` and confirming `indexes/faiss_index.bin`, `indexes/bm25_index.pkl`, and `indexes/metadata.pkl` are generated.\n2. Running a single CLI query (`python src/medical_chatbot/main.py --query \"...\"`) and checking the answer includes citations and the medical disclaimer.\n3. Checking the API health endpoint: `curl http://localhost:8000/api/v1/health`.\n\n---\n\n## 📁 Project Structure\n\n```text\nArabMedRAG/\n├── app.py                          # Streamlit web UI\n├── api_server.py                   # FastAPI REST API\n├── requirements.txt                # Pip dependencies\n├── .env.example                    # Environment template\n├── .github/workflows/deploy.yml    # Deployment workflow\n├── TECHNICAL_DOCS.md               # Technical documentation\n├── demo/                           # Demo video + screenshots\n├── telegram_bot/\n│   ├── bot.py                      # Telegram bot interface\n│   └── requirements.txt            # Bot-specific dependency\n└── src/medical_chatbot/\n    ├── config/\n    │   ├── agents.yaml             # 6 agent definitions\n    │   └── tasks.yaml              # 6 task definitions\n    ├── rag/\n    │   ├── document_loader.py      # CSV → MedicalDocument objects\n    │   ├── chunking.py             # 500-token chunks / 100 overlap\n    │   ├── embedding_pipeline.py   # SentenceTransformers embedder\n    │   ├── vector_store.py         # FAISS index\n    │   ├── keyword_index.py        # BM25 index\n    │   └── build_index.py          # One-shot index builder CLI\n    ├── tools/\n    │   ├── language_detection_tool.py\n    │   ├── classifier_tool.py\n    │   ├── hybrid_search_tool.py\n    │   ├── citation_tool.py\n    │   ├── hallucination_checker_tool.py\n    │   └── disease_entity_extractor.py\n    ├── cache.py                    # Response caching\n    ├── crew.py                     # CrewAI crew: arabic_chatbot\n    └── main.py                     # CLI entrypoint\n```\n\n---\n\n## 👤 Author\n\n**Marwan Abdellah**\n- **GitHub**: [@MarwanAbdellah](https://github.com/MarwanAbdellah)\n- **LinkedIn**: [Marwan Abdellah](https://www.linkedin.com/in/marwan-abdellah/)\n\n---\n\n## 📄 License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n","readmeExcerpt":"🏥 ArabMedRAG - Arabic Medical AI Assistant $1 $1 $1 $1 $1 **ArabMedRAG** is a production-ready Arabic Medical Chatbot powered by CrewAI, Hybrid RAG (FAISS + BM25), and AraBERT/E5 embeddings, grounded on 341,476 Arabic medical Q&A pairs. It routes user queries through six AI agents — language detection, medical classification, hybrid retrieval, citation grounding, Arabic response generation, and hallucination detecti","codeSnippets":[],"executableExamples":[{"language":"mermaid","snippet":"graph TD\n    A[User Arabic Query] --> B[Language Detection Agent]\n    B --> C[Medical Classification Agent]\n    C --> D{Emergency Detected?}\n    D -->|Yes| E[Immediate Emergency Alert]\n    D -->|No| F[Hybrid Retrieval Agent FAISS + BM25]\n    F --> G[Citation Grounding Agent]\n    G --> H[Arabic Medical Response Agent]\n    H --> I[Hallucination Detection Agent]\n    I --> J[Final Arabic Answer + Citations + Disclaimer]"},{"language":"bash","snippet":"git clone https://github.com/MarwanAbdellah/ArabMedRAG.git\ncd ArabMedRAG"},{"language":"bash","snippet":"pip install -r requirements.txt"},{"language":"bash","snippet":"cp .env.example .env"},{"language":"env","snippet":"LLM_MODEL=groq/llama-3.3-70b-versatile\nLLM_API_KEY=your_api_key_here\nEMBEDDING_MODEL=aubmindlab/bert-base-arabertv2\nTOP_K=5\nVECTOR_THRESHOLD=0.50\nDATA_PATH=data/concatenated_df.csv\nAPI_KEYS=med-api-key-change-me-123"},{"language":"bash","snippet":"# Quick test - sample 1,000 rows (~2 min)\npython src/medical_chatbot/rag/build_index.py --sample 1000\n\n# Full dataset - 341,476 rows (~20-30 min on CPU)\npython src/medical_chatbot/rag/build_index.py"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[],"languages":["python"],"docsSourceLabel":"GITHUB REPOS","editorialOverview":"Production Arabic medical chatbot powered by a 6-agent CrewAI pipeline, hybrid RAG (FAISS + BM25), grounded on 341,476 Arabic medical Q&A pairs, with Streamlit, FastAPI, and Telegram interfaces. 🏥 ArabMedRAG - Arabic Medical AI Assistant $1 $1 $1 $1 $1 **ArabMedRAG** is a production-ready Arabic Medical Chatbot powered by CrewAI, Hybrid RAG (FAISS + BM25), and AraBERT/E5 embeddings, grounded on 341,476 Arabic medical Q&A pairs. It routes user queries through six AI agents — language detection, medical classification, hybrid retrieval, citation grounding, Arabic response generation, and hallucination detecti","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":370,"uniquenessScore":68,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T03:20:45.792Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T03:20:45.792Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:03:37.582Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/github_repos","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}