Examples
Complete programs you can copy and run, grouped by what they do. Each example page lists the install step, then each program with its output. Programs that clone a repository use tangle-network/sandbox-demo, a small Node project whose tests fail until a coding agent fixes them.
By use case
| Page | Language | What the examples do |
|---|---|---|
| Sandboxes | TypeScript | Commands, files, lifecycle, snapshots, branches, network rules and preview links. |
| Coding agents | TypeScript | Claude Code, Codex and OpenCode fixing tests, committing, streaming, racing and running for hours. |
| Products | TypeScript | One sandbox per customer, chat routes, batches, hosted runs, per-turn cost and email or iMessage lines. |
| Fleets | TypeScript, Python | Many agents or commands across many sandboxes under one budget. |
| Evaluation and other clouds | TypeScript, YAML | Model judges, model and coding agent comparisons, CI gates, intelligence reports, agent-runtime and agent graphs. |
| Python | Python | The Python SDK: commands, files, snapshots, coding agents, network rules, batches and asyncio. |
| CLI | Shell | The tangle CLI: fix a test, pair interactively, continue a session, batches, fleets, Hub connections and JSON scripting. |
By language
- TypeScript: Sandboxes, Coding agents, Products, Fleets, Evaluation and other clouds.
- Python: Python, and the Python program on Fleets.
- Shell: CLI.
- YAML: the agent graph on Evaluation and other clouds.
Every example
Sandboxes
- Run one command
- Analyse a CSV with Python
- Stop and resume
- Snapshot and revert
- Branch into two
- Find TODOs in a repository
- Lock down the network
- Host a page on a public URL
- Share a dev server
- Pause a coding agent and continue later
Coding agents
- Fix a failing test and keep the patch
- Fix a bug and commit it
- Watch each tool call as it happens
- Stream the agent’s text
- Race two coding agents on one task
- Start a long task and collect it later
- Run a planner and an implementer in one sandbox
- Drive a browser
Products
- Review contracts with one sandbox per customer
- Walk one customer’s sandbox through its lifecycle
- Keep a support conversation per customer
- Triage a queue of tickets in one call
- Research a company with a hosted run
- Report what each turn cost
- Run your own tool loop on a Router model
- Chat from a Cloudflare Worker
- Stream to a browser that survives reloads
- Answer email with a per-member sandbox
- Share one line between two members
- Take calls on an iMessage line
Fleets
- Run four agents under one budget
- Review five packages at once
- Translate a README into five languages
- Give each agent its own model
- Shard a test suite across machines
- Stop everyone at a soft spending cap
- Run a command across machines from Python
Evaluation and other clouds
- Grade replies with a rubric
- Score an agent’s run
- Compare two models
- Compare two coding agents
- Gate a prompt change in CI
- Ask what an agent did
- Run an agent through agent-runtime
- Time a cold start
- Run an agent graph from the CLI
Python
- Hello sandbox
- Run one command
- Analyse a CSV
- Stop and resume
- Snapshot and restore files
- Find TODOs in a cloned repository
- Have a coding agent fix a test
- Fix and commit
- Watch a coding agent work
- Lock down the network
- Run a batch across two coding agents
- Run sandboxes concurrently with asyncio
CLI
- Fix a test and keep the patch
- Pair with a coding agent in its own terminal UI
- Continue one conversation over several turns
- Try a change and roll it back
- Triage a list of tickets in one batch
- Run several agents under a budget
- Supervise workers under one budget
- Let an agent read your GitHub issues
- Script with JSON output
Quickstart examples in the SDK
The TypeScript SDK ships eight short quickstart programs as data, so you can show them in your own app or tooling.
Each entry has an id, a title, a one-sentence summary, its language and the complete code.
import { quickstartExamples } from "@tangle-network/sandbox/examples";
for (const example of quickstartExamples) {
console.log(example.id, "-", example.title);
}run-code - Run code
fix-failing-test - Fix a failing test
your-claude-subscription - Use your Claude subscription
race-two-agents - Race two agents
stream-the-work - Stream the work
lock-down-the-network - Lock down the network
share-a-preview - Share a preview
pause-and-resume - Pause and resumeMost of these programs, with their output, are also in Sandboxes and Coding agents.