A. AI coding agents
Sandboxed test runner per task
A coding agent spins up a throwaway container per task to run the user's test suite in isolation, tears it down on success or failure.
Prompt for any LLM (no setup needed)
Paste this into ChatGPT, Claude, or Gemini — no MCP, no API key, no install:
Read https://instanode.dev/llms.txt for the API.I want to: a coding agent spins up a throwaway container per task to run the user's test suite in isolation, tears it down on success or failure.
Write a complete runnable script (bash + whatever language fits) that: - Provisions the services I need (container deploy) from instanode.dev - Does the work above end-to-end - Prints expected output at each step - Tells me how to claim the resources at the end if I want to keep them past 24 hours
Use real curl commands against api.instanode.dev. Quote the actual response shapes from llms.txt. ```
Sample agent prompt
For each task in tasks.jsonl, deploy a throwaway container via instanode.dev /deploy/new running the user's test suite. Mount their repo as a volume, run `pytest -x`, capture exit code and last 200 lines of stdout, then call /deploy/delete. Aggregate pass/fail to results.csv.Steps to follow
- Step 1: Build the runner image once.
``dockerfile
FROM python:3.12-slim
RUN pip install pytest pytest-json-report
ENTRYPOINT ["pytest", "-x", "--json-report", "--json-report-file=/out/report.json"]
``
- Step 2: Spawn one container per task.
/deploy/newis multipart — passname,image, and anyenv.*as form fields.
``bash
for task in $(cat tasks.jsonl); do
REPO=$(echo "$task" | jq -r .repo)
DEPLOY=$(curl -sX POST https://api.instanode.dev/deploy/new \
-H "Authorization: Bearer $INSTANODE_TOKEN" \
-F "name=test-runner-$(echo "$REPO" | tr '/' '-')" \
-F "image=ghcr.io/me/runner:latest" \
-F "env.REPO=$REPO")
echo "$DEPLOY" >> deploys.jsonl
done
``
- Step 3: Poll for completion.
``bash
while read d; do
ID=$(echo "$d" | jq -r .id)
curl -s "https://api.instanode.dev/deploy/$ID/logs" \
-H "Authorization: Bearer $INSTANODE_TOKEN" | tail -200
done < deploys.jsonl
``
- Step 4: Tear down each on exit.
``bash
curl -sX DELETE "https://api.instanode.dev/deploy/$ID" \
-H "Authorization: Bearer $INSTANODE_TOKEN"
``
- Step 5: Aggregate exit codes into results.csv for the planner agent to consume.
Why this works on instanode.dev
/deploy/new returns in under a second and the deploy is fully isolated per token — no shared kernel state between tasks. Anonymous-tier deploys auto-expire in 24h, so a forgotten teardown won't leak a runner forever.
Related cases
- E2B microVM sandbox per agent turn — per-turn variant of the same throwaway-container idea
- Daytona warm-pool data workspace — warm-pool alternative when cold-start cost matters
- Terminal-Bench shell sandbox grid — fleet-scale version with 100 parallel sandboxes