AI Agent Hub
Back to skills
RAGFlow Knowledge DB Assistant icon

RAGFlow Knowledge DB Assistant

Knowledge Management Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please install @user_3bdd14fe/3039dc63-d846-4c9d-a392-35c306448cfb following https://skillhub.cn/install/skillhub.md.

About this skill

Problem

RAGFlow is an open-source RAG knowledge-base system, but common workflows still require separate scripts for uploading documents, maintaining knowledge bases, calling retrieval endpoints, and persisting records into a database. ragflow-knowledge-db targets that glue-code problem: it covers RAGFlow API operations such as knowledge-base management, document upload, retrieval, and RAG chat, while also storing document, task, and report data in SQLite or MySQL for later querying and reuse.

How It Works

The skill provides two clients: scripts/ragflow_client.py for RAGFlow API operations and scripts/db_client.py for database interaction. Before use, you configure the RAGFlow endpoint, API key, and database connection. Core capabilities include:

  • Knowledge-base management: list, create, and delete knowledge bases for multiple document domains.
  • Document management: upload and delete supported files, including PDF, DOCX, PPTX, XLSX, TXT, MD, JSON, CSV, and images.
  • Retrieval and chat: run simple retrieval or use simple_chat to return formatted context and prompts for LLM integration.
  • Database management: initialize the schema, sync documents from RAGFlow, and manage research tasks and reports.

A common workflow is to read knowledge-base and document state from RAGFlow, persist the relevant records locally, then use retrieved context to build prompts without repeatedly hand-writing API calls.

Limits and Notes

This skill is best treated as tooling around RAGFlow rather than a replacement for the system itself. Keep these points in mind:

  • Check client.available and wrap API calls in error handling so service issues are not mistaken for business failures.
  • Store the API key in environment variables instead of committing it to code.
  • Large uploads may need longer timeouts.
  • Use meaningful document names to make synchronization, retrieval, and troubleshooting easier.

Use Cases

  • Connect to RAGFlow, create knowledge bases, and upload PDF, Word, or Excel documents for project archives.
  • Maintain a RAGFlow document set by listing documents and removing expired contracts or old guides.
  • Call simple_chat to retrieve knowledge-base context and prompts for passing to an LLM.
  • Store RAGFlow-synced documents, research tasks, and reports in SQLite for later querying.

Best For

  • Engineers maintaining RAGFlow knowledge bases who need bulk document upload and expired-content cleanup.
  • Developers building RAG apps who need retrieved context and prompts for LLM integration.
  • Product or ops managers handling research data who need tasks and reports synced to SQLite for querying.
  • Backend engineers integrating knowledge management who need RAGFlow API state persisted to a database.