Fast, secure data
access for agents

Give agents high-concurrency, high-throughput access to operational databases, warehouses, and APIs. Analytical queries run on an isolated replica of your operational data, kept current in real time through CDC.

Diagram of three AI agents, each connected through its own Spice.ai instance to a shared data store that spans Databricks, PostgreSQL, Snowflake, and S3

Fast, current data at agent scale

31x

faster than querying object storage directly (TPC-H SF-100, one node)

566K

rows per second of initial ingest from PostgreSQL, before CDC takes over (CH-benCHmark SF-1000)

2.9x

faster on three nodes than one as agent workloads grow (TPC-H SF-100)

Built for how agents use data

Agents query often, in bursts, and across many sources. Spice gives each agent fast, scoped, and audited access to the data it needs. Spice stays simple to operate from one deployment to thousands.

Real-time analytics

Analytical query on operational data

Spice replicates the operational data an agent needs into an isolated analytics replica, kept current in real time through high-throughput CDC.

Read the CDC docs (opens in a new tab)

Real-time analytics on operational data: an app writes to MySQL, an isolated Spice analytics replica is added beside it, CDC streams each change into the replica, and agents' heavy analytical queries run on Spice without touching MySQLisolatedCDCMySQLanalytics replicaAppAgent 1Agent 2Real-time analytics on operational data
Query without ETL

Data access without ETL

Spice federates databases, warehouses, object storage, and APIs into one SQL layer. Agents call SQL, hybrid search, schema discovery, and your MCP servers through one authenticated MCP endpoint.

Read the federation docs (opens in a new tab)

Isolated agent data

Physical isolation

Each agent queries a Spice runtime that holds only the datasets its Spicepod declares. Datasets are read-only by default. The agent holds a Spice API key, not database credentials.

Read the authentication docs (opens in a new tab)

Per-tenant lakehouses

One standard lakehouse for every tenant

Spice standardizes lakehouse deployments for every tenant, so adding a customer is a configuration change instead of managing additional data infrastructure.

Read the Management API docs

Tool access and audit

Controls and audit on every call

The tools parameter sets which tools a model that Spice runs can call. Set it to a list of tool names to limit them. The tool_recursion_limit parameter caps tool-call rounds for each request, 10 by default. Task history records each SQL query, model call, and tool call.

Read the tools docs (opens in a new tab)

Connect an agent to your data

MCP example

An example of connecting an agent to Spice through MCP.

# spicepod.yamlruntime:  auth:    api_key:      enabled: true  # /v1/mcp requires auth      keys:        - ${secrets:SPICE_API_KEY}datasets:  - from: postgres:public.orders    name: orders    params:      pg_host: db.example.com      pg_pass: ${secrets:PG_PASS}    acceleration:      enabled: true  # A local, accelerated copy for agents  - from: snowflake:DB.SALES.DEALS    name: deals  # A warehouse table, credentials omitted for simplicity$ claude mcp add --transport http spice \    http://localhost:8090/v1/mcp \    --header "X-API-KEY: <key>"sql> -- the agent calls the sql tool over MCP     SELECT o.status, COUNT(*) AS orders,       d.stage AS deal_stage     FROM orders o            -- Postgres     JOIN deals d             -- Snowflake       ON d.customer_id = o.customer_id     WHERE o.customer_id = 42     GROUP BY o.status, d.stage;# example outputshipped    18  negotiationpending     3  negotiation
  1. Connect and accelerate your data

    Define each dataset in spicepod.yaml and set acceleration to enabled.

  2. Run Spice next to your agents

    Start Spice with spice run, or deploy it as a sidecar, in your cluster, or on Spice Cloud.

  3. Query from any client

    Agents call Spice over MCP, SQL over HTTP, Arrow Flight, JDBC, ODBC, or the OpenAI-compatible API.

  1. /plugin marketplace add spiceai/skills
  2. /plugin install spiceai@spiceai

Proven in production

Teams run Spice to serve fast data to apps and agents at scale.

Peter Janovsky

“Spice opened the door to take these critical control-plane datasets and move them next to our services in the runtime path.”

Peter Janovsky

Software Architect, Twilio

Darin Douglass

100x

Faster queries

“It just spins up and works, which is really nice. The responsiveness is amazing, which is a huge gain for the customer.”

FAQs

Answers for teams that connect AI agents to operational data.

It is a data layer between AI agents and your databases, warehouses, and APIs. Agents query a Spice runtime over MCP or SQL. Spice keeps a local copy of the operational tables that you accelerate, and CDC can keep each copy current. Spice federates other sources. Datasets are read-only by default. The agent holds a Spice API key, not database credentials.

Configure API keys in runtime.auth, then add the Spice MCP endpoint to the client. For a self-hosted runtime, the endpoint is /v1/mcp on the Spice HTTP address (127.0.0.1:8090 by default). For a client on another host, start Spice with --http set to an address that the client can reach. Then add the host name that the client uses to runtime.mcp.allowed_hosts. By default, the endpoint accepts only localhost, 127.0.0.1, and ::1. Before a remote client sends the key, turn on TLS in runtime.tls or keep the endpoint on a private network. Send the key in the X-API-KEY header. The client then lists the Spice tools, such as sql, table_schema, and search.

The /v1/mcp endpoint lists the Spice built-in tools and each tool that the Spicepod adds. list_datasets finds the datasets that the agent can query, with their descriptions and columns. table_schema reads column names and types before the agent writes SQL. sql runs a query and returns JSON rows. search runs semantic search on datasets that have embeddings. get_current_datetime gives the current time for date filters. To call other MCP servers through Spice, add them with from: mcp:.

Not by default. Each dataset uses access: read, so the sql tool rejects INSERT, UPDATE, DELETE, and DDL statements. A write needs a read-write API key and a dataset set to access: read_write.

Not for accelerated datasets. Agents query the local copy in Spice. Queries on a federated dataset still run on the source. With CDC, Spice reads only the database change log after the initial snapshot. In the Spice 2.0 benchmarks, PostgreSQL kept more than 266,000 transactions per minute (tpmC) while Spice ran analytical queries.

An accelerated dataset that uses CDC is about 2 seconds behind the source under load. A federated dataset reads the source at query time. For CDC, Spice reads the PostgreSQL WAL, the MySQL binlog, MongoDB change streams, or DynamoDB Streams. Spice applies each insert, update, and delete to the local copy. By default, a PostgreSQL, MySQL, or DynamoDB dataset reports ready only when its replication lag is below 2 seconds. Change this limit with the connector *_replication_ready_lag parameter. To set up a replica, read Analytics Replica.

Query the source directly when a table changes rarely, is too large to copy, or comes from an API. Leave acceleration off for that dataset, and Spice federates the query to the source at query time. Accelerate the tables that agents query often or in bursts. One SQL query can join accelerated and federated datasets. For more about this choice, read SQL federation and acceleration.

Declare only the needed datasets in the Spicepod of the runtime that the agent uses. To limit one tool further, set table_allowlist in its params. For a model that Spice runs, list the allowed datasets in the datasets field of the model.

Query the runtime.task_history table. Task history is on by default and records each SQL query, model call, and tool call, with its input. To also record each output, set captured_output: truncated in runtime.task_history. Calls through /v1/mcp to other MCP servers are recorded the same way.

Run one Spice runtime for each tenant or agent, each with its own Spicepod and API keys. On Spice Cloud, create and change these deployments through the Management API. Adding a customer is then a configuration change.

Yes. The Spice runtime is open source under the Apache 2.0 license and includes the MCP endpoint, CDC, and acceleration. Spice Cloud runs it as a managed service. Spice.ai Enterprise adds SSO, role-based access control, and audit logs.