# AutoFlow

> An open-source Graph RAG-based conversational knowledge base tool built on TiDB Vector Storage, LlamaIndex, and DSPy.

AutoFlow is an open-source Graph RAG (knowledge graph RAG) knowledge base tool developed by PingCAP, the team behind TiDB. It is available as a live demo at tidb.ai and can be self-hosted via Docker Compose. The project is licensed under Apache 2.0 and is actively developed on GitHub, where it has accumulated over 2,800 stars.

## What It Is

AutoFlow is a conversational search and knowledge base platform that combines knowledge graph-based retrieval-augmented generation (GraphRAG) with vector search. It is built on top of TiDB Serverless Vector Storage, LlamaIndex (a RAG framework), and DSPy (Stanford's framework for programming foundation models). The result is a system that can ingest documentation or website content, build a knowledge graph, and answer user questions through a Perplexity-style conversational interface.

## Core Features

- **Perplexity-style conversational search**: A built-in website crawler navigates official and documentation sites, scraping sitemap URLs to build a comprehensive, searchable knowledge base.
- **Embeddable JavaScript widget**: A simple JS snippet can be embedded into any website, placing a conversational search window (typically bottom-right) that answers product-related queries instantly.
- **Knowledge graph RAG**: Combines vector search with knowledge graph traversal for more contextually accurate retrieval than standard RAG pipelines.
- **Hybrid search support**: Supports vector search, full-text search, and hybrid search via the PyTiDB SDK.

## Tech Stack and Architecture

AutoFlow's architecture is built around several key components:
- **TiDB** – Serves as the unified database for chat history, vector embeddings, JSON data, and analytics
- **LlamaIndex** – Provides the RAG framework layer
- **DSPy** – Enables programmatic (not just prompt-based) control of foundation models
- **Next.js** – Powers the frontend
- **Tailwind CSS + shadcn/ui** – Handles styling and UI components

The backend and frontend are each published as separate Docker images (`tidbai/backend` and `tidbai/frontend`), and the recommended self-hosted deployment requires 4 CPU cores and 8 GB RAM via Docker Compose.

## Deployment Model

AutoFlow is designed for self-hosted deployment. The primary path is Docker Compose, with deployment documentation available at autoflow.tidb.ai. The live demo at tidb.ai demonstrates the tool answering questions about TiDB's own documentation. A public API is also exposed at tidb.ai/api-docs.

## Update: Version 0.4.0

The latest release is version 0.4.0, published on January 3, 2025. The project README notes that AutoFlow is still in early stages of development, with the team actively working toward packaging it as a Python installable (`pip install autoflow-ai`) to make it a more accessible RAG solution. The repository was last pushed to in April 2026, indicating ongoing maintenance activity.

## Features
- Graph RAG (knowledge graph-based retrieval-augmented generation)
- Perplexity-style conversational search interface
- Built-in website crawler with sitemap scraping
- Embeddable JavaScript widget for websites
- Vector search, full-text search, and hybrid search
- TiDB Serverless Vector Storage integration
- LlamaIndex RAG framework integration
- DSPy foundation model programming
- Docker Compose self-hosted deployment
- Public REST API
- Chat history storage
- Knowledge graph construction from documentation

## Integrations
TiDB, TiDB Cloud Serverless, LlamaIndex, DSPy, Next.js, PyTiDB, Docker, Docker Compose

## Platforms
WEB, API, CLI

## Pricing
Open Source

## Version
0.4.0

## Links
- Website: https://tidb.ai
- Documentation: https://autoflow.tidb.ai
- Repository: https://github.com/pingcap/autoflow
- EveryDev.ai: https://www.everydev.ai/tools/autoflow-tidb-ai
