Template Gallery

A small curated set of public templates ships with the platform. They're pre-snapshotted images tuned for the agent toolkit: every dependency the typed runCode primitive can take advantage of is pre-installed, and each kernel passes a ready_check before the snapshot is published.

SlugStackUse it for
python-data-sciencePython 3.12, numpy, pandas, matplotlib (headless), scikit-learn, scipy, plotly, seaborn, jupyter_client, ipykernelData-science agents. Matplotlib plt.show() auto-emits base64 PNG; DataFrames as structured dataframe results.
node-typescriptNode 22 LTS, pnpm, tsx, vitest, esbuild, Playwright (Chromium with system deps)Web-app-building agents, test-runner agents, browser-driving agents. The TypeScript kernel uses esbuild for transparent .ts execution.

More templates land as we find clear, recurring agent shapes that benefit from a curated base.

Use a template

ts
import { Sandbox } from "@tangle-network/sandbox";
const client = new Sandbox({
  apiKey: process.env.TANGLE_API_KEY!,
  baseUrl: "https://sandbox.tangle.tools",
});
const box = await client.create({ publicTemplateId: "python-data-science" });

Or via CLI:

bash
tangle template list --featured           # browse the gallery
tangle template get python-data-science   # see the manifest + tags
tangle sandbox create --public-template python-data-science
tangle sandbox create --public-template python-data-science --public-template-version v3

Build your own

The reference templates live at products/sandbox/templates/ in the repo. Each is a directory with:

products/sandbox/templates/<slug>/
  template.json    # name, slug, description, tags, image, kernel ready-checks
  Dockerfile       # built atop the standard sidecar base
  README.md        # (optional) becomes the template's public readme

The shared products/sandbox/templates/publish.ts script provisions a sandbox from the Dockerfile, runs every kernels[].ready_check, snapshots, and calls client.publicTemplates.publish(). Re-running with an existing slug publishes a new version.

bash
TANGLE_API_KEY=tng_... pnpm tsx products/sandbox/templates/publish.ts <slug>

Template manifest schema

jsonc
{
  "name": "Python Data Science",
  "slug": "python-data-science",
  "description": "...",
  "tags": ["python", "data-science", "agent"],
  "image": {
    "dockerfile": "./Dockerfile",
    "platform": "linux/amd64"
  },
  "kernels": [
    {
      "language": "python",
      "ready_check": "python3 -c 'import numpy, pandas, sklearn; print(\"ok\")'"
    }
  ]
}

The publisher refuses to ship a template whose ready-check fails. That's the only line between "I built an image locally" and "every customer is going to spawn this and trip on a missing dep."

Forking a template

Templates are versioned. Pin a sandbox to a specific version when stability matters:

ts
const box = await client.create({
  publicTemplateId: "python-data-science",
  publicTemplateVersionId: "v3",
});

Or fork a published template into your team's namespace as a starting point: client.publicTemplates.publish({ forkedFromTemplateId: "tmpl_..." }).