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.
Learn more

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.
Learn more

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.
Learn more

Capabilities

AI database features

CapabilityDescriptionPerformanceProduction Ready
Vector SearchHNSW indexing, multiple distance metrics, quantizationSub-millisecond on millions
ML InferenceONNX runtime, batch processing, embedding generationHigh-throughput batch ops
Hybrid SearchVector + FTS, multi-vector, faceted, temporalOptimized query planning
RerankingCross-encoder, LLM, ColBERT, ensembleGPU-accelerated support
Background WorkersQueue executor, auto-tuner, index maintenanceNon-blocking async ops
RAG PipelineComplete in-database RAG with document processingEnd-to-end optimization
ML AnalyticsClustering (K-means, DBSCAN, GMM), PCA, outlier detection, quality metrics, drift detectionGPU-accelerated algorithms
GPU AccelerationCUDA (NVIDIA), ROCm (AMD), Metal (Apple), 100x speedup on batch opsAuto-detection with CPU fallback
Performance OptimizationSIMD (AVX2/AVX-512/NEON), intelligent query planning, ANN cache, WAL compressionPredictive prefetching
SecurityVector encryption (AES-GCM), differential privacy, RLS integration, multi-tenant isolationGDPR-compliant
Monitoring & Observabilitypg_stat_neurondb view, worker heartbeats, latency histograms, Prometheus exporterReal-time metrics
PostgreSQL NativePure C implementation, 473 SQL functions, zero external dependencies, WAL integrationZero core modifications
NeuronAgentREST API and WebSocket agent runtime with long-term memory, tool execution, and streaming responsesHNSW-based context retrieval
NeuronMCPModel Context Protocol server enabling MCP-compatible clients to access NeuronDB via stdioJSON-RPC 2.0 implementation

NeuronDB vs. Alternatives

Comparison of NeuronDB with other PostgreSQL AI and vector extensions

FeatureNeuronDBpgvectorpgvectorscalepgaiPostgresML
Vector IndexingHNSW + IVFHNSW + IVFStreamingDiskANNUses pgvectorpgvector-based
ML InferenceONNX (C++)NoneNoneAPI callsPython ML libs
Embedding GenerationIn-database (ONNX)ExternalExternalExternal APIIn-database (Transformers)
Hybrid SearchNative (Vector+FTS)ManualManualManualManual
RerankingCross-encoder, LLM, ColBERT, MMRNoneNoneNoneNone
ML Algorithms52 algorithms: RF, XGBoost, LightGBM, CatBoost, SVM, KNN, DT, NB, NN, K-means, DBSCAN, GMM, PCA, etc.NoneNoneNoneXGBoost, LightGBM, sklearn suite, Linear/Logistic
Background Workers4 workers: neuranq, neuranmon, neurandefrag, neuranllmNoneNoneNoneNone
RAG PipelineComplete In-DBNoneNonePartial (API)Partial (Python)
QuantizationFP16, INT8, Binary (2x-32x)Binary onlyBinary onlyNoneNone
ImplementationPure CPure CPure CRust + SQLPython + C
GPU SupportCUDA + ROCm + Metal (native C/C++)NoneNoneNoneCUDA (via Python)
PostgreSQL Versions16, 17, 1812-1815-1816-1814-16
Vector Types5 types: vector, vectorp, vecmap, vgraph, rtext1 type: vector1 type: vectorUses pgvectorUses pgvector
Distance Metrics10+ metrics: L2, Cosine, Inner Product, Manhattan, Hamming, Jaccard, etc.3 metrics: L2, Cosine, Inner Product3 metrics: L2, Cosine, Inner ProductUses pgvectorUses pgvector
SQL Functions473 functions~20 functions~30 functions~15 functions~50 functions
Performance (QPS)100K+ (with GPU)10K-50K50K-100KLimited (API overhead)5K-20K (Python overhead)
DependenciesZero (pure C, optional ONNX)Zero (pure C)Zero (pure C)Rust runtimePython + ML libraries