Provision
Create an isolated container with a single POST. Returns a sandbox_id in under 300ms.
# Create a sandcastlecurl -X POST /v2/sandcastles \ -H "Authorization: Bearer $KEY"# → { "sandbox_id": "sc_8f3k..." }
One API call spins up an isolated sandbox that already knows your data — connectors, semantic layer, and permissions built in. Your agent reasons over your real warehouse from the first query.
5.3x
cheaper per thread
10x
lower token spend
3x
faster time-to-answer
60+
connectors on boot
Sandcastle is sandbox infrastructure for AI data agents — an isolated environment that boots already connected to your warehouse, your metrics, and your permissions.
60+ warehouses and SaaS sources, live the moment a sandbox boots. No drivers, no wiring.
Your metrics, dimensions, and joins load as a governed ontology — the agent reasons in your terms.
RBAC per user and source. The agent runs the query but never sees a credential.
Apache Arrow streams data at 10 GB/s, zero-copy — a petabyte warehouse feels like a local DataFrame.
60+ warehouses and SaaS sources, loaded and authenticated the moment a sandbox boots.
FIG. 1 — Prebuilt connectors, ready on boot
Four REST calls. One governed session.
Create an isolated container with a single POST. Returns a sandbox_id in under 300ms.
# Create a sandcastlecurl -X POST /v2/sandcastles \ -H "Authorization: Bearer $KEY"# → { "sandbox_id": "sc_8f3k..." }
Stream connector data into the sandbox via Apache Arrow. Pass a connector_id and query — data lands in memory as a Textable.
# Load connector datacurl -X POST .../load-connector-data \ -d '{ "connector_id": 42, "query": "SELECT * FROM sales" }'
Run arbitrary Python inside the sandbox. Query across loaded sources, join data, build models.
# Execute code in sandboxcurl -X POST .../execute \ -d '{ "code": "result = df.groupby( \"region\").revenue.sum()" }'# → { "execution_time_ms": 47 }
Write results back to the ontology. New metrics and dimensions persist across sessions — your org learns from every query.
# Update ontology with new metriccurl -X POST .../ontology \ -d '{ "metrics": [{ "name": "revenue_by_region", "expr": "SUM(sales.amount)" }] }'
Each bar is the wall-clock time for one agent to answer the same question, split into three clocks: the agent's own reasoning loop, time recalling the ontology (what and how to query), and time running the query. A bare agent on the warehouse re-derives the schema and runs slow queries every step (44s). A generic sandbox speeds execution a little but leaves the data layer untouched (40s). Sandcastle's pre-built connectors and cached ontology collapse query time and stop the schema being re-derived — 15s, ~3× faster. The hatched region is time saved versus the baseline.
A DIY text-to-SQL agent re-loads your whole schema into context on every query, so you pay for those input tokens again and again. Sandcastle caches what to query in the ontology — you pay the schema tax once. Left: input cost per 1M tokens, raw context vs ontology-cached (~10× cheaper). Right: total cost per analysis thread in compute units (5.3× cheaper). Measured on a production workload, same model.
Off-the-shelf sandbox providers were designed with coding agents in mind — they give you a fast, isolated, empty box. A Sandcastle boots already knowing your data: 60+ connectors, a governed ontology of your metrics and joins, dialect reconciliation, and RBAC at the data grain. The connector wiring, schema rediscovery, and permission work you would otherwise pay for on every query is already done.