Skip to main content

Spice.ai OSS

Spice is an open-source SQL query and AI compute engine, written in Rust, for data-driven apps and agents.

Spice provides three industry standard APIs in a lightweight, portable runtime (single ~140 MB binary):

  1. SQL Query APIs: Arrow Flight, Arrow Flight SQL, ODBC, JDBC, and ADBC.
  2. OpenAI-Compatible APIs: HTTP APIs compatible the OpenAI SDK, AI SDK with local model serving (CUDA/Metal accelerated) and gateway to hosted models.
  3. Iceberg Catalog REST APIs: A unified Iceberg Catalog API.
Goal 🎯

Developers can focus on building data apps and AI agents confidently, knowing they are grounded in data.

Spice is primarily used for:

Spice is built-on industry leading technologies including Apache DataFusion, Apache Arrow, Arrow Flight, SQLite, and DuckDB. If you want to build with DataFusion or using DuckDB, Spice provides a simple, flexible, and production-ready engine you can just use.

OGP

Why Spice?​

Spice makes it fast and easy to query data from one or more sources using SQL. You can co-locate a managed dataset with your application or machine learning model, and accelerate it with Arrow in-memory, SQLite/DuckDB, or with attached PostgreSQL for fast, high-concurrency, low-latency queries. Accelerated engines give you flexibility and control over query cost and performance.

Before Spice

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.

How is Spice different?​

  1. AI-Native Runtime: Spice combines data query and AI inference in a single engine, for data-grounded AI and accurate AI.

  2. 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.

  3. 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.

  4. 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.

  5. 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​

FeatureSpiceTrino / PrestoDremioClickHouseMaterialize
Primary Use-CaseData & AI apps/agentsBig data analyticsInteractive analyticsReal-time analyticsReal-time analytics
Primary deployment modelSidecarClusterClusterClusterCluster
Federated Query Supportβœ…βœ…βœ…β€•β€•
Acceleration/Materializationβœ… (Arrow, SQLite, DuckDB, PostgreSQL)Intermediate storageReflections (Iceberg)Materialized viewsβœ… (Real-time views)
Catalog Supportβœ… (Iceberg, Unity Catalog)βœ…βœ…β€•β€•
Query Result Cachingβœ…βœ…βœ…βœ…Limited
Multi-Modal Accelerationβœ… (OLAP + OLTP)――――
Change Data Capture (CDC)βœ… (Debezium)β€•β€•β€•βœ… (Debezium)

AI Apps and Agents​

FeatureSpiceLangChainLlamaIndexAgentOps.aiOllama
Primary Use-CaseData & AI appsAgentic workflowsRAG appsAgent operationsLLM apps
Programming LanguageAny language (HTTP interface)JavaScript, PythonPythonPythonAny language (HTTP interface)
Unified Data + AI Runtimeβœ…β€•β€•β€•β€•
Federated Data Queryβœ…β€•β€•β€•β€•
Accelerated Data Accessβœ…β€•β€•β€•β€•
Tools/Functionsβœ…βœ…βœ…LimitedLimited
LLM Memoryβœ…βœ…β€•βœ…β€•
Evaluations (Evals)βœ…Limited―Limited―
Searchβœ… (VSS)βœ…βœ…LimitedLimited
Cachingβœ… (Query and results caching)Limited―――
Embeddingsβœ… (Built-in & pluggable models/DBs)βœ…βœ…Limited―

βœ… = Fully supported
❌ = Not supported
Limited = Partial or restricted support

Example Use-Cases​

Data-grounded Agentic AI Applications​

  • OpenAI-compatible API: Connect to hosted models (OpenAI, Anthropic, xAI) or deploy locally (Llama, NVIDIA NIM). AI Gateway Recipe
  • Federated Data Access: Query using SQL and NSQL (text-to-SQL) across databases, data warehouses, and data lakes with advanced query push-down for fast retrieval across disparate data sources. Federated SQL Query Recipe
  • Search and RAG: Search and retrieve context with accelerated embeddings for retrieval-augmented generation (RAG) workflows. Vector Search over GitHub Files
  • LLM Memory and Observability: Store and retrieve history and context for AI agents while gaining deep visibility into data flows, model performance, and traces. LLM Memory Recipe | Monitoring Features Documentation

Database CDN and Query Mesh​

  • Data Acceleration: Co-locate materialized datasets in Arrow, SQLite, and DuckDB with applications for sub-second query. DuckDB Data Accelerator Recipe
  • Resiliency and Local Dataset Replication: Maintain application availability with local replicas of critical datasets. Local Dataset Replication Recipe
  • Responsive Dashboards: Enable fast, real-time analytics by accelerating data for frontends and BI tools. Sales BI Dashboard Demo
  • Simplified Legacy Migration: Use a single endpoint to unify legacy systems with modern infrastructure, including federated SQL querying across multiple sources. Federated SQL Query Recipe

Retrieval-Augmented Generation (RAG)​

FAQ​

  • Is 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.

Watch a 30-sec BI dashboard acceleration demo​

See more demos on YouTube.

Intelligent Applications and Agents​

Spice enables developers to build data-grounded AI applications and agents by co-locating data and ML models with applications. Read more about the vision to enable the development of intelligent AI-driven applications.

Connect with us​