A portable accelerated data query and LLM-inference engine, written in Rust, for data-grounded AI apps and agents.
📄 Docs | ⚡️ Quickstart | 🧑🍳 Cookbook
Spice is a SQL query, search, and LLM-inference engine, written in Rust, for data apps and agents.
Spice provides four industry standard APIs in a lightweight, portable runtime (single binary/container):
vector_search and text_search UDTFs.🎯 Goal: Developers can focus on building data apps and AI agents confidently, knowing they are grounded in data.
Spice's primary features include:
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.
🎥 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
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.
INSERT INTO for data ingestion and transformation—no Spark required.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.
| 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-Modal Acceleration | ✅ (OLAP + OLTP) | ― | ― | ― | ― |
| Change Data Capture (CDC) | ✅ (Debezium) | ― | ― | ― | ✅ (Debezium) |
| Feature | Spice | LangChain | LlamaIndex | AgentOps.ai | Ollama |
|---|---|---|---|---|---|
| Primary Use-Case | Data & AI apps | Agentic workflows | RAG apps | Agent operations | LLM apps |
| Programming Language | Any language (HTTP interface) | JavaScript, Python | Python | Python | Any language (HTTP interface) |
| Unified Data + AI Runtime | ✅ | ― | ― | ― | ― |
| Federated Data Query | ✅ | ― | ― | ― | ― |
| Accelerated Data Access | ✅ | ― | ― | ― | ― |
| Tools/Functions | ✅ (MCP HTTP+SSE) | ✅ | ✅ | Limited | Limited |
| LLM Memory | ✅ | ✅ | ― | ✅ | ― |
| Evaluations (Evals) | ✅ | Limited | ― | Limited | ― |
| Hybrid Search | ✅ (Keyword, Vector, & Full-Text-Search) | ✅ | ✅ | Limited | Limited |
| Caching | ✅ (Query and results caching) | Limited | ― | ― | ― |
| Embeddings | ✅ (Built-in & pluggable models/DBs) | ✅ | ✅ | Limited | ― |
✅ = Fully supported ❌ = Not supported Limited = Partial or restricted support
text_search and vector_search UDTFs. Reciprocal rank fusion (RRF) for hybrid search. Amazon S3 Vectors Cookbook RecipeINSERT INTO. DuckDB Data Accelerator Recipevector_search and text_search UDTFs with hybrid search using reciprocal rank fusion (RRF). Example: SELECT * FROM vector_search(my_table, 'search query', 10) WHERE condition ORDER BY score;. Amazon S3 Vectors Cookbook RecipeIs Spice a cache? No specifically; you can think of Spice data acceleration as an active cache, materialization, or data prefetcher. A cache would fetch data on a cache-miss while Spice prefetches and materializes filtered data on an interval, trigger, or as data changes using CDC. In addition to acceleration Spice supports results caching.
Is Spice a CDN for databases? Yes, a common use-case for Spice is as a CDN for different data sources. Using CDN concepts, Spice enables you to ship (load) a working set of your database (or data lake, or data warehouse) where it's most frequently accessed, like from a data-intensive application or for AI context.
https://github.com/spiceai/spiceai/assets/80174/7735ee94-3f4a-4983-a98e-fe766e79e03a
See more demos on YouTube.
| Name | Description | Status | Protocol/Format |
|---|---|---|---|
databricks (mode: delta_lake) | Databricks | Stable | S3/Delta Lake |
delta_lake | Delta Lake | Stable | Delta Lake |
dremio | Dremio | Stable | Arrow Flight |
duckdb | DuckDB | Stable | Embedded |
file | File | Stable | Parquet, CSV |
github | GitHub | Stable | GitHub API |
postgres | PostgreSQL | Stable | |
s3 | S3 | Stable | Parquet, CSV |
mysql | MySQL | Stable | |
spice.ai | Spice.ai | Stable | Arrow Flight |
graphql | GraphQL | Release Candidate | JSON |
dynamodb | Amazon DynamoDB | Release Candidate | |
databricks (mode: spark_connect) | Databricks | Beta | Spark Connect |
flightsql | FlightSQL | Beta | Arrow Flight SQL |
iceberg | Apache Iceberg | Beta | Parquet |
mssql | Microsoft SQL Server | Beta | Tabular Data Stream (TDS) |
odbc | ODBC | Beta | ODBC |
snowflake | Snowflake | Beta | Arrow |
spark | Spark | Beta | Spark Connect |
oracle | Oracle | Alpha | Oracle ODPI-C |
abfs | Azure BlobFS | Alpha | Parquet, CSV |
clickhouse | Clickhouse | Alpha | |
debezium | Debezium CDC | Alpha | Kafka + JSON |
kafka | Kafka | Alpha | Kafka + JSON |
ftp, sftp | FTP/SFTP | Alpha | Parquet, CSV |
glue | AWS Glue | Alpha | Iceberg, Parquet, CSV |
http, https | HTTP(s) | Alpha | Parquet, CSV, JSON |
imap | IMAP | Alpha | IMAP Emails |
localpod | Local dataset replication | Alpha | |
mongodb | MongoDB | Alpha | |
sharepoint | Microsoft SharePoint | Alpha | Unstructured UTF-8 documents |
elasticsearch | ElasticSearch | Roadmap |
| Name | Description | Status | Engine Modes |
|---|---|---|---|
arrow | In-Memory Arrow Records | Stable | memory |
cayenne | Spice Cayenne (Vortex) | Beta (v1.9.0-rc.2+) | file |
duckdb | Embedded DuckDB | Stable | memory, file |
postgres | Attached PostgreSQL | Release Candidate | N/A |
sqlite | Embedded SQLite | Release Candidate | memory, file |
| Name | Description | Status | ML Format(s) | LLM Format(s) |
|---|---|---|---|---|
openai | OpenAI (or compatible) LLM endpoint | Release Candidate | - | OpenAI-compatible HTTP endpoint |
file | Local filesystem | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
huggingface | Models hosted on HuggingFace | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
spice.ai | Models hosted on the Spice.ai Cloud Platform | ONNX | OpenAI-compatible HTTP endpoint | |
azure | Azure OpenAI | - | OpenAI-compatible HTTP endpoint | |
bedrock | Amazon Bedrock (Nova models) | Alpha | - | OpenAI-compatible HTTP endpoint |
anthropic | Models hosted on Anthropic | Alpha | - | OpenAI-compatible HTTP endpoint |
xai | Models hosted on xAI | Alpha | - | OpenAI-compatible HTTP endpoint |
| Name | Description | Status | ML Format(s) | LLM Format(s)* |
|---|---|---|---|---|
openai | OpenAI (or compatible) LLM endpoint | Release Candidate | - | OpenAI-compatible HTTP endpoint |
file | Local filesystem | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
huggingface | Models hosted on HuggingFace | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
model2vec | Static embeddings (500x faster) | Release Candidate | Model2Vec | - |
azure | Azure OpenAI | Alpha | - | OpenAI-compatible HTTP endpoint |
bedrock | AWS Bedrock (e.g., Titan, Cohere) | Alpha | - | OpenAI-compatible HTTP endpoint |
| Name | Description | Status |
|---|---|---|
s3_vectors | Amazon S3 Vectors for petabyte-scale vector storage and querying | Alpha |
pgvector | PostgreSQL with pgvector extension | Alpha |
duckdb_vector | DuckDB with vector extension for efficient vector storage and search | Alpha |
sqlite_vec | SQLite with sqlite-vec extension for lightweight vector operations | Alpha |
Catalog Connectors connect to external catalog providers and make their tables available for federated SQL query in Spice. Configuring accelerations for tables in external catalogs is not supported. The schema hierarchy of the external catalog is preserved in Spice.
| Name | Description | Status | Protocol/Format |
|---|---|---|---|
spice.ai | Spice.ai Cloud Platform | Stable | Arrow Flight |
unity_catalog | Unity Catalog | Stable | Delta Lake |
databricks | Databricks | Beta | Spark Connect, S3/Delta Lake |
iceberg | Apache Iceberg | Beta | Parquet |
glue | AWS Glue | Alpha | CSV, Parquet, Iceberg |
https://github.com/spiceai/spiceai/assets/88671039/85cf9a69-46e7-412e-8b68-22617dcbd4e0
Install the Spice CLI:
On macOS, Linux, and WSL:
Or using brew:
On Windows using PowerShell:
Step 1. Initialize a new Spice app with the spice init command:
A spicepod.yaml file is created in the spice_qs directory. Change to that directory:
Step 2. Start the Spice runtime:
Example output will be shown as follows:
The runtime is now started and ready for queries.
Step 3. In a new terminal window, add the spiceai/quickstart Spicepod. A Spicepod is a package of configuration defining datasets and ML models.
The spicepod.yaml file will be updated with the spiceai/quickstart dependency.
The spiceai/quickstart Spicepod will add a taxi_trips data table to the runtime which is now available to query by SQL.
Step 4. Start the Spice SQL REPL:
The SQL REPL inferface will be shown:
Enter show tables; to display the available tables for query:
Enter a query to display the longest taxi trips:
Output:
Using the Docker image locally:
In a Dockerfile:
Using Helm:
The Spice.ai Cookbook is a collection of recipes and examples for using Spice. Find it at https://github.com/spiceai/cookbook.
Access ready-to-use Spicepods and datasets hosted on the Spice.ai Cloud Platform using the Spice runtime. A list of public Spicepods is available on Spicerack: https://spicerack.org/.
To use public datasets, create a free account on Spice.ai:
Visit spice.ai and click Try for Free.
After creating an account, create an app to generate an API key.
Once set up, you can access ready-to-use Spicepods including datasets. For this demonstration, use the taxi_trips dataset from the Spice.ai Quickstart.
Step 1. Initialize a new project.
Step 2. Log in and authenticate from the command line using the spice login command. A pop up browser window will prompt you to authenticate:
Step 3. Start the runtime:
Step 4. Configure the dataset:
In a new terminal window, configure a new dataset using the spice dataset configure command:
Enter a dataset name that will be used to reference the dataset in queries. This name does not need to match the name in the dataset source.
Enter the description of the dataset:
Enter the location of the dataset:
Select y when prompted whether to accelerate the data:
You should see the following output from your runtime terminal:
Step 5. In a new terminal window, use the Spice SQL REPL to query the dataset
The output displays the results of the query along with the query execution time:
You can experiment with the time it takes to generate queries when using non-accelerated datasets. You can change the acceleration setting from true to false in the datasets.yaml file.
Comprehensive documentation is available at spiceai.org/docs.
Over 45 quickstarts and samples available in the Spice Cookbook.
Spice.ai is designed to be extensible with extension points documented at EXTENSIBILITY.md. Build custom Data Connectors, Data Accelerators, Catalog Connectors, Secret Stores, Models, or Embeddings.
🚀 See the Roadmap for upcoming features.
We greatly appreciate and value your support! You can help Spice in a number of ways:
⭐️ star this repo! Thank you for your support! 🙏