█

AI/TLDR

Buy me a coffee
Buy me a coffee

Spice

A SQL, search and inference engine you run beside your database so agents query fresh local data

Data-Platform AIOpen source
Language
Rust
License
Apache-2.0
$curl https://install.spiceai.org | /bin/bash
IN SHORT

What is Spice?

Spice is an open-source engine, written in Rust, that you deploy as a sidecar next to an application or agent and point at the databases, object stores and warehouses you already run. It sits in the Data-Platform AI category of the Cloud AI Platforms tools and is open-source, written in Rust and licensed Apache-2.0.

Overview

Spice is an open-source engine, written in Rust, that you deploy as a sidecar next to an application or agent and point at the databases, object stores and warehouses you already run. It answers SQL, full-text and vector queries locally, materialises the slices of data it is asked for most often, and exposes an OpenAI-compatible endpoint so a model can be given that data without a separate retrieval service. The project describes the goal as building data-grounded AI apps and agents without first standing up an ETL pipeline.

Hand-drawn before-and-after diagram: without Spice an application sends many high-latency requests to a data store of S3, MySQL and a vector store; with Spice, the application talks to a co-located Spice instance with its own cache and only a single request for new data leaves for the data store
The sidecar idea in one picture: chatty, high-latency calls to the data store become local reads, with one request out for new dataSpice README ↗

The engine is assembled from established open-source pieces rather than a new storage format: Apache DataFusion for query planning, Apache Arrow for in-memory data, and DuckDB, SQLite, PostgreSQL or the project's own Vortex-based Cayenne format as acceleration targets. Over thirty connectors cover PostgreSQL, MySQL, MongoDB, Snowflake, Databricks, S3, Iceberg, Kafka, GitHub and more, with change-data-capture replication from PostgreSQL write-ahead logs, MySQL binlogs and MongoDB change streams, so a replica stays close to the source without Debezium or Kafka in between.

Because it is one binary, the same engine covers three quite different jobs: a local cache in front of a production database that keeps analytical load off it, a hybrid search layer combining BM25 (Tantivy), vector indexes and reciprocal rank fusion, and a gateway that serves models and embeddings from OpenAI, Anthropic, Azure, Bedrock, xAI or Hugging Face behind one API. Spice can also run as an MCP server, which is how agent frameworks reach its tables and search indexes.

VideoThe maintainers walk through Cayenne, the Vortex-based acceleration engine that stores the materialised working setSpice AI ↗

What it does

  • Federated SQL across 30+ connectors — PostgreSQL, MySQL, MongoDB, Snowflake, Databricks, S3, Iceberg, Kafka, GitHub — planned by Apache DataFusion
  • Acceleration engines (Cayenne on Vortex, Arrow, DuckDB, SQLite, PostgreSQL) that materialise hot data locally instead of re-querying the source
  • Native change-data-capture from PostgreSQL WAL, MySQL binlog and MongoDB change streams, with no Debezium or Kafka deployment
  • Hybrid search: BM25 via Tantivy, vector search via DuckDB HNSW, Elasticsearch kNN or Amazon S3 Vectors, plus rerank and RRF as SQL table functions
  • OpenAI-compatible API gateway for hosted and local models, plus an MCP server so agents can call the same tables and indexes
  • Deploys as a single binary, a Docker image, a Helm chart, or a scheduler/executor cluster for distributed query

Getting started

Spice ships as a single `spice` binary. A project is a directory with a `spicepod.yaml` describing datasets, accelerations, models and search indexes; `spice run` starts the runtime and serves SQL, HTTP and the OpenAI-compatible endpoints.

Install the CLI

macOS, Linux and WSL install from the project's script; Homebrew and a PowerShell installer are also published.

bashbash
curl https://install.spiceai.org | /bin/bash

# or
brew install spiceai/spiceai/spice

Initialise a project

`spice init` writes a Spicepod you can edit; the quickstart pod adds a sample dataset so there is something to query.

bashbash
spice init spice_qs
cd spice_qs
spice add spiceai/quickstart

Start the runtime

Leave this running — it loads the Spicepod, connects the sources and builds any accelerations you declared.

bashbash
spice run

Query from the SQL REPL

In a second terminal, open the REPL and query the accelerated dataset directly.

bashbash
spice sql

sql> SELECT trip_distance, total_amount FROM taxi_trips ORDER BY trip_distance DESC LIMIT 10;

Run it as a container or a cluster

The same runtime ships as a Docker image and a Helm chart; for distributed query, start scheduler and executor roles separately.

bashbash
docker pull spiceai/spiceai

helm repo add spiceai https://helm.spiceai.org
helm install spiceai spiceai/spiceai
VideoOnce a Spicepod is running, the same instance can be attached to an agent as an MCP serverSpice AI ↗

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Put an analytics replica beside a production PostgreSQL or MySQL database so dashboards and agents stop hammering the primary
  • Give an agent one SQL and search surface over warehouses, object stores and SaaS APIs without copying everything into a vector database first
  • Build hybrid retrieval — BM25 plus vectors plus reranking — as SQL, against data that stays where it lives
  • Serve models and embeddings through one OpenAI-compatible endpoint that already has the application's data next to it

How Spice compares

Spice alongside other open-source data-platform ai tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Spice★ 3.1kA SQL, search and inference engine you run beside your database so agents query fresh local data
Dremio★ 1.5kOpen lakehouse platform with an AI semantic layer, text-to-SQL, and a built-in agent for natural-language analytics over Iceberg data.
Google BigQuery ML—Create, train, and run machine learning and generative-AI models inside Google BigQuery using standard SQL, with no data movement.
Amazon SageMaker Lakehouse—AWS unified Iceberg-based lakehouse spanning S3 and Redshift, feeding analytics and AI/ML from a single copy of data.
Amazon Redshift ML—Build, train, and deploy machine learning models in Amazon Redshift using SQL, with SageMaker handling the underlying training.
Microsoft Fabric—Microsoft's unified data platform with Copilot and data agents that answer natural-language questions over OneLake lakehouses and warehouses.
Cloudera AI—Enterprise platform to build, deploy, and govern traditional, generative, and agentic AI across data on Cloudera's open lakehouse.
Teradata ClearScape Analytics—In-database analytics and AI/ML engine in Teradata VantageCloud, with ModelOps and an enterprise vector store for unstructured data.