Heroku launched code execution sandboxes that allow AI agents to run untrusted code securely in isolated one-off dynos. This approach can reduce token consumption by up to 98% by letting agents write scripts that orchestrate operations instead of forcing all data through the model's context window. The sandboxes are available
Table of contents
How agents improve with code execution toolsIsolation via one-off dynosHow to use the built-in toolsDeploying your own code execution MCP serverSort: