{
  "manifest_version": "1",
  "slug": "code-interpreter",
  "title": "Code interpreter",
  "headline": "Run AI-generated code safely",
  "description": "A private code interpreter on exe.dev: a model writes Python, and each conversation's own sandbox VM runs it in a Jupyter kernel and returns charts.",
  "category": "ai-agents",
  "tags": [
    "code interpreter",
    "run ai generated code",
    "llm code execution",
    "e2b alternative",
    "jupyter kernel",
    "python sandbox",
    "tool calling",
    "data analysis",
    "advanced data analysis",
    "openai sdk"
  ],
  "url": "https://exe.dev/deploy/code-interpreter",
  "markdown_url": "https://exe-staging.dev/deploy/code-interpreter.md",
  "upstream": {
    "website": "https://ipython.readthedocs.io",
    "source": "https://github.com/boldsoftware/exe-sdk-python",
    "docs": "https://exe.dev/docs/https-api",
    "license": "MIT (exedev SDK), BSD-3-Clause (IPython)"
  },
  "example_vm_name": "my-code-interpreter",
  "time": "10 minutes",
  "stack": [
    {
      "name": "Code interpreter",
      "detail": "app.py (FastAPI), run by uv as code-interpreter.service; the model through exe.dev's LLM gateway",
      "port": 8000,
      "data": "~/code-interpreter/data"
    },
    {
      "name": "Sandbox VMs",
      "detail": "one per conversation, copied from a base VM, each running an IPython kernel",
      "data": "~/work on each sandbox"
    }
  ],
  "access": [
    {
      "url": "https://my-code-interpreter.exe.xyz/",
      "who": "private",
      "what": "the chat, for you and people you share the VM with"
    }
  ],
  "inputs": [
    {
      "name": "EXE_TOKEN",
      "description": "the exe.dev API key that `ssh exe.dev ssh-key generate-api-key` printed, `exe1....`"
    }
  ],
  "delivers": [
    "The code interpreter at https://my-code-interpreter.exe.xyz/, private behind exe.dev login, as code-interpreter.service, restarted on failure and after a reboot",
    "The exe.dev API key in /etc/code-interpreter.env, mode 600, and on no other VM",
    "`curl -s localhost:8000/api/health` on the VM answers `\"exe\":\"ok\"` and `\"llm\":\"ok\"`",
    "A test question answered by code run in a sandbox VM, and that test conversation and its sandbox deleted"
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe-staging.dev/new?prompt=EXE_TOKEN%3D%3Cfill-this-in%3E%0A%0ASet%20up%20Code%20interpreter%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe-staging.dev%2Fdeploy%2Fcode-interpreter.md%20from%20top%20to%20bottom.%0A%0AThe%20values%20at%20the%20top%20of%20this%20message%20are%20mine%3A%0A-%20EXE_TOKEN%3A%20the%20exe.dev%20API%20key%20that%20%60ssh%20exe.dev%20ssh-key%20generate-api-key%60%20printed%2C%20%60exe1....%60%0AAsk%20me%20for%20any%20that%20still%20say%20%3Cfill-this-in%3E%20before%20you%20need%20them.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-code-interpreter.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-code-interpreter.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20The%20code%20interpreter%20at%20https%3A%2F%2Fmy-code-interpreter.exe.xyz%2F%2C%20private%20behind%20exe.dev%20login%2C%20as%20code-interpreter.service%2C%20restarted%20on%20failure%20and%20after%20a%20reboot%0A-%20The%20exe.dev%20API%20key%20in%20%2Fetc%2Fcode-interpreter.env%2C%20mode%20600%2C%20and%20on%20no%20other%20VM%0A-%20%60curl%20-s%20localhost%3A8000%2Fapi%2Fhealth%60%20on%20the%20VM%20answers%20%60%22exe%22%3A%22ok%22%60%20and%20%60%22llm%22%3A%22ok%22%60%0A-%20A%20test%20question%20answered%20by%20code%20run%20in%20a%20sandbox%20VM%2C%20and%20that%20test%20conversation%20and%20its%20sandbox%20deleted%0A%0ARun%20%22Set%20up%20by%20hand%22%20from%20%22On%20the%20VM%22%2C%20skipping%20VM%20creation%20and%20SSH.%0AEXE_TOKEN%20is%20a%20secret%3A%20put%20it%20only%20in%20%2Fetc%2Fcode-interpreter.env%2C%20and%0Anever%20print%20it.%20If%20the%20health%20check%20shows%20401%20or%20%60invalid%20token%60%2C%20tell%0Athe%20owner%20the%20key%20was%20refused%20and%20how%20to%20make%20one%20%28%22Before%20you%20start%22%29.%0AThen%20run%20%22Check%20it%20from%20the%20VM%22.%20Finish%20by%20pointing%20the%20owner%20to%20%22Ask%0Ait%20something%22.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A",
    "terminal": "curl -fsSL https://exe-staging.dev/deploy/code-interpreter/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "EXE_TOKEN=\u003cfill-this-in\u003e\n\nSet up Code interpreter on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/code-interpreter.md from top to bottom.\n\nThe values at the top of this message are mine:\n- EXE_TOKEN: the exe.dev API key that `ssh exe.dev ssh-key generate-api-key` printed, `exe1....`\nAsk me for any that still say \u003cfill-this-in\u003e before you need them.\n\nThe recipe's example VM name is my-code-interpreter. This VM's name is the output of `hostname`: use it wherever the recipe writes my-code-interpreter. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- The code interpreter at https://my-code-interpreter.exe.xyz/, private behind exe.dev login, as code-interpreter.service, restarted on failure and after a reboot\n- The exe.dev API key in /etc/code-interpreter.env, mode 600, and on no other VM\n- `curl -s localhost:8000/api/health` on the VM answers `\"exe\":\"ok\"` and `\"llm\":\"ok\"`\n- A test question answered by code run in a sandbox VM, and that test conversation and its sandbox deleted\n\nRun \"Set up by hand\" from \"On the VM\", skipping VM creation and SSH.\nEXE_TOKEN is a secret: put it only in /etc/code-interpreter.env, and\nnever print it. If the health check shows 401 or `invalid token`, tell\nthe owner the key was refused and how to make one (\"Before you start\").\nThen run \"Check it from the VM\". Finish by pointing the owner to \"Ask\nit something\".\n\nFinish with the URLs I should open.\n",
    "prompt_url": "https://exe-staging.dev/deploy/code-interpreter/prompt.txt"
  },
  "updated": "2026-10-28",
  "related": [
    "python-sandboxes",
    "typescript-sandboxes",
    "open-webui",
    "claude-managed-agents",
    "agents",
    "claude-code"
  ],
  "alternatives": [
    "E2B",
    "Daytona",
    "Modal",
    "ChatGPT data analysis"
  ],
  "files": [
    "https://exe-staging.dev/deploy/code-interpreter/app.py",
    "https://exe-staging.dev/deploy/code-interpreter/ask.py",
    "https://exe-staging.dev/deploy/code-interpreter/index.html",
    "https://exe-staging.dev/deploy/code-interpreter/sandbox.py"
  ]
}
