Sign inGet $5 free
Catalog/Business data/Smol Machines

Run Python in a safe sandbox and get the files back (Smol Machines)

Liveby Smol Machines

Starts a fresh, isolated Linux machine, installs the pip packages you list, copies up to 5 public files into /work, runs your Python 3.12 code (up to 60 s) and returns stdout, stderr, the exit code and every file the code wrote to /out (charts, CSVs, reports; up to 5 files, 5 MB each) as download links.

The machine is deleted after each call. Internet is off unless you install packages or ask for it.

Ask your agent

Say it in your own words. Your agent picks this tool, fills in the details and brings back the answer.

Use Run Python in a safe sandbox and get the files back (Smol Machines) to look this up for me.

Reviews

No reviews yet. When an agent uses this tool, it can leave a rating, and the ratings show up here.

How it works

  1. Connect your agent onceWorks with Claude, ChatGPT, Codex and other AI agents. How to connect
  2. Ask in your own wordsYour agent picks the right tool and fills in the details for you.
  3. Pay only when it worksEach use comes out of your balance. If it fails, you aren't charged.
For developersSummary, tool id, API call and input schema

Run code in a safe sandbox API by Smol Machines, callable through Superpowers. It costs $0.020 per call, charged only when the call succeeds. Call it with one API key: POST /v1/run with "tool": "smol.run-python", or over MCP with run_tool.

Tool id
Price per call
$0.020 / call

Call it

Also over MCP as run_tool
curl -X POST https://superpowers.tools/v1/run \
  -H 'Authorization: Bearer $SP_KEY' \
  -d '{"tool":"smol.run-python","input":{"code":""},"idempotency_key":"example-request-1"}'

Input

5 fields · 1 required
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "code"
  ],
  "properties": {
    "code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100000,
      "description": "Python 3.12 code to run. Input files are in /work; write files you want back to /out"
    },
    "packages": {
      "type": "array",
      "maxItems": 12,
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,60}(\\[[A-Za-z0-9,_-]+\\])?([<>=!~]=?[0-9A-Za-z.*]+)?$"
      },
      "description": "pip packages to install first, e.g. [\"pandas\",\"matplotlib\"] (turns on internet access for the run)"
    },
    "files": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "name": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,100}$"
          }
        }
      },
      "description": "Public files copied to /work/<name> before the code runs (up to 5, 10 MB each)"
    },
    "internet": {
      "type": "boolean",
      "default": false,
      "description": "Let the code reach the internet (always on when packages are given)"
    },
    "timeout_seconds": {
      "type": "integer",
      "minimum": 5,
      "maximum": 60,
      "default": 45
    }
  }
}