NeuronDB
AI Database Extension for PostgreSQL
PostgreSQL extension with vector search, RAG pipeline, machine learning inference, and GPU acceleration. Build AI-powered applications directly in your database.
NeuronDB Ecosystem
Complete AI database platform with core engine and runtime components
NeuronDB
- •Vector search with HNSW and IVF indexing, supporting 5 vector types and 10+ distance metrics.
- •52 ML algorithms implemented in pure C: Random Forest, XGBoost, LightGBM, CatBoost, SVM, KNN, and more.
- •RAG pipeline with document processing, semantic retrieval, reranking, and LLM integration.
- •GPU acceleration for CUDA (NVIDIA), ROCm (AMD), and Metal (Apple Silicon) with automatic detection.
- •473 SQL functions with hybrid search, background workers, and security features.
NeuronAgent
- •REST API and WebSocket agent runtime system with long-term memory and tool execution.
- •Agent state machine with HNSW-based vector search for context retrieval and memory management.
- •Tool registry supporting SQL, HTTP, Code, and Shell operations with streaming responses.
- •Background jobs with API key authentication, crash recovery, and SKIP LOCKED processing.
- •Integration with NeuronDB for embeddings, LLM operations, and vector search.
NeuronMCP
- •Model Context Protocol server enabling MCP-compatible clients (like Claude Desktop) to access NeuronDB.
- •JSON-RPC 2.0 implementation with stdio communication protocol and resource management.
- •Tools for vector search, embedding generation, model training, and database schema management.
- •Middleware support for custom integrations and tool architecture.
- •MCP server with structured logging and error handling.
Capabilities
AI database features
| Capability | Description | Performance | Production Ready |
|---|---|---|---|
| Vector Search | HNSW indexing, multiple distance metrics, quantization | Sub-millisecond on millions | |
| ML Inference | ONNX runtime, batch processing, embedding generation | High-throughput batch ops | |
| Hybrid Search | Vector + FTS, multi-vector, faceted, temporal | Optimized query planning | |
| Reranking | Cross-encoder, LLM, ColBERT, ensemble | GPU-accelerated support | |
| Background Workers | Queue executor, auto-tuner, index maintenance | Non-blocking async ops | |
| RAG Pipeline | Complete in-database RAG with document processing | End-to-end optimization | |
| ML Analytics | Clustering (K-means, DBSCAN, GMM), PCA, outlier detection, quality metrics, drift detection | GPU-accelerated algorithms | |
| GPU Acceleration | CUDA (NVIDIA), ROCm (AMD), Metal (Apple), 100x speedup on batch ops | Auto-detection with CPU fallback | |
| Performance Optimization | SIMD (AVX2/AVX-512/NEON), intelligent query planning, ANN cache, WAL compression | Predictive prefetching | |
| Security | Vector encryption (AES-GCM), differential privacy, RLS integration, multi-tenant isolation | GDPR-compliant | |
| Monitoring & Observability | pg_stat_neurondb view, worker heartbeats, latency histograms, Prometheus exporter | Real-time metrics | |
| PostgreSQL Native | Pure C implementation, 473 SQL functions, zero external dependencies, WAL integration | Zero core modifications | |
| NeuronAgent | REST API and WebSocket agent runtime with long-term memory, tool execution, and streaming responses | HNSW-based context retrieval | |
| NeuronMCP | Model Context Protocol server enabling MCP-compatible clients to access NeuronDB via stdio | JSON-RPC 2.0 implementation |
NeuronDB vs. Alternatives
Comparison of NeuronDB with other PostgreSQL AI and vector extensions
| Feature | NeuronDB | pgvector | pgvectorscale | pgai | PostgresML |
|---|---|---|---|---|---|
| Vector Indexing | HNSW + IVF | HNSW + IVF | StreamingDiskANN | Uses pgvector | pgvector-based |
| ML Inference | ONNX (C++) | None | None | API calls | Python ML libs |
| Embedding Generation | In-database (ONNX) | External | External | External API | In-database (Transformers) |
| Hybrid Search | Native (Vector+FTS) | Manual | Manual | Manual | Manual |
| Reranking | Cross-encoder, LLM, ColBERT, MMR | None | None | None | None |
| ML Algorithms | 52 algorithms: RF, XGBoost, LightGBM, CatBoost, SVM, KNN, DT, NB, NN, K-means, DBSCAN, GMM, PCA, etc. | None | None | None | XGBoost, LightGBM, sklearn suite, Linear/Logistic |
| Background Workers | 4 workers: neuranq, neuranmon, neurandefrag, neuranllm | None | None | None | None |
| RAG Pipeline | Complete In-DB | None | None | Partial (API) | Partial (Python) |
| Quantization | FP16, INT8, Binary (2x-32x) | Binary only | Binary only | None | None |
| Implementation | Pure C | Pure C | Pure C | Rust + SQL | Python + C |
| GPU Support | CUDA + ROCm + Metal (native C/C++) | None | None | None | CUDA (via Python) |
| PostgreSQL Versions | 16, 17, 18 | 12-18 | 15-18 | 16-18 | 14-16 |
| Vector Types | 5 types: vector, vectorp, vecmap, vgraph, rtext | 1 type: vector | 1 type: vector | Uses pgvector | Uses pgvector |
| Distance Metrics | 10+ metrics: L2, Cosine, Inner Product, Manhattan, Hamming, Jaccard, etc. | 3 metrics: L2, Cosine, Inner Product | 3 metrics: L2, Cosine, Inner Product | Uses pgvector | Uses pgvector |
| SQL Functions | 473 functions | ~20 functions | ~30 functions | ~15 functions | ~50 functions |
| Performance (QPS) | 100K+ (with GPU) | 10K-50K | 50K-100K | Limited (API overhead) | 5K-20K (Python overhead) |
| Dependencies | Zero (pure C, optional ONNX) | Zero (pure C) | Zero (pure C) | Rust runtime | Python + ML libraries |