MCPcopy Index your code
hub / github.com/apconw/Aix-DB

github.com/apconw/Aix-DB @v1.2.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.4 ↗ · + Follow
3,272 symbols 11,358 edges 291 files 768 documented · 23% updated 15d agov1.2.4 · 2026-04-11★ 2,1886 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Aix-DB

Aix-DB - LLM Data Assistant

An intelligent data analytics system powered by Large Language Models and RAG technology, enabling conversational data analysis (ChatBI) for rapid data extraction and visualization

Release Version GitHub Stars License Docker Pulls

简体中文 | English

🚀 Looking for Enterprise AI Solutions?

AiX-Bot

Our commercial product with powerful enterprise features:

Private Deployment · Custom Development · Dedicated Support · Multi-scenario AI Applications

👇 Click to Experience Now 👇

AI Chat Data Q&A Report Generation

💼 For business inquiries, please contact us via WeChat (note "Business Cooperation") | Contact Us

Aix-DB is built on the LangChain/LangGraph framework, combined with MCP Skills multi-agent collaboration architecture, enabling end-to-end transformation from natural language to data insights.

Core Capabilities: General Q&A · Data Q&A (Text2SQL) · Spreadsheet Q&A · Deep Research · Data Visualization · MCP Multi-Agent

Product Features: 📦 Ready to Use · 🔒 Secure & Controllable · 🔌 Easy Integration · 🎯 Increasingly Accurate


Demo Video

🎯 Skill Mode 💬 Standard Mode

System Architecture

System Architecture

Layered Architecture Design:

  • Frontend Layer: Modern web interface built with Vue 3 + TypeScript, integrated with ECharts and AntV visualization components
  • API Gateway Layer: High-performance async API service based on Sanic, providing RESTful interfaces and JWT authentication
  • Intelligent Service Layer: LLM services, Text2SQL Agent, RAG retrieval engine, MCP multi-agent collaboration
  • Data Storage Layer: Support for multiple database types including relational databases, vector databases, graph databases, and file storage

Supported Data Sources

Data Q&A Workflow

Step Module Description
1 User Input User asks data query questions in natural language
2 LLM Intent Understanding LLM parses question intent, extracts key entities and query conditions
3 RAG Knowledge Retrieval Embedding + BM25 hybrid retrieval, combined with Neo4j graph to obtain relevant table structures and business knowledge
4 SQL Generation Text2SQL engine generates SQL statements with syntax validation and optimization
5 Database Execution Execute SQL on target data source, supporting 8+ database types
6 Visualization Automatically generate ECharts/AntV charts to present analysis results

Quick Start

Deploy with Docker (Recommended)

docker run -d \
  --name aix-db \
  --restart unless-stopped \
  -e TZ=Asia/Shanghai \
  -e SERVER_HOST=0.0.0.0 \
  -e SERVER_PORT=8088 \
  -e SERVER_WORKERS=2 \
  -e LANGFUSE_TRACING_ENABLED=false \
  -e LANGFUSE_SECRET_KEY= \
  -e LANGFUSE_PUBLIC_KEY= \
  -e LANGFUSE_BASE_URL= \
  -p 18080:80 \
  -p 18088:8088 \
  -p 15432:5432 \
  -p 9000:9000 \
  -p 9001:9001 \
  -v ./volume/pg_data:/var/lib/postgresql/data \
  -v ./volume/minio/data:/data \
  -v ./volume/logs/supervisor:/var/log/supervisor \
  -v ./volume/logs/nginx:/var/log/nginx \
  -v ./volume/logs/aix-db:/var/log/aix-db \
  -v ./volume/logs/minio:/var/log/minio \
  -v ./volume/logs/postgresql:/var/log/postgresql \
  --add-host host.docker.internal:host-gateway \
  crpi-7xkxsdc0iki61l0q.cn-hangzhou.personal.cr.aliyuncs.com/apconw/aix-db:1.2.3

Note: To enable Langfuse full-chain tracing, set LANGFUSE_TRACING_ENABLED=true and configure the corresponding keys and URL.

Deploy with Docker Compose

git clone https://github.com/apconw/Aix-DB.git
cd Aix-DB/docker
cp .env.template .env  # Copy env template, modify as needed
docker-compose up -d

Access the System

Web Management Interface - URL: http://localhost:18080 - Username: admin - Password: 123456

PostgreSQL Database - Connection: localhost:15432 - Database: aix_db - Username: aix_db - Password: 1

Local Development

① Clone the Repository

git clone https://github.com/apconw/Aix-DB.git
cd Aix-DB

② Start Middleware Dependencies (PostgreSQL, MinIO, etc.)

cd docker
docker-compose up -d

③ Configure Environment Variables

Edit .env.dev in the project root to set database connection, MinIO address, etc. (default config works out of the box)

④ Install Python Dependencies (requires Python 3.11)

# Option 1: pip
pip install -r requirements.txt

# Option 2: uv (recommended, faster)
uv venv --python 3.11
source .venv/bin/activate
uv sync

⑤ Start Backend Service

python serv.py

⑥ Start Frontend Dev Server (in another terminal)

cd web
npm install
npm run dev

Tech Stack

Backend: Sanic · SQLAlchemy · LangChain/LangGraph · Neo4j · FAISS/Chroma · MinIO

Frontend: Vue 3 · TypeScript · Vite 5 · Naive UI · ECharts · AntV

AI Models: OpenAI · Anthropic · DeepSeek · Qwen · Ollama


Documentation


Contributing

We welcome Issues and Pull Requests!

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact Us

If you have any questions, feel free to reach out:


Star History

Star History Chart


License

This project is licensed under the Apache License 2.0.

Extension points exported contracts — how you extend this code

ComponentCustomProperties (Interface)
*
web/src/types/index.d.ts
GlobalComponents (Interface)
(no doc)
web/components.d.ts
GlobalComponents (Interface)
(no doc)
web/auto-imports.d.ts
ImportMetaEnv (Interface)
(no doc)
web/src/env.d.ts
ComponentCustomProperties (Interface)
(no doc)
web/auto-imports.d.ts
ImportMeta (Interface)
(no doc)
web/src/env.d.ts
Window (Interface)
(no doc)
web/src/env.d.ts
Window (Interface)
(no doc)
web/src/types/global.d.ts

Core symbols most depended-on inside this repo

get
called by 998
web/src/types/index.d.ts
push
called by 233
web/public/pdfjs-4.10.38-dist/web/viewer.mjs
exists
called by 120
common/redis_tool.py
next
called by 110
web/public/pdfjs-4.10.38-dist/web/viewer.mjs
_on
called by 93
web/public/pdfjs-4.10.38-dist/web/viewer.mjs
dispatch
called by 75
web/public/pdfjs-4.10.38-dist/web/viewer.mjs
reset
called by 69
web/public/pdfjs-4.10.38-dist/web/viewer.mjs
get_session
called by 62
model/db_connection_pool.py

Shape

Function 1,659
Method 1,194
Class 326
Route 72
Interface 21

Languages

TypeScript61%
Python39%

Modules by API surface

web/public/pdfjs-4.10.38-dist/web/viewer.mjs981 symbols
docs/site/assets/javascripts/bundle.e71a0d61.min.js347 symbols
docs/site/assets/javascripts/lunr/wordcut.js139 symbols
model/schemas.py97 symbols
docs/site/assets/javascripts/lunr/min/lunr.tr.min.js55 symbols
controllers/datasource_api.py38 symbols
agent/excel/excel_duckdb_manager.py37 symbols
web/public/pdfjs-4.10.38-dist/web/debugger.mjs34 symbols
docs/site/assets/javascripts/workers/search.7a47a382.min.js33 symbols
services/datasource_service.py27 symbols
agent/common/enhanced_common_agent.py24 symbols
agent/context/conversation_history_manager.py23 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add Aix-DB \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact