[ sandcastle platform ]

Sandbox Infrastructure for AI Data Agents

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.

/ parallel execution timeline/ live

5.3x

cheaper per thread

10x

lower token spend

3x

faster time-to-answer

60+

connectors on boot

[ what you get ]

Everything your agent needs, in one API call.

Sandcastle is sandbox infrastructure for AI data agents — an isolated environment that boots already connected to your warehouse, your metrics, and your permissions.

01

Pre-connected to your data

60+ warehouses and SaaS sources, live the moment a sandbox boots. No drivers, no wiring.

02

It knows your business

Your metrics, dimensions, and joins load as a governed ontology — the agent reasons in your terms.

03

Governed by default

RBAC per user and source. The agent runs the query but never sees a credential.

04

Built for real scale

Apache Arrow streams data at 10 GB/s, zero-copy — a petabyte warehouse feels like a local DataFrame.

[ how it works ]

Provision. Load. Execute. Persist.

Four REST calls. One governed session.

Step 01

Provision

Create an isolated container with a single POST. Returns a sandbox_id in under 300ms.

< 300ms cold start
sandcastle-api.sh
# Create a sandcastlecurl -X POST /v2/sandcastles \  -H "Authorization: Bearer $KEY"# → { "sandbox_id": "sc_8f3k..." }
Step 02

Load

Stream connector data into the sandbox via Apache Arrow. Pass a connector_id and query — data lands in memory as a Textable.

10 GB/s Arrow streaming
sandcastle-api.sh
# Load connector datacurl -X POST .../load-connector-data \  -d '{ "connector_id": 42,       "query": "SELECT * FROM sales" }'
Step 03

Execute

Run arbitrary Python inside the sandbox. Query across loaded sources, join data, build models.

64 GB max RAM
sandcastle-api.sh
# Execute code in sandboxcurl -X POST .../execute \  -d '{ "code": "result = df.groupby(    \"region\").revenue.sum()" }'# → { "execution_time_ms": 47 }
Step 04

Persist

Write results back to the ontology. New metrics and dimensions persist across sessions — your org learns from every query.

Persistent semantic layer
sandcastle-api.sh
# Update ontology with new metriccurl -X POST .../ontology \  -d '{ "metrics": [{    "name": "revenue_by_region",    "expr": "SUM(sales.amount)" }] }'
[ proof ]

Same question. A fraction of the time and cost.

Time to Answer
Every answer is three clocks
Agent + warehouse 44s
+ generic sandbox 40s
+ Sandcastle 15s 3× faster
Agent Ontology Query

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.

FIG. 2 — time to answer, decomposed · hover for detail
Unit Economics
Pay the schema tax once
$ / 1M tokens
$5.00
$0.50
RawCached
10× cheaper
Cost / thread
432
82
DIYOntology
5.3× cheaper

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.

FIG. 3 — DIY vs ontology-cached · hover for detail
[ faq ]

Questions, answered.

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.

[ try textql ]

Bring Us Your Hardest Problem