Spiceai
A portable accelerated SQL query, search, and LLM-inference engine, written in Rust, for data-grounded AI apps and agents.
Install / Use
/learn @spiceai/SpiceaiREADME
Spice is a SQL query, search, and LLM-inference engine, written in Rust, for data apps and agents.
<img width="740" alt="Spice.ai Open Source accelerated data query and LLM-inference engine" src="https://github.com/user-attachments/assets/9db94f9c-10a1-47b0-ab45-05aa964590ff" />Spice provides four industry standard APIs in a lightweight, portable runtime (single binary/container):
- SQL Query & Search: HTTP, Arrow Flight, Arrow Flight SQL, ODBC, JDBC, and ADBC APIs;
vector_searchandtext_searchUDTFs. - OpenAI-Compatible APIs: HTTP APIs for OpenAI SDK compatibility, local model serving (CUDA/Metal accelerated), and hosted model gateway.
- Iceberg Catalog REST APIs: A unified Iceberg REST Catalog API.
- MCP HTTP+SSE APIs: Integration with external tools via Model Context Protocol (MCP) using HTTP and Server-Sent Events (SSE).
🎯 Goal: Developers can focus on building data apps and AI agents confidently, knowing they are grounded in data.
Spice's primary features include:
- Data Federation: SQL query across any database, data warehouse, or data lake. Scale from single-node to distributed multi-node query execution. Learn More.
- Data Materialization and Acceleration: Materialize, accelerate, and cache database queries with Arrow, DuckDB, SQLite, PostgreSQL, or Spice Cayenne (Vortex). Read the MaterializedView interview - Building a CDN for Databases
- Enterprise Search: Keyword, vector, and full-text search with Tantivy-powered BM25 and petabyte-scale vector similarity search via Amazon S3 Vectors or pgvector for structured and unstructured data.
- AI apps and agents: An AI-database powering retrieval-augmented generation (RAG) and intelligent agents with OpenAI-compatible APIs and MCP integration. Learn More.
If you want to build with DataFusion, DuckDB, or Vortex, Spice provides a simple, flexible, and production-ready engine you can just use.
📣 Read the Spice.ai 1.0-stable announcement.
Spice is built-on industry leading technologies including Apache DataFusion, Apache Arrow, Arrow Flight, SQLite, and DuckDB.
<div align="center"> <picture> <img width="600" alt="How Spice works." src="https://github.com/spiceai/spiceai/assets/80174/7d93ae32-d6d8-437b-88d3-d64fe089e4b7" /> </picture> </div>🎥 Watch the CMU Databases Accelerating Data and AI with Spice.ai Open-Source
🎥 Watch How to Query Data using Spice, OpenAI, and MCP
🎥 Watch How to search with Amazon S3 Vectors
Why Spice?
<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/spiceai/spiceai/assets/80174/96b5fcef-a550-4ce8-a74a-83931275e83e"> <img width="800" alt="Spice.ai" src="https://github.com/spiceai/spiceai/assets/80174/29e4421d-8942-4f2a-8397-e9d4fdeda36b" /> </picture> </div>Spice simplifies building data-driven AI applications and agents by making it fast and easy to query, federate, and accelerate data from one or more sources using SQL, while grounding AI in real-time, reliable data. Co-locate datasets with apps and AI models to power AI feedback loops, enable RAG and search, and deliver fast, low-latency data-query and AI-inference with full control over cost and performance.
Latest Capabilities
- Spice Cayenne Data Accelerator: Simplified multi-file acceleration using the Vortex columnar format + SQLite metadata. Delivers DuckDB-comparable performance without single-file scaling limitations.
- Multi-Node Distributed Query: Scale query execution across multiple nodes with Apache Ballista integration for improved performance on large datasets.
- Acceleration Snapshots: Bootstrap accelerations from S3 for fast cold starts (seconds vs. minutes). Supports ephemeral storage with persistent recovery.
- Iceberg Table Writes: Write to Iceberg tables using standard SQL
INSERT INTOfor data ingestion and transformation—no Spark required. - Petabyte-Scale Vector Search: Native Amazon S3 Vectors integration manages the full vector lifecycle from ingestion to embedding to querying. SQL-integrated hybrid search with RRF.
How is Spice different?
-
AI-Native Runtime: Spice combines data query and AI inference in a single engine, for data-grounded AI and accurate AI.
-
Application-Focused: Designed to run distributed at the application and agent level, often as a 1:1 or 1:N mapping between app and Spice instance, unlike traditional data systems built for many apps on one centralized database. It’s common to spin up multiple Spice instances—even one per tenant or customer.
-
Dual-Engine Acceleration: Supports both OLAP (Arrow/DuckDB) and OLTP (SQLite/PostgreSQL) engines at the dataset level, providing flexible performance across analytical and transactional workloads.
-
Disaggregated Storage: Separation of compute from disaggregated storage, co-locating local, materialized working sets of data with applications, dashboards, or ML pipelines while accessing source data in its original storage.
-
Edge to Cloud Native: Deploy as a standalone instance, Kubernetes sidecar, microservice, or cluster—across edge/POP, on-prem, and public clouds. Chain multiple Spice instances for tier-optimized, distributed deployments.
How does Spice compare?
Data Query and Analytics
| Feature | Spice | Trino / Presto | Dremio | ClickHouse | Materialize | | -------------------------------- | ------------------------------------- | -------------------- | --------------------- | ------------------- | ------------------- | | Primary Use-Case | Data & AI apps/agents | Big data analytics | Interactive analytics | Real-time analytics | Real-time analytics | | Primary deployment model | Sidecar | Cluster | Cluster | Cluster | Cluster | | Federated Query Support | ✅ | ✅ | ✅ | ― | ― | | Acceleration/Materialization | ✅ (Arrow, SQLite, DuckDB, PostgreSQL) | Intermediate storage | Reflections (Iceberg) | Materialized views | ✅ (Real-time views) | | Catalog Support | ✅ (Iceberg, Unity Catalog, AWS Glue) | ✅ | ✅ | ― | ― | | Query Result Caching | ✅ | ✅ | ✅ | ✅ | Limited | | **Multi-Mod
