AI agents are powerful, but they are also notoriously unreliable. They hallucinate facts, forget previous conversations, and struggle to reason over complex, multi-page documents. The reason? They lack a proper memory system. They lack a Native Database.
RAGFlow Agent Native Database is the solution. This is a cutting-edge, open-source repository that provides a complete, production-ready infrastructure for building AI agents with deep document understanding. It is not just a simple vector database; it is a full RAG (Retrieval-Augmented Generation) pipeline.
This repository includes a document parser for PDFs, Word files, and images. It features a sophisticated chunking engine that preserves the semantic structure of your documents. It also includes a hybrid search system that combines vector similarity with keyword matching. It is the ultimate toolkit for developers building the next generation of autonomous, knowledge-grounded AI agents.
We have structured the toolkit to cover every aspect of the RAG pipeline.
| Layer | Description | Technology |
|---|---|---|
| Ingestion | Parses and chunks your documents | Python, Unstructured.io |
| Storage | Stores embeddings and metadata | Qdrant, PostgreSQL |
| Retrieval | Finds the most relevant context | Hybrid Search, BM25 |
| Feature | Description |
|---|---|
| Deep Document Parsing | Extracts tables, images, and text from complex PDFs |
| Semantic Chunking | Splits documents by meaning, not just character count |
| Hybrid Search | Combines vector similarity with keyword search for accuracy |
| Agent Integration | Native support for LangChain, AutoGen, and CrewAI |
| Multi-Modal | Supports text, images, and tables in the same knowledge base |
| Open Source | Fully transparent, Apache 2.0 licensed, and free to use |
You will need Docker, Python 3.10+, and an OpenAI API key (or a local embedding model).
# Step 1: Clone the repository
git clone https://github.com/your-username/ragflow-agent-native-database.git
# Step 2: Navigate into the directory
cd ragflow-agent-native-database
# Step 3: Launch the stack with Docker Compose
docker-compose up -d
# Step 4: Access the web UI
# Navigate to http://localhost:8080Once the UI loads, you can create a new knowledge base, upload your PDFs, and start querying your documents. The agent will use the retrieved context to answer your questions with citations.
Why is hybrid search better than pure vector search? Because vector search is bad at finding exact matches.
Imagine you are searching for a specific invoice number: "INV-2024-001". A vector search might return a document about "invoices" in general, but it might miss the exact number. Keyword search (BM25) will find the exact match.
Our system runs both searches simultaneously. It then merges the results using a Reciprocal Rank Fusion (RRF) algorithm. This ensures you get the best of both worlds: the semantic understanding of vectors and the precision of keywords.
We believe that AI agents should be reliable and grounded in facts. If you have improved the chunking engine, added support for a new file format, or found a bug in the retrieval logic, we welcome your contributions!
- Fork the repository.
- Create your feature branch (
git checkout -b feature/new-parser). - Commit your changes (
git commit -m 'Add new parser'). - Push to the branch (
git push origin feature/new-parser). - Open a Pull Request.
Please read our CONTRIBUTING.md for detailed coding standards and testing requirements. We also have an active Discord server where you can share your RAG pipelines, ask for help with document parsing, and discuss the latest trends in agentic AI.
- π¬ Discussions: Join the conversation in the GitHub Discussions tab.
- π Issues: Found a bug? Let us know via the Issues tracker.
- π§ Email: Reach out directly at support@ragflow.dev.