SuiAgentic

by AnhQuan2004
  • Linux
  • Apple

Integrations

  • Uses .env files for configuration management of connection parameters and application settings

  • Supports Docker for running the Qdrant vector database component, simplifying deployment and setup

  • Built on FastAPI to provide REST API endpoints for document embedding and semantic retrieval capabilities

🧠 SuiAgentic

SuiAgentic is a FastAPI-based application for document embedding and semantic retrieval, powered by the Qdrant vector database. It enables you to convert documents (from URLs or local files) into embeddings, store them efficiently, and retrieve relevant content using natural language queries. It is designed to support AI-enhanced tools like Cursor, Copilot, Claude, and other MCP-compatible clients.

💡 Why SuiAgentic? Many organizations need to integrate context from internal documents (e.g., PRDs, design specs, wikis) into tools used by developers and knowledge workers. However, consolidating documents from various sources into a centralized, searchable knowledge base is complex and fragmented.

SuiAgentic solves this by providing a centralized context server that ingests, chunks, embeds, and indexes your content—making it available via a simple REST API and web interface. It also supports being used as an MCP server for AI agents.

🚀 Key Features Document Embedding: Extracts content from URLs (with or without authentication), splits it into chunks, generates embeddings, and stores them in Qdrant.

Semantic Search: Query your knowledge base with natural language and retrieve relevant chunks or documents.

Web UI: Easy-to-use web interface for embedding and searching.

REST API: Fully accessible via HTTP endpoints for automation or integration.

MCP Server Ready: Use it with MCP-compatible clients like Cursor, Copilot, Claude, etc.

Authentication Support: Supports Basic Auth and Bearer Token for protected documents.

⚙️ Quick Start

  1. Clone the Repository
git clone https://github.com/AnhQuan2004/mcp_agent.git cd mcp_agent
  1. Set up Python Environment
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
  1. Install Dependencies
pip install -r requirements.txt
  1. Create .env file (or use the provided .env.example)
QDRANT_URL=localhost QDRANT_PORT=6333 QDRANT_COLLECTION_NAME=documents
  1. Start Qdrant (Vector DB)

Using Docker:

docker run -p 6333:6333 qdrant/qdrant

Or using the helper script:

./runqdrant.sh
  1. Run the Agentic App
uvicorn app.main:app --reload # or: python run.py

Visit http://localhost:8000

🌐 Web Interface & API

Web UI:

  • / — Home
  • /embed — Embed documents via UI
  • /retrieve — Semantic search UI

🔍 POST /retrieve

{ "query": "What is the architecture of Sui?", "top_k": 5, "group_by_doc": true }

🌍 Embedding from URLs

Public URLs:

  • Just provide the URL via the API or UI — no auth needed.

🤖 Using as an MCP Server

To use sui as an MCP server:

{ "mcpServers": { "suiAgentic": { "url": "http://localhost:8000/mcp" } } }

Document Upload Tools

This directory contains tools to bulk upload documents to your SuiAgentic Qdrant database.

Available Tools

  1. upload_folder.py - A simple script to upload PDF files from a folder
  2. upload_documents.py - An advanced script to upload PDF, DOCX, and TXT files with more options

Prerequisites

  • Python 3.8+
  • SuiAgentic application installed and configured
  • Qdrant server running locally or accessible via network
  • Required dependencies installed (PyPDF2, python-docx)

Basic Usage

Upload PDF Files from a Folder

# Upload all PDFs from a folder python upload_folder.py /path/to/pdf/folder # Upload with a prefix (useful for categorizing documents) python upload_folder.py /path/to/pdf/folder --prefix "Research Papers"

Advanced Document Upload

# Upload all supported documents from a folder and subfolders python upload_documents.py /path/to/documents --recursive # Add metadata tags to all documents python upload_documents.py /path/to/documents --tag category=research --tag project=alpha # Specify collection name (if not using default) python upload_documents.py /path/to/documents --collection my_collection # Complete example with all options python upload_documents.py /path/to/documents --recursive --prefix "Project X" --tag department=marketing --tag status=final

What These Tools Do

  1. Find supported documents in the specified folder
  2. Extract text content from each document
  3. Split text into manageable chunks
  4. Generate 3072-dimensional embeddings for each chunk
  5. Store chunks and embeddings in Qdrant
  6. Track metadata for each document

Command-line Arguments

upload_folder.py

  • folder - Path to the folder containing PDF files
  • --prefix - Prefix to add to document names

upload_documents.py

  • folder - Path to the folder containing documents
  • --prefix - Prefix to add to document names
  • --recursive - Search for files recursively in subfolders
  • --collection - Name of the Qdrant collection to use
  • --tag - Add metadata tags to documents (can be used multiple times: --tag key=value)

Examples

Organize documents by project

python upload_documents.py /path/to/projects/project1 --recursive --prefix "Project 1" --tag project=alpha python upload_documents.py /path/to/projects/project2 --recursive --prefix "Project 2" --tag project=beta

Categorize documents

python upload_documents.py /path/to/contracts --prefix "Legal" --tag department=legal --tag confidential=true python upload_documents.py /path/to/manuals --prefix "Technical" --tag department=engineering

Troubleshooting

  • If you encounter memory errors with large documents, try breaking them into smaller files
  • For large collections of documents, consider processing in smaller batches
  • Check the log output for any errors during processing

🪪 License

Licensed under the Apache License 2.0.

-
security - not tested
F
license - not found
-
quality - not tested

A FastAPI-based application that enables document embedding and semantic retrieval using Qdrant vector database, allowing users to convert documents into embeddings and retrieve relevant content through natural language queries.

  1. Available Tools
    1. Prerequisites
      1. Basic Usage
        1. Upload PDF Files from a Folder
        2. Advanced Document Upload
      2. What These Tools Do
        1. Command-line Arguments
          1. upload_folder.py
          2. upload_documents.py
        2. Examples
          1. Organize documents by project
          2. Categorize documents
        3. Troubleshooting

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            Enables LLMs to perform semantic search and document management using ChromaDB, supporting natural language queries with intuitive similarity metrics for retrieval augmented generation applications.
            Last updated -
            Python
            • Apple
          • -
            security
            A
            license
            -
            quality
            Provides RAG capabilities for semantic document search using Qdrant vector database and Ollama/OpenAI embeddings, allowing users to add, search, list, and delete documentation with metadata support.
            Last updated -
            5
            4
            TypeScript
            Apache 2.0
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables semantic search capabilities by providing tools to manage Qdrant vector database collections, process and embed documents using various embedding services, and perform semantic searches across vector embeddings.
            Last updated -
            89
            TypeScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            Enables semantic search across multiple Qdrant vector database collections, supporting multi-query capability and providing semantically relevant document retrieval with configurable result counts.
            Last updated -
            46
            TypeScript
            MIT License

          View all related MCP servers

          ID: k89urpzdu5